MCPcopy Create free account
hub / github.com/Roy3838/Observer / handleSaveModalChanges

Function handleSaveModalChanges

app/src/components/GenerateAgent.tsx:236–253  ·  view source on GitHub ↗
(agent: CompleteAgent, code: string)

Source from the content-addressed store, hash-verified

234 };
235
236 const handleSaveModalChanges = async (agent: CompleteAgent, code: string) => {
237 try {
238 // The agent object from the modal already has the correct model_name
239 await saveAgent(agent, code);
240 setSaveSuccess(true);
241 setTimeout(() => {
242 setSaveSuccess(false);
243 setVisibleResponse('');
244 setFullResponse('');
245 setUserInput('');
246 }, 3000);
247 } catch (err) {
248 const errorMessage = err instanceof Error ? err.message : 'Unknown error';
249 setError(`Error saving agent: ${errorMessage}`);
250 }
251 setShowEditModal(false);
252 setIsSaving(false);
253 };
254
255 return (
256 <div className="w-full">

Callers

nothing calls this directly

Calls 1

saveAgentFunction · 0.90

Tested by

no test coverage detected