mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 06:04:40 +00:00
feat(coding-agent): add set_session_name RPC command (#1075)
- Add set_session_name command with empty name validation - Expose sessionName in get_state response - Add setSessionName() to AgentSession and RpcClient - Document in docs/rpc.md
This commit is contained in:
parent
cb08758696
commit
e20583aac8
6 changed files with 86 additions and 1 deletions
|
|
@ -154,6 +154,7 @@ Response:
|
|||
"followUpMode": "one-at-a-time",
|
||||
"sessionFile": "/path/to/session.jsonl",
|
||||
"sessionId": "abc123",
|
||||
"sessionName": "my-feature-work",
|
||||
"autoCompactionEnabled": true,
|
||||
"messageCount": 5,
|
||||
"pendingMessageCount": 0
|
||||
|
|
@ -161,7 +162,7 @@ Response:
|
|||
}
|
||||
```
|
||||
|
||||
The `model` field is a full [Model](#model) object or `null`.
|
||||
The `model` field is a full [Model](#model) object or `null`. The `sessionName` field is the display name set via `set_session_name`, or omitted if not set.
|
||||
|
||||
#### get_messages
|
||||
|
||||
|
|
@ -612,6 +613,25 @@ Response:
|
|||
|
||||
Returns `{"text": null}` if no assistant messages exist.
|
||||
|
||||
#### set_session_name
|
||||
|
||||
Set a display name for the current session. The name appears in session listings and helps identify sessions.
|
||||
|
||||
```json
|
||||
{"type": "set_session_name", "name": "my-feature-work"}
|
||||
```
|
||||
|
||||
Response:
|
||||
```json
|
||||
{
|
||||
"type": "response",
|
||||
"command": "set_session_name",
|
||||
"success": true
|
||||
}
|
||||
```
|
||||
|
||||
The current session name is available via `get_state` in the `sessionName` field.
|
||||
|
||||
### Commands
|
||||
|
||||
#### get_commands
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue