/** * `auto-continue` namespace dictionaries: copy for the plugin settings card * registered into the `settings.plugin.item` seat of the plugin-configuration * section. Includes the card-chrome keys the card component reads. */ import { LOCALIZED_TEXT_DEFAULTS } from '../shared/core.ts'; /** 简体中文词典(键集的事实来源)。 */ export const zh = { 'card.title': '自动继续', 'card.description': '接住意外中断的请求,等现场稳定下来,再把对话交还给 Agent。', 'flow.interrupted': '检测中断', 'flow.grace': '安全等待', 'flow.continue': '发送继续', 'repo.star': '去 GitHub 点 Star', 'repo.aria': '打开 dsh-auto-continue 的 GitHub 开源地址并点 Star', 'section.handoff.title': '接力方式', 'section.handoff.description': '决定中断后说什么,以及什么时候暂时停手。', 'section.safety.title': '安全节奏', 'section.safety.description': '先确认上一步,再控制等待与连续续跑的边界。', 'section.recovery.title': '恢复雷达', 'section.recovery.description': '扫描掉线会话,识别可恢复错误并逐步退避。', 'section.loop.title': '循环断路器', 'section.loop.description': '发现空转时及时换路,而不是让 Agent 原地消耗。', 'section.live.title': '现场状态', 'section.live.description': '看看今天接住了多少次,以及哪些会话还在暂停。', 'field.paused': '暂停自动继续', 'field.pausedHint': '全局暂停: 实时与扫描都不会再自动发送, 已排队的待发送也会取消。', 'field.continueText': '继续文本', 'field.continueTextHint': '中断后自动发送的消息内容。', 'default.continueText': LOCALIZED_TEXT_DEFAULTS.zh.continueText, 'field.continueTextMaxTokens': '超限时的继续文本', 'field.continueTextMaxTokensHint': '达到输出 token 上限时自动发送的文本, 支持与继续文本相同的占位符。', 'default.continueTextMaxTokens': LOCALIZED_TEXT_DEFAULTS.zh.continueTextMaxTokens, 'field.guardTools': '幂等护栏', 'field.guardToolsHint': '续跑前检查上一步工具调用: 结果未确认时提示先确认状态, 已成功时提示不要重复执行, 避免重复 commit/调 API。', 'field.guardPendingText': '结果未确认时的护栏文本', 'field.guardPendingTextHint': '上一步工具可能已部分执行时附加到继续文本之后, 支持 {tool} 占位符。', 'default.guardPendingText': LOCALIZED_TEXT_DEFAULTS.zh.guardPendingText, 'field.guardDoneText': '工具已成功时的护栏文本', 'field.guardDoneTextHint': '上一步工具已确认成功时附加到继续文本之后, 支持 {tool} 与 {result}(结果摘要)占位符。', 'default.guardDoneText': LOCALIZED_TEXT_DEFAULTS.zh.guardDoneText, 'field.graceMs': '宽限期 (ms)', 'field.graceMsHint': '检测到中断后等待的时长; 期间宿主自行恢复则取消。', 'field.cooldownMs': '冷却时间 (ms)', 'field.cooldownMsHint': '同一会话两次自动「继续」的最小间隔, 失败尝试也计入。', 'field.maxConsecutive': '最大连续次数', 'field.maxConsecutiveHint': '同一会话连续自动「继续」的上限; 超过后停止, 直到用户手动介入或出现成功回合。', 'field.scanOnBoot': '启动/重连扫描', 'field.scanOnBootHint': '页面启动或重连时扫描最近中断的会话并自动续跑(如浏览器关闭期间宿主崩溃)。', 'field.scanLimit': '扫描会话数', 'field.scanLimitHint': '最多检查多少个最近更新的会话(不含运行中与子代理会话)。', 'field.freshMs': '扫描时间窗 (ms)', 'field.freshMsHint': '扫描只处理该时间窗内的中断。', 'field.verbose': '详细日志', 'field.verboseHint': '在浏览器控制台输出 [auto-continue] 日志。', 'field.classify': '错误分类', 'field.classifyHint': '仅自动恢复临时性错误(网络/超时/5xx 等); 认证/余额/模型不存在等永久性错误跳过并通知。', 'field.retryableErrorPatterns': '自定义可恢复错误', 'field.retryableErrorPatternsHint': '每行一个大小写不敏感的普通文本片段; 命中错误码、HTTP 状态或消息时覆盖内置分类。请只填 provider 稳定且足够具体的文案, 过宽会重复请求。', 'field.retryableErrorPatternsPlaceholder': '例如:Upstream rejected the request as invalid', 'field.backoffFactor': '退避系数', 'field.backoffFactorHint': '连续失败时冷却间隔的倍率(如 2 表示 20s→40s→80s 递增)。', 'field.backoffMaxMs': '最大退避间隔 (ms)', 'field.backoffMaxMsHint': '自适应退避的上限, 防止等待过久。', 'field.notify': '浏览器通知', 'field.notifyHint': '自动继续成功/放弃/遇到永久性错误时弹出浏览器通知, 通知带「立即续跑」与「暂停该会话 1 小时」按钮。', 'stats.title': '今日统计', 'stats.sent': '自动继续', 'stats.skipped': '跳过(永久错误)', 'stats.recovered': '恢复成功', 'stats.failed': '继续后仍失败', 'stats.gaveUp': '停止(达上限)', 'stats.looped': '循环打断', 'field.loopGuard': '循环守卫', 'field.loopGuardHint': '检测运行中的回合空转: 连续短句且无工具调用、流式消息内连续复读, 或连续调用相同工具时, 自动取消并用循环提示文本重启回合。', 'field.loopShortChars': '短句长度上限 (字符)', 'field.loopShortCharsHint': '模型消息文本短于该值计为一条短句(空转信号)。', 'field.loopWindowMs': '短句时间窗 (ms)', 'field.loopWindowMsHint': '连续短句必须落在这个时间窗内; 正常思考的短文本散布在长时间里不会被误判。', 'field.loopShortCount': '连续短句阈值', 'field.loopShortCountHint': '时间窗内连续多少条短句且期间无工具调用时判定空转循环。', 'field.loopRepeatText': '相同消息重复次数', 'field.loopRepeatTextHint': '连续输出多少条完全相同的消息时判定空转(最强信号, 不限长度, 也用于流式消息内连续复读段落)。', 'field.loopToolRepeat': '同工具重复次数', 'field.loopToolRepeatHint': '同工具+同参数+同结果的连续调用多少次时判定死循环; 参数或结果有变化视为有进展。', 'field.loopText': '循环提示文本', 'field.loopTextHint': '打断后重启回合时发送的文本, 支持 {tool} 占位符。', 'default.loopText': LOCALIZED_TEXT_DEFAULTS.zh.loopText, 'stats.byCode': '按错误码统计', 'stats.empty': '今天还没有自动继续记录。', 'stats.reset': '清零', 'pause.title': '已暂停会话', 'pause.none': '没有暂停中的会话。', 'pause.clearAll': '全部解除', 'pause.unpause': '解除', 'pause.minutes': '分钟', 'chrome.collapse': '收起设置', 'chrome.expand': '展开设置', 'chrome.unsaved': '未保存', 'chrome.readOnly': '当前部署的设置只读。', 'chrome.saveFailed': '部署未接受这些值, 已保留供你修改。', 'chrome.discard': '放弃', 'chrome.saving': '保存中…', 'chrome.save': '保存', 'chrome.overridden': '已覆盖', 'chrome.reset': '恢复默认', 'chrome.invalidNumber': '请输入数字, 留空则使用默认值。', 'chrome.inherit': '继承', 'chrome.on': '开', 'chrome.off': '关', } satisfies Record; /** 本插件的键联合。 */ export type SettingsCardKey = keyof typeof zh; /** English dictionary, checked complete against the zh key set. */ export const en: Record = { 'card.title': 'Auto continue', 'card.description': 'Catches an interrupted request, waits for things to settle, then hands the thread back to the agent.', 'flow.interrupted': 'Interrupted', 'flow.grace': 'Safe pause', 'flow.continue': 'Continue', 'repo.star': 'Star on GitHub', 'repo.aria': 'Open the dsh-auto-continue repository on GitHub and star it', 'section.handoff.title': 'The handoff', 'section.handoff.description': 'Choose what gets sent after an interruption and when the relay should stand down.', 'section.safety.title': 'Safety rhythm', 'section.safety.description': 'Confirm the previous step, then set the boundaries for waiting and repeated resumes.', 'section.recovery.title': 'Recovery radar', 'section.recovery.description': 'Find dropped sessions, recognize recoverable errors, and back off gracefully.', 'section.loop.title': 'Loop breaker', 'section.loop.description': 'Spot a spinning agent and route it forward before it burns time in place.', 'section.live.title': 'Live signal', 'section.live.description': 'See what the relay caught today and which sessions are still paused.', 'field.paused': 'Pause auto-continue', 'field.pausedHint': 'Globally pause: no live or scan auto-send fires, and queued pending sends are cancelled.', 'field.continueText': 'Continue text', 'field.continueTextHint': 'Message automatically sent after an interruption.', 'default.continueText': LOCALIZED_TEXT_DEFAULTS.en.continueText, 'field.continueTextMaxTokens': 'Continue text (max tokens)', 'field.continueTextMaxTokensHint': 'Text sent when the output token ceiling is reached; same placeholders as the continue text.', 'default.continueTextMaxTokens': LOCALIZED_TEXT_DEFAULTS.en.continueTextMaxTokens, 'field.guardTools': 'Idempotency guard', 'field.guardToolsHint': 'Before resuming, inspect the last tool call: if its result is unconfirmed, tell the model to check state first; if it succeeded, tell it not to rerun — avoids duplicate commits / API calls.', 'field.guardPendingText': 'Guard text (unconfirmed result)', 'field.guardPendingTextHint': 'Appended when the last tool may have partially executed; supports the {tool} placeholder.', 'default.guardPendingText': LOCALIZED_TEXT_DEFAULTS.en.guardPendingText, 'field.guardDoneText': 'Guard text (tool succeeded)', 'field.guardDoneTextHint': 'Appended when the last tool is confirmed done; supports {tool} and {result} (result excerpt).', 'default.guardDoneText': LOCALIZED_TEXT_DEFAULTS.en.guardDoneText, 'field.graceMs': 'Grace period (ms)', 'field.graceMsHint': 'Wait after an interruption; cancelled if the host recovers on its own.', 'field.cooldownMs': 'Cooldown (ms)', 'field.cooldownMsHint': 'Minimum interval between auto-continues per session; failed attempts count too.', 'field.maxConsecutive': 'Max consecutive', 'field.maxConsecutiveHint': 'Max consecutive auto-continues per session; stops until a user intervenes or a turn completes.', 'field.scanOnBoot': 'Scan on load / reconnect', 'field.scanOnBootHint': 'Scan recently interrupted sessions on page load or reconnect (e.g. the host crashed while the browser was closed).', 'field.scanLimit': 'Scan limit', 'field.scanLimitHint': 'How many most-recently-updated sessions to check (running / subagent sessions excluded).', 'field.freshMs': 'Scan window (ms)', 'field.freshMsHint': 'Only interruptions inside this window are considered.', 'field.verbose': 'Verbose logs', 'field.verboseHint': 'Log [auto-continue] lines to the browser console.', 'field.classify': 'Classify errors', 'field.classifyHint': 'Auto-resume transient failures only (network/timeout/5xx…); auth, balance and model errors are skipped and notified.', 'field.retryableErrorPatterns': 'Custom retryable errors', 'field.retryableErrorPatternsHint': 'One case-insensitive literal per line. A match in the error code, HTTP status, or message overrides built-in classification. Use only stable, provider-specific text; broad matches can repeat requests.', 'field.retryableErrorPatternsPlaceholder': 'For example: Upstream rejected the request as invalid', 'field.backoffFactor': 'Backoff factor', 'field.backoffFactorHint': 'Cooldown multiplier per consecutive failure (2 = 20s→40s→80s…).', 'field.backoffMaxMs': 'Max backoff (ms)', 'field.backoffMaxMsHint': 'Cap on the adaptive backoff interval.', 'field.notify': 'Browser notifications', 'field.notifyHint': 'Notify when auto-continue fires, gives up, or hits a permanent error; notifications carry "Resume now" and "Pause this session 1h" buttons.', 'stats.title': "Today's stats", 'stats.sent': 'Auto-continued', 'stats.skipped': 'Skipped (permanent)', 'stats.recovered': 'Recovered', 'stats.failed': 'Failed after', 'stats.gaveUp': 'Gave up (cap)', 'stats.looped': 'Loops broken', 'field.loopGuard': 'Loop guard', 'field.loopGuardHint': 'Detects a running turn spinning in place — many short sentences with no tool calls, repeated paragraphs inside one streamed assistant message, or the same tool repeating — then cancels and restarts with the loop text.', 'field.loopShortChars': 'Short-sentence max (chars)', 'field.loopShortCharsHint': 'A model message shorter than this counts as a short sentence (spinning signal).', 'field.loopWindowMs': 'Short-sentence window (ms)', 'field.loopWindowMsHint': 'Consecutive short sentences must land inside this window; normal thinking spread over time is not misjudged.', 'field.loopShortCount': 'Short-sentence threshold', 'field.loopShortCountHint': 'How many consecutive short sentences inside the window, with no tool call, trip the loop guard.', 'field.loopRepeatText': 'Identical message count', 'field.loopRepeatTextHint': 'How many consecutive identical messages trip the guard (strongest signal, any length; also used for repeated paragraphs inside one streamed assistant message).', 'field.loopToolRepeat': 'Same-tool repeat count', 'field.loopToolRepeatHint': 'How many consecutive calls of the same tool with identical arguments and results trip the loop guard; a changed argument or result counts as progress.', 'field.loopText': 'Loop text', 'field.loopTextHint': 'Text sent after the loop guard restarts a turn; supports the {tool} placeholder.', 'default.loopText': LOCALIZED_TEXT_DEFAULTS.en.loopText, 'stats.byCode': 'By error code', 'stats.empty': 'No auto-continue activity today.', 'stats.reset': 'Reset', 'pause.title': 'Paused sessions', 'pause.none': 'No sessions paused.', 'pause.clearAll': 'Clear all', 'pause.unpause': 'Resume', 'pause.minutes': 'min', 'chrome.collapse': 'Hide settings', 'chrome.expand': 'Show settings', 'chrome.unsaved': 'Unsaved', 'chrome.readOnly': 'This deployment stores settings read-only.', 'chrome.saveFailed': 'The deployment did not accept these values; they were left for you to correct.', 'chrome.discard': 'Discard', 'chrome.saving': 'Saving…', 'chrome.save': 'Save', 'chrome.overridden': 'Overridden', 'chrome.reset': 'Reset to default', 'chrome.invalidNumber': 'Enter a number, or leave blank to use the default.', 'chrome.inherit': 'Inherit', 'chrome.on': 'On', 'chrome.off': 'Off', };