tycono 0.3.37 → 0.3.38

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": "tycono",
3
- "version": "0.3.37",
3
+ "version": "0.3.38",
4
4
  "description": "Build an AI company. Watch them work.",
5
5
  "type": "module",
6
6
  "bin": {
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 to toggle mode, Ctrl+C always exits
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 (mode === 'command' && key.tab) {
677
- process.stdout.write('\x1b[2J\x1b[H');
678
- setMode('panel');
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
- // Esc in Command Mode → interrupt supervisor (like Claude Code)
681
- // Only when actually streaming (not idle/done) — prevents spam on repeated Esc
682
- if (mode === 'command' && key.escape && focusedWaveId
683
- && (sse.streamStatus === 'streaming')) {
684
- stopWave(focusedWaveId).catch(() => {});
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
 
@@ -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
- onEscape(); return;
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'];