diff --git a/packages/frontend/src/components/CommandInputBar.vue b/packages/frontend/src/components/CommandInputBar.vue index 962bf28..aab1960 100644 --- a/packages/frontend/src/components/CommandInputBar.vue +++ b/packages/frontend/src/components/CommandInputBar.vue @@ -447,7 +447,6 @@ const handleQuickCommandExecute = (command: string) => { v-if="showPopupFileManagerBoolean" @click="openFileManagerModal" class="flex-shrink-0 flex items-center justify-center w-8 h-8 border border-border/50 rounded-lg text-text-secondary transition-colors duration-200 hover:bg-border hover:text-foreground" - :title="t('fileManager.title', '文件管理器')" > @@ -456,7 +455,6 @@ const handleQuickCommandExecute = (command: string) => { v-if="showPopupFileEditorBoolean" @click="openFileEditorModal" class="flex-shrink-0 flex items-center justify-center w-8 h-8 border border-border/50 rounded-lg text-text-secondary transition-colors duration-200 hover:bg-border hover:text-foreground" - :title="t('fileEditor.title', '文件编辑器')" > diff --git a/packages/frontend/src/components/Terminal.vue b/packages/frontend/src/components/Terminal.vue index c8d9315..0b31057 100644 --- a/packages/frontend/src/components/Terminal.vue +++ b/packages/frontend/src/components/Terminal.vue @@ -148,14 +148,12 @@ const handleContextMenuPaste = async (event: MouseEvent) => { const addContextMenuListener = () => { if (terminalRef.value) { terminalRef.value.addEventListener('contextmenu', handleContextMenuPaste); - console.log(`[Terminal ${props.sessionId}] Right-click paste listener added.`); } }; const removeContextMenuListener = () => { if (terminalRef.value) { terminalRef.value.removeEventListener('contextmenu', handleContextMenuPaste); - console.log(`[Terminal ${props.sessionId}] Right-click paste listener removed.`); } }; // --- 右键粘贴功能结束 --- @@ -245,7 +243,6 @@ onMounted(() => { setTimeout(() => { // Re-check if still active and terminal exists if (props.isActive && terminal && terminalRef.value && terminalRef.value.offsetHeight > 0) { - console.log(`[Terminal ${props.sessionId}] Executing delayed fit and resize.`); fitAndEmitResizeNow(terminal); // Also ensure focus when becoming active terminal.focus(); diff --git a/packages/frontend/src/composables/useSshTerminal.ts b/packages/frontend/src/composables/useSshTerminal.ts index 2580fd1..15e3ff0 100644 --- a/packages/frontend/src/composables/useSshTerminal.ts +++ b/packages/frontend/src/composables/useSshTerminal.ts @@ -90,7 +90,6 @@ export function createSshTerminalManager(sessionId: string, wsDeps: SshTerminalD console.log(`[SSH ${sessionId}] handleTerminalResize called with:`, dimensions); // 只有在连接状态下才发送 resize 命令给后端 if (isConnected.value) { - console.log(`[SSH ${sessionId}] Sending ssh:resize to backend:`, dimensions); sendMessage({ type: 'ssh:resize', sessionId, payload: dimensions }); } else { console.log(`[SSH ${sessionId}] WebSocket not connected, skipping ssh:resize.`); diff --git a/packages/frontend/src/stores/appearance.store.ts b/packages/frontend/src/stores/appearance.store.ts index 6225c18..5e2ead3 100644 --- a/packages/frontend/src/stores/appearance.store.ts +++ b/packages/frontend/src/stores/appearance.store.ts @@ -101,13 +101,6 @@ export const useAppearanceStore = defineStore('appearance', () => { ]); appearanceSettings.value = settingsResponse.data; allTerminalThemes.value = themesResponse.data; // 更新 allTerminalThemes - console.log('[AppearanceStore LOG] 外观设置已加载 (原始数据):', JSON.stringify(settingsResponse.data)); // 添加原始数据日志 - console.log(`[AppearanceStore LOG] 从后端加载的 terminalBackgroundEnabled 原始值: ${settingsResponse.data.terminalBackgroundEnabled}`); // 专门记录该值 - console.log('[AppearanceStore] 所有终端主题列表已加载:', allTerminalThemes.value); - - // --- 后端返回的 activeTerminalThemeId 已经是 number | null --- - // 前端不再需要设置默认主题 ID 的逻辑,后端初始化时会保证它不为 NULL - // 如果后端返回 null (理论上不应发生,除非初始化失败),则 currentTerminalTheme 计算属性会回退到 defaultXtermTheme // 应用加载的 UI 主题 applyUiTheme(currentUiTheme.value); @@ -486,7 +479,6 @@ export const useAppearanceStore = defineStore('appearance', () => { for (const [key, value] of Object.entries(theme)) { root.style.setProperty(key, value); } - console.log('[AppearanceStore] UI 主题已应用:', theme); } /** diff --git a/packages/frontend/src/stores/commandHistory.store.ts b/packages/frontend/src/stores/commandHistory.store.ts index 8b88e41..397fbc0 100644 --- a/packages/frontend/src/stores/commandHistory.store.ts +++ b/packages/frontend/src/stores/commandHistory.store.ts @@ -67,7 +67,6 @@ export const useCommandHistoryStore = defineStore('commandHistory', () => { try { const cachedData = localStorage.getItem(cacheKey); if (cachedData) { - console.log('[CmdHistoryStore] Loading history from cache.'); historyList.value = JSON.parse(cachedData); // 缓存中已是降序 isLoading.value = false; // 先显示缓存 } else { diff --git a/packages/frontend/src/stores/quickCommandTags.store.ts b/packages/frontend/src/stores/quickCommandTags.store.ts index a869afb..61ce5f7 100644 --- a/packages/frontend/src/stores/quickCommandTags.store.ts +++ b/packages/frontend/src/stores/quickCommandTags.store.ts @@ -26,7 +26,6 @@ export const useQuickCommandTagsStore = defineStore('quickCommandTags', () => { try { const cachedData = localStorage.getItem(cacheKey); if (cachedData) { - console.log('[QuickCmdTagStore] Loading quick command tags from cache.'); tags.value = JSON.parse(cachedData); isLoading.value = false; } else { @@ -41,7 +40,6 @@ export const useQuickCommandTagsStore = defineStore('quickCommandTags', () => { // 2. 后台获取最新数据 isLoading.value = true; try { - console.log('[QuickCmdTagStore] Fetching latest quick command tags from server...'); // 使用新的 API 端点 const response = await apiClient.get('/quick-command-tags'); const freshData = response.data; @@ -50,11 +48,9 @@ export const useQuickCommandTagsStore = defineStore('quickCommandTags', () => { // 3. 对比并更新 const currentDataString = JSON.stringify(tags.value); if (currentDataString !== freshDataString) { - console.log('[QuickCmdTagStore] Tags data changed, updating state and cache.'); tags.value = freshData; localStorage.setItem(cacheKey, freshDataString); } else { - console.log('[QuickCmdTagStore] Tags data is up-to-date.'); } error.value = null; return true; diff --git a/packages/frontend/src/stores/quickCommands.store.ts b/packages/frontend/src/stores/quickCommands.store.ts index 44a5524..e14b6fc 100644 --- a/packages/frontend/src/stores/quickCommands.store.ts +++ b/packages/frontend/src/stores/quickCommands.store.ts @@ -250,7 +250,6 @@ export const useQuickCommandsStore = defineStore('quickCommands', () => { try { const cachedData = localStorage.getItem(cacheKey); if (cachedData) { - console.log(`[QuickCmdStore] Loading commands from cache.`); // 确保解析后的数据符合 QuickCommandFE 结构 (特别是 tagIds) const parsedData = JSON.parse(cachedData) as QuickCommandFE[]; // 基本验证,确保 tagIds 是数组 @@ -291,7 +290,6 @@ export const useQuickCommandsStore = defineStore('quickCommands', () => { quickCommandsList.value = freshData; localStorage.setItem(cacheKey, freshDataString); // 更新缓存 } else { - console.log('[QuickCmdStore] Commands data is up-to-date.'); } error.value = null; } catch (err: any) { diff --git a/packages/frontend/src/stores/settings.store.ts b/packages/frontend/src/stores/settings.store.ts index 345dfd5..ebc7007 100644 --- a/packages/frontend/src/stores/settings.store.ts +++ b/packages/frontend/src/stores/settings.store.ts @@ -208,7 +208,6 @@ export const useSettingsStore = defineStore('settings', () => { try { if (settings.value.fileManagerColWidths) { loadedFmWidths = JSON.parse(settings.value.fileManagerColWidths); - console.log(`[SettingsStore] Successfully parsed fileManagerColWidths JSON: ${JSON.stringify(loadedFmWidths)}`); if (typeof loadedFmWidths !== 'object' || loadedFmWidths === null) { console.warn('[SettingsStore] Invalid fileManagerColWidths format loaded, resetting.'); loadedFmWidths = {}; diff --git a/packages/frontend/src/stores/tags.store.ts b/packages/frontend/src/stores/tags.store.ts index c8fbc23..8717ebc 100644 --- a/packages/frontend/src/stores/tags.store.ts +++ b/packages/frontend/src/stores/tags.store.ts @@ -24,7 +24,6 @@ export const useTagsStore = defineStore('tags', () => { try { const cachedData = localStorage.getItem(cacheKey); if (cachedData) { - console.log('[TagsStore] Loading tags from cache.'); tags.value = JSON.parse(cachedData); isLoading.value = false; // 先显示缓存 } else { @@ -39,7 +38,6 @@ export const useTagsStore = defineStore('tags', () => { // 2. 后台获取最新数据 isLoading.value = true; // 标记正在后台获取 try { - console.log('[TagsStore] Fetching latest tags from server...'); const response = await apiClient.get('/tags'); const freshData = response.data; const freshDataString = JSON.stringify(freshData); @@ -47,7 +45,6 @@ export const useTagsStore = defineStore('tags', () => { // 3. 对比并更新 const currentDataString = JSON.stringify(tags.value); if (currentDataString !== freshDataString) { - console.log('[TagsStore] Tags data changed, updating state and cache.'); tags.value = freshData; localStorage.setItem(cacheKey, freshDataString); // 更新缓存 } else { diff --git a/packages/frontend/src/views/WorkspaceView.vue b/packages/frontend/src/views/WorkspaceView.vue index b37b42a..d43af78 100644 --- a/packages/frontend/src/views/WorkspaceView.vue +++ b/packages/frontend/src/views/WorkspaceView.vue @@ -325,7 +325,6 @@ const unsubscribeFromWorkspaceEvents = useWorkspaceEventOff(); // 处理终端大小调整 (用于 Terminal) // 注意:LayoutRenderer 内部的 Terminal 组件需要 emit('terminal-resize', sessionId, dims) const handleTerminalResize = (payload: { sessionId: string; dims: { cols: number; rows: number } }) => { - console.log(`[工作区视图 ${payload.sessionId}] 收到 resize 事件:`, payload.dims); sessionStore.sessions.get(payload.sessionId)?.terminalManager.handleTerminalResize(payload.dims); }; @@ -803,7 +802,7 @@ const closeFileManagerModal = () => {
-

{{ t('fileManager.modalTitle', '文件管理器') }} ({{ currentFileManagerSessionId }})

+

{{ t('fileManager.modalTitle', '文件管理器') }} ({{ currentFileManagerSessionId ? (sessionStore.sessions.get(currentFileManagerSessionId)?.connectionName || currentFileManagerSessionId) : '未知会话' }})