From ba06fba5a554864e28e1a10d94f58eeae01d8be6 Mon Sep 17 00:00:00 2001 From: 777genius Date: Mon, 27 Apr 2026 11:45:05 +0300 Subject: [PATCH] fix: remove legacy opencode prompt markers --- src/main/services/team/runtime/OpenCodeTeamRuntimeAdapter.ts | 3 --- test/main/services/team/OpenCodeTeamRuntimeAdapter.test.ts | 5 ++--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/services/team/runtime/OpenCodeTeamRuntimeAdapter.ts b/src/main/services/team/runtime/OpenCodeTeamRuntimeAdapter.ts index 78b49714..267b452b 100644 --- a/src/main/services/team/runtime/OpenCodeTeamRuntimeAdapter.ts +++ b/src/main/services/team/runtime/OpenCodeTeamRuntimeAdapter.ts @@ -635,7 +635,6 @@ function buildMemberBootstrapPrompt( function buildOpenCodeRuntimeMessageText(input: OpenCodeTeamRuntimeMessageInput): string { const replyRecipient = input.replyRecipient?.trim() || 'user'; - const taskRefs = input.taskRefs?.length ? JSON.stringify(input.taskRefs) : null; const deliveryContext = input.messageId && input.taskRefs?.length ? JSON.stringify({ @@ -668,8 +667,6 @@ function buildOpenCodeRuntimeMessageText(input: OpenCodeTeamRuntimeMessageInput) 'The inbound app message follows. Treat it as the actual instruction to process now, not as background context.', 'If the inbound message asks for exact reply text, use that exact text. Do not replace concrete instructions with a generic greeting or availability message.', input.actionMode ? `Action mode for this message: ${input.actionMode}.` : null, - taskRefs ? `If your reply is about these tasks, include taskRefs exactly: ${taskRefs}` : null, - input.messageId ? `The inbound app messageId is "${input.messageId}".` : null, '', '', '', diff --git a/test/main/services/team/OpenCodeTeamRuntimeAdapter.test.ts b/test/main/services/team/OpenCodeTeamRuntimeAdapter.test.ts index e6795585..924502ac 100644 --- a/test/main/services/team/OpenCodeTeamRuntimeAdapter.test.ts +++ b/test/main/services/team/OpenCodeTeamRuntimeAdapter.test.ts @@ -364,9 +364,8 @@ describe('OpenCodeTeamRuntimeAdapter', () => { expect(sentText).toContain(''); expect(sentText).toContain('"kind":"opencode-delivery-context"'); expect(sentText).toContain('"inboundMessageId":"msg-1"'); - expect(sentText).toContain( - 'If your reply is about these tasks, include taskRefs exactly: [{"taskId":"task-1","displayId":"abcd1234","teamName":"team-a"}]' - ); + expect(sentText).not.toContain('include taskRefs exactly'); + expect(sentText).not.toContain('The inbound app messageId is'); expect(sentText).toContain('Do not use SendMessage or runtime_deliver_message'); expect(sentText).toContain('never use #00000000'); });