fix: preserve direct context after session recovery

This commit is contained in:
Ryder Sun committed 2026-09-15 18:16:55 +08:00
1 parent eb2234b598
commit 1c9aabbf8e
1 file changed
+5 -2
@@ -1272,8 +1272,11 @@ class LocalWorkspaceAgentInvocation {
].join('\n')
const buildPrompt = (afterKind, contextPackage) => isolated || frozen
? v4Prompt
: group.conversationType === 'direct'
? contextPackage.currentTaskText
: group.conversationType === 'direct'
? (sessionRotated
? (contextPackage.continuationText || contextPackage.stableText
|| contextPackage.currentTaskText)
: contextPackage.currentTaskText)
: [
context.v4 === true && v4Prompt
? v4Prompt