✨ feat(vscode): 冲突解决会话 profile 可在设置面板配置
This commit is contained in:
@@ -67,8 +67,8 @@ export async function handleResumeSession(panel: KanbanWebviewPanel, sessionId:
|
||||
existing.show(false)
|
||||
return
|
||||
}
|
||||
// 实施 resume 走工单级 profilePath > 默认 的优先级(同 handleImplement /
|
||||
// startConflictResolution);头脑风暴 resume 保持现状,只看工单级 + 默认。
|
||||
// 实施 resume 走工单级 profilePath > 默认 的优先级(同 handleImplement);
|
||||
// 头脑风暴 resume 保持现状,只看工单级 + 默认。
|
||||
const effectiveProfilePath
|
||||
= sessionKind === 'implement'
|
||||
? panel.resolveImplementProfilePath(profilePath)
|
||||
@@ -1396,9 +1396,8 @@ export async function startConflictResolution(panel: KanbanWebviewPanel, opts: {
|
||||
workspaceRoot: string
|
||||
featureBranch: string
|
||||
worktreePath: string
|
||||
profilePath?: string
|
||||
}): Promise<void> {
|
||||
const { issueNumber, prIndex, workspaceRoot, featureBranch, worktreePath, profilePath } = opts
|
||||
const { issueNumber, prIndex, workspaceRoot, featureBranch, worktreePath } = opts
|
||||
const settings = getSettings(panel.context)
|
||||
const devBranch = settings.devBranch || 'main'
|
||||
|
||||
@@ -1553,9 +1552,9 @@ export async function startConflictResolution(panel: KanbanWebviewPanel, opts: {
|
||||
return
|
||||
}
|
||||
terminal.show(false)
|
||||
// 与 handleImplement 保持一致:走工单级 profilePath > 默认 fallback 的优先级,
|
||||
// 让冲突解决会话和实施会话用同一份 profile。
|
||||
const effectiveProfilePath = panel.resolveImplementProfilePath(profilePath)
|
||||
// 冲突解决只用全局设置 conflictResolutionProfilePath;空串 = DEFAULT_PROFILE_PATH。
|
||||
const effectiveProfilePath
|
||||
= settings.conflictResolutionProfilePath.trim() || DEFAULT_PROFILE_PATH
|
||||
if (effectiveProfilePath.includes('\'')) {
|
||||
logger.add({
|
||||
level: 'error',
|
||||
@@ -1590,13 +1589,15 @@ export async function startConflictResolution(panel: KanbanWebviewPanel, opts: {
|
||||
}
|
||||
|
||||
/**
|
||||
* Pick the profile.json that the *implement-class* cc sessions
|
||||
* (handleImplement / handleResumeSession when sessionKind === 'implement' /
|
||||
* startConflictResolution) should launch with. Priority:
|
||||
* Pick the profile.json that implement-class cc sessions
|
||||
* (handleImplement / handleResumeSession when sessionKind === 'implement')
|
||||
* should launch with. Priority:
|
||||
* 1. The per-issue `profilePath` recorded in state JSON (preserves the
|
||||
* brainstorm-time choice, overridable from the issue detail panel).
|
||||
* 2. The hard-coded `DEFAULT_PROFILE_PATH` fallback.
|
||||
*
|
||||
* Conflict-resolution sessions use the global
|
||||
* `settings.conflictResolutionProfilePath` instead of this helper.
|
||||
* Brainstorm sessions deliberately don't go through this helper — they
|
||||
* keep the legacy `profilePath || DEFAULT_PROFILE_PATH` so creators can
|
||||
* still pick a profile per issue at brainstorm time.
|
||||
|
||||
Reference in New Issue
Block a user