tycono 0.3.6 → 0.3.7
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 +1 -1
- package/src/api/src/routes/execute.ts +7 -5
- package/src/tui/app.tsx +2 -9
package/package.json
CHANGED
|
@@ -50,14 +50,16 @@ export function handleExecRequest(req: IncomingMessage, res: ServerResponse): vo
|
|
|
50
50
|
|
|
51
51
|
// ── /api/waves/active — restore active waves after refresh ──
|
|
52
52
|
if (method === 'GET' && url === '/api/waves/active') {
|
|
53
|
-
// Recovery: rebuild wave→session mapping from session-store
|
|
54
|
-
//
|
|
53
|
+
// Recovery: rebuild wave→session mapping from session-store
|
|
54
|
+
// Include done sessions (persistent channel model) but limit to CEO sessions
|
|
55
55
|
const waves = waveMultiplexer.getActiveWaves();
|
|
56
56
|
if (waves.length === 0) {
|
|
57
57
|
const allSessions = listSessions();
|
|
58
58
|
let recovered = 0;
|
|
59
59
|
for (const ses of allSessions) {
|
|
60
|
-
if (!ses.waveId
|
|
60
|
+
if (!ses.waveId) continue;
|
|
61
|
+
// Only recover CEO sessions for wave display (team sessions loaded on demand)
|
|
62
|
+
if (ses.roleId !== 'ceo') continue;
|
|
61
63
|
const exec = executionManager.getActiveExecution(ses.id);
|
|
62
64
|
if (exec) {
|
|
63
65
|
waveMultiplexer.registerSession(ses.waveId, exec);
|
|
@@ -476,10 +478,10 @@ function handleWaveStream(waveId: string, url: string, res: ServerResponse, req:
|
|
|
476
478
|
|
|
477
479
|
let sessionIds = waveMultiplexer.getWaveSessionIds(waveId);
|
|
478
480
|
|
|
479
|
-
// Recovery:
|
|
481
|
+
// Recovery: recover sessions for this wave (active + done = persistent channel)
|
|
480
482
|
if (sessionIds.length === 0) {
|
|
481
483
|
const allSessions = listSessions();
|
|
482
|
-
const waveSessions = allSessions.filter(s => s.waveId === waveId
|
|
484
|
+
const waveSessions = allSessions.filter(s => s.waveId === waveId);
|
|
483
485
|
for (const ses of waveSessions) {
|
|
484
486
|
const exec = executionManager.getActiveExecution(ses.id);
|
|
485
487
|
if (exec) {
|
package/src/tui/app.tsx
CHANGED
|
@@ -335,11 +335,7 @@ export const App: React.FC = () => {
|
|
|
335
335
|
const lastWave = pastEntries[pastEntries.length - 1];
|
|
336
336
|
setFocusedWaveId(lastWave?.waveId ?? null);
|
|
337
337
|
|
|
338
|
-
//
|
|
339
|
-
if (lastWave) {
|
|
340
|
-
loadPreviousConversation(lastWave.waveId);
|
|
341
|
-
loadWaveHistoryEvents(lastWave.waveId);
|
|
342
|
-
}
|
|
338
|
+
// SSE replay handles history display automatically (persistent channel model)
|
|
343
339
|
} else if (api.loaded) {
|
|
344
340
|
// No active waves, no past waves — fresh start
|
|
345
341
|
autoWaveCreated.current = true;
|
|
@@ -442,8 +438,7 @@ export const App: React.FC = () => {
|
|
|
442
438
|
setFocusedWaveId(waveId);
|
|
443
439
|
sse.clearEvents();
|
|
444
440
|
setSystemMessages([]);
|
|
445
|
-
|
|
446
|
-
loadWaveHistoryEvents(waveId);
|
|
441
|
+
// SSE reconnect handles history replay automatically
|
|
447
442
|
},
|
|
448
443
|
onQuit: () => exit(),
|
|
449
444
|
onShowPanel: () => setMode('panel'),
|
|
@@ -690,8 +685,6 @@ export const App: React.FC = () => {
|
|
|
690
685
|
setFocusedWaveId(newWaveId);
|
|
691
686
|
sse.clearEvents();
|
|
692
687
|
setSystemMessages([]);
|
|
693
|
-
loadPreviousConversation(newWaveId);
|
|
694
|
-
loadWaveHistoryEvents(newWaveId);
|
|
695
688
|
}}
|
|
696
689
|
/>
|
|
697
690
|
</Box>
|