/** * Pi 主程序界面文案映射(pi-ui-cn-data.ts) * * 来源:dist/modes/interactive/**\/*.js —— 未被 esbuild 打包的原始模块。 * 为什么不直接从 bundle 提取:bundle 是 4.3MB 单行压缩码,混入 TypeScript * 编译器报错、undici 报错、系统提示词等噪音;未打包模块边界清晰,可精准区分 * 「给人看的界面文案」与「代码/日志/提示词」。 * * 关键约定:key 一律带外层双引号(如 '"Always trust"')。 * 替换是纯文本 src.split(old).join(new),不带引号的 key 会命中「以它开头的其他文案」: * 例如 "Unknown error" 会把 "Unknown error occurred" 误伤成 "未知错误 occurred"。 * 带引号即匹配 JS 字符串字面量边界,杜绝前缀冲突。 * * 注意:部分条目的引号内是 \uXXXX / \xNN 转义形式(esbuild 输出的就是转义字节), * 这是刻意匹配 bundle 的实际内容,不是笔误。 */ // ---------- 完整文案 ---------- export const UI_CN_MAP: Array<[string, string]> = [ ["\"Always trust\"", "\"Always trust(总是信任)\""], ["\"Never trust\"", "\"Never trust(从不信任)\""], ["\"Anthropic extra usage\"", "\"Anthropic extra usage(Anthropic 额外用量)\""], ["\"Light theme\"", "\"Light theme(浅色主题)\""], ["\"Light Theme\"", "\"Light Theme(浅色主题)\""], ["\"Dark theme\"", "\"Dark theme(深色主题)\""], ["\"Dark Theme\"", "\"Dark Theme(深色主题)\""], ["\"save and go back\"", "\"save and go back(保存并返回)\""], ["\"Change mode\"", "\"Change mode(更改模式)\""], ["\"switch to single theme\"", "\"switch to single theme(切换为单一主题)\""], ["\"Steering mode\"", "\"Steering mode(转向模式)\""], ["\"Follow-up mode\"", "\"Follow-up mode(后续消息模式)\""], ["\"HTTP idle timeout\"", "\"HTTP idle timeout(HTTP 空闲超时)\""], ["\"Cache warming\"", "\"Cache warming(缓存预热)\""], ["\"Hide thinking\"", "\"Hide thinking(隐藏思考)\""], ["\"Mermaid diagrams\"", "\"Mermaid diagrams(Mermaid 图表)\""], ["\"Cache miss notices\"", "\"Cache miss notices(缓存未命中通知)\""], ["\"Show transcript notices for cache costs and provider recovery diagnostics\"", "\"Show transcript notices for cache costs and provider recovery diagnostics(显示缓存成本与提供商恢复诊断的记录通知)\""], ["\"Collapse changelog\"", "\"Collapse changelog(折叠更新日志)\""], ["\"Quiet startup\"", "\"Quiet startup(静默启动)\""], ["\"Install telemetry\"", "\"Install telemetry(安装遥测)\""], ["\"Default project trust\"", "\"Default project trust(默认项目信任)\""], ["\"Double-escape action\"", "\"Double-escape action(双击 Esc 行为)\""], ["\"Tree filter mode\"", "\"Tree filter mode(会话树过滤模式)\""], ["\"Default thinking level per model\"", "\"Default thinking level per model(各模型默认思考级别)\""], ["\" (clear override)\"", "\" (clear override)((清除覆盖))\""], ["\"TUI mode\"", "\"TUI mode(TUI 模式)\""], ["\"Fullscreen exit output\"", "\"Fullscreen exit output(全屏退出输出)\""], ["\"Fullscreen scrollbar\"", "\"Fullscreen scrollbar(全屏滚动条)\""], ["\"Fullscreen copy on select\"", "\"Fullscreen copy on select(全屏选中即复制)\""], // 1.0.0 新增:全屏滚轮设置(标题与说明) ["\"Fullscreen wheel scrolling\"", "\"Fullscreen wheel scrolling(全屏滚轮滚动)\""], ["\"Automatically copy selected text in fullscreen mode; disable to copy selections with Ctrl+X\"", "\"Automatically copy selected text in fullscreen mode; disable to copy selections with Ctrl+X(全屏模式下自动复制选中的文本;关闭后可用 Ctrl+X 复制选中内容)\""], ["\"Lines per mouse-wheel event in fullscreen mode; 'auto' speeds up fast wheel spins where the terminal does not\"", "\"Lines per mouse-wheel event in fullscreen mode; 'auto' speeds up fast wheel spins where the terminal does not(全屏模式下每次滚轮事件滚动的行数;'auto' 会在终端不提供快速滚动时加速连续滚轮)\""], ["\"Show images\"", "\"Show images(显示图片)\""], ["\"Image width\"", "\"Image width(图片宽度)\""], ["\"Auto-resize images\"", "\"Auto-resize images(自动缩放图片)\""], ["\"Block images\"", "\"Block images(阻止图片)\""], ["\"Skill commands\"", "\"Skill commands(技能命令)\""], ["\"Show hardware cursor\"", "\"Show hardware cursor(显示硬件光标)\""], ["\"Editor padding\"", "\"Editor padding(编辑器内边距)\""], ["\"Output padding\"", "\"Output padding(输出内边距)\""], ["\"Autocomplete max items\"", "\"Autocomplete max items(自动补全最大项数)\""], ["\"Clear on shrink\"", "\"Clear on shrink(缩小时清屏)\""], ["\"Terminal progress\"", "\"Terminal progress(终端进度)\""], ["\"What's New\"", "\"What's New(新功能)\""], ["\"Fullscreen layout is not initialized\"", "\"Fullscreen layout is not initialized(全屏布局尚未初始化)\""], ["\"Unknown error occurred\"", "\"Unknown error occurred(发生未知错误)\""], ["\"tmux extended-keys is off. Modified Enter keys may not work. Add `set -g extended-keys on` to ~/.tmux.conf and restart tmux.\"", "\"tmux extended-keys is off. Modified Enter keys may not work. Add `set -g extended-keys on` to ~/.tmux.conf and restart tmux.(tmux 的 extended-keys 已关闭,修改过的 Enter 键可能无效。请在 ~/.tmux.conf 中添加 `set -g extended-keys on` 并重启 tmux。)\""], ["\"tmux extended-keys-format is xterm. Pi works best with csi-u. Add `set -g extended-keys-format csi-u` to ~/.tmux.conf and restart tmux.\"", "\"tmux extended-keys-format is xterm. Pi works best with csi-u. Add `set -g extended-keys-format csi-u` to ~/.tmux.conf and restart tmux.(tmux 的 extended-keys-format 为 xterm,Pi 在 csi-u 下表现最佳。请在 ~/.tmux.conf 中添加 `set -g extended-keys-format csi-u` 并重启 tmux。)\""], ["\"[Skill conflicts]\"", "\"[Skill conflicts]([技能冲突])\""], ["\"[Prompt conflicts]\"", "\"[Prompt conflicts]([提示词冲突])\""], ["\"[Extension issues]\"", "\"[Extension issues]([扩展问题])\""], ["\"[Theme conflicts]\"", "\"[Theme conflicts]([主题冲突])\""], ["\"Failed to create session\"", "\"Failed to create session(创建会话失败)\""], ["\"Forked to new session\"", "\"Forked to new session(已分叉到新会话)\""], ["\"Failed to fork session\"", "\"Failed to fork session(分叉会话失败)\""], ["\"Navigated to selected point\"", "\"Navigated to selected point(已跳转到所选位置)\""], ["\"... (widget truncated)\"", "\"... (widget truncated)(…(组件内容已截断))\""], ["\"Session cwd not found\"", "\"Session cwd not found(未找到会话工作目录)\""], ["\"Startup is still in progress\"", "\"Startup is still in progress(启动仍在进行中)\""], ["\"A bash command is already running. Press Esc to cancel it first.\"", "\"A bash command is already running. Press Esc to cancel it first.(已有 bash 命令正在运行,请先按 Esc 取消。)\""], ["\"Operation aborted\"", "\"Operation aborted(操作已中止)\""], ["\"Compaction cancelled\"", "\"Compaction cancelled(压缩已取消)\""], ["\"Auto-compaction cancelled\"", "\"Auto-compaction cancelled(自动压缩已取消)\""], ["\"Completed compaction is missing from the session context\"", "\"Completed compaction is missing from the session context(会话上下文中缺少已完成的压缩结果)\""], ["\"Branch summary\"", "\"Branch summary(分支摘要)\""], ["\"thinking block\"", "\"thinking block(思考块)\""], ["\"thinking blocks\"", "\"thinking blocks(思考块)\""], ["\"Cache miss\"", "\"Cache miss(缓存未命中)\""], ["\"Cache miss after model switch\"", "\"Cache miss after model switch(切换模型后缓存未命中)\""], ["\"1 time\"", "\"1 time(1 次)\""], ["\"To resume this session:\"", "\"To resume this session:(恢复此会话:)\""], ["\"Suspend to background is not supported on Windows\"", "\"Suspend to background is not supported on Windows(Windows 不支持后台挂起)\""], ["\"No queued messages to restore\"", "\"No queued messages to restore(没有可恢复的排队消息)\""], ["\"Current model does not support thinking\"", "\"Current model does not support thinking(当前模型不支持思考)\""], ["\"Only one model in scope\"", "\"Only one model in scope(范围内只有一个模型)\""], ["\"Only one model available\"", "\"Only one model available(只有一个可用模型)\""], ["\"Queued message for after compaction\"", "\"Queued message for after compaction(压缩后排队的消息)\""], ["\"not set\"", "\"not set(未设置)\""], ["\"Close active overlays before changing TUI mode\"", "\"Close active overlays before changing TUI mode(更改 TUI 模式前请先关闭活动浮层)\""], ["\"Model selection saved to settings\"", "\"Model selection saved to settings(模型选择已保存到设置)\""], ["\"No messages to fork from\"", "\"No messages to fork from(没有可分叉的消息)\""], ["\"Nothing to clone yet\"", "\"Nothing to clone yet(暂无可克隆内容)\""], ["\"Cloned to new session\"", "\"Cloned to new session(已克隆到新会话)\""], ["\"No entries in session\"", "\"No entries in session(会话中没有条目)\""], ["\"Already at this point\"", "\"Already at this point(已在该位置)\""], ["\"Summarize branch?\"", "\"Summarize branch?(要摘要分支吗?)\""], ["\"No summary\"", "\"No summary(不摘要)\""], ["\"Summarize with custom prompt\"", "\"Summarize with custom prompt(用自定义提示词摘要)\""], ["\"Custom summarization instructions\"", "\"Custom summarization instructions(自定义摘要指令)\""], ["\"Wait for the current compaction or tree navigation to finish before navigating the session tree.\"", "\"Wait for the current compaction or tree navigation to finish before navigating the session tree.(请等当前压缩或会话树导航完成后再导航会话树。)\""], ["\"Branch summarization cancelled\"", "\"Branch summarization cancelled(分支摘要已取消)\""], ["\"Navigation cancelled\"", "\"Navigation cancelled(导航已取消)\""], ["\"Selected entry has no text to copy\"", "\"Selected entry has no text to copy(所选条目没有可复制的文本)\""], ["\"Copied selected message to clipboard\"", "\"Copied selected message to clipboard(已复制所选消息到剪贴板)\""], ["\"Resumed session\"", "\"Resumed session(已恢复会话)\""], ["\"Resume cancelled\"", "\"Resume cancelled(恢复已取消)\""], ["\"Resumed session in current cwd\"", "\"Resumed session in current cwd(已在当前目录恢复会话)\""], ["\"Failed to resume session\"", "\"Failed to resume session(恢复会话失败)\""], ["\"No API key providers available.\"", "\"No API key providers available.(没有可用的 API Key 提供商。)\""], ["\"No login providers available.\"", "\"No login providers available.(没有可用的登录提供商。)\""], ["\"You can also use an AWS profile, IAM keys, or role-based credentials.\"", "\"You can also use an AWS profile, IAM keys, or role-based credentials.(你也可以使用 AWS 配置文件、IAM 密钥或基于角色的凭据。)\""], ["\"Waiting for authentication...\"", "\"Waiting for authentication...(等待认证…)\""], ["\"Wait for the current response to finish before reloading.\"", "\"Wait for the current response to finish before reloading.(请等当前回复结束后再重新加载。)\""], ["\"Wait for compaction to finish before reloading.\"", "\"Wait for compaction to finish before reloading.(请等压缩完成后再重新加载。)\""], ["\"Reloading keybindings, extensions, skills, prompts, themes, and context files...\"", "\"Reloading keybindings, extensions, skills, prompts, themes, and context files...(正在重新加载键位、扩展、技能、提示词、主题与上下文文件…)\""], ["\"Reloaded keybindings, extensions, skills, prompts, themes, and context files\"", "\"Reloaded keybindings, extensions, skills, prompts, themes, and context files(已重新加载键位、扩展、技能、提示词、主题与上下文文件)\""], ["\"Import session\"", "\"Import session(导入会话)\""], ["\"Import cancelled\"", "\"Import cancelled(导入已取消)\""], ["\"Failed to import session\"", "\"Failed to import session(导入会话失败)\""], ["\"No agent messages to copy yet.\"", "\"No agent messages to copy yet.(暂无可复制的助手消息。)\""], ["\"Copied last agent message to clipboard\"", "\"Copied last agent message to clipboard(已复制最后一条助手消息到剪贴板)\""], ["\"Session Info\"", "\"Session Info(会话信息)\""], ["\"Cache Warming\"", "\"Cache Warming(缓存预热)\""], ["\"Inactive (cache warming unavailable)\"", "\"Inactive (cache warming unavailable)(未启用(缓存预热不可用))\""], ["\"Cache miss penalty:\"", "\"Cache miss penalty:(缓存未命中惩罚:)\""], ["\"Refresh cost:\"", "\"Refresh cost:(刷新成本:)\""], ["\"1 miss\"", "\"1 miss(1 次未命中)\""], ["\"Cache Re-billed:\"", "\"Cache Re-billed:(缓存重复计费:)\""], ["\"No changelog entries found.\"", "\"No changelog entries found.(未找到更新日志条目。)\""], ["\"Keyboard Shortcuts\"", "\"Keyboard Shortcuts(键盘快捷键)\""], ["\"\\u2713 New session started\"", "\"\\u2713 New session started(✓ 新会话已开始)\""], ["\"\\u2713 Debug log written\"", "\"\\u2713 Debug log written(✓ 调试日志已写入)\""], ["\"Anthropic subscription auth is active. Third-party harness usage draws from extra usage and is billed per token, not your Claude plan limits. Manage extra usage at https://claude.ai/settings/usage. Disable this warning in /settings.\"", "\"Anthropic subscription auth is active. Third-party harness usage draws from extra usage and is billed per token, not your Claude plan limits. Manage extra usage at https://claude.ai/settings/usage. Disable this warning in /settings.(Anthropic 订阅认证已启用。第三方工具用量从额外用量中扣除、按 token 计费,不计入你的 Claude 套餐额度。可在 https://claude.ai/settings/usage 管理额外用量。可在 /settings 中关闭此警告。)\""], ["\"To resume this session:\"", "\"To resume this session:(恢复此会话:)\""], ["\"Changelog: \"", "\"Changelog: (更新日志:)\""], ["\"The transcript contains your messages, model output, tool calls and their results, including file contents and command output read during this session.\"", "\"The transcript contains your messages, model output, tool calls and their results, including file contents and command output read during this session.(记录包含你的消息、模型输出、工具调用及其结果,包括本次会话中读取的文件内容和命令输出。)\""], ["\"Bug report cancelled\"", "\"Bug report cancelled(缺陷报告已取消)\""], ["\"Uploading bug reports requires online mode. Use Export as Zip instead.\"", "\"Uploading bug reports requires online mode. Use Export as Zip instead.(上传缺陷报告需要在线模式,请改用「导出为 Zip」。)\""], ["\"the current model\"", "\"the current model(当前模型)\""], ["\"Upload failed\"", "\"Upload failed(上传失败)\""], ["\"Export as Zip\"", "\"Export as Zip(导出为 Zip)\""], ["\"Report a bug\"", "\"Report a bug(报告缺陷)\""], ["\"Include the session transcript?\"", "\"Include the session transcript?(是否包含会话记录?)\""], ["\"Yes, include the transcript\"", "\"Yes, include the transcript(是,包含记录)\""], ["\"Yes, generate a summary\"", "\"Yes, generate a summary(是,生成摘要)\""], ["\"Bug report\"", "\"Bug report(缺陷报告)\""], ["\"Upload Report\"", "\"Upload Report(上传报告)\""], ["\"not included\"", "\"not included(未包含)\""], ["\"Uploading bug report...\"", "\"Uploading bug report...(正在上传缺陷报告…)\""], ["\"API key\"", "\"API key(API Key)\""], ["\"Select provider to configure:\"", "\"Select provider to configure:(选择要配置的提供商:)\""], ["\"Select provider to logout:\"", "\"Select provider to logout:(选择要登出的提供商:)\""], ["\"No providers available\"", "\"No providers available(没有可用的提供商)\""], ["\"No providers logged in. Use /login first.\"", "\"No providers logged in. Use /login first.(没有已登录的提供商,请先使用 /login。)\""], ["\"No matching providers\"", "\"No matching providers(没有匹配的提供商)\""], ["\" \\u2713 configured\"", "\" \\u2713 configured(✓ 已配置)\""], ["\"Cmd+click to open\"", "\"Cmd+click to open(Cmd+点击打开)\""], ["\"Ctrl+click to open\"", "\"Ctrl+click to open(Ctrl+点击打开)\""], ["\"to cancel\"", "\"to cancel(取消)\""], ["\"to cancel,\"", "\"to cancel,(取消,)\""], ["\"to submit\"", "\"to submit(提交)\""], ["\"to close\"", "\"to close(关闭)\""], ["\"GitHub CLI is not logged in. Run 'gh auth login' first.\"", "\"GitHub CLI is not logged in. Run 'gh auth login' first.(GitHub CLI 未登录,请先运行 'gh auth login'。)\""], ["\"GitHub CLI (gh) is not installed. Install it from https://cli.github.com/\"", "\"GitHub CLI (gh) is not installed. Install it from https://cli.github.com/(未安装 GitHub CLI (gh),请从 https://cli.github.com/ 安装。)\""], ["\"Uploading to Radius...\"", "\"Uploading to Radius...(正在上传到 Radius…)\""], // 1.0.0 新增:Radius 提供商(登录项与说明) ["\"Radius API key\"", "\"Radius API key(Radius API 密钥)\""], ["\"Radius is a service crafted for Pi by the builders of Pi, Earendil Works\"", "\"Radius is a service crafted for Pi by the builders of Pi, Earendil Works(Radius 是 Pi 的开发者 Earendil Works 为 Pi 打造的服务)\""], ["\"Share cancelled\"", "\"Share cancelled(分享已取消)\""], ["\"Pi session\"", "\"Pi session(Pi 会话)\""], ["\"Creating gist...\"", "\"Creating gist...(正在创建 gist…)\""], ["\"Failed to parse gist ID from gh output\"", "\"Failed to parse gist ID from gh output(无法从 gh 输出中解析 gist ID)\""], ["\"Share anonymous usage data\"", "\"Share anonymous usage data(分享匿名使用数据)\""], ["\"Don't share\"", "\"Don't share(不分享)\""], ["\"Pick a theme.\"", "\"Pick a theme.(选择主题。)\""], ["\"Opt-in to anonymous usage data sharing?\"", "\"Opt-in to anonymous usage data sharing?(是否选择分享匿名使用数据?)\""], ["\"skip setup\"", "\"skip setup(跳过设置)\""], ["\"branch summary\"", "\"branch summary(分支摘要)\""], ["\"context edit\"", "\"context edit(上下文编辑)\""], ["\" [no-tools]\"", "\" [no-tools]([无工具])\""], ["\" [user]\"", "\" [user]([用户])\""], ["\" [labeled]\"", "\" [labeled]([已标记])\""], ["\" [all]\"", "\" [all]([全部])\""], ["\" [+label time]\"", "\" [+label time]([+标记时间])\""], ["\"user: \"", "\"user: (用户:)\""], ["\"assistant: \"", "\"assistant: (助手:)\""], ["\"(no content)\"", "\"(no content)((无内容))\""], ["\"label time\"", "\"label time(标记时间)\""], ["\"Branch summary (\"", "\"Branch summary ((分支摘要()\""], ["\" to expand)\"", "\" to expand)(展开))\""], ["\"Model Configuration\"", "\"Model Configuration(模型配置)\""], ["\"all enabled\"", "\"all enabled(全部启用)\""], ["\" [unavailable]\"", "\" [unavailable]([不可用])\""], ["\"Model unavailable\"", "\"Model unavailable(模型不可用)\""], ["\" default\"", "\" default(默认)\""], ["\"\\u25CB Current Folder | \"", "\"\\u25CB Current Folder(当前文件夹) | \""], ["\"\\u25C9 Current Folder\"", "\"\\u25C9 Current Folder(◉ 当前文件夹)\""], ["\" | \\u25CB All\"", "\" | \\u25CB All(| ○ 全部)\""], ["\"\\u25C9 All\"", "\"\\u25C9 All(◉ 全部)\""], ["\" No user messages found\"", "\" No user messages found(未找到用户消息)\""], ["\"Fork from Message\"", "\"Fork from Message(从此消息分叉)\""], ["\"Select a user message to copy the active path up to that point into a new session\"", "\"Select a user message to copy the active path up to that point into a new session(选择一条用户消息,把截取到该处的活动路径复制到新会话)\""], ["\"Response was truncated before completion.\"", "\"Response was truncated before completion.(回复在完成前被截断。)\""], ["\"Context overflow detected, \"", "\"Context overflow detected, (检测到上下文溢出,)\""], ["\"pi has joined Earendil\"", "\"pi has joined Earendil(pi 已加入 Earendil)\""], ["\"Read the blog post:\"", "\"Read the blog post:(阅读博客文章:)\""], ["\" (Ctrl+Enter on Windows Terminal)\"", "\" (Ctrl+Enter on Windows Terminal)((Windows Terminal 上为 Ctrl+Enter))\""], ["\"ARMIN SAYS HI\"", "\"ARMIN SAYS HI(ARMIN 打招呼)\""], ["\"external editor\"", "\"external editor(外部编辑器)\""], ["\"Empty regex\"", "\"Empty regex(空正则)\""], ["\"Free Kimi K2.5 via OpenCode Zen\"", "\"Free Kimi K2.5 via OpenCode Zen(通过 OpenCode Zen 免费使用 Kimi K2.5)\""], ["\"Powered by daxnuts\"", "\"Powered by daxnuts(由 daxnuts 提供)\""], ["\"Try OpenCode\"", "\"Try OpenCode(试试 OpenCode)\""], // ---- 模板串静态前缀(变量表达式保留原文,pi 升级不受影响)---- ["Could not refresh model catalogs: ", "Could not refresh model catalogs(无法刷新模型目录): "], ["Saved decision: ", "Saved decision(已保存的决定): "], ["Current session: ", "Current session(当前会话): "], ["trash: ", "trash(回收站): "], ["Thinking Level for ", "Thinking Level for(思考级别) "], ["New version ", "New version(新版本) "], ["Enter to select ", "Enter to select(回车选择) "], ["Type to filter ", "Type to filter(输入过滤) "], ["Show transcript notices for cache costs and provider recovery diagnostics", "Show transcript notices for cache costs and provider recovery diagnostics(显示缓存成本与提供商恢复诊断的记录通知)"], // ---- /settings 子页面补充 ---- ["\"Project Local Resources\"", "\"Project Local Resources(项目本地资源)\""], ["\"Global Resources\"", "\"Global Resources(全局资源)\""], ["\"switch mode\"", "\"switch mode(切换模式)\""], ["Welcome to ${APP_NAME}, the minimal coding agent.", "Welcome to ${APP_NAME}, the minimal coding agent.(欢迎使用 ${APP_NAME},极简编码助手。)"], ["Session-only. ${keyDisplayText(\"app.models.save\")} to save to settings.", "Session-only. ${keyDisplayText(\"app.models.save\")} to save to settings.(仅本会话有效。按 ${keyDisplayText(\"app.models.save\")} 保存到设置。)"], // ---- 通知类模板串(整串匹配)---- ["Session compacted ${times}", "Session compacted(会话已压缩) ${times}"], ["Thinking level: ${newLevel}", "Thinking level:(思考级别) ${newLevel}"], ["Default thinking level: ${level}", "Default thinking level:(默认思考级别) ${level}"], ["Switched to ${result.model.name||result.model.id}${thinkingStr}", "Switched to(已切换到) ${result.model.name||result.model.id}${thinkingStr}"], ["Default model: ${model.provider}/${model.id}", "Default model:(默认模型) ${model.provider}/${model.id}"], ["Model scope: ${modelList}${cycleHint}", "Model scope:(模型范围) ${modelList}${cycleHint}"], ["Tool output: ${expanded?\"expanded\":\"collapsed\"}", "Tool output:(工具输出) ${expanded?\"expanded\":\"collapsed\"}"], ["Thinking blocks: ${this.hideThinkingBlock?\"hidden\":\"visible\"}", "Thinking blocks:(思考块) ${this.hideThinkingBlock?\"hidden\":\"visible\"}"], ["`Logged in to ${providerName}`", "`Logged in to(已登录) ${providerName}`"], ["Logged out of ${providerOption.name}", "Logged out of(已登出) ${providerOption.name}"], ["`Saved API key for ${providerName}`", "`Saved API key for(已保存 API Key) ${providerName}`"], ["`Session exported to: ${filePath}`", "`Session exported to:(会话已导出到) ${filePath}`"], ["`Session imported from: ${inputPath}`", "`Session imported from:(会话已从以下路径导入) ${inputPath}`"], ["Session name: ${currentName}", "Session name:(会话名称) ${currentName}"], ["Migrated credentials to auth.json: ${migratedProviders.join(\", \")}", "Migrated credentials to auth.json:(已将凭据迁移到 auth.json) ${migratedProviders.join(\", \")}"], ["Aborted after ${retryAttempt} retry attempt${retryAttempt>1?\"s\":\"\"}", "Aborted after(已中止,重试次数) ${retryAttempt} retry attempt${retryAttempt>1?\"s\":\"\"}"], ["Saved trust decision: ${selection.trusted?\"trusted\":\"untrusted\"}. Restart ${APP_NAME} for this to take effect.", "Saved trust decision:(已保存信任决定) ${selection.trusted?\"trusted\":\"untrusted\"}. Restart ${APP_NAME} for this to take effect."], // ---- 通知类动态前缀 ---- // ---- 1.0.0 设置界面 / 登录菜单补漏 ---- ["\"Auto-compact\"", "\"Auto-compact(自动压缩)\""], ["\"Transport\"", "\"Transport(传输方式)\""], ["\"Theme\"", "\"Theme(主题)\""], ["\"Apply\"", "\"Apply(应用)\""], ["\"Bearer token\"", "\"Bearer token(Bearer 令牌)\""], ["\"AWS profile\"", "\"AWS profile(AWS 配置档案)\""], ["\"Existing AWS credential chain\"", "\"Existing AWS credential chain(现有 AWS 凭证链)\""], ["\"Google Cloud API key\"", "\"Google Cloud API key(Google Cloud API 密钥)\""], ["\"Application Default Credentials\"", "\"Application Default Credentials(应用默认凭证)\""], ["\"Service account credentials file\"", "\"Service account credentials file(服务账号凭证文件)\""], ["\"30 sec\"", "\"30 sec(30 秒)\""], ["\"1 min\"", "\"1 min(1 分钟)\""], ["\"2 min\"", "\"2 min(2 分钟)\""], ["\"5 min\"", "\"5 min(5 分钟)\""], ["\"Enable\"", "\"Enable(启用)\""], ["\"Disable\"", "\"Disable(禁用)\""], ["\"Sign in\"", "\"Sign in(登录)\""], ["\"Sign out\"", "\"Sign out(登出)\""], ["\"Reconnect\"", "\"Reconnect(重新连接)\""], ["\"Exposure\"", "\"Exposure(曝光方式)\""], ["\"System (matches your terminal colors)\"", "\"System (matches your terminal colors)(跟随终端配色)\""], ["\"Dark\"", "\"Dark(深色)\""], ["\"Light\"", "\"Light(浅色)\""], ["\"Yes\"", "\"Yes(是)\""], ["\"No\"", "\"No(否)\""], ["\"Continue\"", "\"Continue(继续)\""], ["\"Cancel\"", "\"Cancel(取消)\""], ["\"Download model\\u2026\"", "\"Download model\\u2026(下载模型…)\""], ["\"MCP servers\"", "\"MCP servers(MCP 服务器)\""], ["\"Loading model\"", "\"Loading model(正在加载模型)\""], ["\"Downloading model\"", "\"Downloading model(正在下载模型)\""], ["\"Sign in with Kimi Code\"", "\"Sign in with Kimi Code(使用 Kimi Code 登录)\""], ["\"Sign in with Meta\"", "\"Sign in with Meta(使用 Meta 登录)\""], ["\"Sign in with ChatGPT\"", "\"Sign in with ChatGPT(使用 ChatGPT 登录)\""], ["\"Sign in with OpenRouter\"", "\"Sign in with OpenRouter(使用 OpenRouter 登录)\""], ["\"Sign in with SuperGrok or X Premium\"", "\"Sign in with SuperGrok or X Premium(使用 SuperGrok 或 X Premium 登录)\""], ["\" \\u2022 not configured\"", "\" \\u2022 not configured(未配置)\""], ["\" automatic\"", "\" automatic(自动)\""], ["`Sign in with ${radiusOption.name}`", "`Sign in with ${radiusOption.name}(使用 Radius 登录)`"], ["\"\"", "\"(提供商/模型)\""], ["\"\"", "\"(级别)\""], ["\"\"", "\"(描述)\""], ["\"\"", "\"(提供商)\""], // 启动画面引导语。源码位于 theme.fg("dim", "Pi can explain …"),参数是裸字符串, // 不落在白名单上下文(label: / description: / ui.*)里,自动扫描扫不到,只能手写。 // 整句唯一,带引号即可安全匹配。 [ "\"Pi can explain its own features and look up its docs. Ask it how to use or extend Pi.\"", "\"Pi can explain its own features and look up its docs. Ask it how to use or extend Pi.(Pi 能解释自身功能并查阅自己的文档。可以问它如何使用或扩展 Pi。)\"", ], ]; // ---------- 半截拼接句 ---------- // 源码形如 hint("app.exit", "to exit") —— 键位名由 pi 渲染,中间的空白由渲染函数拼上。 export const UI_FRAG_MAP: Array<[string, string]> = [ ["\"to interrupt\"", "\"to interrupt(中断)\""], ["\"to clear\"", "\"to clear(清空)\""], ["\"to exit\"", "\"to exit(退出)\""], ["\"to exit (empty)\"", "\"to exit (empty)(退出(空))\""], ["\"to suspend\"", "\"to suspend(挂起)\""], ["\"to delete to end\"", "\"to delete to end(删除到行尾)\""], ["\"to cycle thinking level\"", "\"to cycle thinking level(循环切换思考级别)\""], ["\"to cycle models\"", "\"to cycle models(循环切换模型)\""], ["\"to select model\"", "\"to select model(选择模型)\""], ["\"to expand tools\"", "\"to expand tools(展开工具)\""], ["\"to expand thinking\"", "\"to expand thinking(展开思考)\""], ["\"for external editor\"", "\"for external editor(外部编辑器)\""], ["\"for commands\"", "\"for commands(命令)\""], ["\"to run bash\"", "\"to run bash(运行 bash)\""], ["\"to run bash (no context)\"", "\"to run bash (no context)(运行 bash(无上下文))\""], ["\"to queue follow-up\"", "\"to queue follow-up(排队后续消息)\""], ["\"to edit all queued messages\"", "\"to edit all queued messages(编辑所有排队消息)\""], ["\"drop files\"", "\"drop files(拖放文件)\""], ["\"to attach\"", "\"to attach(附加)\""], ["\"to collapse\"", "\"to collapse(折叠)\""], ["\"to expand\"", "\"to expand(展开)\""], // 全屏模式下滚动到末尾时浮出的提示(模板串中间片段:前面是“↓ ”+ 空格,后面紧跟 ${shortcut} 插值, // 所以只能取纯 ASCII 的这段文字,避开 \u2193 / \xB7 转义与嵌套模板串) ["Jump to latest message", "Jump to latest message(跳到最新消息)"], // ---------- 启动画面紧凑提示行 ---------- // 未展开启动画面时的那一行: // escape interrupt · ctrl+c/ctrl+d clear/exit · / commands · ! bash · ctrl+o more // 这一批词与上面的展开版是两套不同字符串:展开版是 "to interrupt" / "for commands" // / "to run bash",紧凑版是去掉前缀的裸词 "interrupt" / "commands" / "bash" / "more"。 // // 为何要带函数调用锚点而非裸字符串: // "commands" 这类裸词在 chunk 里出现多次,裸替换会误伤无关位置; // 带上 hint(...)/rawKeyHint(...) 整个调用表达式做锚点即为唯一匹配 // (实测下列锚点在该 chunk 中各出现 1 次)。第二个参数只用于显示, // 第一个参数是键位 id,改成中文不影响按键行为。 ["hint(\"app.interrupt\",\"interrupt\")", "hint(\"app.interrupt\",\"interrupt(中断)\")"], ["rawKeyHint(\"/\",\"commands\")", "rawKeyHint(\"/\",\"commands(命令)\")"], ["rawKeyHint(\"!\",\"bash\")", "rawKeyHint(\"!\",\"bash(运行命令)\")"], ["hint(\"app.tools.expand\",\"more\")", "hint(\"app.tools.expand\",\"more(更多)\")"], ["\"clear/exit\"", "\"clear/exit(清空/退出)\""], // 模板串静态片段: // `Press ${keyText("app.tools.expand")} to show full startup help${showDetails?" and loaded resources":""}.` // 只替换两段纯文本,保留 ${...} 表达式原样,避免破坏模板结构。 ["to show full startup help", "to show full startup help(显示完整启动帮助)"], [" and loaded resources", " and loaded resources(与已加载资源)"], ];