()
| 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(); |
no outgoing calls
no test coverage detected