Add get_messages RPC command

This commit is contained in:
Mario Zechner 2025-12-09 14:35:09 +01:00
parent 2b0aa5ed8e
commit 3c8ab0280e
3 changed files with 25 additions and 3 deletions

View file

@ -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}`);