Add edit dialog for managed agents with relay profile sync (#277)

This commit is contained in:
Will Pfleger
2026-04-13 14:15:43 -04:00
committed by GitHub
parent 4c6c897d11
commit ccecf7e362
9 changed files with 519 additions and 136 deletions

View File

@@ -1046,13 +1046,22 @@ export async function getAgentModels(pubkey: string) {
return invokeTauri<AgentModelsResponse>("get_agent_models", { pubkey });
}
type RawUpdateManagedAgentResponse = {
agent: RawManagedAgent;
profile_sync_error: string | null;
};
export async function updateManagedAgent(
input: UpdateManagedAgentInput,
): Promise<ManagedAgent> {
const response = await invokeTauri<RawManagedAgent>("update_managed_agent", {
input,
});
return fromRawManagedAgent(response);
): Promise<{ agent: ManagedAgent; profileSyncError: string | null }> {
const response = await invokeTauri<RawUpdateManagedAgentResponse>(
"update_managed_agent",
{ input },
);
return {
agent: fromRawManagedAgent(response.agent),
profileSyncError: response.profile_sync_error,
};
}
// ── Backend provider discovery ────────────────────────────────────────────────

View File

@@ -410,6 +410,13 @@ export type UpdateManagedAgentInput = {
model?: string | null;
systemPrompt?: string | null;
mcpToolsets?: string | null;
parallelism?: number;
turnTimeoutSeconds?: number;
relayUrl?: string;
acpCommand?: string;
agentCommand?: string;
agentArgs?: string[];
mcpCommand?: string;
};
export type AgentPersona = {
id: string;