mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-13 02:41:50 +08:00
feat: i18n for CLI history view; fix Claude session discovery path encoding
## Changes ### i18n 中文化 (i18n.js, cli-history.js) - 添加 60+ 个翻译键用于 CLI 执行历史和对话详情 - 将 cli-history.js 中的硬编码英文字符串替换为 t() 函数调用 - 覆盖范围: 执行历史、对话详情、状态、工具标签、按钮、提示等 ### 修复 Claude 会话追踪 (native-session-discovery.ts) - 问题: Claude 使用路径编码存储会话 (D:\path -> D--path),但代码使用 SHA256 哈希导致无法发现 - 解决方案: - 添加 encodeClaudeProjectPath() 函数用于路径编码 - 更新 ClaudeSessionDiscoverer.getSessions() 使用路径编码 - 增强 extractFirstUserMessage() 支持多种消息格式 (string/array) - 结果: Claude 会话现可正确关联,UI 按钮 "查看完整过程对话" 应可正常显示 ## 验证 - npm run build 通过 ✅ - Claude 会话发现 1267 个会话 ✅ - 消息提取成功率 80% ✅ - 路径编码验证正确 ✅
This commit is contained in:
@@ -289,6 +289,65 @@ const i18n = {
|
||||
'cli.fileBrowserApiError': 'Server restart required to enable file browser',
|
||||
'cli.fileBrowserManualHint': 'Type the full path above and click Select (e.g., C:\\Users\\name\\.gemini)',
|
||||
|
||||
// CLI History & Execution
|
||||
'cli.executionHistory': 'Execution History',
|
||||
'cli.conversationDetail': 'Conversation Detail',
|
||||
'cli.nativeSessionDetail': 'Native Session Detail',
|
||||
'cli.viewFullConversation': 'View Full Process Conversation',
|
||||
'cli.perTurnView': 'Per-Turn View',
|
||||
'cli.concatenatedView': 'Concatenated View',
|
||||
'cli.userPrompt': 'User Prompt',
|
||||
'cli.assistantResponse': 'Assistant Response',
|
||||
'cli.user': 'User',
|
||||
'cli.assistant': 'Assistant',
|
||||
'cli.latest': 'Latest',
|
||||
'cli.turn': 'Turn',
|
||||
'cli.thinkingProcess': 'Thinking Process',
|
||||
'cli.thoughts': 'thoughts',
|
||||
'cli.toolCalls': 'Tool Calls',
|
||||
'cli.totalTokens': 'Total Tokens',
|
||||
'cli.input': 'Input',
|
||||
'cli.output': 'Output',
|
||||
'cli.cached': 'Cached',
|
||||
'cli.concatenatedPrompt': 'Concatenated Prompt (sent to CLI)',
|
||||
'cli.sessionId': 'Session ID',
|
||||
|
||||
// CLI History Actions & Buttons
|
||||
'cli.refresh': 'Refresh',
|
||||
'cli.copyId': 'Copy ID',
|
||||
'cli.copyFullPrompt': 'Copy Full Prompt',
|
||||
'cli.delete': 'Delete',
|
||||
'cli.exportJson': 'Export JSON',
|
||||
'cli.copyFilePath': 'Copy File Path',
|
||||
'cli.copySessionId': 'Copy Session ID',
|
||||
'cli.viewNativeSession': 'View Native Session',
|
||||
'cli.viewDetails': 'View Details',
|
||||
'cli.searchHistory': 'Search history...',
|
||||
'cli.allTools': 'All Tools',
|
||||
'cli.noExecutions': 'No executions yet',
|
||||
'cli.noMatchingResults': 'No matching results',
|
||||
|
||||
// CLI History Messages
|
||||
'cli.conversationNotFound': 'Conversation not found',
|
||||
'cli.nativeSessionNotFound': 'Native session not found',
|
||||
'cli.historyRefreshed': 'History refreshed',
|
||||
'cli.executionDeleted': 'Execution deleted',
|
||||
'cli.deleteFailed': 'Delete failed',
|
||||
'cli.idCopied': 'ID copied',
|
||||
'cli.promptCopied': 'Prompt copied to clipboard',
|
||||
'cli.fullPromptCopied': 'Full prompt copied to clipboard',
|
||||
'cli.sessionIdCopied': 'Session ID copied',
|
||||
'cli.filePathCopied': 'File path copied',
|
||||
'cli.pathNotAvailable': 'Path not available',
|
||||
'cli.noSessionData': 'No session data',
|
||||
'cli.sessionExported': 'Session exported',
|
||||
'cli.failedToCopy': 'Failed to copy',
|
||||
'cli.executionNotFound': 'Execution not found',
|
||||
|
||||
// CLI History Confirm Dialog
|
||||
'cli.confirmDelete': 'Delete this execution record? This action cannot be undone.',
|
||||
'cli.nativeSessionBadge': 'Native session',
|
||||
|
||||
// CodexLens Configuration
|
||||
'codexlens.config': 'CodexLens Configuration',
|
||||
'codexlens.configDesc': 'Manage code indexing, semantic search, and embedding models',
|
||||
@@ -2205,6 +2264,7 @@ const i18n = {
|
||||
'loop.add': 'Add',
|
||||
'loop.save': 'Save',
|
||||
'loop.cancel': 'Cancel',
|
||||
'loop.loadToolsError': 'Failed to load available tools. Please try again.',
|
||||
|
||||
// Navigation & Grouping
|
||||
'loop.nav.groupBy': 'Group By',
|
||||
@@ -2874,6 +2934,65 @@ const i18n = {
|
||||
'cli.fileBrowserApiError': '需要重启服务器以启用文件浏览器',
|
||||
'cli.fileBrowserManualHint': '请在上方输入完整路径后点击选择(如 C:\\Users\\用户名\\.gemini)',
|
||||
|
||||
// CLI 历史与执行
|
||||
'cli.executionHistory': '执行历史',
|
||||
'cli.conversationDetail': '对话详情',
|
||||
'cli.nativeSessionDetail': '原生会话详情',
|
||||
'cli.viewFullConversation': '查看完整过程对话',
|
||||
'cli.perTurnView': '按轮次查看',
|
||||
'cli.concatenatedView': '合并视图',
|
||||
'cli.userPrompt': '用户提示词',
|
||||
'cli.assistantResponse': '助手回复',
|
||||
'cli.user': '用户',
|
||||
'cli.assistant': '助手',
|
||||
'cli.latest': '最新',
|
||||
'cli.turn': '轮次',
|
||||
'cli.thinkingProcess': '思考过程',
|
||||
'cli.thoughts': '个思考',
|
||||
'cli.toolCalls': '工具调用',
|
||||
'cli.totalTokens': '总令牌数',
|
||||
'cli.input': '输入',
|
||||
'cli.output': '输出',
|
||||
'cli.cached': '已缓存',
|
||||
'cli.concatenatedPrompt': '合并提示词(发送至 CLI)',
|
||||
'cli.sessionId': '会话 ID',
|
||||
|
||||
// CLI 历史操作与按钮
|
||||
'cli.refresh': '刷新',
|
||||
'cli.copyId': '复制 ID',
|
||||
'cli.copyFullPrompt': '复制完整提示词',
|
||||
'cli.delete': '删除',
|
||||
'cli.exportJson': '导出 JSON',
|
||||
'cli.copyFilePath': '复制文件路径',
|
||||
'cli.copySessionId': '复制会话 ID',
|
||||
'cli.viewNativeSession': '查看原生会话',
|
||||
'cli.viewDetails': '查看详情',
|
||||
'cli.searchHistory': '搜索历史...',
|
||||
'cli.allTools': '所有工具',
|
||||
'cli.noExecutions': '暂无执行记录',
|
||||
'cli.noMatchingResults': '无匹配结果',
|
||||
|
||||
// CLI 历史消息
|
||||
'cli.conversationNotFound': '未找到对话',
|
||||
'cli.nativeSessionNotFound': '未找到原生会话',
|
||||
'cli.historyRefreshed': '历史已刷新',
|
||||
'cli.executionDeleted': '执行记录已删除',
|
||||
'cli.deleteFailed': '删除失败',
|
||||
'cli.idCopied': 'ID 已复制',
|
||||
'cli.promptCopied': '提示词已复制到剪贴板',
|
||||
'cli.fullPromptCopied': '完整提示词已复制到剪贴板',
|
||||
'cli.sessionIdCopied': '会话 ID 已复制',
|
||||
'cli.filePathCopied': '文件路径已复制',
|
||||
'cli.pathNotAvailable': '路径不可用',
|
||||
'cli.noSessionData': '无会话数据',
|
||||
'cli.sessionExported': '会话已导出',
|
||||
'cli.failedToCopy': '复制失败',
|
||||
'cli.executionNotFound': '未找到执行记录',
|
||||
|
||||
// CLI 历史确认对话框
|
||||
'cli.confirmDelete': '删除此执行记录?此操作无法撤销。',
|
||||
'cli.nativeSessionBadge': '原生会话',
|
||||
|
||||
// CodexLens 配置
|
||||
'codexlens.config': 'CodexLens 配置',
|
||||
'codexlens.configDesc': '管理代码索引、语义搜索和嵌入模型',
|
||||
@@ -4802,6 +4921,7 @@ const i18n = {
|
||||
'loop.add': '添加',
|
||||
'loop.save': '保存',
|
||||
'loop.cancel': '取消',
|
||||
'loop.loadToolsError': '加载可用工具失败,请重试。',
|
||||
|
||||
// Navigation & Grouping
|
||||
'loop.nav.groupBy': '分组',
|
||||
|
||||
Reference in New Issue
Block a user