Render Mermaid diagrams and worktree images in agent Markdown
This commit is contained in:
+25
-1
@@ -327,6 +327,30 @@ paths:
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
"409": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/tasks/{taskId}/image:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
get:
|
||||
operationId: getTaskImage
|
||||
description: >
|
||||
An image file from the task's worktree, for Markdown images and image attachments. path is absolute or relative
|
||||
to the worktree; after resolving symlinks it must be inside the worktree. PNG, JPEG, GIF, WebP and SVG, chosen by extension.
|
||||
parameters:
|
||||
- { name: path, in: query, required: true, schema: { type: string } }
|
||||
responses:
|
||||
"200":
|
||||
description: The file's bytes.
|
||||
content:
|
||||
image/png: { schema: { type: string, format: binary } }
|
||||
image/jpeg: { schema: { type: string, format: binary } }
|
||||
image/gif: { schema: { type: string, format: binary } }
|
||||
image/webp: { schema: { type: string, format: binary } }
|
||||
image/svg+xml: { schema: { type: string, format: binary } }
|
||||
"400": { $ref: "#/components/responses/Error" }
|
||||
"403": { $ref: "#/components/responses/Error" }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
"409": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/tasks/{taskId}/diff:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
@@ -832,7 +856,7 @@ components:
|
||||
required: [kind]
|
||||
properties:
|
||||
kind: { type: string, enum: [file, diff, image, diagram, task, snapshot, url] }
|
||||
path: { type: string, description: "file: repo-relative path." }
|
||||
path: { type: string, description: "file: repo-relative path. image: an image file in the task's worktree, absolute or relative to it." }
|
||||
start_line: { type: integer }
|
||||
end_line: { type: integer }
|
||||
ref: { type: string, description: "diff: git revision range." }
|
||||
|
||||
Reference in New Issue
Block a user