You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -125,7 +131,7 @@ Use the spawn_agents tool to spawn specialized agents to help you complete the u
125
131
'- Spawn context-gathering agents (file pickers, code-searcher, directory-lister, glob-matcher, and web/docs researchers) before making edits.',
126
132
isMax&&
127
133
'- Spawn the thinker-best-of-n-gpt-5 after gathering context to solve complex problems.',
128
-
`- Spawn a ${isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} agent to implement the changes after you have gathered all the context you need. You must spawn this agent for non-trivial changes, since it writes much better code than you would with the str_replace or write_file tools. Don't spawn the editor in parallel with context-gathering agents.`,
134
+
`- Spawn a ${useGeminiEditor ? 'editor-implementor-gemini' : isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} agent to implement the changes after you have gathered all the context you need. You must spawn this agent for non-trivial changes, since it writes much better code than you would with the str_replace or write_file tools. Don't spawn the editor in parallel with context-gathering agents.`,
129
135
'- Spawn commanders sequentially if the second command depends on the the first.',
130
136
!isFast&&
131
137
`- Spawn a ${isDefault ? 'code-reviewer' : 'code-reviewer-best-of-n-gpt-5'} to review the changes after you have implemented the changes.`,
@@ -302,12 +310,14 @@ function buildImplementationInstructionsPrompt({
302
310
isDefault,
303
311
isMax,
304
312
hasNoValidation,
313
+
useGeminiEditor,
305
314
}: {
306
315
isSonnet: boolean
307
316
isFast: boolean
308
317
isDefault: boolean
309
318
isMax: boolean
310
319
hasNoValidation: boolean
320
+
useGeminiEditor: boolean
311
321
}){
312
322
return`Act as a helpful assistant and freely respond to the user's request however would be most helpful to the user. Use your judgement to orchestrate the completion of the user's request using your specialized sub-agents and tools as needed. Take your time and be comprehensive. Don't surprise the user. For example, don't modify files if the user has not asked you to do so at least implicitly.
313
323
@@ -320,13 +330,13 @@ ${buildArray(
320
330
!isFast&&
321
331
`- Important: Read as many files as could possibly be relevant to the task over several steps to improve your understanding of the user's request and produce the best possible code changes. Find more examples within the codebase similar to the user's request, dependencies that help with understanding how things work, tests, etc. This is frequently 12-20 files, depending on the task.`,
322
332
!isFast&&
323
-
`- For any task requiring 3+ steps, use the write_todos tool to write out your step-by-step implementation plan. Include ALL of the applicable tasks in the list.${isFast ? '' : ' You should include a step to review the changes after you have implemented the changes.'}:${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'} Skip write_todos for simple tasks like quick edits or answering questions.`,
333
+
`- For any task requiring 3+ steps, use the write_todos tool to write out your step-by-step implementation plan. Include ALL of the applicable tasks in the list.${isFast ? '' : ' You should include a step to review the changes after you have implemented the changes.'}:${hasNoValidation ? '' : ' You should include at least one step to validate/test your changes: be specific about whether to typecheck, run tests, run lints, etc.'}You may be able to do reviewing and validation in parallel in the same step. Skip write_todos for simple tasks like quick edits or answering questions.`,
324
334
isFast&&
325
335
'- Implement the changes in one go. Pause after making all the changes to see the tool results of your edits.',
326
336
isFast&&
327
337
'- Do a single typecheck targeted for your changes at most (if applicable for the project). Or skip this step if the change was small.',
328
338
!isFast&&
329
-
`- IMPORTANT: You must spawn the ${isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} agent to implement non-trivial code changes, since it will generate the best code changes from multiple implementation proposals. This is the best way to make high quality code changes -- strongly prefer using this agent over the str_replace or write_file tools, unless the change is very straightforward and obvious.`,
339
+
`- IMPORTANT: You must spawn the ${useGeminiEditor ? 'editor-implementor-gemini' : isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} agent to implement non-trivial code changes, since it will generate the best code changes from multiple implementation proposals. This is the best way to make high quality code changes -- strongly prefer using this agent over the str_replace or write_file tools, unless the change is very straightforward and obvious.`,
330
340
!isFast&&
331
341
`- Spawn a ${isDefault ? 'code-reviewer' : 'code-reviewer-best-of-n-gpt-5'} to review the changes after you have implemented the changes. (Skip this step only if the change is extremely straightforward and obvious.)`,
332
342
!hasNoValidation&&
@@ -340,17 +350,19 @@ function buildImplementationStepPrompt({
340
350
isMax,
341
351
hasNoValidation,
342
352
isSonnet,
353
+
useGeminiEditor,
343
354
}: {
344
355
isFast: boolean
345
356
isMax: boolean
346
357
hasNoValidation: boolean
347
358
isSonnet: boolean
359
+
useGeminiEditor: boolean
348
360
}){
349
361
returnbuildArray(
350
362
isMax&&
351
363
`Keep working until the user's request is completely satisfied${!hasNoValidation ? ' and validated' : ''}, or until you require more information from the user.`,
352
364
!isFast&&
353
-
`You must spawn the ${isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} agent to implement code changes, since it will generate the best code changes.`,
365
+
`You must spawn the ${useGeminiEditor ? 'editor-implementor-gemini' : isMax ? 'editor-best-of-n-gpt-5' : 'editor-best-of-n'} agent to implement code changes, since it will generate the best code changes.`,
354
366
isMax&&'Spawn the thinker-best-of-n-gpt-5 to solve complex problems.',
355
367
`After completing the user request, summarize your changes in a sentence${isFast ? '' : ' or a few short bullet points'}.${isSonnet ? " Don't create any summary markdown files or example documentation files, unless asked by the user." : ''}. Don't repeat yourself -- especially if you already summarized your changes then just end your turn.`,
'Generates a complete implementation plan with all code changes',
@@ -61,7 +66,7 @@ OR for new files or major rewrites:
61
66
}
62
67
</codebuff_tool_call>
63
68
${
64
-
isGpt5
69
+
isGpt5||isGemini
65
70
? ``
66
71
: `
67
72
You can also use <think> tags interspersed between tool calls to think about the best way to implement the changes. Keep these thoughts very brief. You may not need to use think tags at all.
0 commit comments