✨ feat(vscode): 头脑风暴会话一键续聊,终端开着直接打进去、关了带提示词恢复

详情面板「头脑风暴会话id」行的 ▶ 改为续聊:规划终端还开着就把续聊提示词
打进去;终端关了但有会话 id 就 `claude --resume <id>` 带提示词恢复;没会话
才新开。属性行右侧按钮改为数组,续聊与关闭 tab 可并存。

Claude-Session: https://claude.ai/code/session_01KDcq9HcrVLs2c9tkRxasub
This commit is contained in:
cruldra committed 2026-09-03 01:16:41 +08:00
1 parent 90600cf070
commit ae875756a9
15 files changed
+307 -297

No files matched your search

+7 -5
View File
@@ -16,9 +16,13 @@ export interface CcCommandOpts {
profilePath: string
/** e.g. 'high' → `--effort high`; omitted means no `--effort`. */
effort?: string
/** When set, append `--resume <id>`. Mutually exclusive with prompt; resume wins. */
/** When set, append `--resume <id>` so cc restores that conversation. */
resumeSessionId?: string
/** When set (and no resume), append the prompt as a positional `'<prompt>'` arg. */
/**
* When set, append the prompt as a positional `'<prompt>'` arg. Combined
* with `resumeSessionId` it is submitted as the next message of the
* restored conversation.
*/
prompt?: string
}
@@ -31,11 +35,9 @@ export function buildCcCommand(opts: CcCommandOpts): string {
if (opts.effort)
parts.push(`--effort ${opts.effort}`)
parts.push('--dangerously-skip-permissions', `--settings '${opts.profilePath}'`)
// resume and prompt are mutually exclusive; a resumed session restores its
// own conversation, so a fresh prompt would be meaningless.
if (opts.resumeSessionId)
parts.push(`--resume ${opts.resumeSessionId}`)
else if (opts.prompt)
if (opts.prompt)
parts.push(`'${opts.prompt}'`)
return parts.join(' ')
}