✨ 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

+23
View File
@@ -0,0 +1,23 @@
import { describe, expect, it, vi } from 'vitest'
import { buildCcCommand } from '../../src/cc/ccCommand'
vi.mock('../../src/cc/claudeBin', () => ({
resolveClaudeBin: () => 'claude',
}))
describe('buildCcCommand', () => {
it('appends the prompt as a positional arg for a fresh session', () => {
expect(buildCcCommand({ profilePath: '/p.json', prompt: 'hello' }))
.toBe('claude --dangerously-skip-permissions --settings \'/p.json\' \'hello\'')
})
it('resumes without a prompt when only a session id is given', () => {
expect(buildCcCommand({ profilePath: '/p.json', resumeSessionId: 'abc' }))
.toBe('claude --dangerously-skip-permissions --settings \'/p.json\' --resume abc')
})
it('resumes and hands the prompt to the restored session', () => {
expect(buildCcCommand({ profilePath: '/p.json', resumeSessionId: 'abc', prompt: 'go on' }))
.toBe('claude --dangerously-skip-permissions --settings \'/p.json\' --resume abc \'go on\'')
})
})