✨ feat(vscode): 设置面板可配头脑风暴/实施/测试会话的默认 profile

三类会话的 profile 此前只有工单级字段,留空就硬编码落到 official,
想整体换模型只能一个工单一个工单改。

设置面板新增三个下拉,与冲突解决/提交/改动说明的 profile 选择同区。
解析链路变成:工单级字段 > 对应的全局默认设置 > getDefaultProfilePath(),
三类之间仍互不回退。新建工单的头脑风暴会话也走同一条链路。

Claude-Session: https://claude.ai/code/session_01REdhpbaNyqWASF2HWsnTFv
This commit is contained in:
cruldra committed 2026-09-13 08:59:56 +08:00
1 parent 518d471b7a
commit 958c59e090
11 files changed
+196 -18

No files matched your search

+16
View File
@@ -39,6 +39,9 @@ export async function handleSettingsSave(panel: KanbanWebviewPanel, payload: {
implTabPreCreateScript: string
implTabPostCloseScript: string
splitNewTerminals: boolean
defaultBrainstormProfilePath: string
defaultImplementProfilePath: string
defaultTestProfilePath: string
conflictResolutionProfilePath: string
commitProfilePath: string
prDiffSummaryProfilePath: string
@@ -74,6 +77,10 @@ export async function handleSettingsSave(panel: KanbanWebviewPanel, payload: {
const trimmedPreRemove = payload.worktreePreRemoveScript.trim()
const trimmedImplPre = payload.implTabPreCreateScript.trim()
const trimmedImplPost = payload.implTabPostCloseScript.trim()
// 三个会话默认 profile:'' 有意义(= 落到 DEFAULT_PROFILE_PATH),只 trim。
const trimmedDefaultBrainstormProfile = payload.defaultBrainstormProfilePath.trim()
const trimmedDefaultImplementProfile = payload.defaultImplementProfilePath.trim()
const trimmedDefaultTestProfile = payload.defaultTestProfilePath.trim()
// conflict-resolution profile: '' is meaningful (= DEFAULT_PROFILE_PATH).
const trimmedConflictProfile = payload.conflictResolutionProfilePath.trim()
// 提交代码 profile:'' 有意义(= 未配置 → 提交严格失败),只 trim。
@@ -118,6 +125,9 @@ export async function handleSettingsSave(panel: KanbanWebviewPanel, payload: {
implTabPreCreateScript: trimmedImplPre,
implTabPostCloseScript: trimmedImplPost,
splitNewTerminals: payload.splitNewTerminals,
defaultBrainstormProfilePath: trimmedDefaultBrainstormProfile,
defaultImplementProfilePath: trimmedDefaultImplementProfile,
defaultTestProfilePath: trimmedDefaultTestProfile,
conflictResolutionProfilePath: trimmedConflictProfile,
commitProfilePath: trimmedCommitProfile,
prDiffSummaryProfilePath: trimmedPrDiffSummaryProfile,
@@ -147,6 +157,9 @@ export async function handleSettingsSave(panel: KanbanWebviewPanel, payload: {
implTabPreCreateScript: trimmedImplPre,
implTabPostCloseScript: trimmedImplPost,
splitNewTerminals: payload.splitNewTerminals,
defaultBrainstormProfilePath: trimmedDefaultBrainstormProfile,
defaultImplementProfilePath: trimmedDefaultImplementProfile,
defaultTestProfilePath: trimmedDefaultTestProfile,
conflictResolutionProfilePath: trimmedConflictProfile,
commitProfilePath: trimmedCommitProfile,
prDiffSummaryProfilePath: trimmedPrDiffSummaryProfile,
@@ -253,6 +266,9 @@ export async function handleEditSettingsRequest(panel: KanbanWebviewPanel): Prom
implTabPreCreateScript: s.implTabPreCreateScript,
implTabPostCloseScript: s.implTabPostCloseScript,
splitNewTerminals: s.splitNewTerminals,
defaultBrainstormProfilePath: s.defaultBrainstormProfilePath,
defaultImplementProfilePath: s.defaultImplementProfilePath,
defaultTestProfilePath: s.defaultTestProfilePath,
conflictResolutionProfilePath: s.conflictResolutionProfilePath,
commitProfilePath,
prDiffSummaryProfilePath,