mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +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
|
|
@ -590,6 +590,11 @@ export class AgentSession {
|
|||
return this.sessionManager.getSessionId();
|
||||
}
|
||||
|
||||
/** Current session display name, if set */
|
||||
get sessionName(): string | undefined {
|
||||
return this.sessionManager.getSessionName();
|
||||
}
|
||||
|
||||
/** Scoped models for cycling (from --models flag) */
|
||||
get scopedModels(): ReadonlyArray<{ model: Model<any>; thinkingLevel: ThinkingLevel }> {
|
||||
return this._scopedModels;
|
||||
|
|
@ -2181,6 +2186,13 @@ export class AgentSession {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a display name for the current session.
|
||||
*/
|
||||
setSessionName(name: string): void {
|
||||
this.sessionManager.appendSessionInfo(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a fork from a specific entry.
|
||||
* Emits before_fork/fork session events to extensions.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue