diff --git a/src/channels/feishu/feishu-cards.mjs b/src/channels/feishu/feishu-cards.mjs index 6b72346..4a59b1f 100644 --- a/src/channels/feishu/feishu-cards.mjs +++ b/src/channels/feishu/feishu-cards.mjs @@ -490,7 +490,7 @@ export function menuHelpText() { '/sessionlist 或 /sessions 列出工作区会话', '/session ID 绑定已有会话', '/workspacelist 列出工作区', - '/workspace 路径 切换工作区', + '/workspace 工作区序号或绝对路径 切换工作区', '/new 开启全新会话', '', '📊 状态 / 压缩', @@ -554,7 +554,7 @@ const HELP_TEXT_COMMANDS = [ '`/new` — 开启全新会话', '`/session ID` — 绑定已有会话', '`/sessionlist [工作区]` 或 `/sessions [工作区]` — 列出会话', - '`/workspace 路径` — 切换工作区', + '`/workspace 工作区序号或绝对路径` — 切换工作区', '`/workspacelist` — 列出工作区', '`/status` — 查看连接状态', '`/compact` — 压缩上下文', diff --git a/src/channels/shared/i18n-en/feishu.mjs b/src/channels/shared/i18n-en/feishu.mjs index 271541c..43fc6d7 100644 --- a/src/channels/shared/i18n-en/feishu.mjs +++ b/src/channels/shared/i18n-en/feishu.mjs @@ -227,7 +227,6 @@ export default { '/sessionlist or /sessions List workspace sessions', '/session ID 绑定已有会话': '/session ID Bind an existing session', '/workspacelist 列出工作区': '/workspacelist List workspaces', - '/workspace 路径 切换工作区': '/workspace PATH Switch workspace', '/new 开启全新会话': '/new Start a new session', '📊 状态 / 压缩': '📊 Status / compact', '/status 连接状态': '/status Connection status', @@ -247,8 +246,8 @@ export default { '/steer 指令 给 Agent 补充指令': '/steer INSTRUCTION Steer the Agent', '**📋 卡片功能**\n\n1. 会话下拉 — 切换当前绑定会话\n2. 工作区下拉 — 切换工作区\n3. 🤖 预设下拉 — 切换 Agent 预设\n4. 🧠 模型下拉 — 切换模型\n5. 🆕 新会话 — 开启全新会话\n6. 📋 会话/关注 — 查看/绑定会话,管理关注\n7. ⏹ 停止 — 停止当前任务\n8. 📐 压缩 — 压缩当前会话上下文\n9. 补充指令 — 给 Agent 发送指令\n10. 🗄 归档切换 — 显示/隐藏归档会话\n11. 📊 状态 — 查看系统连接状态\n12. 📖 帮助 — 查看本帮助': '**📋 Card features**\n\n1. Session dropdown — switch the bound session\n2. Workspace dropdown — switch workspace\n3. 🤖 Preset dropdown — switch Agent Preset\n4. 🧠 Model dropdown — switch model\n5. 🆕 New session — start fresh\n6. 📋 Sessions/watches — view or bind sessions and manage watches\n7. ⏹ Stop — stop the current task\n8. 📐 Compact — compact the current session context\n9. Steer task — send an instruction to the Agent\n10. 🗄 Archived toggle — show or hide archived sessions\n11. 📊 Status — view connection status\n12. 📖 Help — view this help', - '**⌨️ 文本命令**\n\n`/m` — 打开菜单卡片\n`/new` — 开启全新会话\n`/session ID` — 绑定已有会话\n`/sessionlist [工作区]` 或 `/sessions [工作区]` — 列出会话\n`/workspace 路径` — 切换工作区\n`/workspacelist` — 列出工作区\n`/status` — 查看连接状态\n`/compact` — 压缩上下文\n`/stop` — 停止当前任务\n`/steer 指令` — 补充指令\n`/watch ID` — 关注会话\n`/watchlist` — 关注列表\n`/unwatch ID` — 取消关注\n`/archived on/off` — 归档显隐\n`/presetlist` 或 `/presets` — 列出预设\n`/preset [序号/ID]` — 切换预设\n`/preset --default` — 跟随默认\n`/models` — 列出模型\n`/reasoninglist` 或 `/reasonings` — 按序号列出当前模型可用推理等级\n`/reasoning [序号、等级ID或 --default]` — 查看或切换当前推理等级\n`/model [序号或完整模型ID] [推理等级ID]` — 查看或切换当前会话模型\n`/batch` — 开启批量输入(仅私聊,最多 10 条文字)\n`/send` — 提交当前批次\n`/cancel` — 取消当前批次\n`/repair` — 补全飞书权限与卡片回调': - '**⌨️ Text commands**\n\n`/m` — open the menu card\n`/new` — start a new session\n`/session ID` — bind an existing session\n`/sessionlist [workspace]` or `/sessions [workspace]` — list sessions\n`/workspace PATH` — switch workspace\n`/workspacelist` — list workspaces\n`/status` — view connection status\n`/compact` — compact context\n`/stop` — stop the current task\n`/steer INSTRUCTION` — steer the task\n`/watch ID` — watch a session\n`/watchlist` — list watched sessions\n`/unwatch ID` — stop watching\n`/archived on/off` — show or hide archived sessions\n`/presetlist` or `/presets` — list presets\n`/preset [index/ID]` — switch preset\n`/preset --default` — follow default\n`/models` — list models\n`/reasoninglist` or `/reasonings` — list reasoning efforts for the current model\n`/reasoning [index, effort ID, or --default]` — show or switch reasoning effort\n`/model [index or full model ID] [reasoning effort ID]` — show or switch the current Session model\n`/batch` — start batch input (direct messages only, up to 10 text messages)\n`/send` — submit the current batch\n`/cancel` — cancel the current batch\n`/repair` — complete Feishu permissions and the card callback', + '**⌨️ 文本命令**\n\n`/m` — 打开菜单卡片\n`/new` — 开启全新会话\n`/session ID` — 绑定已有会话\n`/sessionlist [工作区]` 或 `/sessions [工作区]` — 列出会话\n`/workspace 工作区序号或绝对路径` — 切换工作区\n`/workspacelist` — 列出工作区\n`/status` — 查看连接状态\n`/compact` — 压缩上下文\n`/stop` — 停止当前任务\n`/steer 指令` — 补充指令\n`/watch ID` — 关注会话\n`/watchlist` — 关注列表\n`/unwatch ID` — 取消关注\n`/archived on/off` — 归档显隐\n`/presetlist` 或 `/presets` — 列出预设\n`/preset [序号/ID]` — 切换预设\n`/preset --default` — 跟随默认\n`/models` — 列出模型\n`/reasoninglist` 或 `/reasonings` — 按序号列出当前模型可用推理等级\n`/reasoning [序号、等级ID或 --default]` — 查看或切换当前推理等级\n`/model [序号或完整模型ID] [推理等级ID]` — 查看或切换当前会话模型\n`/batch` — 开启批量输入(仅私聊,最多 10 条文字)\n`/send` — 提交当前批次\n`/cancel` — 取消当前批次\n`/repair` — 补全飞书权限与卡片回调': + '**⌨️ Text commands**\n\n`/m` — open the menu card\n`/new` — start a new session\n`/session ID` — bind an existing session\n`/sessionlist [workspace]` or `/sessions [workspace]` — list sessions\n`/workspace ` — switch workspace\n`/workspacelist` — list workspaces\n`/status` — view connection status\n`/compact` — compact context\n`/stop` — stop the current task\n`/steer INSTRUCTION` — steer the task\n`/watch ID` — watch a session\n`/watchlist` — list watched sessions\n`/unwatch ID` — stop watching\n`/archived on/off` — show or hide archived sessions\n`/presetlist` or `/presets` — list presets\n`/preset [index/ID]` — switch preset\n`/preset --default` — follow default\n`/models` — list models\n`/reasoninglist` or `/reasonings` — list reasoning efforts for the current model\n`/reasoning [index, effort ID, or --default]` — show or switch reasoning effort\n`/model [index or full model ID] [reasoning effort ID]` — show or switch the current Session model\n`/batch` — start batch input (direct messages only, up to 10 text messages)\n`/send` — submit the current batch\n`/cancel` — cancel the current batch\n`/repair` — complete Feishu permissions and the card callback', '**💡 数字兜底**\n回复数字快速操作:\n**1**工作区列表 · **2**新会话 · **3**会话/关注\n**4**状态 · **5**补全权限 · **6**帮助': '**💡 Number fallback**\nReply with a number for a quick action:\n**1** Workspace list · **2** New session · **3** Sessions/watches\n**4** Status · **5** Complete permissions · **6** Help', '从下方下拉选择补充指令;最后一项可自定义输入。': diff --git a/test/channels/feishu/feishu-cards.test.mjs b/test/channels/feishu/feishu-cards.test.mjs index e3ec0ad..d0a3216 100644 --- a/test/channels/feishu/feishu-cards.test.mjs +++ b/test/channels/feishu/feishu-cards.test.mjs @@ -69,6 +69,7 @@ test('menu and card help advertise Agent Preset, reasoning, and batch commands', assert.match(help, /\/presetlist/); assert.match(help, /\/presets/); assert.match(help, /\/sessions/); + assert.match(help, /\/workspace 工作区序号或绝对路径/); assert.match(help, /\/preset \[序号或完整ID\]/); assert.match(help, /\/preset id:/); assert.match(help, /\/preset --default/); @@ -83,6 +84,7 @@ test('menu and card help advertise Agent Preset, reasoning, and batch commands', const card = helpCard(); assert.match(card, /\/presets/); assert.match(card, /\/sessions/); + assert.match(card, /\/workspace 工作区序号或绝对路径/); assert.match(card, /\/reasoninglist/); assert.match(card, /\/reasonings/); assert.match(card, /\/reasoning \[序号、等级ID或 --default\]/); @@ -215,6 +217,10 @@ test('reachable Feishu cards contain no Chinese literals in English mode', () => setImHostLanguage('en'); try { + const englishMenuHelp = menuHelpText(); + const englishCardHelp = helpCard(['Additional help']); + assert.match(englishMenuHelp, /\/workspace /); + assert.match(englishCardHelp, /\/workspace /); rendered.push( menuCard({ workspaces: ['/work'], @@ -234,7 +240,7 @@ test('reachable Feishu cards contain no Chinese literals in English mode', () => model: 'provider/model-two', sessionCount: 1, }), - helpCard(['Additional help']), + englishCardHelp, sessionListCard('/work', sessions, 0, 1), workspaceListCard(['/work'], '/work'), watchListCard( @@ -245,7 +251,7 @@ test('reachable Feishu cards contain no Chinese literals in English mode', () => steerCard({ hasSession: true }), customSteerCard(), cardActionProbeCard('0123456789abcdef0123456789abcdef'), - menuHelpText(), + englishMenuHelp, ); } finally { setImHostLanguage('zh');