From b7a1a249a4d609634e1c3bf9fd158ad7e51edade Mon Sep 17 00:00:00 2001 From: Flik Date: Fri, 6 Mar 2026 22:42:05 +0800 Subject: [PATCH] fix(web): resolve TypeScript errors in ClientView - Remove unused imports (ImageOutline, TerminalOutline, ShellResult) - Add null coalescing for array access in shell history Co-Authored-By: Claude Opus 4.6 --- web/src/views/ClientView.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/src/views/ClientView.vue b/web/src/views/ClientView.vue index 20932e7..61eed88 100644 --- a/web/src/views/ClientView.vue +++ b/web/src/views/ClientView.vue @@ -5,7 +5,7 @@ import { ArrowBackOutline, CreateOutline, TrashOutline, PushOutline, AddOutline, StorefrontOutline, ExtensionPuzzleOutline, SettingsOutline, RefreshOutline, - ImageOutline, TerminalOutline, PlayOutline + PlayOutline } from '@vicons/ionicons5' import GlassModal from '../components/GlassModal.vue' import GlassTag from '../components/GlassTag.vue' @@ -18,7 +18,7 @@ import { getStorePlugins, installStorePlugin, getRuleSchemas, startClientPlugin, restartClientPlugin, stopClientPlugin, deleteClientPlugin, checkClientUpdate, applyClientUpdate, getClientSystemStats, getVersionInfo, getClientScreenshot, executeClientShell, - type UpdateInfo, type SystemStats, type ScreenshotData, type ShellResult + type UpdateInfo, type SystemStats, type ScreenshotData } from '../api' import type { ProxyRule, ClientPlugin, ConfigField, StorePluginInfo, RuleSchemasMap } from '../types' import InlineLogPanel from '../components/InlineLogPanel.vue' @@ -286,16 +286,16 @@ const executeShell = async () => { const handleShellHistory = (direction: 'up' | 'down') => { if (shellHistory.value.length === 0) return - + if (direction === 'up') { if (historyIndex.value < shellHistory.value.length - 1) { historyIndex.value++ - shellCommand.value = shellHistory.value[historyIndex.value] + shellCommand.value = shellHistory.value[historyIndex.value] || '' } } else { if (historyIndex.value > 0) { historyIndex.value-- - shellCommand.value = shellHistory.value[historyIndex.value] + shellCommand.value = shellHistory.value[historyIndex.value] || '' } else if (historyIndex.value === 0) { historyIndex.value = -1 shellCommand.value = ''