diff --git a/src/components/ClaudeCodeSession.tsx b/src/components/ClaudeCodeSession.tsx index c096295..790d0dd 100644 --- a/src/components/ClaudeCodeSession.tsx +++ b/src/components/ClaudeCodeSession.tsx @@ -8,6 +8,7 @@ import { ChevronDown, GitBranch, Settings, + Settings2, ChevronUp, X, Hash, @@ -1280,26 +1281,44 @@ export const ClaudeCodeSession: React.FC = ({
{projectPath && onProjectSettings && ( - + + + + + + +

{t('agents.hooks')}

+
+
+
)} {projectPath && ( - + + + + + + +

{t('app.commands')}

+
+
+
)}
@@ -1698,7 +1717,7 @@ export const ClaudeCodeSession: React.FC = ({ - Slash Commands + {t('slashCommands.slashCommands')} {t('slashCommands.manageProjectCommands')} {projectPath} diff --git a/src/components/FloatingPromptInput.tsx b/src/components/FloatingPromptInput.tsx index 81c8d71..afd53a3 100644 --- a/src/components/FloatingPromptInput.tsx +++ b/src/components/FloatingPromptInput.tsx @@ -101,21 +101,6 @@ type Model = { icon: React.ReactNode; }; -const MODELS: Model[] = [ - { - id: "sonnet", - name: "Claude 4 Sonnet", - description: "Faster, efficient for most tasks", - icon: - }, - { - id: "opus", - name: "Claude 4.1 Opus", - description: "More capable, better for complex tasks", - icon: - } -]; - /** * FloatingPromptInput component - Fixed position prompt input with model picker * @@ -141,38 +126,54 @@ const FloatingPromptInputInner = ( ) => { const { t } = useTranslation(); + // Define MODELS inside component to access translations + const MODELS: Model[] = [ + { + id: "sonnet", + name: t('agents.sonnetName'), + description: t('agents.sonnetDescription'), + icon: + }, + { + id: "opus", + name: t('agents.opusName'), + description: t('agents.opusDescription'), + icon: + } + ]; + // Define THINKING_MODES inside component to access translations const THINKING_MODES: ThinkingModeConfig[] = [ { id: "auto", - name: "Auto", + name: t('messages.auto'), description: t('messages.letClaudeDecide'), level: 0 }, { id: "think", - name: "Think", + name: t('messages.think'), description: t('messages.basicReasoning'), level: 1, phrase: "think" }, { id: "think_hard", - name: "Think Hard", + name: t('messages.thinkHard'), description: t('messages.deeperAnalysis'), level: 2, phrase: "think hard" }, { id: "think_harder", - name: "Think Harder", + name: t('messages.thinkHarder'), description: t('messages.extensiveReasoning'), level: 3, phrase: "think harder" }, { id: "ultrathink", - name: "Ultrathink", + name: t('messages.ultrathink'), description: t('messages.maximumAnalysis'), level: 4, phrase: "ultrathink" @@ -738,7 +739,7 @@ const FloatingPromptInputInner = ( onClick={(e) => e.stopPropagation()} >
-

Compose your prompt

+

{t('input.composeYourPrompt')}

-

{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.name || "Auto"}

+

{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.name || t('messages.auto')}

{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.description}

@@ -957,7 +958,7 @@ const FloatingPromptInputInner = ( -

{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.name || "Auto"}

+

{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.name || t('messages.auto')}

{THINKING_MODES.find(m => m.id === selectedThinkingMode)?.description}

diff --git a/src/components/SlashCommandPicker.tsx b/src/components/SlashCommandPicker.tsx index 4aa97ab..a311b64 100644 --- a/src/components/SlashCommandPicker.tsx +++ b/src/components/SlashCommandPicker.tsx @@ -245,9 +245,9 @@ export const SlashCommandPicker: React.FC = ({ if (cmd.scope === "user") { key = cmd.namespace ? `${t('slashCommands.userCommands')}: ${cmd.namespace}` : t('slashCommands.userCommands'); } else if (cmd.scope === "project") { - key = cmd.namespace ? `Project Commands: ${cmd.namespace}` : "Project Commands"; + key = cmd.namespace ? `${t('slashCommands.projectCommands')}: ${cmd.namespace}` : t('slashCommands.projectCommands'); } else { - key = cmd.namespace || "Commands"; + key = cmd.namespace || t('slashCommands.commands'); } if (!acc[key]) { @@ -477,7 +477,7 @@ export const SlashCommandPicker: React.FC = ({

{groupKey.startsWith(t('slashCommands.userCommands')) && } - {groupKey.startsWith("Project Commands") && } + {groupKey.startsWith(t('slashCommands.projectCommands')) && } {groupKey}

diff --git a/src/components/SlashCommandsManager.tsx b/src/components/SlashCommandsManager.tsx index 00b84e6..5353b47 100644 --- a/src/components/SlashCommandsManager.tsx +++ b/src/components/SlashCommandsManager.tsx @@ -293,7 +293,7 @@ export const SlashCommandsManager: React.FC = ({ const groupedCommands = filteredCommands.reduce((acc, cmd) => { const key = cmd.namespace ? `${cmd.namespace} (${cmd.scope})` - : `${cmd.scope === 'project' ? 'Project' : 'User'} Commands`; + : cmd.scope === 'project' ? t('slashCommands.projectCommands') : t('slashCommands.userCommands'); if (!acc[key]) { acc[key] = []; } @@ -531,7 +531,7 @@ export const SlashCommandsManager: React.FC = ({
- User (Global) + {t('slashCommands.user')} ({t('slashCommands.globalSearch')})
)} @@ -539,7 +539,7 @@ export const SlashCommandsManager: React.FC = ({
- Project + {t('slashCommands.project')}
)} diff --git a/src/locales/en/common.json b/src/locales/en/common.json index e3bd8f1..72c5afa 100644 --- a/src/locales/en/common.json +++ b/src/locales/en/common.json @@ -213,6 +213,8 @@ "project": "Project", "user": "User", "userCommands": "User Commands", + "projectCommands": "Project Commands", + "commands": "Commands", "manageProjectCommands": "Manage project-specific slash commands for", "noCommandsFound": "No commands found", "noProjectCommandsYet": "No project commands created yet", @@ -661,6 +663,12 @@ "deeperAnalysis": "Deeper analysis", "extensiveReasoning": "Extensive reasoning", "maximumAnalysis": "Maximum analysis", + "thinking": "Thinking", + "auto": "Auto", + "think": "Think", + "thinkHard": "Think Hard", + "thinkHarder": "Think Harder", + "ultrathink": "Ultrathink", "typeYourPromptHere": "Type your prompt here...", "dropImagesHere": "Drop images here...", "askClaudeAnything": "Ask Claude anything...", @@ -759,7 +767,8 @@ }, "input": { "pressEnterToSend": "Press Enter to send, Shift+Enter for new line", - "withFileAndCommandSupport": ", @ to mention files, / for commands, drag & drop or paste images" + "withFileAndCommandSupport": ", @ to mention files, / for commands, drag & drop or paste images", + "composeYourPrompt": "Compose your prompt" }, "relayStation": { "title": "Relay Stations", diff --git a/src/locales/zh/common.json b/src/locales/zh/common.json index f1f64f8..3a0fe67 100644 --- a/src/locales/zh/common.json +++ b/src/locales/zh/common.json @@ -202,6 +202,8 @@ "project": "项目", "user": "用户", "userCommands": "用户命令", + "projectCommands": "项目命令", + "commands": "命令", "manageProjectCommands": "管理项目特定的斜杠命令", "noCommandsFound": "未找到命令", "noProjectCommandsYet": "尚未创建项目命令", @@ -593,7 +595,18 @@ "claudeCodeNotFound": "未找到 Claude Code", "selectClaudeInstallation": "选择 Claude 安装", "installClaudeCode": "安装 Claude Code", - "session": "会话" + "session": "会话", + "letClaudeDecide": "让 Claude 决定", + "basicReasoning": "基础推理", + "deeperAnalysis": "深度分析", + "extensiveReasoning": "广泛推理", + "maximumAnalysis": "最大化分析", + "thinking": "思考", + "auto": "自动", + "think": "思考", + "thinkHard": "深度思考", + "thinkHarder": "更深度思考", + "ultrathink": "超级思考" }, "checkpoint": { "title": "检查点", @@ -681,7 +694,8 @@ }, "input": { "pressEnterToSend": "按 Enter 发送,Shift+Enter 换行", - "withFileAndCommandSupport": ",@ 提及文件,/ 调用命令,拖拽或粘贴图片" + "withFileAndCommandSupport": ",@ 提及文件,/ 调用命令,拖拽或粘贴图片", + "composeYourPrompt": "编写您的提示" }, "relayStation": { "title": "中转站",