fix: issue properly basing diffs when tagged on pr
This commit is contained in:
+8
-7
@@ -169,17 +169,18 @@ async function runOllamaLoop(ctx: AgentRunContext): Promise<AgentResult> {
|
||||
});
|
||||
}
|
||||
|
||||
// After select_mode, explicitly tell the model to act on the returned guidance.
|
||||
// Without this nudge, smaller models tend to treat the mode instructions as
|
||||
// informational and stop rather than executing the workflow steps.
|
||||
if (calledSelectMode) {
|
||||
// After the FIRST select_mode call, nudge the model to act on the guidance.
|
||||
// Only nudge once — repeated nudging causes a loop where the model keeps
|
||||
// re-calling select_mode instead of executing the workflow.
|
||||
if (calledSelectMode && !pendingModeNudge) {
|
||||
pendingModeNudge = true;
|
||||
messages.push({
|
||||
role: "user",
|
||||
content:
|
||||
"You have selected a mode and received your workflow instructions. " +
|
||||
"Now execute the first step of that workflow immediately by calling the appropriate tool. " +
|
||||
"Do not describe what you will do — just call the tool.",
|
||||
"Good. You have selected a mode and received the workflow. " +
|
||||
"Do NOT call select_mode again. " +
|
||||
"Call the next tool to execute the workflow now (e.g. checkout_pr, get_issue, create_pull_request_review). " +
|
||||
"Start immediately.",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user