feat(core): expose session switching endpoints
This commit is contained in:
parent
9dadc2455f
commit
35b3fc85d0
7 changed files with 283 additions and 4 deletions
|
|
@ -955,6 +955,24 @@ const scenarios: Scenario[] = [
|
|||
headers: ctx.headers(),
|
||||
}))
|
||||
.json(200, data(object)),
|
||||
http.protected
|
||||
.post("/api/session/{sessionID}/agent", "v2.session.switchAgent")
|
||||
.seeded((ctx) => ctx.session({ title: "Switch agent" }))
|
||||
.at((ctx) => ({
|
||||
path: route("/api/session/{sessionID}/agent", { sessionID: ctx.state.id }),
|
||||
headers: { ...ctx.headers(), "content-type": "application/json" },
|
||||
body: { agent: "plan" },
|
||||
}))
|
||||
.status(204, undefined, "none"),
|
||||
http.protected
|
||||
.post("/api/session/{sessionID}/model", "v2.session.switchModel")
|
||||
.seeded((ctx) => ctx.session({ title: "Switch model" }))
|
||||
.at((ctx) => ({
|
||||
path: route("/api/session/{sessionID}/model", { sessionID: ctx.state.id }),
|
||||
headers: { ...ctx.headers(), "content-type": "application/json" },
|
||||
body: { model: { providerID: "opencode", id: "big-pickle" } },
|
||||
}))
|
||||
.status(204, undefined, "none"),
|
||||
http.protected
|
||||
.get("/api/session/{sessionID}/context", "v2.session.context")
|
||||
.at((ctx) => ({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue