mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: chatd refactor (#26270)
Implements the chatd stabilization RFC. Combines: - https://github.com/coder/coder/pull/25908 - https://github.com/coder/coder/pull/25923 - https://github.com/coder/coder/pull/26109 - https://github.com/coder/coder/pull/26110 - https://github.com/coder/coder/pull/26111 - https://github.com/coder/coder/pull/26112
This commit is contained in:
Generated
+94
-4
@@ -818,6 +818,42 @@ const docTemplate = `{
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/experimental/chats/{chat}/reconcile-invalid": {
|
||||
"post": {
|
||||
"description": "Experimental: this endpoint is subject to change.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chats"
|
||||
],
|
||||
"summary": "Reconcile invalid chat state",
|
||||
"operationId": "reconcile-invalid-chat-state",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Chat ID",
|
||||
"name": "chat",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.Chat"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/experimental/chats/{chat}/stream": {
|
||||
"get": {
|
||||
"description": "Experimental: this endpoint is subject to change.",
|
||||
@@ -923,6 +959,45 @@ const docTemplate = `{
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/experimental/chats/{chat}/stream/parts": {
|
||||
"get": {
|
||||
"description": "Experimental: this endpoint is subject to change.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Chats"
|
||||
],
|
||||
"summary": "Stream chat parts via WebSockets",
|
||||
"operationId": "stream-chat-parts-via-websockets",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Chat ID",
|
||||
"name": "chat",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.ChatStreamEvent"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"x-apidocgen": {
|
||||
"skip": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/experimental/chats/{chat}/title/regenerate": {
|
||||
"post": {
|
||||
"description": "Experimental: this endpoint is subject to change.",
|
||||
@@ -17087,7 +17162,8 @@ const docTemplate = `{
|
||||
"paused",
|
||||
"completed",
|
||||
"error",
|
||||
"requires_action"
|
||||
"requires_action",
|
||||
"interrupting"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ChatStatusWaiting",
|
||||
@@ -17096,7 +17172,8 @@ const docTemplate = `{
|
||||
"ChatStatusPaused",
|
||||
"ChatStatusCompleted",
|
||||
"ChatStatusError",
|
||||
"ChatStatusRequiresAction"
|
||||
"ChatStatusRequiresAction",
|
||||
"ChatStatusInterrupting"
|
||||
]
|
||||
},
|
||||
"codersdk.ChatStreamActionRequired": {
|
||||
@@ -17155,7 +17232,9 @@ const docTemplate = `{
|
||||
"error",
|
||||
"queue_update",
|
||||
"retry",
|
||||
"action_required"
|
||||
"action_required",
|
||||
"preview_reset",
|
||||
"history_reset"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ChatStreamEventTypeMessagePart",
|
||||
@@ -17164,17 +17243,28 @@ const docTemplate = `{
|
||||
"ChatStreamEventTypeError",
|
||||
"ChatStreamEventTypeQueueUpdate",
|
||||
"ChatStreamEventTypeRetry",
|
||||
"ChatStreamEventTypeActionRequired"
|
||||
"ChatStreamEventTypeActionRequired",
|
||||
"ChatStreamEventTypePreviewReset",
|
||||
"ChatStreamEventTypeHistoryReset"
|
||||
]
|
||||
},
|
||||
"codersdk.ChatStreamMessagePart": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"generation_attempt": {
|
||||
"type": "integer"
|
||||
},
|
||||
"history_version": {
|
||||
"type": "integer"
|
||||
},
|
||||
"part": {
|
||||
"$ref": "#/definitions/codersdk.ChatMessagePart"
|
||||
},
|
||||
"role": {
|
||||
"$ref": "#/definitions/codersdk.ChatMessageRole"
|
||||
},
|
||||
"seq": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Generated
+86
-4
@@ -723,6 +723,38 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/experimental/chats/{chat}/reconcile-invalid": {
|
||||
"post": {
|
||||
"description": "Experimental: this endpoint is subject to change.",
|
||||
"produces": ["application/json"],
|
||||
"tags": ["Chats"],
|
||||
"summary": "Reconcile invalid chat state",
|
||||
"operationId": "reconcile-invalid-chat-state",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Chat ID",
|
||||
"name": "chat",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.Chat"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/experimental/chats/{chat}/stream": {
|
||||
"get": {
|
||||
"description": "Experimental: this endpoint is subject to change.",
|
||||
@@ -816,6 +848,41 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/experimental/chats/{chat}/stream/parts": {
|
||||
"get": {
|
||||
"description": "Experimental: this endpoint is subject to change.",
|
||||
"produces": ["application/json"],
|
||||
"tags": ["Chats"],
|
||||
"summary": "Stream chat parts via WebSockets",
|
||||
"operationId": "stream-chat-parts-via-websockets",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Chat ID",
|
||||
"name": "chat",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.ChatStreamEvent"
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"x-apidocgen": {
|
||||
"skip": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/experimental/chats/{chat}/title/regenerate": {
|
||||
"post": {
|
||||
"description": "Experimental: this endpoint is subject to change.",
|
||||
@@ -15392,7 +15459,8 @@
|
||||
"paused",
|
||||
"completed",
|
||||
"error",
|
||||
"requires_action"
|
||||
"requires_action",
|
||||
"interrupting"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ChatStatusWaiting",
|
||||
@@ -15401,7 +15469,8 @@
|
||||
"ChatStatusPaused",
|
||||
"ChatStatusCompleted",
|
||||
"ChatStatusError",
|
||||
"ChatStatusRequiresAction"
|
||||
"ChatStatusRequiresAction",
|
||||
"ChatStatusInterrupting"
|
||||
]
|
||||
},
|
||||
"codersdk.ChatStreamActionRequired": {
|
||||
@@ -15460,7 +15529,9 @@
|
||||
"error",
|
||||
"queue_update",
|
||||
"retry",
|
||||
"action_required"
|
||||
"action_required",
|
||||
"preview_reset",
|
||||
"history_reset"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ChatStreamEventTypeMessagePart",
|
||||
@@ -15469,17 +15540,28 @@
|
||||
"ChatStreamEventTypeError",
|
||||
"ChatStreamEventTypeQueueUpdate",
|
||||
"ChatStreamEventTypeRetry",
|
||||
"ChatStreamEventTypeActionRequired"
|
||||
"ChatStreamEventTypeActionRequired",
|
||||
"ChatStreamEventTypePreviewReset",
|
||||
"ChatStreamEventTypeHistoryReset"
|
||||
]
|
||||
},
|
||||
"codersdk.ChatStreamMessagePart": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"generation_attempt": {
|
||||
"type": "integer"
|
||||
},
|
||||
"history_version": {
|
||||
"type": "integer"
|
||||
},
|
||||
"part": {
|
||||
"$ref": "#/definitions/codersdk.ChatMessagePart"
|
||||
},
|
||||
"role": {
|
||||
"$ref": "#/definitions/codersdk.ChatMessageRole"
|
||||
},
|
||||
"seq": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user