fix(runtime-fallback): consume delegated bootstrap retry payload
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -551,6 +551,7 @@ describe("runtime-fallback", () => {
|
|||||||
expect(promptBody?.tools?.question).toBe(false)
|
expect(promptBody?.tools?.question).toBe(false)
|
||||||
expect(promptBody?.tools?.call_omo_agent).toBe(true)
|
expect(promptBody?.tools?.call_omo_agent).toBe(true)
|
||||||
expect(promptBody?.parts?.[0]?.text).toContain("inspect src/tools/delegate-task")
|
expect(promptBody?.parts?.[0]?.text).toContain("inspect src/tools/delegate-task")
|
||||||
|
expect(getDelegatedChildSessionBootstrap(sessionID)).toBeUndefined()
|
||||||
})
|
})
|
||||||
|
|
||||||
test("should use persisted user prompt while preserving delegated bootstrap launch context", async () => {
|
test("should use persisted user prompt while preserving delegated bootstrap launch context", async () => {
|
||||||
|
|||||||
@@ -54,8 +54,13 @@ export function getLastUserRetryPayload(
|
|||||||
return { retryParts }
|
return { retryParts }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bootstrapRetryParts = bootstrap?.retryParts ?? []
|
||||||
|
if (bootstrapRetryParts.length > 0) {
|
||||||
|
clearDelegatedChildSessionBootstrap(sessionID)
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
retryParts: bootstrap?.retryParts ?? [],
|
retryParts: bootstrapRetryParts,
|
||||||
...(bootstrap?.system ? { system: bootstrap.system } : {}),
|
...(bootstrap?.system ? { system: bootstrap.system } : {}),
|
||||||
...(bootstrap?.tools ? { tools: bootstrap.tools } : {}),
|
...(bootstrap?.tools ? { tools: bootstrap.tools } : {}),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user