fix: remove legacy opencode prompt markers
This commit is contained in:
parent
9a3e17ce70
commit
ba06fba5a5
2 changed files with 2 additions and 6 deletions
|
|
@ -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,
|
||||
'</opencode_app_message_delivery>',
|
||||
'',
|
||||
'<opencode_inbound_app_message>',
|
||||
|
|
|
|||
|
|
@ -364,9 +364,8 @@ describe('OpenCodeTeamRuntimeAdapter', () => {
|
|||
expect(sentText).toContain('<opencode_delivery_context>');
|
||||
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');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue