feat(coding-agent): expose RPC queue clearing

closes #8432
This commit is contained in:
Vegard Stikbakke 2026-08-25 15:19:49 +02:00
parent 587be985a0
commit a79b373342
7 changed files with 130 additions and 0 deletions

View file

@ -134,6 +134,29 @@ Response:
{"type": "response", "command": "abort", "success": true}
```
#### clear_queue
Remove queued steering and follow-up messages and return their text.
```json
{"type": "clear_queue"}
```
Response:
```json
{
"type": "response",
"command": "clear_queue",
"success": true,
"data": {
"steering": ["Change direction"],
"followUp": ["Summarize when finished"]
}
}
```
To implement interactive Esc behavior, send `clear_queue` before `abort`, then restore the returned text in the client editor. `abort` continues queued messages when they remain in the session.
#### new_session
Start a fresh session. Can be cancelled by a `session_before_switch` extension event handler.