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:
parent
f4a1c693b3
commit
376b35ca55
13 changed files with 9 additions and 22 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import { vi } from "vitest";
|
||||
|
||||
import { processRule as processPromptOrRule } from "./hubLoader.js";
|
||||
|
||||
describe("processPromptOrRule (rule processing)", () => {
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ import {
|
|||
persistModelName,
|
||||
} from "../util/modelPersistence.js";
|
||||
|
||||
import { pathToUri, slugToUri, uriToPath, uriToSlug } from "./uriUtils.js";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Types
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import {
|
|||
} from "../services/index.js";
|
||||
import {
|
||||
AgentFileServiceState,
|
||||
AuthServiceState,
|
||||
ConfigServiceState,
|
||||
ModelServiceState,
|
||||
} from "../services/types.js";
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ function getUserAgent(): string {
|
|||
/**
|
||||
* Merges user-agent header into request options
|
||||
*/
|
||||
function mergeUserAgentIntoRequestOptions(
|
||||
function _mergeUserAgentIntoRequestOptions(
|
||||
requestOptions: ModelConfig["requestOptions"],
|
||||
): ModelConfig["requestOptions"] {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { loadAuthConfig } from "../auth/workos.js";
|
||||
import { logger } from "../util/logger.js";
|
||||
|
||||
import { BaseService } from "./BaseService.js";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ const SlashCommandsMaybe: React.FC<{
|
|||
show,
|
||||
inputMode,
|
||||
hideNormalUI,
|
||||
isRemoteMode,
|
||||
isRemoteMode: _isRemoteMode,
|
||||
assistant,
|
||||
filter,
|
||||
selectedIndex,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ export const ScreenContent: React.FC<ScreenContentProps> = ({
|
|||
handleConfigSelect,
|
||||
handleModelSelect,
|
||||
handleSessionSelect,
|
||||
handleReload,
|
||||
handleReload: _handleReload,
|
||||
closeCurrentScreen,
|
||||
activePermissionRequest,
|
||||
activeQuizQuestion,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue