osai-agent 4.2.48 → 4.2.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osai-agent",
3
- "version": "4.2.48",
3
+ "version": "4.2.52",
4
4
  "type": "module",
5
5
  "description": "OS AI Agent - YOUR AI AGENT",
6
6
  "main": "src/index.js",
package/src/ui/App.js CHANGED
@@ -603,7 +603,11 @@ export function App({ createAgentLoop, agentConfig, initialSession = null, onExi
603
603
  if (!agentLoopActiveRef.current) return;
604
604
  if (cancelRequestedRef.current) return;
605
605
 
606
- try { agentLoopRef.current?.cancel?.(); } catch {}
606
+ const loop = agentLoopRef.current;
607
+ if (loop) {
608
+ if (loop._subagentActive && loop._subagentLoop) { try { loop._subagentLoop.cancel?.(); } catch {} }
609
+ try { loop?.cancel?.(); } catch {}
610
+ }
607
611
  updateUserActivity();
608
612
 
609
613
  // Close any active tool_start events with synthetic tool_end
@@ -164,13 +164,15 @@ export function ProviderMenu({ visible, onSelect, onCancel, serverUrl, token, cu
164
164
  setCatalog(data);
165
165
  setPhase('catalog');
166
166
  } else {
167
- const res = await fetch(`${serverUrl}/api/provider/catalog`, {
168
- headers: { Authorization: `Bearer ${token}` }
169
- });
170
- if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
171
- const data = await res.json();
172
- setCatalog(data);
173
- setPhase('catalog');
167
+ const res = await fetch(`${serverUrl}/api/provider/catalog`, {
168
+ headers: { Authorization: `Bearer ${token}` }
169
+ });
170
+ if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
171
+ const data = await res.json();
172
+ const localKeyMap = Object.fromEntries(LOCAL_PROVIDERS.map(p => [p.id, p.needsKey]));
173
+ const fixed = data.map(p => ({ ...p, needs_key: localKeyMap[p.id] ?? p.needs_key }));
174
+ setCatalog(fixed);
175
+ setPhase('catalog');
174
176
  }
175
177
  } catch (err) {
176
178
  setCatalogError(err.message);