feat(adapters): add /resume command for switching to existing sessions#128
feat(adapters): add /resume command for switching to existing sessions#128Qubhu wants to merge 1 commit intoNanmiCoder:mainfrom
Conversation
Allow IM users (Telegram & Feishu) to resume existing sessions via /resume command, enabling seamless CLI ↔ IM workflow continuity. - /resume: list recent 10 sessions with interactive picker - /resume <session-id>: UUID prefix match, direct switch - /resume <keyword>: title fuzzy search - Mark current session with ✦ in picker - Validate workDirExists before switching - Add SessionListItem type and listSessions() to AdapterHttpClient Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@copilot review and comment |
|
@dosubot review and comment |
|
@Qubhu hello 感谢你的代码贡献,该功能有相关的实际聊天截图吗,可以贴一下 |
|
Here's my review of this PR. Note that I couldn't access the actual diff, so this is based on the PR description and analysis of the existing codebase patterns. Overall: The feature design is solid — three usage modes (list, UUID prefix, keyword search) provide good flexibility, and the 🔴 Critical
📝 Minor
The feature itself fills a real gap (CLI ↔ IM session continuity) and the interaction design is clean. Addressing the critical items — especially the state race condition and auth check — would make this merge-ready. 👍 To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
Summary
/resume命令,支持 IM 端切换回已有会话,实现 CLI ↔ IM 无缝衔接/resume列出最近会话、/resume <session-id>UUID 前缀匹配、/resume <关键词>标题模糊搜索SessionListItem类型和listSessions()方法到AdapterHttpClientworkDirExists改动文件
adapters/common/http-client.tsSessionListItem类型 +listSessions()adapters/common/format.ts/resume;新增formatSessionList()+formatRelativeTime()adapters/telegram/index.ts/resume命令、会话选择交互、switchToSession()adapters/feishu/index.tsdocs/im/resume-command-plan.md交互示例
Test plan
/resume列出最近 10 个会话,当前会话带 ✦ 标记/resume <UUID前缀>唯一匹配时直接切换/resume <关键词>标题搜索正常工作workDir不存在时拦截提示/new命令正确清理pendingSessionSelection状态🤖 Generated with Claude Code