feat(core): expose session switching endpoints
This commit is contained in:
@@ -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) => ({
|
||||
|
||||
Reference in New Issue
Block a user