feat(feishu): watchlist entry in the menu card

This commit is contained in:
liuwenbo00 2026-08-21 10:50:24 +08:00 • committed by xmanrui
parent 10fd429852
commit 1790ec21ac
3 changed files with 42 additions and 35 deletions

File diff suppressed because one or more lines are too long

View file

@ -1066,6 +1066,10 @@ export class FeishuHarnessBridge {
await this.#showWorkspaces({ chatId, key });
return;
}
if (action === 'watchlist') {
await this.#showWatchList(key, chatId);
return;
}
if (action === 'new') {
await this.#state.clearSession(key);
await this.#send(chatId, '已开启全新 Harness 会话。');
@ -1118,7 +1122,7 @@ export class FeishuHarnessBridge {
async #handleMenuPick(menu, number, { chatId, key, event }) {
if (menu.kind === 'menu') {
const action = ['sessions', 'workspaces', 'new', 'status', 'help', 'repair'][number - 1];
const action = ['sessions', 'workspaces', 'new', 'status', 'help', 'repair', 'watchlist'][number - 1];
if (!action) {
await this.#send(chatId, '菜单没有这个编号,回复 /m 重新打开。');
return;

View file

@ -65,6 +65,7 @@ export function menuCard() {
// have card.action.trigger yet, so rendering it as a callback button would
// send the user straight back to Feishu's broken callback setup popup.
{ tag: 'div', text: markdown('**6 · 修复卡片按钮**(请直接回复数字 **6**)') },
button('7 · 关注列表', 'watchlist'),
]);
}
@ -152,9 +153,11 @@ export function menuHelpText() {
'4 · /status 连接状态',
'5 · /help 本帮助',
'6 · /repair 修复卡片按钮(请回复数字 6)',
'7 · /watchlist 关注列表',
'',
'直接发送文字/图片即继续当前会话。',
'/session ID 或序号 绑定已有会话',
'/watch ID 或序号 关注会话(完成后推送)',
'/compact 压缩上下文',
'/workspace 绝对路径 切换工作区',
].join('\n');