feat(coding-agent): add switchSession to Extension API (#1191)
Allows extension commands to programmatically switch to a different session file via ctx.switchSession(sessionPath). fixes #1187
This commit is contained in:
@@ -277,6 +277,10 @@ export async function runRpcMode(session: AgentSession): Promise<never> {
|
||||
});
|
||||
return { cancelled: result.cancelled };
|
||||
},
|
||||
switchSession: async (sessionPath) => {
|
||||
const success = await session.switchSession(sessionPath);
|
||||
return { cancelled: !success };
|
||||
},
|
||||
},
|
||||
shutdownHandler: () => {
|
||||
shutdownRequested = true;
|
||||
|
||||
Reference in New Issue
Block a user