mirror of
https://github.com/sst/opencode.git
synced 2025-08-31 10:17:26 +00:00
add summarize
This commit is contained in:
parent
d62ce482da
commit
e68747a64a
1 changed files with 29 additions and 0 deletions
|
@ -195,6 +195,35 @@ export namespace Server {
|
|||
return c.json(Session.abort(body.sessionID));
|
||||
},
|
||||
)
|
||||
.post(
|
||||
"/session_summarize",
|
||||
describeRoute({
|
||||
description: "Summarize the session",
|
||||
responses: {
|
||||
200: {
|
||||
description: "Summarize the session",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: resolver(z.boolean()),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
zValidator(
|
||||
"json",
|
||||
z.object({
|
||||
sessionID: z.string(),
|
||||
providerID: z.string(),
|
||||
modelID: z.string(),
|
||||
}),
|
||||
),
|
||||
async (c) => {
|
||||
const body = c.req.valid("json");
|
||||
await Session.summarize(body);
|
||||
return c.json(true);
|
||||
},
|
||||
)
|
||||
.post(
|
||||
"/session_chat",
|
||||
describeRoute({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue