feat: export agents to .claudia.json file
This commit is contained in:
@@ -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;
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user