fix(atlas): use worktree path for git verification when available (fixes #2229)

This commit is contained in:
MoerAI
2026-03-18 16:23:37 +09:00
parent 01e18f8773
commit 4723319eef

View File

@@ -65,11 +65,13 @@ export function createToolExecuteAfterHandler(input: {
}
if (toolOutput.output && typeof toolOutput.output === "string") {
const gitStats = collectGitDiffStats(ctx.directory)
const boulderState = readBoulderState(ctx.directory)
const worktreePath = boulderState?.worktree_path?.trim()
const verificationDirectory = worktreePath ? worktreePath : ctx.directory
const gitStats = collectGitDiffStats(verificationDirectory)
const fileChanges = formatFileChanges(gitStats)
const subagentSessionId = extractSessionIdFromOutput(toolOutput.output)
const boulderState = readBoulderState(ctx.directory)
if (boulderState) {
const progress = getPlanProgress(boulderState.active_plan)
const sessionState = toolInput.sessionID ? getState(toolInput.sessionID) : undefined