fix(coding-agent): split /clone from /fork UX

closes #2962
This commit is contained in:
Mario Zechner
2026-04-20 14:33:32 +02:00
parent 62c1c4031c
commit d554409b1f
16 changed files with 386 additions and 34 deletions

View File

@@ -580,7 +580,7 @@ If an extension cancelled the switch:
#### fork
Create a new fork from a previous user message. Can be cancelled by a `session_before_fork` extension event handler. Returns the text of the message being forked from.
Create a new fork from a previous user message on the active branch. Can be cancelled by a `session_before_fork` extension event handler. Returns the text of the message being forked from.
```json
{"type": "fork", "entryId": "abc123"}
@@ -606,6 +606,34 @@ If an extension cancelled the fork:
}
```
#### clone
Duplicate the current active branch into a new session at the current position. Can be cancelled by a `session_before_fork` extension event handler.
```json
{"type": "clone"}
```
Response:
```json
{
"type": "response",
"command": "clone",
"success": true,
"data": {"cancelled": false}
}
```
If an extension cancelled the clone:
```json
{
"type": "response",
"command": "clone",
"success": true,
"data": {"cancelled": true}
}
```
#### get_fork_messages
Get user messages available for forking.