diff --git a/src/components/PromptInput/Notifications.tsx b/src/components/PromptInput/Notifications.tsx index 836c122e9..65464dcf9 100644 --- a/src/components/PromptInput/Notifications.tsx +++ b/src/components/PromptInput/Notifications.tsx @@ -24,7 +24,6 @@ import { setEnvHookNotifier } from '../../utils/hooks/fileChangedWatcher.js'; import { toIDEDisplayName } from '../../utils/ide.js'; import { getMessagesAfterCompactBoundary } from '../../utils/messages.js'; import { tokenCountFromLastAPIResponse } from '../../utils/tokens.js'; -import { AutoUpdaterWrapper } from '../AutoUpdaterWrapper.js'; import { ConfigurableShortcutHint } from '../ConfigurableShortcutHint.js'; import { IdeStatusIndicator } from '../IdeStatusIndicator.js'; import { MemoryUsageIndicator } from '../MemoryUsageIndicator.js'; @@ -57,13 +56,13 @@ type Props = { export function Notifications({ apiKeyStatus, - autoUpdaterResult, + autoUpdaterResult: _autoUpdaterResult, debug, - isAutoUpdating, + isAutoUpdating: _isAutoUpdating, verbose, messages, - onAutoUpdaterResult, - onChangeIsUpdating, + onAutoUpdaterResult: _onAutoUpdaterResult, + onChangeIsUpdating: _onChangeIsUpdating, ideSelection, mcpClients, isInputWrapped = false, @@ -102,9 +101,6 @@ export function Notifications({ const shouldShowIdeSelection = ideStatus === 'connected' && (ideSelection?.filePath || (ideSelection?.text && ideSelection.lineCount > 0)); - // Hide update installed message when showing IDE selection - const shouldShowAutoUpdater = !shouldShowIdeSelection || isAutoUpdating || autoUpdaterResult?.status !== 'success'; - // Check if we're in overage mode for UI indicators const isInOverageMode = claudeAiLimits.isUsingOverage; const subscriptionType = getSubscriptionType(); @@ -157,12 +153,6 @@ export function Notifications({ verbose={verbose} tokenUsage={tokenUsage} mainLoopModel={mainLoopModel} - shouldShowAutoUpdater={shouldShowAutoUpdater} - autoUpdaterResult={autoUpdaterResult} - isAutoUpdating={isAutoUpdating} - isShowingCompactMessage={isShowingCompactMessage} - onAutoUpdaterResult={onAutoUpdaterResult} - onChangeIsUpdating={onChangeIsUpdating} /> @@ -180,12 +170,6 @@ function NotificationContent({ verbose, tokenUsage, mainLoopModel, - shouldShowAutoUpdater, - autoUpdaterResult, - isAutoUpdating, - isShowingCompactMessage, - onAutoUpdaterResult, - onChangeIsUpdating, }: { ideSelection: IDESelection | undefined; mcpClients?: MCPServerConnection[]; @@ -200,12 +184,6 @@ function NotificationContent({ verbose: boolean; tokenUsage: number; mainLoopModel: string; - shouldShowAutoUpdater: boolean; - autoUpdaterResult: AutoUpdaterResult | null; - isAutoUpdating: boolean; - isShowingCompactMessage: boolean; - onAutoUpdaterResult: (result: AutoUpdaterResult) => void; - onChangeIsUpdating: (isUpdating: boolean) => void; }): ReactNode { // Poll apiKeyHelper inflight state to show slow-helper notice. // Gated on configuration — most users never set apiKeyHelper, so the diff --git a/src/utils/attachments.ts b/src/utils/attachments.ts index 4e20f648c..d53c16382 100644 --- a/src/utils/attachments.ts +++ b/src/utils/attachments.ts @@ -69,6 +69,7 @@ import type { } from '@anthropic-ai/sdk/resources/messages.mjs' import { maybeResizeAndDownsampleImageBlock } from './imageResizer.js' import type { PastedContent } from './config.js' +import { getSettings_DEPRECATED } from './settings/settings.js' import { getDefaultSonnetModel, getDefaultHaikuModel, diff --git a/src/utils/computerUse/gates.ts b/src/utils/computerUse/gates.ts index b18af2a4a..64c7f831a 100644 --- a/src/utils/computerUse/gates.ts +++ b/src/utils/computerUse/gates.ts @@ -1,7 +1,6 @@ import type { CoordinateMode, CuSubGates } from '@ant/computer-use-mcp/types' import { getDynamicConfig_CACHED_MAY_BE_STALE } from '../../services/analytics/growthbook.js' -import { getSubscriptionType } from '../auth.js' import { isEnvTruthy } from '../envUtils.js' type ChicagoConfig = CuSubGates & { diff --git a/src/utils/computerUse/win32/inputIndicator.ts b/src/utils/computerUse/win32/inputIndicator.ts index 0a6f6da0c..42450d2b7 100644 --- a/src/utils/computerUse/win32/inputIndicator.ts +++ b/src/utils/computerUse/win32/inputIndicator.ts @@ -22,7 +22,6 @@ const INDICATOR_HEIGHT = 28 const FADE_AFTER_MS = 2000 const BG_COLOR = '30, 30, 30' // dark background const TEXT_COLOR = '220, 220, 220' // light text -const ACCENT_COLOR = '80, 200, 80' // green accent for active let indicatorProc: ReturnType | null = null let stopFile: string | null = null diff --git a/src/utils/computerUse/win32/windowMessage.ts b/src/utils/computerUse/win32/windowMessage.ts index 5b904e1ba..b3eeff038 100644 --- a/src/utils/computerUse/win32/windowMessage.ts +++ b/src/utils/computerUse/win32/windowMessage.ts @@ -12,9 +12,6 @@ import { validateHwnd, runPs, VK_MAP, MODIFIER_KEYS } from './shared.js' -/** Character count above which we switch to clipboard paste */ -const CLIPBOARD_THRESHOLD = 32 - /** Cache findEditChild results — window structure doesn't change while bound */ const editChildCache = new Map() @@ -275,46 +272,6 @@ function buildWmCharLines(hwnd: string, text: string): string[] { return lines } -/** - * Paste text via clipboard into the target window. - * Uses Clipboard.SetText() + SendMessageW(Ctrl+V). - * NO global APIs (SendInput/keybd_event/SendKeys) — only window-targeted messages. - */ -function pasteViaClipboard(hwnd: string, text: string): boolean { - // Escape single quotes for PowerShell string literal - const escaped = text.replace(/'/g, "''") - const hwndExpr = `[IntPtr]::new([long]${hwnd})` - const script = `${WINMSG_TYPE} -Add-Type -AssemblyName System.Windows.Forms - -# Save current clipboard -$saved = $null -try { $saved = [System.Windows.Forms.Clipboard]::GetText() } catch {} - -# Set our text -[System.Windows.Forms.Clipboard]::SetText('${escaped}') - -# Ctrl+V via PostMessage to the target window (NOT global keybd_event) -# Must use PostMessage + correct lParam (scan code) for Windows Terminal / ConPTY -[WinMsg]::PostMessage(${hwndExpr}, [WinMsg]::WM_KEYDOWN, [IntPtr]0x11, [WinMsg]::KeyDownLParam(0x11)) # Ctrl down -[WinMsg]::PostMessage(${hwndExpr}, [WinMsg]::WM_KEYDOWN, [IntPtr]0x56, [WinMsg]::KeyDownLParam(0x56)) # V down -[WinMsg]::PostMessage(${hwndExpr}, [WinMsg]::WM_KEYUP, [IntPtr]0x56, [WinMsg]::KeyUpLParam(0x56)) # V up -[WinMsg]::PostMessage(${hwndExpr}, [WinMsg]::WM_KEYUP, [IntPtr]0x11, [WinMsg]::KeyUpLParam(0x11)) # Ctrl up - -# Brief wait for paste to complete -Start-Sleep -Milliseconds 50 - -# Restore clipboard -if ($saved -ne $null -and $saved -ne '') { - try { [System.Windows.Forms.Clipboard]::SetText($saved) } catch {} -} else { - try { [System.Windows.Forms.Clipboard]::Clear() } catch {} -} -Write-Output 'OK' -` - return runPs(script) === 'OK' -} - /** * Send text to a window via WM_CHAR per Unicode codepoint. * Always uses the WM_CHAR path — reliable across all window types including diff --git a/src/utils/lanBeacon.ts b/src/utils/lanBeacon.ts index b54adab33..e938611cc 100644 --- a/src/utils/lanBeacon.ts +++ b/src/utils/lanBeacon.ts @@ -87,7 +87,7 @@ export class LanBeacon extends EventEmitter { // Non-fatal — multicast may not be supported on this network }) - this.socket.on('message', (buf, rinfo) => { + this.socket.on('message', (buf, _rinfo) => { try { const msg = JSON.parse(buf.toString()) as LanAnnounce if (msg.proto !== 'claude-pipe-v1') return diff --git a/src/utils/messages.ts b/src/utils/messages.ts index 494d9f464..6d628f895 100644 --- a/src/utils/messages.ts +++ b/src/utils/messages.ts @@ -1431,7 +1431,7 @@ export function updateMessageLookupsIncremental( const msg = messages[i]! if (msg.type === 'assistant') { const aMsg = msg as AssistantMessage - const id = aMsg.message.id! + const _id = aMsg.message.id! if (Array.isArray(aMsg.message.content)) { const newToolUseIDs: string[] = [] for (const content of aMsg.message.content) { diff --git a/src/utils/model/modelOptions.ts b/src/utils/model/modelOptions.ts index 754963955..7e9bb5f11 100644 --- a/src/utils/model/modelOptions.ts +++ b/src/utils/model/modelOptions.ts @@ -158,15 +158,6 @@ function getCustomOpusOption(): ModelOption | undefined { } } -function getOpus41Option(): ModelOption { - return { - value: 'opus', - label: 'Opus 4.1', - description: `Opus 4.1 · Legacy`, - descriptionForModel: 'Opus 4.1 - legacy version', - } -} - function getOpus47Option(fastMode = false): ModelOption { const is3P = getAPIProvider() !== 'firstParty' return { diff --git a/src/utils/permissions/PermissionMode.ts b/src/utils/permissions/PermissionMode.ts index ac02d9bbf..4294391eb 100644 --- a/src/utils/permissions/PermissionMode.ts +++ b/src/utils/permissions/PermissionMode.ts @@ -1,4 +1,3 @@ -import { feature } from 'bun:bundle' import z from 'zod/v4' import { PAUSE_ICON } from '../../constants/figures.js' // Types extracted to src/types/permissions.ts to break import cycles diff --git a/src/utils/permissions/bypassPermissionsKillswitch.ts b/src/utils/permissions/bypassPermissionsKillswitch.ts index 393f0e10a..533e840f2 100644 --- a/src/utils/permissions/bypassPermissionsKillswitch.ts +++ b/src/utils/permissions/bypassPermissionsKillswitch.ts @@ -1,6 +1,5 @@ import { feature } from 'bun:bundle' import { useEffect, useRef } from 'react' -import { useNotifications } from 'src/context/notifications.js' import { toError } from '../../utils/errors.js' import { logError } from '../../utils/log.js' import { getIsRemoteMode } from '../../bootstrap/state.js' diff --git a/src/utils/permissions/getNextPermissionMode.ts b/src/utils/permissions/getNextPermissionMode.ts index 67a077d8a..7352edf6c 100644 --- a/src/utils/permissions/getNextPermissionMode.ts +++ b/src/utils/permissions/getNextPermissionMode.ts @@ -1,5 +1,4 @@ import type { ToolPermissionContext } from '../../Tool.js' -import { logForDebugging } from '../debug.js' import type { PermissionMode } from './PermissionMode.js' import { transitionPermissionMode } from './permissionSetup.js' diff --git a/src/utils/permissions/permissionSetup.ts b/src/utils/permissions/permissionSetup.ts index 711107745..4242dfc13 100644 --- a/src/utils/permissions/permissionSetup.ts +++ b/src/utils/permissions/permissionSetup.ts @@ -874,7 +874,7 @@ export async function initializeToolPermissionContext({ disallowedToolsCli, baseToolsCli, permissionMode, - allowDangerouslySkipPermissions, + allowDangerouslySkipPermissions: _allowDangerouslySkipPermissions, addDirs, }: { allowedToolsCli: string[] diff --git a/src/utils/pipeRegistry.ts b/src/utils/pipeRegistry.ts index 8e5554f8f..da2b07a5f 100644 --- a/src/utils/pipeRegistry.ts +++ b/src/utils/pipeRegistry.ts @@ -11,7 +11,6 @@ import { readFile, writeFile, unlink, mkdir } from 'fs/promises' import { join } from 'path' import { createHash } from 'crypto' -import { getClaudeConfigHomeDir } from './envUtils.js' import { isPipeAlive, getPipesDir } from './pipeTransport.js' import type { TcpEndpoint } from './pipeTransport.js' import type { LanAnnounce } from './lanBeacon.js' diff --git a/src/utils/promptEditor.ts b/src/utils/promptEditor.ts index fa23b2818..685ddcaff 100644 --- a/src/utils/promptEditor.ts +++ b/src/utils/promptEditor.ts @@ -106,7 +106,7 @@ export function editFileInEditor(filePath: string): EditorResult { */ function recollapsePastedContent( editedPrompt: string, - originalPrompt: string, + _originalPrompt: string, pastedContents: Record, ): string { let collapsed = editedPrompt diff --git a/src/utils/queryHelpers.ts b/src/utils/queryHelpers.ts index 8f8679778..94dbb7404 100644 --- a/src/utils/queryHelpers.ts +++ b/src/utils/queryHelpers.ts @@ -1,5 +1,4 @@ import type { ToolUseBlock } from '@anthropic-ai/sdk/resources/index.mjs' -import last from 'lodash-es/last.js' import { getSessionId, isSessionPersistenceDisabled, diff --git a/src/utils/sentry.ts b/src/utils/sentry.ts index 63d1359d7..83e85f3af 100644 --- a/src/utils/sentry.ts +++ b/src/utils/sentry.ts @@ -76,7 +76,7 @@ export function initSentry(): void { 'CancelError', ], - beforeSendTransaction(event) { + beforeSendTransaction(_event) { // Don't send performance transactions for now — errors only return null }, diff --git a/src/utils/settings/types.ts b/src/utils/settings/types.ts index 974a27be0..36a5a5519 100644 --- a/src/utils/settings/types.ts +++ b/src/utils/settings/types.ts @@ -3,10 +3,7 @@ import { z } from 'zod/v4' import { SandboxSettingsSchema } from '../../entrypoints/sandboxTypes.js' import { isEnvTruthy } from '../envUtils.js' import { lazySchema } from '../lazySchema.js' -import { - EXTERNAL_PERMISSION_MODES, - PERMISSION_MODES, -} from '../permissions/PermissionMode.js' +import { PERMISSION_MODES } from '../permissions/PermissionMode.js' import { MarketplaceSourceSchema } from '../plugins/schemas.js' import { CLAUDE_CODE_SETTINGS_SCHEMA_URL } from './constants.js' import { PermissionRuleSchema } from './permissionValidation.js' diff --git a/src/utils/toolPool.ts b/src/utils/toolPool.ts index b756d9153..5021980c8 100644 --- a/src/utils/toolPool.ts +++ b/src/utils/toolPool.ts @@ -55,7 +55,7 @@ export function applyCoordinatorToolFilter(tools: Tools): Tools { export function mergeAndFilterTools( initialTools: Tools, assembled: Tools, - mode: ToolPermissionContext['mode'], + _mode: ToolPermissionContext['mode'], ): Tools { // Merge initialTools on top - they take precedence in deduplication. // initialTools may include built-in tools (from getTools() in REPL.tsx) which