/** `conversation` namespace dictionaries. */

/** Dictionary namespace owned by this plugin. */
export const NS = 'conversation'

// The claimed /plan hint and the plan-mode textarea placeholder describe the same next action.
const PLAN_NEXT_ACTION_ZH = '描述你的任务以生成计划'
const PLAN_NEXT_ACTION_EN = 'describe your task to generate plan'

/** Simplified Chinese dictionary (the key-set source of truth). */
export const zh = {
  'hint.plan': PLAN_NEXT_ACTION_ZH,
  'hint.goal': '输入目标，智能体将持续执行',
  'hint.goal.active': '当前目标进行中。可输入 edit 修改 / pause 暂停 / resume 继续 / clear 清除',
  'placeholder.plan': PLAN_NEXT_ACTION_ZH,
  'placeholder.default': '发消息或做任务… / 调用指令 @ 文件或对话',
  'placeholder.unavailable': '会话不可用',
  'placeholder.parentOffline': '父会话已离线，无法继续发送；仍可停止当前运行',
  'placeholder.hero': '描述你想要构建的内容… / 调用指令 @ 文件或对话',
  'placeholder.workspace': '选择一个工作区开始',
  'placeholder.steerQueue': 'Cmd/Ctrl+Enter 插话发送全部排队消息',
  'input.commands': '指令',
  'input.stop': '停止生成',
  'input.send': '发送消息',
  'input.accessMode': '访问模式，当前：{name}',
  'image.dropTitle': '图片拖动到此处即可添加',
  'image.dropDesc': '最多 {count} 张，每张 {size}',
  'image.dropBlocked': '当前无法添加图片',
  'image.pending': '待发送图片',
  'image.openOriginal': '查看原图',
  'image.openOriginalLabel': '{label}，点击查看原图',
  'image.remove': '移除图片 {name}',
  'image.scrollLeft': '向左滚动图片',
  'image.scrollRight': '向右滚动图片',
  'image.original': '原图',
  'image.label': '图片',
  'image.loadFailed': '图片加载失败，点击重试',
  'image.loading': '图片加载中…',
  'image.preview': '原图预览',
  'image.closePreview': '关闭原图预览',
  'image.unsupportedType': '仅支持 PNG、JPG、WebP、GIF 格式的图片',
  'image.tooMany': '一条消息最多添加 {count} 张图片',
  'image.fileTooLarge': '单张图片不能超过 {size}',
  'image.totalTooLarge': '图片总大小超过 {size}，请移除部分图片',
  'image.tooManyPixels': '图片分辨率过大，请压缩后重试',
  'image.dimensionTooLarge': '图片宽高不能超过 {size}px，请缩小后重试',
  'image.modelUnsupported': '当前模型不支持图片，请切换支持图片的模型',
  'image.subagentUnsupported': '子智能体会话暂不支持图片',
  'image.sendFailed': '图片发送失败（{reason}），请重新添加图片后再试',
  'context.aria': '上下文已用 {percent}',
  'context.used': '上下文已用',
  'context.system': '系统提示词',
  'context.tools': '工具',
  'context.messages': '对话消息',
  'settings.enter.title': '繁忙时 Enter 键行为',
  'settings.enter.description': '仅在智能体运行时生效；Cmd/Ctrl+Enter 使用另一行为',
  'settings.enter.queue': '排队发送',
  'settings.enter.steer': '插话发送',
  'access.confirm.title': '确认启用 Full access？',
  'access.confirm.description': '启用 Full access 后，agent 将减少确认步骤，并且可以直接执行更多操作，包括敏感操作、文件修改或外部命令。仅建议在你信任当前任务时使用。',
  'access.confirm.acknowledge': '我已了解风险，并愿意继续',
  'access.confirm.cancel': '取消',
  'access.confirm.enable': '启用 Full access',
  'access.fullLabel': 'Full access',
  'hero.headline': '探索未至之境',
  'hero.preview': '预览版',
  'hero.chooseWorkspace': '选择工作区',
  'session.hierarchy': '会话层级',
  'todo.title': '任务',
  'todo.progress.done': '{done} 已完成',
  'todo.progress.active': '{active} 进行中',
  'todo.progress.pending': '{pending} 待处理',
  'todo.rowTitle': '更新任务清单',
  'todo.completed': '{done}/{total} 已完成',
  'command.imagesUnsupported': '/{command} 不接受图片附件，请先移除图片',
  'ask.rowTitle': '提问',
  'ask.waiting': '等待回答',
  'ask.cancelled': '已取消',
  'ask.cancelledDetail': '本轮已取消，未提交回答',
  'ask.interrupted': '已中断',
  'ask.interruptedDetail': '本轮已中断，未提交回答',
  'ask.answered': '{answered}/{total} 已回答',
  'ask.skipped': '未回答',
  'bash.running': '运行中',
  'bash.failed': '失败',
  'bash.stopped': '已停止',
  'row.running': '运行中',
  'row.failed': '失败',
  'row.stopped': '已停止',
  'row.input': '输入',
  'row.output': '输出',
  'row.inspect': '查看',
  'tool.title.search': '搜索',
  'tool.title.read': '读取',
  'tool.title.bash': 'Bash',
  'tool.title.write': '写入',
  'tool.title.edit': '编辑',
  'tool.title.code': '代码',
  'tool.title.generic': '工具调用',
  'tool.title.inspect': '查看',
  'tool.title.runCordis': '运行 Cordis 插件',
  'tool.title.stopCordis': '停止 Cordis 插件',
  'tool.title.removeCordis': '移除 Cordis 插件',
  'tool.title.pwsh': 'Pwsh',
  'tool.title.grep': 'Grep',
  'tool.title.glob': 'Glob',
  'tool.title.webSearch': '网页搜索',
  'tool.title.webFetch': '网页获取',
  'diff.files.one': '{count} 个文件',
  'diff.files.other': '{count} 个文件',
  'diff.collapseAria': '收起差异',
  'diff.expandAria': '展开其余 {count} 行差异',
  'diff.expandRest': '… 其余 {count} 行',
  'read.window': '显示 {shown} / {total} 行',
  'read.collapseAria': '收起内容',
  'read.expandAria': '展开其余 {count} 行',
  'read.expandRest': '… 其余 {count} 行',
  'search.paths': '{shown} 个路径',
  'search.paths.truncated': '显示 {shown} / 共 {total} 个路径',
  'search.matches': '{shown} 处匹配 · {files} 个文件',
  'search.matches.truncated': '显示 {shown} / 共 {total} 处匹配 · {files} 个文件',
  'search.noResults': '无结果',
  'search.collapseAria': '收起结果',
  'search.expandAria': '展开其余 {count} 行结果',
  'search.expandRest': '… 其余 {count} 行',
  'web.noResults': '未找到结果',
  'web.sourcesTruncated': '来源列表已截断',
  'web.http': 'HTTP',
  'web.contentTruncated': '内容已截断',
  'details.running': '运行中…',
  'queue.count': '{n} 条排队消息',
  'queue.edit': '编辑排队消息',
  'queue.edit.unsupported': '包含非文本内容，暂不支持编辑',
  'queue.save': '保存排队消息',
  'queue.cancelEdit': '取消编辑',
  'queue.remove': '删除排队消息',
  'queue.steer': '插话发送',
  'queue.steer.unavailable': '仅运行中可插话发送',
  'queue.editFailed': '编辑失败：这条消息可能已经开始发送。',
  'queue.removeFailed': '删除失败：这条消息可能已经开始发送。',
  'queue.steerFailed': '插话发送失败，请重试。',
  'terminal.signal': '信号 {signal}',
  'terminal.exitCode': '退出码 {code}',
  'terminal.running': '运行中',
  'terminal.failed': '失败',
  'terminal.done': '已完成',
  'terminal.noOutput': '无输出',
  'terminal.collapseAria': '收起输出',
  'terminal.expandAria': '展开其余 {n} 行输出',
  'terminal.expandRest': '… 其余 {n} 行',
  'terminal.sendInput': '（发送输入）',
  'terminal.session': '终端 {sessionId}',
} satisfies Record<string, string>

/** The conversation namespace key union. */
export type ConversationKey = keyof typeof zh

/** English dictionary, checked complete against the zh key set. */
export const en = {
  'hint.plan': PLAN_NEXT_ACTION_EN,
  'hint.goal': 'describe the objective for a long-running task',
  'hint.goal.active': 'goal active — edit / pause / resume / clear',
  'placeholder.plan': PLAN_NEXT_ACTION_EN,
  'placeholder.default': 'Message or run a task... / commands, @ files or sessions',
  'placeholder.unavailable': 'Session unavailable',
  'placeholder.parentOffline': 'Parent session offline; sending is unavailable but you can still stop the run',
  'placeholder.hero': 'Describe what you want to build... / commands, @ files or sessions',
  'placeholder.workspace': 'Choose a workspace to start',
  'placeholder.steerQueue': 'Cmd/Ctrl+Enter steers all queued messages',
  'input.commands': 'Commands',
  'input.stop': 'Stop generating',
  'input.send': 'Send message',
  'input.accessMode': 'Access mode, current: {name}',
  'image.dropTitle': 'Drag images here to add them',
  'image.dropDesc': 'Up to {count} images, {size} each',
  'image.dropBlocked': 'Images cannot be added right now',
  'image.pending': 'Pending images',
  'image.openOriginal': 'View original',
  'image.openOriginalLabel': '{label}, click to view original',
  'image.remove': 'Remove image {name}',
  'image.scrollLeft': 'Scroll images left',
  'image.scrollRight': 'Scroll images right',
  'image.original': 'Original image',
  'image.label': 'Image',
  'image.loadFailed': 'Image failed to load; click to retry',
  'image.loading': 'Loading image…',
  'image.preview': 'Original image preview',
  'image.closePreview': 'Close original image preview',
  'image.unsupportedType': 'Only PNG, JPG, WebP, and GIF images are supported',
  'image.tooMany': 'A message can include up to {count} images',
  'image.fileTooLarge': 'Each image must be smaller than {size}',
  'image.totalTooLarge': 'Images exceed {size} in total; remove some and try again',
  'image.tooManyPixels': 'Image resolution is too high; compress it and try again',
  'image.dimensionTooLarge': 'Image sides must be at most {size}px; downscale it and try again',
  'image.modelUnsupported': 'The current model does not support images; switch to a model that does',
  'image.subagentUnsupported': 'Subagent sessions do not support images yet',
  'image.sendFailed': 'Sending images failed ({reason}); re-add them and try again',
  'context.aria': '{percent} of context used',
  'context.used': 'of context used',
  'context.system': 'System prompt',
  'context.tools': 'Tools',
  'context.messages': 'Messages',
  'settings.enter.title': 'Enter behavior while busy',
  'settings.enter.description': 'Busy only; Cmd/Ctrl+Enter uses the other behavior',
  'settings.enter.queue': 'Queue',
  'settings.enter.steer': 'Steer',
  'access.confirm.title': 'Enable Full access?',
  'access.confirm.description': 'Full access reduces confirmation steps and lets the agent perform more actions directly, including sensitive operations, file changes, or external commands. Only use it when you trust the current task.',
  'access.confirm.acknowledge': 'I understand the risks and want to continue',
  'access.confirm.cancel': 'Cancel',
  'access.confirm.enable': 'Enable Full access',
  'access.fullLabel': 'Full access',
  'hero.headline': 'Into the Unknown',
  'hero.preview': 'Preview',
  'hero.chooseWorkspace': 'Choose workspace',
  'session.hierarchy': 'Session hierarchy',
  'todo.title': 'To-dos',
  'todo.progress.done': '{done} completed',
  'todo.progress.active': '{active} in progress',
  'todo.progress.pending': '{pending} pending',
  'todo.rowTitle': 'Update to-do list',
  'todo.completed': '{done}/{total} completed',
  'command.imagesUnsupported': '/{command} does not accept image attachments; remove them first',
  'ask.rowTitle': 'Ask question',
  'ask.waiting': 'waiting',
  'ask.cancelled': 'cancelled',
  'ask.cancelledDetail': 'This question set was cancelled before answers were submitted.',
  'ask.interrupted': 'interrupted',
  'ask.interruptedDetail': 'This question set was interrupted before answers were submitted.',
  'ask.answered': '{answered}/{total} answered',
  'ask.skipped': 'Not answered',
  'bash.running': 'Running',
  'bash.failed': 'Failed',
  'bash.stopped': 'Stopped',
  'row.running': 'Running',
  'row.failed': 'Failed',
  'row.stopped': 'Stopped',
  'row.input': 'IN',
  'row.output': 'OUT',
  'row.inspect': 'Inspect',
  'tool.title.search': 'Search',
  'tool.title.read': 'Read',
  'tool.title.bash': 'Bash',
  'tool.title.write': 'Write',
  'tool.title.edit': 'Edit',
  'tool.title.code': 'Code',
  'tool.title.generic': 'Tool call',
  'tool.title.inspect': 'Inspect',
  'tool.title.runCordis': 'Run Cordis Plugin',
  'tool.title.stopCordis': 'Stop Cordis Plugin',
  'tool.title.removeCordis': 'Remove Cordis Plugin',
  'tool.title.pwsh': 'Pwsh',
  'tool.title.grep': 'Grep',
  'tool.title.glob': 'Glob',
  'tool.title.webSearch': 'Search',
  'tool.title.webFetch': 'Fetch',
  'diff.files.one': '{count} file',
  'diff.files.other': '{count} files',
  'diff.collapseAria': 'Collapse diff',
  'diff.expandAria': 'Expand {count} more diff lines',
  'diff.expandRest': '… {count} more lines',
  'read.window': 'Showing {shown} of {total} lines',
  'read.collapseAria': 'Collapse content',
  'read.expandAria': 'Expand {count} more lines',
  'read.expandRest': '… {count} more lines',
  'search.paths': '{shown} paths',
  'search.paths.truncated': 'Showing {shown} of {total} paths',
  'search.matches': '{shown} matches · {files} files',
  'search.matches.truncated': 'Showing {shown} of {total} matches · {files} files',
  'search.noResults': 'No results',
  'search.collapseAria': 'Collapse results',
  'search.expandAria': 'Expand {count} more result lines',
  'search.expandRest': '… {count} more lines',
  'web.noResults': 'No results found',
  'web.sourcesTruncated': 'Source list truncated',
  'web.http': 'HTTP',
  'web.contentTruncated': 'Content truncated',
  'details.running': 'Running…',
  'queue.count': '{n} queued messages',
  'queue.edit': 'Edit queued message',
  'queue.edit.unsupported': 'Contains non-text content; editing is not supported yet',
  'queue.save': 'Save queued message',
  'queue.cancelEdit': 'Cancel editing',
  'queue.remove': 'Remove queued message',
  'queue.steer': 'Steer queued message',
  'queue.steer.unavailable': 'Steering is available only while the agent is running',
  'queue.editFailed': 'Edit failed: this message may have already started sending.',
  'queue.removeFailed': 'Removal failed: this message may have already started sending.',
  'queue.steerFailed': 'Steering failed. Try again.',
  'terminal.signal': 'signal {signal}',
  'terminal.exitCode': 'exit code {code}',
  'terminal.running': 'Running',
  'terminal.failed': 'Failed',
  'terminal.done': 'Done',
  'terminal.noOutput': 'No output',
  'terminal.collapseAria': 'Collapse output',
  'terminal.expandAria': 'Expand the remaining {n} output lines',
  'terminal.expandRest': '… {n} more lines',
  // The Host terminal_send presenter has no locale seat; keep its fallbacks
  // aligned with these English values.
  'terminal.sendInput': '(send input)',
  'terminal.session': 'Terminal {sessionId}',
} satisfies Record<ConversationKey, string>
