feat: export agents to .claudia.json file

This commit is contained in:
Vivek R
2025-06-23 15:23:29 +05:30
parent ccac68a7c2
commit ad035036e8
4 changed files with 117 additions and 6 deletions

View File

@@ -733,6 +733,20 @@ export const api = {
}
},
/**
* Exports a single agent to JSON format
* @param id - The agent ID to export
* @returns Promise resolving to the JSON string
*/
async exportAgent(id: number): Promise<string> {
try {
return await invoke<string>('export_agent', { id });
} catch (error) {
console.error("Failed to export agent:", error);
throw error;
}
},
/**
* Executes an agent
* @param agentId - The agent ID to execute
@@ -1800,4 +1814,4 @@ export const api = {
throw error;
}
},
};
};