Show the terminal immediately when opening the Terminal tab
This commit is contained in:
+19
-12
@@ -738,24 +738,22 @@ paths:
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
"409": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/tasks/{taskId}/terminals:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
/api/terminals:
|
||||
get:
|
||||
operationId: listTaskTerminals
|
||||
operationId: listTerminals
|
||||
description: >
|
||||
The task's running terminals, login shells in its worktree, oldest first. A terminals.changed event with the
|
||||
task's id is broadcast whenever one starts or ends.
|
||||
Every task's running terminals, login shells in its worktree, each task's oldest first. Whenever one starts or
|
||||
ends, a terminals.changed event with the task's id is broadcast, whose payload is that task's TerminalList.
|
||||
responses:
|
||||
"200":
|
||||
description: The terminals.
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items: { $ref: "#/components/schemas/TaskTerminal" }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
"409": { $ref: "#/components/responses/Error" }
|
||||
schema: { $ref: "#/components/schemas/TerminalList" }
|
||||
|
||||
/api/tasks/{taskId}/terminals:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
post:
|
||||
operationId: startTaskTerminal
|
||||
description: >
|
||||
@@ -2091,12 +2089,21 @@ components:
|
||||
|
||||
TaskTerminal:
|
||||
type: object
|
||||
required: [id, name, started_at]
|
||||
required: [id, task_id, name, started_at]
|
||||
properties:
|
||||
id: { type: string }
|
||||
task_id: { type: string }
|
||||
name: { type: string, description: "Shell, or the name of the saved command it was started with." }
|
||||
started_at: { type: string, format: date-time }
|
||||
|
||||
TerminalList:
|
||||
type: object
|
||||
required: [terminals]
|
||||
properties:
|
||||
terminals:
|
||||
type: array
|
||||
items: { $ref: "#/components/schemas/TaskTerminal" }
|
||||
|
||||
TerminalStart:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user