mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 14:41:24 +08:00
refactor: Clean up JSON structure and improve readability in locale files
This commit is contained in:
parent
87f3628b49
commit
21c436d900
19
CLAUDE.md
19
CLAUDE.md
@ -21,13 +21,18 @@ This file provides guidance to AI coding assistants when working with code in th
|
|||||||
|
|
||||||
## Development Commands
|
## Development Commands
|
||||||
|
|
||||||
- **Install**: `yarn install`
|
- **Install**: `yarn install` - Install all project dependencies
|
||||||
- **Development**: `yarn dev` - Runs Electron app in development mode
|
- **Development**: `yarn dev` - Runs Electron app in development mode with hot reload
|
||||||
- **Debug**: `yarn debug` - Starts with debugging enabled, use chrome://inspect
|
- **Debug**: `yarn debug` - Starts with debugging enabled, use `chrome://inspect` to attach debugger
|
||||||
- **Build Check**: `yarn build:check` - REQUIRED before commits (lint + test + typecheck), if having i18n sort issues, run `yarn i18n:sync` first to sync template.
|
- **Build Check**: `yarn build:check` - **REQUIRED** before commits (lint + test + typecheck)
|
||||||
- **Test**: `yarn test` - Run all tests (Vitest)
|
- If having i18n sort issues, run `yarn i18n:sync` first to sync template
|
||||||
- **Single Test**: `yarn test:main` or `yarn test:renderer`
|
- If having formatting issues, run `yarn format` first
|
||||||
- **Lint**: `yarn lint` - Fix linting issues and run typecheck
|
- **Test**: `yarn test` - Run all tests (Vitest) across main and renderer processes
|
||||||
|
- **Single Test**:
|
||||||
|
- `yarn test:main` - Run tests for main process only
|
||||||
|
- `yarn test:renderer` - Run tests for renderer process only
|
||||||
|
- **Lint**: `yarn lint` - Fix linting issues and run TypeScript type checking
|
||||||
|
- **Format**: `yarn format` - Auto-format code using Biome
|
||||||
|
|
||||||
## Project Architecture
|
## Project Architecture
|
||||||
|
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
"test:e2e": "yarn playwright test",
|
"test:e2e": "yarn playwright test",
|
||||||
"test:lint": "oxlint --deny-warnings && eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --cache",
|
"test:lint": "oxlint --deny-warnings && eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --cache",
|
||||||
"test:scripts": "vitest scripts",
|
"test:scripts": "vitest scripts",
|
||||||
"lint": "oxlint --fix && eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --cache && yarn typecheck && yarn check:i18n",
|
"lint": "oxlint --fix && eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --cache && yarn typecheck && yarn check:i18n && yarn format:check",
|
||||||
"format": "biome format --write && biome lint --write",
|
"format": "biome format --write && biome lint --write",
|
||||||
"format:check": "biome format && biome lint",
|
"format:check": "biome format && biome lint",
|
||||||
"prepare": "git config blame.ignoreRevsFile .git-blame-ignore-revs && husky",
|
"prepare": "git config blame.ignoreRevsFile .git-blame-ignore-revs && husky",
|
||||||
|
|||||||
@ -80,102 +80,102 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"advance": {
|
"advance": {
|
||||||
"maxTurns": {
|
"maxTurns": {
|
||||||
"description": "Define how many request/response cycles the agent may complete automatically.",
|
"description": "Define how many request/response cycles the agent may complete automatically.",
|
||||||
"helper": "Higher values enable longer autonomous runs; lower values keep sessions short.",
|
"helper": "Higher values enable longer autonomous runs; lower values keep sessions short.",
|
||||||
"label": "Conversation turn limit"
|
"label": "Conversation turn limit"
|
||||||
},
|
},
|
||||||
"permissionMode": {
|
"permissionMode": {
|
||||||
"description": "Control how the agent handles actions that require approval.",
|
"description": "Control how the agent handles actions that require approval.",
|
||||||
"label": "Permission mode",
|
"label": "Permission mode",
|
||||||
"options": {
|
"options": {
|
||||||
"acceptEdits": "Accept edits automatically",
|
"acceptEdits": "Accept edits automatically",
|
||||||
"bypassPermissions": "Bypass permission checks",
|
"bypassPermissions": "Bypass permission checks",
|
||||||
"default": "Default (ask before continuing)",
|
"default": "Default (ask before continuing)",
|
||||||
"plan": "Planning mode (requires plan approval)"
|
"plan": "Planning mode (requires plan approval)"
|
||||||
|
},
|
||||||
|
"placeholder": "Choose a permission behavior"
|
||||||
|
},
|
||||||
|
"title": "Advanced Settings"
|
||||||
},
|
},
|
||||||
"placeholder": "Choose a permission behavior"
|
"essential": "Essential Settings",
|
||||||
},
|
"prompt": "Prompt Settings",
|
||||||
"title": "Advanced Settings"
|
"tooling": {
|
||||||
},
|
"mcp": {
|
||||||
"essential": "Essential Settings",
|
"description": "Connect MCP servers to unlock additional tools you can approve above.",
|
||||||
"prompt": "Prompt Settings",
|
"empty": "No MCP servers detected. Add one from the MCP settings page.",
|
||||||
"tooling": {
|
"manageHint": "Need advanced configuration? Visit Settings → MCP Servers.",
|
||||||
"mcp": {
|
"toggle": "Toggle {{name}}"
|
||||||
"description": "Connect MCP servers to unlock additional tools you can approve above.",
|
},
|
||||||
"empty": "No MCP servers detected. Add one from the MCP settings page.",
|
"permissionMode": {
|
||||||
"manageHint": "Need advanced configuration? Visit Settings → MCP Servers.",
|
"acceptEdits": {
|
||||||
"toggle": "Toggle {{name}}"
|
"behavior": "Pre-approves trusted filesystem tools so edits run immediately.",
|
||||||
},
|
"description": "File edits and filesystem operations are automatically approved.",
|
||||||
"permissionMode": {
|
"title": "Auto-accept file edits"
|
||||||
"acceptEdits": {
|
},
|
||||||
"behavior": "Pre-approves trusted filesystem tools so edits run immediately.",
|
"bypassPermissions": {
|
||||||
"description": "File edits and filesystem operations are automatically approved.",
|
"behavior": "Every tool is pre-approved automatically.",
|
||||||
"title": "Auto-accept file edits"
|
"description": "All permission prompts are skipped — use with caution.",
|
||||||
|
"title": "Bypass permission checks",
|
||||||
|
"warning": "Use with caution — all tools will run without asking for approval."
|
||||||
|
},
|
||||||
|
"confirmChange": {
|
||||||
|
"description": "Switching modes updates the automatically approved tools.",
|
||||||
|
"title": "Change permission mode?"
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"behavior": "Read-only tools are pre-approved automatically.",
|
||||||
|
"description": "Read-only tools are pre-approved; everything else still needs permission.",
|
||||||
|
"title": "Default (ask before continuing)"
|
||||||
|
},
|
||||||
|
"plan": {
|
||||||
|
"behavior": "Read-only defaults are pre-approved while execution remains disabled.",
|
||||||
|
"description": "Shares the default read-only tool set but presents a plan before execution.",
|
||||||
|
"title": "Planning mode (coming soon)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"preapproved": {
|
||||||
|
"autoBadge": "Added by mode",
|
||||||
|
"autoDescription": "This tool is auto-approved by the current permission mode.",
|
||||||
|
"empty": "No tools match your filters.",
|
||||||
|
"mcpBadge": "MCP tool",
|
||||||
|
"requiresApproval": "Requires approval when disabled",
|
||||||
|
"search": "Search tools",
|
||||||
|
"toggle": "Toggle {{name}}",
|
||||||
|
"warning": {
|
||||||
|
"description": "Enable only tools you trust. Mode defaults are highlighted automatically.",
|
||||||
|
"title": "Pre-approved tools run without manual review."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"review": {
|
||||||
|
"autoTools": "Auto: {{count}}",
|
||||||
|
"customTools": "Custom: {{count}}",
|
||||||
|
"helper": "Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
||||||
|
"mcp": "MCP: {{count}}",
|
||||||
|
"mode": "Mode: {{mode}}"
|
||||||
|
},
|
||||||
|
"steps": {
|
||||||
|
"mcp": {
|
||||||
|
"title": "MCP servers"
|
||||||
|
},
|
||||||
|
"permissionMode": {
|
||||||
|
"title": "Step 1 · Permission mode"
|
||||||
|
},
|
||||||
|
"preapproved": {
|
||||||
|
"title": "Step 2 · Pre-approved tools"
|
||||||
|
},
|
||||||
|
"review": {
|
||||||
|
"title": "Step 3 · Review"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tab": "Tooling & permissions"
|
||||||
},
|
},
|
||||||
"bypassPermissions": {
|
"tools": {
|
||||||
"behavior": "Every tool is pre-approved automatically.",
|
"approved": "approved",
|
||||||
"description": "All permission prompts are skipped — use with caution.",
|
"caution": "Pre-approved tools bypass human review. Enable only trusted tools.",
|
||||||
"title": "Bypass permission checks",
|
"description": "Choose which tools can run without manual approval.",
|
||||||
"warning": "Use with caution — all tools will run without asking for approval."
|
"requiresPermission": "Requires permission when not pre-approved.",
|
||||||
},
|
|
||||||
"confirmChange": {
|
|
||||||
"description": "Switching modes updates the automatically approved tools.",
|
|
||||||
"title": "Change permission mode?"
|
|
||||||
},
|
|
||||||
"default": {
|
|
||||||
"behavior": "Read-only tools are pre-approved automatically.",
|
|
||||||
"description": "Read-only tools are pre-approved; everything else still needs permission.",
|
|
||||||
"title": "Default (ask before continuing)"
|
|
||||||
},
|
|
||||||
"plan": {
|
|
||||||
"behavior": "Read-only defaults are pre-approved while execution remains disabled.",
|
|
||||||
"description": "Shares the default read-only tool set but presents a plan before execution.",
|
|
||||||
"title": "Planning mode (coming soon)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"preapproved": {
|
|
||||||
"autoBadge": "Added by mode",
|
|
||||||
"autoDescription": "This tool is auto-approved by the current permission mode.",
|
|
||||||
"empty": "No tools match your filters.",
|
|
||||||
"mcpBadge": "MCP tool",
|
|
||||||
"requiresApproval": "Requires approval when disabled",
|
|
||||||
"search": "Search tools",
|
|
||||||
"toggle": "Toggle {{name}}",
|
|
||||||
"warning": {
|
|
||||||
"description": "Enable only tools you trust. Mode defaults are highlighted automatically.",
|
|
||||||
"title": "Pre-approved tools run without manual review."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"review": {
|
|
||||||
"autoTools": "Auto: {{count}}",
|
|
||||||
"customTools": "Custom: {{count}}",
|
|
||||||
"helper": "Changes save automatically. Adjust the steps above any time to fine-tune permissions.",
|
|
||||||
"mcp": "MCP: {{count}}",
|
|
||||||
"mode": "Mode: {{mode}}"
|
|
||||||
},
|
|
||||||
"steps": {
|
|
||||||
"mcp": {
|
|
||||||
"title": "MCP servers"
|
|
||||||
},
|
|
||||||
"permissionMode": {
|
|
||||||
"title": "Step 1 · Permission mode"
|
|
||||||
},
|
|
||||||
"preapproved": {
|
|
||||||
"title": "Step 2 · Pre-approved tools"
|
|
||||||
},
|
|
||||||
"review": {
|
|
||||||
"title": "Step 3 · Review"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tab": "Tooling & permissions"
|
|
||||||
},
|
|
||||||
"tools": {
|
|
||||||
"approved": "approved",
|
|
||||||
"caution": "Pre-approved tools bypass human review. Enable only trusted tools.",
|
|
||||||
"description": "Choose which tools can run without manual approval.",
|
|
||||||
"requiresPermission": "Requires permission when not pre-approved.",
|
|
||||||
"tab": "Pre-approved tools",
|
"tab": "Pre-approved tools",
|
||||||
"title": "Pre-approved tools",
|
"title": "Pre-approved tools",
|
||||||
"toggle": "{{defaultValue}}"
|
"toggle": "{{defaultValue}}"
|
||||||
|
|||||||
@ -99,81 +99,81 @@
|
|||||||
},
|
},
|
||||||
"title": "高级设置"
|
"title": "高级设置"
|
||||||
},
|
},
|
||||||
"essential": "基础设置",
|
"essential": "基础设置",
|
||||||
"prompt": "提示词设置",
|
"prompt": "提示词设置",
|
||||||
"tooling": {
|
"tooling": {
|
||||||
"mcp": {
|
"mcp": {
|
||||||
"description": "连接 MCP 服务器即可解锁更多可在上方预先授权的工具。",
|
"description": "连接 MCP 服务器即可解锁更多可在上方预先授权的工具。",
|
||||||
"empty": "未检测到 MCP 服务器,请前往 MCP 设置页添加。",
|
"empty": "未检测到 MCP 服务器,请前往 MCP 设置页添加。",
|
||||||
"manageHint": "需要更多配置?前往 设置 → MCP 服务器。",
|
"manageHint": "需要更多配置?前往 设置 → MCP 服务器。",
|
||||||
"toggle": "切换 {{name}}"
|
"toggle": "切换 {{name}}"
|
||||||
},
|
},
|
||||||
"permissionMode": {
|
"permissionMode": {
|
||||||
"acceptEdits": {
|
"acceptEdits": {
|
||||||
"behavior": "预先授权受信任的文件系统工具,允许即时执行。",
|
"behavior": "预先授权受信任的文件系统工具,允许即时执行。",
|
||||||
"description": "文件编辑和文件系统操作将自动通过审批。",
|
"description": "文件编辑和文件系统操作将自动通过审批。",
|
||||||
"title": "自动接受文件编辑"
|
"title": "自动接受文件编辑"
|
||||||
|
},
|
||||||
|
"bypassPermissions": {
|
||||||
|
"behavior": "所有工具都会被自动预先授权。",
|
||||||
|
"description": "所有权限提示都会被跳过,请谨慎使用。",
|
||||||
|
"title": "跳过所有权限检查",
|
||||||
|
"warning": "危险:所有工具都会在无审批情况下执行。"
|
||||||
|
},
|
||||||
|
"confirmChange": {
|
||||||
|
"description": "切换模式会更新自动预先授权的工具。",
|
||||||
|
"title": "确认切换权限模式?"
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"behavior": "只读工具会自动预先授权。",
|
||||||
|
"description": "只读工具会自动预先授权,其它操作仍需权限。",
|
||||||
|
"title": "默认(继续前询问)"
|
||||||
|
},
|
||||||
|
"plan": {
|
||||||
|
"behavior": "默认的只读工具会自动预先授权,但执行仍被禁用。",
|
||||||
|
"description": "继承默认的只读工具集,并会在执行前先呈现计划。",
|
||||||
|
"title": "规划模式(即将支持)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"preapproved": {
|
||||||
|
"autoBadge": "模式自动添加",
|
||||||
|
"autoDescription": "该工具由当前权限模式自动预先授权。",
|
||||||
|
"empty": "没有符合筛选条件的工具。",
|
||||||
|
"mcpBadge": "MCP 工具",
|
||||||
|
"requiresApproval": "禁用时需要人工审批",
|
||||||
|
"search": "搜索工具",
|
||||||
|
"toggle": "切换 {{name}}",
|
||||||
|
"warning": {
|
||||||
|
"description": "仅启用你信任的工具。模式默认值会自动标注。",
|
||||||
|
"title": "预先授权的工具将在无人工审核时运行。"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"review": {
|
||||||
|
"autoTools": "自动:{{count}}",
|
||||||
|
"customTools": "自定义:{{count}}",
|
||||||
|
"helper": "设置会自动保存,可随时返回上方步骤进行调整。",
|
||||||
|
"mcp": "MCP:{{count}}",
|
||||||
|
"mode": "模式:{{mode}}"
|
||||||
|
},
|
||||||
|
"steps": {
|
||||||
|
"mcp": {
|
||||||
|
"title": "MCP 服务器"
|
||||||
|
},
|
||||||
|
"permissionMode": {
|
||||||
|
"title": "步骤 1 · 权限模式"
|
||||||
|
},
|
||||||
|
"preapproved": {
|
||||||
|
"title": "步骤 2 · 预先授权工具"
|
||||||
|
},
|
||||||
|
"review": {
|
||||||
|
"title": "步骤 3 · 总览"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tab": "工具与权限"
|
||||||
},
|
},
|
||||||
"bypassPermissions": {
|
"tools": {
|
||||||
"behavior": "所有工具都会被自动预先授权。",
|
"approved": "已授权",
|
||||||
"description": "所有权限提示都会被跳过,请谨慎使用。",
|
"caution": "预先授权的工具会跳过人工审核,请仅启用可信的工具。",
|
||||||
"title": "跳过所有权限检查",
|
|
||||||
"warning": "危险:所有工具都会在无审批情况下执行。"
|
|
||||||
},
|
|
||||||
"confirmChange": {
|
|
||||||
"description": "切换模式会更新自动预先授权的工具。",
|
|
||||||
"title": "确认切换权限模式?"
|
|
||||||
},
|
|
||||||
"default": {
|
|
||||||
"behavior": "只读工具会自动预先授权。",
|
|
||||||
"description": "只读工具会自动预先授权,其它操作仍需权限。",
|
|
||||||
"title": "默认(继续前询问)"
|
|
||||||
},
|
|
||||||
"plan": {
|
|
||||||
"behavior": "默认的只读工具会自动预先授权,但执行仍被禁用。",
|
|
||||||
"description": "继承默认的只读工具集,并会在执行前先呈现计划。",
|
|
||||||
"title": "规划模式(即将支持)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"preapproved": {
|
|
||||||
"autoBadge": "模式自动添加",
|
|
||||||
"autoDescription": "该工具由当前权限模式自动预先授权。",
|
|
||||||
"empty": "没有符合筛选条件的工具。",
|
|
||||||
"mcpBadge": "MCP 工具",
|
|
||||||
"requiresApproval": "禁用时需要人工审批",
|
|
||||||
"search": "搜索工具",
|
|
||||||
"toggle": "切换 {{name}}",
|
|
||||||
"warning": {
|
|
||||||
"description": "仅启用你信任的工具。模式默认值会自动标注。",
|
|
||||||
"title": "预先授权的工具将在无人工审核时运行。"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"review": {
|
|
||||||
"autoTools": "自动:{{count}}",
|
|
||||||
"customTools": "自定义:{{count}}",
|
|
||||||
"helper": "设置会自动保存,可随时返回上方步骤进行调整。",
|
|
||||||
"mcp": "MCP:{{count}}",
|
|
||||||
"mode": "模式:{{mode}}"
|
|
||||||
},
|
|
||||||
"steps": {
|
|
||||||
"mcp": {
|
|
||||||
"title": "MCP 服务器"
|
|
||||||
},
|
|
||||||
"permissionMode": {
|
|
||||||
"title": "步骤 1 · 权限模式"
|
|
||||||
},
|
|
||||||
"preapproved": {
|
|
||||||
"title": "步骤 2 · 预先授权工具"
|
|
||||||
},
|
|
||||||
"review": {
|
|
||||||
"title": "步骤 3 · 总览"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tab": "工具与权限"
|
|
||||||
},
|
|
||||||
"tools": {
|
|
||||||
"approved": "已授权",
|
|
||||||
"caution": "预先授权的工具会跳过人工审核,请仅启用可信的工具。",
|
|
||||||
"description": "选择哪些工具可以在无需人工审批的情况下执行。",
|
"description": "选择哪些工具可以在无需人工审批的情况下执行。",
|
||||||
"requiresPermission": "未预先授权时需要人工审批。",
|
"requiresPermission": "未预先授权时需要人工审批。",
|
||||||
"tab": "预先授权工具",
|
"tab": "预先授权工具",
|
||||||
|
|||||||
@ -99,81 +99,81 @@
|
|||||||
},
|
},
|
||||||
"title": "進階設定"
|
"title": "進階設定"
|
||||||
},
|
},
|
||||||
"essential": "必要設定",
|
"essential": "必要設定",
|
||||||
"prompt": "提示設定",
|
"prompt": "提示設定",
|
||||||
"tooling": {
|
"tooling": {
|
||||||
"mcp": {
|
"mcp": {
|
||||||
"description": "連線 MCP 伺服器即可解鎖更多可在上方預先授權的工具。",
|
"description": "連線 MCP 伺服器即可解鎖更多可在上方預先授權的工具。",
|
||||||
"empty": "尚未偵測到 MCP 伺服器,請前往 MCP 設定頁新增。",
|
"empty": "尚未偵測到 MCP 伺服器,請前往 MCP 設定頁新增。",
|
||||||
"manageHint": "需要進階設定?前往 設定 → MCP 伺服器。",
|
"manageHint": "需要進階設定?前往 設定 → MCP 伺服器。",
|
||||||
"toggle": "切換 {{name}}"
|
"toggle": "切換 {{name}}"
|
||||||
},
|
},
|
||||||
"permissionMode": {
|
"permissionMode": {
|
||||||
"acceptEdits": {
|
"acceptEdits": {
|
||||||
"behavior": "預先授權受信任的檔案系統工具,允許即時執行。",
|
"behavior": "預先授權受信任的檔案系統工具,允許即時執行。",
|
||||||
"description": "檔案編輯與檔案系統操作會自動通過核准。",
|
"description": "檔案編輯與檔案系統操作會自動通過核准。",
|
||||||
"title": "自動接受檔案編輯"
|
"title": "自動接受檔案編輯"
|
||||||
|
},
|
||||||
|
"bypassPermissions": {
|
||||||
|
"behavior": "所有工具都會被自動預先授權。",
|
||||||
|
"description": "所有權限提示都會被略過,請務必謹慎使用。",
|
||||||
|
"title": "略過所有權限檢查",
|
||||||
|
"warning": "警告:所有工具都會在無核准情況下執行。"
|
||||||
|
},
|
||||||
|
"confirmChange": {
|
||||||
|
"description": "切換模式會更新自動預先授權的工具。",
|
||||||
|
"title": "確認切換權限模式?"
|
||||||
|
},
|
||||||
|
"default": {
|
||||||
|
"behavior": "唯讀工具會自動預先授權。",
|
||||||
|
"description": "唯讀工具會自動預先授權,其它操作仍需核准。",
|
||||||
|
"title": "預設(繼續前先詢問)"
|
||||||
|
},
|
||||||
|
"plan": {
|
||||||
|
"behavior": "預設的唯讀工具會自動預先授權,但執行仍被停用。",
|
||||||
|
"description": "沿用預設的唯讀工具集,並會在執行前先呈現計畫。",
|
||||||
|
"title": "規劃模式(即將支援)"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"preapproved": {
|
||||||
|
"autoBadge": "模式自動添加",
|
||||||
|
"autoDescription": "此工具由目前的權限模式自動預先授權。",
|
||||||
|
"empty": "沒有符合篩選條件的工具。",
|
||||||
|
"mcpBadge": "MCP 工具",
|
||||||
|
"requiresApproval": "停用時需要人工核准",
|
||||||
|
"search": "搜尋工具",
|
||||||
|
"toggle": "切換 {{name}}",
|
||||||
|
"warning": {
|
||||||
|
"description": "僅啟用你信任的工具。模式預設值會自動標示。",
|
||||||
|
"title": "預先授權的工具將在無人工審查下執行。"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"review": {
|
||||||
|
"autoTools": "自動:{{count}}",
|
||||||
|
"customTools": "自訂:{{count}}",
|
||||||
|
"helper": "設定會自動儲存,可隨時回到上方步驟調整。",
|
||||||
|
"mcp": "MCP:{{count}}",
|
||||||
|
"mode": "模式:{{mode}}"
|
||||||
|
},
|
||||||
|
"steps": {
|
||||||
|
"mcp": {
|
||||||
|
"title": "MCP 伺服器"
|
||||||
|
},
|
||||||
|
"permissionMode": {
|
||||||
|
"title": "步驟 1 · 權限模式"
|
||||||
|
},
|
||||||
|
"preapproved": {
|
||||||
|
"title": "步驟 2 · 預先授權工具"
|
||||||
|
},
|
||||||
|
"review": {
|
||||||
|
"title": "步驟 3 · 檢視"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tab": "工具與權限"
|
||||||
},
|
},
|
||||||
"bypassPermissions": {
|
"tools": {
|
||||||
"behavior": "所有工具都會被自動預先授權。",
|
"approved": "已授權",
|
||||||
"description": "所有權限提示都會被略過,請務必謹慎使用。",
|
"caution": "預先授權的工具會略過人工審查,請僅啟用可信任的工具。",
|
||||||
"title": "略過所有權限檢查",
|
|
||||||
"warning": "警告:所有工具都會在無核准情況下執行。"
|
|
||||||
},
|
|
||||||
"confirmChange": {
|
|
||||||
"description": "切換模式會更新自動預先授權的工具。",
|
|
||||||
"title": "確認切換權限模式?"
|
|
||||||
},
|
|
||||||
"default": {
|
|
||||||
"behavior": "唯讀工具會自動預先授權。",
|
|
||||||
"description": "唯讀工具會自動預先授權,其它操作仍需核准。",
|
|
||||||
"title": "預設(繼續前先詢問)"
|
|
||||||
},
|
|
||||||
"plan": {
|
|
||||||
"behavior": "預設的唯讀工具會自動預先授權,但執行仍被停用。",
|
|
||||||
"description": "沿用預設的唯讀工具集,並會在執行前先呈現計畫。",
|
|
||||||
"title": "規劃模式(即將支援)"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"preapproved": {
|
|
||||||
"autoBadge": "模式自動添加",
|
|
||||||
"autoDescription": "此工具由目前的權限模式自動預先授權。",
|
|
||||||
"empty": "沒有符合篩選條件的工具。",
|
|
||||||
"mcpBadge": "MCP 工具",
|
|
||||||
"requiresApproval": "停用時需要人工核准",
|
|
||||||
"search": "搜尋工具",
|
|
||||||
"toggle": "切換 {{name}}",
|
|
||||||
"warning": {
|
|
||||||
"description": "僅啟用你信任的工具。模式預設值會自動標示。",
|
|
||||||
"title": "預先授權的工具將在無人工審查下執行。"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"review": {
|
|
||||||
"autoTools": "自動:{{count}}",
|
|
||||||
"customTools": "自訂:{{count}}",
|
|
||||||
"helper": "設定會自動儲存,可隨時回到上方步驟調整。",
|
|
||||||
"mcp": "MCP:{{count}}",
|
|
||||||
"mode": "模式:{{mode}}"
|
|
||||||
},
|
|
||||||
"steps": {
|
|
||||||
"mcp": {
|
|
||||||
"title": "MCP 伺服器"
|
|
||||||
},
|
|
||||||
"permissionMode": {
|
|
||||||
"title": "步驟 1 · 權限模式"
|
|
||||||
},
|
|
||||||
"preapproved": {
|
|
||||||
"title": "步驟 2 · 預先授權工具"
|
|
||||||
},
|
|
||||||
"review": {
|
|
||||||
"title": "步驟 3 · 檢視"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tab": "工具與權限"
|
|
||||||
},
|
|
||||||
"tools": {
|
|
||||||
"approved": "已授權",
|
|
||||||
"caution": "預先授權的工具會略過人工審查,請僅啟用可信任的工具。",
|
|
||||||
"description": "選擇哪些工具可在無需人工核准的情況下執行。",
|
"description": "選擇哪些工具可在無需人工核准的情況下執行。",
|
||||||
"requiresPermission": "未預先授權時需要人工核准。",
|
"requiresPermission": "未預先授權時需要人工核准。",
|
||||||
"tab": "預先授權工具",
|
"tab": "預先授權工具",
|
||||||
|
|||||||
@ -1,10 +1,5 @@
|
|||||||
import { Input, Tooltip } from '@heroui/react'
|
import { Input, Tooltip } from '@heroui/react'
|
||||||
import {
|
import { AgentConfiguration, AgentConfigurationSchema, GetAgentResponse, UpdateAgentForm } from '@renderer/types'
|
||||||
AgentConfiguration,
|
|
||||||
AgentConfigurationSchema,
|
|
||||||
GetAgentResponse,
|
|
||||||
UpdateAgentForm
|
|
||||||
} from '@renderer/types'
|
|
||||||
import { Info } from 'lucide-react'
|
import { Info } from 'lucide-react'
|
||||||
import { useCallback, useEffect, useState } from 'react'
|
import { useCallback, useEffect, useState } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
@ -83,9 +78,7 @@ export const AgentAdvanceSettings: React.FC<AgentAdvanceSettingsProps> = ({ agen
|
|||||||
}}
|
}}
|
||||||
aria-label={t('agent.settings.advance.maxTurns.label')}
|
aria-label={t('agent.settings.advance.maxTurns.label')}
|
||||||
/>
|
/>
|
||||||
<span className="text-foreground-500 text-xs">
|
<span className="text-foreground-500 text-xs">{t('agent.settings.advance.maxTurns.helper')}</span>
|
||||||
{t('agent.settings.advance.maxTurns.helper')}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</SettingsItem>
|
</SettingsItem>
|
||||||
</SettingsContainer>
|
</SettingsContainer>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user