Simplify page view file loading to plain relative paths

This commit is contained in:
Ian Gulliver
2026-10-23 06:55:15 -07:00
parent c6da60f728
commit 5b69d2c639
6 changed files with 466 additions and 461 deletions
+6 -3
View File
@@ -875,15 +875,17 @@ paths:
"404": { $ref: "#/components/responses/Error" }
"409": { $ref: "#/components/responses/Error" }
/api/raw:
/api/tasks/{taskId}/raw:
parameters:
- { name: taskId, in: path, required: true, schema: { type: string } }
get:
operationId: getRaw
operationId: getTaskRaw
description: >
A regular file on the server, whole, with a content type chosen by its extension: an HTML page in the
app's Page view and the stylesheets, scripts and images it loads. The response carries a sandbox
Content-Security-Policy, so a page opened from this address directly can't act on the API as its viewer.
parameters:
- { name: path, in: query, required: true, schema: { type: string }, description: "Absolute and slash-separated." }
- { name: path, in: query, required: true, schema: { type: string }, description: "Slash-separated, absolute or relative to the task's worktree root." }
responses:
"200":
description: The file's bytes.
@@ -891,6 +893,7 @@ paths:
"*/*": { schema: { type: string, format: binary } }
"400": { $ref: "#/components/responses/Error" }
"404": { $ref: "#/components/responses/Error" }
"409": { $ref: "#/components/responses/Error" }
/api/terminals:
get: