feat(v2): add frontend remote machine integration
remote-bridge.ts adapter for machine management IPC. machines.svelte.ts store for remote machine state. Layout store extended with remoteMachineId on Pane interface. agent-bridge.ts and pty-bridge.ts route to remote commands when remoteMachineId is set. SettingsDialog gains Remote Machines section. Sidebar auto-groups remote panes by machine label.
This commit is contained in:
parent
0b39133d66
commit
5503340e87
7 changed files with 481 additions and 5 deletions
|
|
@ -11,13 +11,21 @@ export interface AgentQueryOptions {
|
|||
max_turns?: number;
|
||||
max_budget_usd?: number;
|
||||
resume_session_id?: string;
|
||||
remote_machine_id?: string;
|
||||
}
|
||||
|
||||
export async function queryAgent(options: AgentQueryOptions): Promise<void> {
|
||||
if (options.remote_machine_id) {
|
||||
const { remote_machine_id: machineId, ...agentOptions } = options;
|
||||
return invoke('remote_agent_query', { machineId, options: agentOptions });
|
||||
}
|
||||
return invoke('agent_query', { options });
|
||||
}
|
||||
|
||||
export async function stopAgent(sessionId: string): Promise<void> {
|
||||
export async function stopAgent(sessionId: string, remoteMachineId?: string): Promise<void> {
|
||||
if (remoteMachineId) {
|
||||
return invoke('remote_agent_stop', { machineId: remoteMachineId, sessionId });
|
||||
}
|
||||
return invoke('agent_stop', { sessionId });
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue