mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 18:01:22 +00:00
feat(coding-agent): add ctx.reload and reload-runtime example closes #1371
This commit is contained in:
parent
0bd205ab87
commit
e1b56c1d28
8 changed files with 114 additions and 0 deletions
|
|
@ -1068,6 +1068,9 @@ export class InteractiveMode {
|
|||
await this.handleResumeSession(sessionPath);
|
||||
return { cancelled: false };
|
||||
},
|
||||
reload: async () => {
|
||||
await this.handleReloadCommand();
|
||||
},
|
||||
},
|
||||
shutdownHandler: () => {
|
||||
this.shutdownRequested = true;
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@ export async function runPrintMode(session: AgentSession, options: PrintModeOpti
|
|||
const success = await session.switchSession(sessionPath);
|
||||
return { cancelled: !success };
|
||||
},
|
||||
reload: async () => {
|
||||
await session.reload();
|
||||
},
|
||||
},
|
||||
onError: (err) => {
|
||||
console.error(`Extension error (${err.extensionPath}): ${err.error}`);
|
||||
|
|
|
|||
|
|
@ -295,6 +295,9 @@ export async function runRpcMode(session: AgentSession): Promise<never> {
|
|||
const success = await session.switchSession(sessionPath);
|
||||
return { cancelled: !success };
|
||||
},
|
||||
reload: async () => {
|
||||
await session.reload();
|
||||
},
|
||||
},
|
||||
shutdownHandler: () => {
|
||||
shutdownRequested = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue