fix: remove unused imports and variables in CLI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Patrick Erichsen 2026-03-24 13:17:14 -07:00
parent f4a1c693b3
commit 376b35ca55
13 changed files with 9 additions and 22 deletions

View file

@ -1,5 +1,3 @@
import { vi } from "vitest";
import { processRule as processPromptOrRule } from "./hubLoader.js";
describe("processPromptOrRule (rule processing)", () => {

View file

@ -11,8 +11,6 @@ import {
persistModelName,
} from "../util/modelPersistence.js";
import { pathToUri, slugToUri, uriToPath, uriToSlug } from "./uriUtils.js";
// ---------------------------------------------------------------------------
// Types
// ---------------------------------------------------------------------------

View file

@ -1,8 +1,6 @@
import * as fs from "fs";
import * as path from "path";
import { logger } from "../../util/logger.js";
export interface ResolvedReview {
/** Display name for the review */
name: string;

View file

@ -17,7 +17,6 @@ import {
} from "../services/index.js";
import {
AgentFileServiceState,
AuthServiceState,
ConfigServiceState,
ModelServiceState,
} from "../services/types.js";

View file

@ -25,7 +25,7 @@ function getUserAgent(): string {
/**
* Merges user-agent header into request options
*/
function mergeUserAgentIntoRequestOptions(
function _mergeUserAgentIntoRequestOptions(
requestOptions: ModelConfig["requestOptions"],
): ModelConfig["requestOptions"] {
return {

View file

@ -1,6 +1,5 @@
import * as fs from "fs";
import { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import * as path from "path";
import {
@ -18,13 +17,11 @@ import { uriToPath, uriToSlug } from "./auth/uriUtils.js";
import type { AuthConfig } from "./auth/workos.js";
import {
getAccessToken,
getConfigUri,
getOrganizationId,
updateConfigUri,
} from "./auth/workos.js";
import { CLIPlatformClient } from "./CLIPlatformClient.js";
import { env } from "./env.js";
import { logger } from "./util/logger.js";
export interface ConfigLoadResult {
config: AssistantUnrolled;
@ -87,7 +84,7 @@ export async function loadConfiguration(
function determineConfigSource(
authConfig: AuthConfig,
cliConfigPath: string | undefined,
isHeadless: boolean | undefined,
_isHeadless: boolean | undefined,
): ConfigSource {
// Priority 1: CLI --config flag
if (cliConfigPath) {

View file

@ -1,4 +1,3 @@
import { loadAuthConfig } from "../auth/workos.js";
import { logger } from "../util/logger.js";
import { BaseService } from "./BaseService.js";

View file

@ -13,7 +13,6 @@ import historyManager from "core/util/history.js";
import { v4 as uuidv4 } from "uuid";
import { DEFAULT_SESSION_TITLE } from "./constants/session.js";
import { env } from "./env.js";
import { logger } from "./util/logger.js";
// Re-export BaseSessionMetadata for external consumers

View file

@ -4,7 +4,6 @@ import chalk from "chalk";
import { getAllSlashCommands } from "./commands/commands.js";
import { handleInit } from "./commands/init.js";
import { handleInfoSlashCommand } from "./infoScreen.js";
import { reloadService, SERVICE_NAMES, services } from "./services/index.js";
import { getCurrentSession, updateSessionTitle } from "./session.js";
import { telemetryService } from "./telemetry/telemetryService.js";
import { SlashCommandResult } from "./ui/hooks/useChat.types.js";

View file

@ -50,7 +50,7 @@ const SlashCommandsMaybe: React.FC<{
show,
inputMode,
hideNormalUI,
isRemoteMode,
isRemoteMode: _isRemoteMode,
assistant,
filter,
selectedIndex,

View file

@ -28,10 +28,10 @@ export const BottomStatusBar: React.FC<BottomStatusBarProps> = ({
currentMode,
remoteUrl,
isRemoteMode,
services,
navState,
navigateTo,
closeCurrentScreen,
services: _services,
navState: _navState,
navigateTo: _navigateTo,
closeCurrentScreen: _closeCurrentScreen,
contextPercentage,
hasImageInClipboard,
isVerboseMode,

View file

@ -73,7 +73,7 @@ export const ScreenContent: React.FC<ScreenContentProps> = ({
handleConfigSelect,
handleModelSelect,
handleSessionSelect,
handleReload,
handleReload: _handleReload,
closeCurrentScreen,
activePermissionRequest,
activeQuizQuestion,

View file

@ -226,7 +226,7 @@ export async function formatMessageWithFiles(
/**
* Track telemetry for user message
*/
export function trackUserMessage(message: string, model?: any): void {
export function trackUserMessage(message: string, _model?: any): void {
telemetryService.startActiveTime();
telemetryService.logUserPrompt(message.length, message);
}