mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 14:01:06 +00:00
Add get_messages RPC command
This commit is contained in:
parent
2b0aa5ed8e
commit
3c8ab0280e
3 changed files with 25 additions and 3 deletions
|
|
@ -227,6 +227,14 @@ export async function runRpcMode(session: AgentSession): Promise<never> {
|
|||
return success(id, "get_last_assistant_text", { text });
|
||||
}
|
||||
|
||||
// =================================================================
|
||||
// Messages
|
||||
// =================================================================
|
||||
|
||||
case "get_messages": {
|
||||
return success(id, "get_messages", { messages: session.messages });
|
||||
}
|
||||
|
||||
default: {
|
||||
const unknownCommand = command as { type: string };
|
||||
return error(undefined, unknownCommand.type, `Unknown command: ${unknownCommand.type}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue