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

Function handleRunModel

app/src/components/EditAgent/useEditAgentModalLogic.ts:305–326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303
304 /* run model */
305 const handleRunModel = async () => {
306 if (isRunningModel || !currentModel) return;
307 setIsRunningModel(true);
308 setTestOutput((p) => 'SYSTEM: running model...\\n' + p);
309 try {
310 const r = await executeTestIteration(
311 agentId || 'test-agent',
312 systemPrompt,
313 currentModel,
314 getToken
315 );
316 setTestResponse(r);
317 setTestOutput((p) => `SYSTEM: model returned (${r.length} chars)\\n` + p);
318 testResponseRef.current?.focus();
319 } catch (e) {
320 setTestOutput(
321 (p) => `ERROR: ${e instanceof Error ? e.message : String(e)}\\n` + p
322 );
323 } finally {
324 setIsRunningModel(false);
325 }
326 };
327
328 /* run code */
329 const handleRunCode = async () => {

Callers

nothing calls this directly

Calls 1

executeTestIterationFunction · 0.90

Tested by

no test coverage detected