diff --git a/src/App.tsx b/src/App.tsx index 97f71f2..eabdfa7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -81,7 +81,7 @@ function App() { setProjects(projectList); } catch (err) { console.error("Failed to load projects:", err); - setError("Failed to load projects. Please ensure ~/.claude directory exists."); + setError("加载项目失败。请确保 ~/.claude 目录存在。"); } finally { setLoading(false); } @@ -99,7 +99,7 @@ function App() { setSelectedProject(project); } catch (err) { console.error("Failed to load sessions:", err); - setError("Failed to load sessions for this project."); + setError("加载此项目的会话失败。"); } finally { setLoading(false); } @@ -144,9 +144,9 @@ function App() { // Check if we're navigating away from an active Claude session if (view === "claude-code-session" && isClaudeStreaming && activeClaudeSessionId) { const shouldLeave = window.confirm( - "Claude is still responding. If you navigate away, Claude will continue running in the background.\n\n" + - "You can return to this session from the Projects view.\n\n" + - "Do you want to continue?" + "Claude 仍在响应中。如果您离开此页面,Claude 将继续在后台运行。\n\n" + + "您可以从项目视图返回到此会话。\n\n" + + "是否继续?" ); if (!shouldLeave) { @@ -172,7 +172,7 @@ function App() { >
- Browse your Claude Code sessions + 浏览您的 Claude Code 会话
- No projects found in ~/.claude/projects + 在 ~/.claude/projects 中未找到项目
- {isRunning ? "Click back to return to main menu - view in CC Agents > Running Sessions" : "Execute CC Agent"} + {isRunning ? "点击返回主菜单 - 在 CC Agents > 运行中的会话 中查看" : "执行 CC 智能体"}
@@ -541,7 +541,7 @@ export const AgentExecution: React.FC- Manage your Claude Code agents + 管理您的 Claude Code 智能体
- Create your first CC Agent to get started + 创建您的第一个 CC 智能体开始使用
- Created: {new Date(agent.created_at).toLocaleDateString()} + 创建时间:{new Date(agent.created_at).toLocaleDateString()}
- Multiple Claude Code installations were found on your system. - Please select which one you'd like to use. + 在您的系统中发现了多个 Claude Code 安装。 + 请选择您想要使用的版本。
) : ( <>- Claude Code was not found in any of the common installation locations. - Please install Claude Code to continue. + 在常见安装位置未找到 Claude Code。 + 请安装 Claude Code 以继续。
- Searched locations: PATH, /usr/local/bin, + 搜索位置: PATH, /usr/local/bin, /opt/homebrew/bin, ~/.nvm/versions/node/*/bin, ~/.claude/local, ~/.local/bin
- Tip: You can install Claude Code using{" "}
+ 提示: 您可以使用以下命令安装 Claude Code{" "}
npm install -g @claude
- {isEditMode ? "Update your Claude Code agent" : "Create a new Claude Code agent"} + {isEditMode ? "更新您的 Claude Code 智能体" : "创建一个新的 Claude Code 智能体"}
- This will be used as the default task placeholder when executing the agent + 这将作为执行智能体时的默认任务占位符
- Define the behavior and capabilities of your CC Agent + 定义您的 CC 智能体的行为和能力
{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.name || "Auto"}
+{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.name || "自动"}
{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.description}
{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.name || "Auto"}
+{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.name || "自动"}
{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.description}
- Configure a new Model Context Protocol server + 配置新的 Model Context Protocol 服务器
- A unique name to identify this server + 用于标识此服务器的唯一名称
- The command to execute the server + 执行服务器的命令
- Space-separated command arguments + 空格分隔的命令参数
- A unique name to identify this server + 用于标识此服务器的唯一名称
- The SSE endpoint URL + SSE 端点 URL
- Manage Model Context Protocol servers + 管理 Model Context Protocol 服务器
Command
+命令
Arguments
+参数
Environment Variables
+环境变量
- {servers.length} server{servers.length !== 1 ? "s" : ""} configured + 已配置 {servers.length} 个服务器
No MCP servers configured
+没有配置 MCP 服务器
- Add a server to get started with Model Context Protocol + 添加服务器以开始使用 Model Context Protocol
{project.path}
No agent sessions are currently running
+当前没有正在运行的代理会话
Task
+任务
{session.task}
Model
+模型
{session.model}
Duration
+持续时间
{session.process_started_at ? formatDuration(session.process_started_at) - : 'Unknown' + : '未知' }
Project Path
+项目路径
{session.project_path}
@@ -233,7 +233,7 @@ export function RunningSessionsView({ className, showBackButton = false, onBack {session.session_id && (Session ID
+会话ID
{session.session_id}
diff --git a/src/components/SessionList.tsx b/src/components/SessionList.tsx index 7b0a282..802ccd0 100644 --- a/src/components/SessionList.tsx +++ b/src/components/SessionList.tsx @@ -89,7 +89,7 @@ export const SessionList: React.FC- {sessions.length} session{sessions.length !== 1 ? 's' : ''} + {sessions.length} 个会话
{truncateText(getFirstLine(session.first_message), 100)}
@@ -173,7 +173,7 @@ export const SessionList: React.FC
- Configure Claude Code preferences + 配置 Claude Code 偏好设置
- Advanced
+ 高级
- Add Claude attribution to git commits and pull requests + 在 git 提交和拉取请求中添加 Claude 署名
- Show full bash and command outputs + 显示完整的 bash 和命令输出
- How long to retain chat transcripts locally (default: 30 days) + 本地保留聊天记录的时长(默认:30 天)
- Select which Claude Code installation to use + 选择要使用的 Claude Code 安装版本
- ⚠️ Claude binary path has been changed. Remember to save your settings. + ⚠️ Claude 二进制路径已更改。请记得保存您的设置。
)}- Control which tools Claude Code can use without manual approval + 控制 Claude Code 可以在无需手动批准的情况下使用哪些工具
- No allow rules configured. Claude will ask for approval for all tools. + 未配置允许规则。Claude 将对所有工具请求批准。
) : ( allowRules.map((rule) => ( @@ -489,7 +489,7 @@ export const Settings: React.FC- No deny rules configured. + 未配置拒绝规则。
) : ( denyRules.map((rule) => ( @@ -536,7 +536,7 @@ export const Settings: React.FC- Examples: + 示例:
Bash
- Allow all bash commandsBash(npm run build)
- Allow exact commandBash(npm run test:*)
- Allow commands with prefixRead(~/.zshrc)
- Allow reading specific fileEdit(docs/**)
- Allow editing files in docs directoryBash
- 允许所有 bash 命令Bash(npm run build)
- 允许精确命令Bash(npm run test:*)
- 允许带前缀的命令Read(~/.zshrc)
- 允许读取特定文件Edit(docs/**)
- 允许编辑 docs 目录中的文件- Environment variables applied to every Claude Code session + 应用于每个 Claude Code 会话的环境变量
- No environment variables configured. + 未配置环境变量。
) : ( envVars.map((envVar) => ( @@ -607,14 +607,14 @@ export const Settings: React.FC- Common variables: + 常用变量:
CLAUDE_CODE_ENABLE_TELEMETRY
- Enable/disable telemetry (0 or 1)ANTHROPIC_MODEL
- Custom model nameDISABLE_COST_WARNINGS
- Disable cost warnings (1)CLAUDE_CODE_ENABLE_TELEMETRY
- 启用/禁用遥测 (0 或 1)ANTHROPIC_MODEL
- 自定义模型名称DISABLE_COST_WARNINGS
- 禁用成本警告 (1)- Additional configuration options for advanced users + 为高级用户提供的额外配置选项
- Custom script to generate auth values for API requests + 用于为 API 请求生成身份验证值的自定义脚本
{JSON.stringify(settings, null, 2)}
- This shows the raw JSON that will be saved to ~/.claude/settings.json + 这显示了将保存到 ~/.claude/settings.json 的原始 JSON 数据
Claude Code not found
+未找到 Claude Code
{versionStatus.output} @@ -137,7 +137,7 @@ export const Topbar: React.FC= ({ className="w-full" onClick={onSettingsClick} > - Select Claude Installation + 选择 Claude 安装 = ({ rel="noopener noreferrer" className="flex items-center space-x-1 text-xs text-primary hover:underline" > - Install Claude Code + 安装 Claude Code
- Track your Claude Code usage and costs + 跟踪您的 Claude Code 使用情况和费用
Loading usage statistics...
+正在加载使用统计...
{error}
Total Cost
+总费用
{formatCurrency(stats.total_cost)}
@@ -217,7 +217,7 @@ export const UsageDashboard: React.FCTotal Sessions
+总会话数
{formatNumber(stats.total_sessions)}
@@ -230,7 +230,7 @@ export const UsageDashboard: React.FCTotal Tokens
+总令牌数
{formatTokens(stats.total_tokens)}
@@ -243,7 +243,7 @@ export const UsageDashboard: React.FCAvg Cost/Session
+平均会话费用
{formatCurrency(
stats.total_sessions > 0
@@ -260,32 +260,32 @@ export const UsageDashboard: React.FC Input Tokens 输入令牌 {formatTokens(stats.total_input_tokens)} Output Tokens 输出令牌 {formatTokens(stats.total_output_tokens)} Cache Write 缓存写入 {formatTokens(stats.total_cache_creation_tokens)} Cache Read 缓存读取 {formatTokens(stats.total_cache_read_tokens)} {formatCurrency(project.total_cost)}
- {formatCurrency(project.total_cost / project.session_count)}/session
+ {formatCurrency(project.total_cost / project.session_count)}/会话
{formattedDate}
- Cost: {formatCurrency(day.total_cost)}
+ 费用: {formatCurrency(day.total_cost)}
- {formatTokens(day.total_tokens)} tokens
+ {formatTokens(day.total_tokens)} 个令牌
- {day.models_used.length} model{day.models_used.length !== 1 ? 's' : ''}
+ {day.models_used.length} 个模型
Token Breakdown
+ 令牌分布
Most Used Models
+ 常用模型
Top Projects
+ 热门项目
Usage by Model
+ 按模型使用情况
Usage by Project
+ 按项目使用情况
Usage by Session
+ 按会话使用情况
{stats.by_date.length > 0 ? (() => {
const maxCost = Math.max(...stats.by_date.map(d => d.total_cost), 0);
@@ -471,7 +471,7 @@ export const UsageDashboard: React.FC