fix(athena): always show background_wait guidance for athena-junior, not just when forced
The background_wait instruction was only shown when the caller passed run_in_background=false (forced case). But callers passing true also need the guidance since they were polling background_output instead. Now athena-junior always gets background_wait instructions regardless of how it was launched.
This commit is contained in:
@@ -861,11 +861,11 @@ describe("sisyphus-task", () => {
|
|||||||
toolContext
|
toolContext
|
||||||
)
|
)
|
||||||
|
|
||||||
//#then — should still be background but with normal (non-forced) message
|
//#then — should also get background_wait guidance (athena-junior always gets it)
|
||||||
const resultStr = String(result)
|
const resultStr = String(result)
|
||||||
expect(resultStr).toContain("Background task launched")
|
expect(resultStr).toContain("Background task launched")
|
||||||
expect(resultStr).toContain("System notifies on completion")
|
expect(resultStr).toContain("background_wait")
|
||||||
expect(resultStr).not.toContain("automatically backgrounded")
|
expect(resultStr).toContain("automatically backgrounded")
|
||||||
}, { timeout: 10000 })
|
}, { timeout: 10000 })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -263,8 +263,7 @@ export function createDelegateTask(options: DelegateTaskToolOptions): ToolDefini
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (effectiveRunInBackground) {
|
if (effectiveRunInBackground) {
|
||||||
const wasForced = isAthenaJunior && !runInBackground
|
return executeBackgroundTask(args, ctx, options, parentContext, agentToUse, categoryModel, systemContent, fallbackChain, isAthenaJunior)
|
||||||
return executeBackgroundTask(args, ctx, options, parentContext, agentToUse, categoryModel, systemContent, fallbackChain, wasForced)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return executeSyncTask(args, ctx, options, parentContext, agentToUse, categoryModel, systemContent, modelInfo, fallbackChain)
|
return executeSyncTask(args, ctx, options, parentContext, agentToUse, categoryModel, systemContent, modelInfo, fallbackChain)
|
||||||
|
|||||||
Reference in New Issue
Block a user