Start a new task from a closed task
This commit is contained in:
+27
-1
@@ -972,6 +972,32 @@ paths:
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
"409": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/sessions/{sessionId}/continue:
|
||||
parameters:
|
||||
- { name: sessionId, in: path, required: true, schema: { type: string } }
|
||||
post:
|
||||
operationId: continueSession
|
||||
description: >
|
||||
Creates a new task from a merged or discarded task's agent session: its branch and worktree start from the
|
||||
project's default branch, with an agent session that continues that session's conversation from its end (the
|
||||
vendor's own session fork) and gets the message as its first turn, as sendMessage does. The new task has
|
||||
forked_from and no forked_at. Refused while the session's task is active, for a session that isn't a task's
|
||||
implementer, and for an Antigravity session.
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/MessageCreate" }
|
||||
responses:
|
||||
"201":
|
||||
description: The new task.
|
||||
content:
|
||||
application/json:
|
||||
schema: { $ref: "#/components/schemas/Task" }
|
||||
"400": { $ref: "#/components/responses/Error" }
|
||||
"404": { $ref: "#/components/responses/Error" }
|
||||
"409": { $ref: "#/components/responses/Error" }
|
||||
|
||||
/api/tasks/{taskId}/sessions:
|
||||
parameters:
|
||||
- { name: taskId, in: path, required: true, schema: { type: string } }
|
||||
@@ -1539,7 +1565,7 @@ components:
|
||||
merge_commit: { type: string, description: "merged: the squash commit on the default branch; empty when there was nothing to merge." }
|
||||
todo_item: { type: string, description: "The title of the TODO.md item the task was started from; absent for other tasks." }
|
||||
forked_from: { type: string, description: "The task this one was forked from; absent for other tasks." }
|
||||
forked_at: { type: integer, description: "With forked_from: the n of the snapshot it was forked at." }
|
||||
forked_at: { type: integer, description: "With forked_from: the n of the snapshot it was forked at; absent when it continues a closed task from its end." }
|
||||
merge_queued_at: { type: string, format: date-time, description: "When Merge was requested while another task in the project was merging; absent once the merge starts or when none is held." }
|
||||
workflow: { type: string, description: "For a workflow run's task: the name of the workflow it froze at creation (getTaskWorkflow has its copy). A run's task has no agent, worktree or branch (branch, worktree_path and base_ref are empty); its stage tasks are its subtasks, and it closes once they all have, as merged when any of them merged. Absent for other tasks." }
|
||||
workflow_stage: { type: string, description: "For a stage task of a workflow run: the name of the stage it runs; parent_task_id is the run's task. Absent for other tasks." }
|
||||
|
||||
Reference in New Issue
Block a user