Skip to content

Commit e7c4839

Browse files
committed
fix(core): add language instruction to compaction checkpoint and continuation prompt
1 parent f7ddd7f commit e7c4839

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/core/src/session/runner/to-llm-message.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ ${message.summary}
137137
<recent-context>
138138
${message.recent}
139139
</recent-context>
140-
</conversation-checkpoint>`,
140+
</conversation-checkpoint>
141+
142+
Continue responding in the same language as the conversation.`,
141143
metadata: message.metadata,
142144
}),
143145
]

packages/opencode/src/session/compaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ export const layer = Layer.effect(
504504
(input.overflow
505505
? "The previous request exceeded the provider's size limit due to large media attachments. The conversation was compacted and media files were removed from context. If the user was asking about attached images or files, explain that the attachments were too large to process and suggest they try again with smaller or fewer files.\n\n"
506506
: "") +
507-
"Continue if you have next steps, or stop and ask for clarification if you are unsure how to proceed."
507+
"Continue if you have next steps, or stop and ask for clarification if you are unsure how to proceed. Respond in the same language as the conversation."
508508
yield* session.updatePart({
509509
id: PartID.ascending(),
510510
messageID: continueMsg.id,

0 commit comments

Comments
 (0)