tycono 0.3.3 → 0.3.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tui/app.tsx +24 -24
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tycono",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Build an AI company. Watch them work.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/tui/app.tsx CHANGED
@@ -258,30 +258,6 @@ export const App: React.FC = () => {
258
258
  });
259
259
  }, []);
260
260
 
261
- // Load wave history into SSE events (for Panel Mode Stream tab)
262
- const loadWaveHistoryEvents = useCallback(async (waveId: string) => {
263
- try {
264
- const sessions = api.sessions.filter(s => s.waveId === waveId && s.roleId === 'ceo');
265
- const allEvents: import('./api').SSEEvent[] = [];
266
-
267
- for (const ses of sessions.slice(-2)) {
268
- try {
269
- const resp = await import('./api').then(m => m.fetchJson<{ events: any[] }>(`/api/jobs/${ses.id}/history`));
270
- const events = resp?.events ?? [];
271
- for (const e of events) {
272
- if (['text', 'tool:start', 'tool:result', 'msg:start', 'msg:done', 'msg:error', 'dispatch:start', 'thinking'].includes(e.type)) {
273
- allEvents.push(e as import('./api').SSEEvent);
274
- }
275
- }
276
- } catch { /* skip */ }
277
- }
278
-
279
- if (allEvents.length > 0) {
280
- sse.loadHistory(allEvents);
281
- }
282
- } catch { /* ignore */ }
283
- }, [api.sessions, sse]);
284
-
285
261
  // Load previous conversation from wave's activity stream into system messages
286
262
  const loadPreviousConversation = useCallback(async (waveId: string) => {
287
263
  try {
@@ -384,6 +360,30 @@ export const App: React.FC = () => {
384
360
  // SSE subscription to focused wave
385
361
  const sse = useSSE(focusedWaveId);
386
362
 
363
+ // Load wave history into SSE events (for Panel Mode Stream tab)
364
+ const loadWaveHistoryEvents = useCallback(async (waveId: string) => {
365
+ try {
366
+ const sessions = api.sessions.filter(s => s.waveId === waveId && s.roleId === 'ceo');
367
+ const allEvents: import('./api').SSEEvent[] = [];
368
+
369
+ for (const ses of sessions.slice(-2)) {
370
+ try {
371
+ const resp = await import('./api').then(m => m.fetchJson<{ events: any[] }>(`/api/jobs/${ses.id}/history`));
372
+ const events = resp?.events ?? [];
373
+ for (const e of events) {
374
+ if (['text', 'tool:start', 'tool:result', 'msg:start', 'msg:done', 'msg:error', 'dispatch:start', 'thinking'].includes(e.type)) {
375
+ allEvents.push(e as import('./api').SSEEvent);
376
+ }
377
+ }
378
+ } catch { /* skip */ }
379
+ }
380
+
381
+ if (allEvents.length > 0) {
382
+ sse.loadHistory(allEvents);
383
+ }
384
+ } catch { /* ignore */ }
385
+ }, [api.sessions, sse]);
386
+
387
387
  // Build org tree — flatRoleIds follows visual top-to-bottom order
388
388
  const roles = api.company?.roles ?? [];
389
389
  const statuses = api.execStatus?.statuses ?? {};