mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 09:44:21 +01:00
support !shell commands
This commit is contained in:
@@ -593,10 +593,10 @@ export namespace Server {
|
||||
},
|
||||
)
|
||||
.post(
|
||||
"/session/:id/bash",
|
||||
"/session/:id/shell",
|
||||
describeRoute({
|
||||
description: "Run a bash command",
|
||||
operationId: "session.bash",
|
||||
description: "Run a shell command",
|
||||
operationId: "session.shell",
|
||||
responses: {
|
||||
200: {
|
||||
description: "Created message",
|
||||
@@ -618,7 +618,7 @@ export namespace Server {
|
||||
async (c) => {
|
||||
const sessionID = c.req.valid("param").id
|
||||
const body = c.req.valid("json")
|
||||
const msg = await Session.bash({ ...body, sessionID })
|
||||
const msg = await Session.shell({ ...body, sessionID })
|
||||
return c.json(msg)
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user