feat: message abort and web socket support (#222)

* feat: message abort and web socket support

* fix(web): chat end

* fix: lint

* fix: lint
This commit is contained in:
Acbox Liu
2026-03-09 23:27:50 +08:00
committed by GitHub
parent 36d50738b5
commit 23d49a1c7b
21 changed files with 1050 additions and 110 deletions
+60
View File
@@ -2398,6 +2398,36 @@ paths:
summary: Subscribe to local channel events via SSE
tags:
- local-channel
/bots/{bot_id}/cli/ws:
get:
description: Upgrade to WebSocket for bidirectional chat streaming with abort
support.
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"101":
description: Switching Protocols
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: WebSocket chat endpoint
tags:
- local-channel
/bots/{bot_id}/container:
delete:
parameters:
@@ -5081,6 +5111,36 @@ paths:
summary: Subscribe to local channel events via SSE
tags:
- local-channel
/bots/{bot_id}/web/ws:
get:
description: Upgrade to WebSocket for bidirectional chat streaming with abort
support.
parameters:
- description: Bot ID
in: path
name: bot_id
required: true
type: string
responses:
"101":
description: Switching Protocols
schema:
type: string
"400":
description: Bad Request
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"403":
description: Forbidden
schema:
$ref: '#/definitions/handlers.ErrorResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/handlers.ErrorResponse'
summary: WebSocket chat endpoint
tags:
- local-channel
/bots/{id}:
delete:
description: Delete a bot user (owner/admin only)