feat: add workspace list command

This commit is contained in:
xmanrui 2026-08-18 00:39:16 +08:00
parent c44340accb
commit 1fe6180813
17 changed files with 570 additions and 118 deletions

View file

@ -7,6 +7,7 @@ const HELP_TEXT = [
'直接发送文字即可继续当前会话。',
'/new 开启一个全新会话',
'/workspace 工作区绝对路径 切换工作区',
'/workspacelist 列出工作区绝对路径',
'/status 检查连接状态',
'/help 显示本帮助',
].join('\n');
@ -127,7 +128,9 @@ export class QqHarnessBridge {
}
const workspaceCommand = await runWorkspaceCommand(text, this.#harness);
if (workspaceCommand) {
await this.#bot.sendText(target, workspaceCommand.message);
for (const reply of workspaceCommand.messages ?? [workspaceCommand.message]) {
await this.#bot.sendText(target, reply);
}
await this.#state.markSeen(messageId);
return;
}