Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions api-reference/chat/delete.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: 'Delete Chat'
openapi: delete /api/chats
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use the required OpenAPI frontmatter format on Line 3.

Please align the field to the documented format (openapi: 'METHOD /path') to avoid parser/config inconsistencies.

Suggested fix
-openapi: delete /api/chats
+openapi: 'DELETE /api/chats'

As per coding guidelines, API reference MDX pages should include OpenAPI spec reference in format: openapi: 'METHOD /path'.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
openapi: delete /api/chats
openapi: 'DELETE /api/chats'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@api-reference/chat/delete.mdx` at line 3, The OpenAPI frontmatter on the page
uses an incorrect format: change the frontmatter key/value on the "openapi" line
so it follows the required literal format openapi: 'METHOD /path' (e.g., include
the HTTP method and path in single quotes) — update the existing openapi line to
use the exact quoted format to satisfy the parser.

---
135 changes: 135 additions & 0 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,82 @@
}
}
}
},
"delete": {
"description": "Delete a chat room by ID. This operation also removes related room records (memory emails, memories, room-report links, and segment-room links) before deleting the room itself.",
"requestBody": {
"description": "Chat deletion parameters",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteChatRequest"
}
}
}
},
"responses": {
"200": {
"description": "Chat deleted successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteChatResponse"
}
}
}
},
"400": {
"description": "Bad request - invalid parameters or validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteChatErrorResponse"
}
}
}
},
"401": {
"description": "Unauthorized - invalid or missing API key",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden - API key does not have access to this chat",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not found - chat room does not exist",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteChatErrorResponse"
}
}
}
},
"500": {
"description": "Server error - failed to delete chat",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteChatErrorResponse"
}
}
}
}
}
}
},
"/api/chats/compact": {
Expand Down Expand Up @@ -6560,6 +6636,65 @@
}
}
},
"DeleteChatRequest": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The unique identifier (UUID) of the chat room to delete."
}
}
},
"DeleteChatResponse": {
"type": "object",
"required": [
"status",
"id",
"message"
],
"properties": {
"status": {
"type": "string",
"enum": [
"success"
],
"description": "Status of the request"
},
"id": {
"type": "string",
"format": "uuid",
"description": "The UUID of the deleted chat room."
},
"message": {
"type": "string",
"description": "Success message describing the deletion result."
}
}
},
"DeleteChatErrorResponse": {
"type": "object",
"required": [
"status",
"error"
],
"properties": {
"status": {
"type": "string",
"enum": [
"error"
],
"description": "Status of the request"
},
"error": {
"type": "string",
"description": "Error message describing what went wrong."
}
}
},
"UIMessage": {
"type": "object",
"description": "A message in the chat conversation. See https://ai-sdk.dev/docs/reference/ai-sdk-core/ui-message for details.",
Expand Down
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"api-reference/chat/chats",
"api-reference/chat/create",
"api-reference/chat/update",
"api-reference/chat/delete",
"api-reference/chat/generate",
"api-reference/chat/stream",
"api-reference/chat/compact"
Expand Down Expand Up @@ -323,4 +324,4 @@
"og:site_name": "Recoup",
"twitter:card": "summary_large_image"
}
}
}