tycono 0.3.37 → 0.3.39
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/tui/app.tsx +18 -11
- package/src/tui/components/PanelMode.tsx +2 -1
package/package.json
CHANGED
package/src/tui/app.tsx
CHANGED
|
@@ -667,21 +667,28 @@ export const App: React.FC = () => {
|
|
|
667
667
|
}
|
|
668
668
|
}, [execute, addSystemMessage, addSystemLines, focusedWaveId, focusedWaveIndex, derivedWaveStatus, api.sessions.length, activeCount, waves, api.activeSessions, api.portSummary, pendingPresetSelect, onWaveCreated]);
|
|
669
669
|
|
|
670
|
-
// Global key handler: Tab
|
|
670
|
+
// Global key handler: Tab/Escape mode toggle + Ctrl+C
|
|
671
671
|
useInput((input, key) => {
|
|
672
672
|
if (key.ctrl && input === 'c') {
|
|
673
673
|
exit();
|
|
674
674
|
return;
|
|
675
675
|
}
|
|
676
|
-
if (
|
|
677
|
-
|
|
678
|
-
|
|
676
|
+
if (key.tab) {
|
|
677
|
+
if (mode === 'command') {
|
|
678
|
+
process.stdout.write('\x1b[2J\x1b[H');
|
|
679
|
+
setMode('panel');
|
|
680
|
+
}
|
|
681
|
+
return;
|
|
679
682
|
}
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
683
|
+
if (key.escape) {
|
|
684
|
+
if (mode === 'panel') {
|
|
685
|
+
setMode('command');
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
// Esc in Command Mode → interrupt supervisor (like Claude Code)
|
|
689
|
+
if (mode === 'command' && focusedWaveId && sse.streamStatus === 'streaming') {
|
|
690
|
+
stopWave(focusedWaveId).catch(() => {});
|
|
691
|
+
}
|
|
685
692
|
}
|
|
686
693
|
});
|
|
687
694
|
|
|
@@ -755,7 +762,7 @@ export const App: React.FC = () => {
|
|
|
755
762
|
/>
|
|
756
763
|
</Box>
|
|
757
764
|
)}
|
|
758
|
-
|
|
765
|
+
{mode !== 'panel' && <Box flexDirection="column">
|
|
759
766
|
<CommandMode
|
|
760
767
|
eventLines={eventLines}
|
|
761
768
|
systemMessages={systemMessages}
|
|
@@ -770,7 +777,7 @@ export const App: React.FC = () => {
|
|
|
770
777
|
activeSessions={api.activeSessions}
|
|
771
778
|
focusedWaveId={focusedWaveId}
|
|
772
779
|
/>
|
|
773
|
-
</Box>
|
|
780
|
+
</Box>}
|
|
774
781
|
<StatusBar
|
|
775
782
|
companyName={api.company?.name ?? 'Loading...'}
|
|
776
783
|
waveIndex={focusedWaveIndex}
|
|
@@ -123,7 +123,8 @@ const PanelModeInner: React.FC<PanelModeProps> = ({
|
|
|
123
123
|
useInput((input, key) => {
|
|
124
124
|
if (key.escape) {
|
|
125
125
|
if (docsPreview) { setDocsPreview(false); return; }
|
|
126
|
-
|
|
126
|
+
// Panel→Command mode switch handled by app.tsx global handler
|
|
127
|
+
return;
|
|
127
128
|
}
|
|
128
129
|
if (input === 'h' || key.leftArrow) {
|
|
129
130
|
const tabs: RightTab[] = ['stream', 'docs', 'info'];
|