MCPcopy Index your code
hub / github.com/winfunc/opcode / loadAgentRun

Function loadAgentRun

src/components/AgentRunOutputViewer.tsx:104–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 // Load agent run on mount
103 useEffect(() => {
104 const loadAgentRun = async () => {
105 try {
106 setLoading(true);
107 const agentRun = await api.getAgentRun(parseInt(agentRunId));
108 setRun(agentRun);
109 updateTabTitle(tabId, `Agent: ${agentRun.agent_name || 'Unknown'}`);
110 updateTabStatus(tabId, agentRun.status === 'running' ? 'running' : agentRun.status === 'failed' ? 'error' : 'complete');
111 } catch (error) {
112 console.error('Failed to load agent run:', error);
113 updateTabStatus(tabId, 'error');
114 } finally {
115 setLoading(false);
116 }
117 };
118
119 if (agentRunId) {
120 loadAgentRun();

Callers 1

AgentRunOutputViewerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected