mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
fix(apiproxy): echo the resolved agent preset on create and session-added
session.create's reply named only the id, and the session-added frame's agentPreset — which the server already derives via sessionListFields — was stripped by the wire schema it never joined. A client therefore could not label a session it just created (or learned live) until the next full list refresh: the header's preset label rendered nothing for exactly the sessions made in this tab. The create reply is the commit point that knows the RESOLVED composition (a caller that named none gets the default the header recorded), so both carriers now say it.
This commit is contained in:
@@ -1773,7 +1773,13 @@ export function createApiProxy(ctx: Context, defaults: ApiProxyDefaults): ApiPro
|
||||
})
|
||||
}
|
||||
}
|
||||
return ok(request, { sessionId })
|
||||
// Echo the RESOLVED composition so a client can label the session it
|
||||
// just created without waiting for the next list refresh — the create
|
||||
// is the commit point that knows it (a caller that named none gets
|
||||
// the default the header recorded).
|
||||
const created = ctx.agents.get(sessionId)
|
||||
const createdPreset = created?.session.header.agentPreset
|
||||
return ok(request, { sessionId, ...createdPreset === undefined ? {} : { agentPreset: createdPreset } })
|
||||
},
|
||||
|
||||
async history(request) {
|
||||
|
||||
Reference in New Issue
Block a user