tycono 0.3.13-beta.2 → 0.3.13-beta.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.
package/bin/tycono.ts CHANGED
@@ -317,6 +317,19 @@ async function startServerForTui(): Promise<void> {
317
317
  process.on('SIGINT', shutdown);
318
318
  process.on('SIGTERM', shutdown);
319
319
 
320
+ // Handle TTY read errors gracefully (EIO on stdin when terminal disconnects)
321
+ // Without this: "Error: read EIO" → Unhandled 'error' event → crash
322
+ process.stdin.on('error', (err) => {
323
+ logStream.write(`[TTY] stdin error: ${err.code ?? err.message}\n`);
324
+ if (err.code === 'EIO' || err.code === 'EPIPE') {
325
+ // Terminal disconnected — graceful shutdown
326
+ shutdown();
327
+ }
328
+ });
329
+ process.stdout.on('error', (err) => {
330
+ logStream.write(`[TTY] stdout error: ${err.code ?? err.message}\n`);
331
+ });
332
+
320
333
  // Start TUI — stdout.write is NOT intercepted, Ink has full control
321
334
  const { startTui } = await import('../src/tui/index.tsx');
322
335
  await startTui({ port });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tycono",
3
- "version": "0.3.13-beta.2",
3
+ "version": "0.3.13-beta.4",
4
4
  "description": "Build an AI company. Watch them work.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -369,8 +369,8 @@ export const CommandMode: React.FC<CommandModeProps> = ({
369
369
  setAcIndex(i => Math.max(0, i - 1));
370
370
  return;
371
371
  }
372
- if (key.tab) {
373
- // Tab → fill input with selected command (don't execute)
372
+ if (key.rightArrow) {
373
+ // → fill input with selected command (don't execute)
374
374
  const selected = acCandidates[acIndex];
375
375
  if (selected) {
376
376
  const base = selected.cmd.split(' ')[0]; // e.g. "/new" from "/new [text]"
@@ -476,13 +476,28 @@ export const CommandMode: React.FC<CommandModeProps> = ({
476
476
  <Text color={quickBarActive ? 'gray' : 'yellow'} bold>&gt; </Text>
477
477
  <TextInput
478
478
  value={input}
479
- onChange={setInput}
479
+ onChange={(v) => { setInput(v); setAcIndex(0); }}
480
480
  onSubmit={handleSubmit}
481
481
  placeholder=""
482
482
  focus={!quickBarActive}
483
483
  />
484
484
  </Box>
485
485
 
486
+ {/* Command autocomplete — shown when typing / */}
487
+ {acVisible && (
488
+ <Box flexDirection="column" paddingX={0}>
489
+ {acCandidates.slice(0, 8).map((c, i) => (
490
+ <Box key={c.cmd}>
491
+ <Text color={i === acIndex ? 'cyan' : 'gray'} bold={i === acIndex}>
492
+ {i === acIndex ? '\u25B8 ' : ' '}{c.cmd.split(' ')[0].padEnd(12)}
493
+ </Text>
494
+ <Text color="gray" dimColor> {c.desc}</Text>
495
+ </Box>
496
+ ))}
497
+ <Text color="gray" dimColor> \u2191\u2193 select \u2192 fill Enter run Esc cancel</Text>
498
+ </Box>
499
+ )}
500
+
486
501
  {/* Quick action bar — shown when arrow down from input */}
487
502
  {quickBarActive && (
488
503
  <Box paddingX={0} marginTop={0}>