Skip to content

Commit 0484fd3

Browse files
author
Tulga Tsogtgerel
committed
fix: improve instruction to explicitly require file changes
After reviewing the Auggie SDK source code, isAnswerOnly only controls which text is returned, NOT whether tools are executed. The real issue was that the instruction wasn't explicit enough. Changes: - Add clear context that this is an AI assistant implementing changes - Explicitly state 'You MUST actually implement the requested changes' - Tell Auggie to use file editing tools (str-replace-editor, save-file) - Clarify NOT to just describe what would be done - Set isAnswerOnly back to true (correct setting for clean final answer) This ensures Auggie understands it needs to actually edit files, not just provide a description of what it would do.
1 parent d9f39d7 commit 0484fd3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

assistant/src/index.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,10 @@ async function invokeAuggie(context: PRContext): Promise<void> {
273273
}
274274

275275
// Build context for Auggie
276-
const instruction = `${context.commentBody}
276+
const instruction = `You are an AI assistant helping to implement code changes in a Pull Request.
277+
278+
## User Request
279+
${context.commentBody}
277280
278281
## PR Context
279282
- **PR #${context.prNumber}**: ${context.title}
@@ -292,7 +295,10 @@ ${context.commentThread.map(c => `**${c.author}** (${c.createdAt}):\n${c.body}`)
292295
${context.diff}
293296
\`\`\`
294297
295-
Please implement the requested changes based on the comment and PR context above.`;
298+
## Instructions
299+
You MUST actually implement the requested changes by editing the files. Do NOT just describe what you would do.
300+
Use the str-replace-editor, save-file, or other file editing tools to make the actual changes to the code.
301+
After making the changes, provide a brief summary of what you implemented.`;
296302

297303
core.info('📤 Sending request to Auggie...');
298304

@@ -310,7 +316,7 @@ Please implement the requested changes based on the comment and PR context above
310316

311317
// Send the instruction to Auggie
312318
core.info('💬 Sending instruction to Auggie...');
313-
const response = await auggie.prompt(instruction, { isAnswerOnly: false });
319+
const response = await auggie.prompt(instruction, { isAnswerOnly: true });
314320

315321
core.info('📝 Auggie response:');
316322
core.info(response);

0 commit comments

Comments
 (0)