agen-vektor 0.3.1 → 0.3.2

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/dist/cli/index.js CHANGED
@@ -250,7 +250,13 @@ async function runTui(opts) {
250
250
  const onResize = () => doRender();
251
251
  process.stdout.on('resize', onResize);
252
252
  process.on('SIGINT', () => {
253
- // Ctrl+C is handled via raw mode keys; SIGINT may still fire
253
+ // In raw mode Ctrl+C arrives as a key event (0x03), but some terminals
254
+ // (web/embedded, some SSH clients) deliver it as SIGINT instead.
255
+ // Never swallow it: request a clean exit so the user is not forced to kill.
256
+ if (app)
257
+ app.requestExit();
258
+ else
259
+ process.exit(0);
254
260
  });
255
261
  process.on('SIGWINCH', onResize);
256
262
  const keyHandler = (ev) => {
package/dist/tui/app.js CHANGED
@@ -117,6 +117,7 @@ class App {
117
117
  this.status = 'Stopping…';
118
118
  this.statusColor = terminal_1.ANSI.yellow;
119
119
  this.running = false;
120
+ this.addSystem('⏹ Stopped. Press Ctrl+C again to quit.');
120
121
  }
121
122
  return;
122
123
  }
@@ -211,6 +212,17 @@ class App {
211
212
  await this.shutdown();
212
213
  }
213
214
  }
215
+ /**
216
+ * Abort any running task and request a clean exit.
217
+ * Used by Ctrl+C and SIGINT so the TUI never needs to be killed.
218
+ */
219
+ requestExit() {
220
+ if (this.running) {
221
+ this.abortController?.abort();
222
+ this.running = false;
223
+ }
224
+ this.exitRequested = true;
225
+ }
214
226
  // ─── Submission ───────────────────────────────────────────────
215
227
  async submit(text) {
216
228
  if (text.startsWith('/')) {
@@ -486,6 +498,11 @@ class App {
486
498
  if (ev.name === 'escape' || ev.name === 'enter' || ev.name === 'ctrl_c' || (ev.name === 'char' && ev.char === '?')) {
487
499
  this.modal = { type: 'none' };
488
500
  }
501
+ else if (ev.name === 'char' && ev.char) {
502
+ // Typing while an info modal is open: close it and insert the char
503
+ this.modal = { type: 'none' };
504
+ this.input.insert(ev.char);
505
+ }
489
506
  else if (ev.name === 'pageup') {
490
507
  this.scroll = (0, chat_1.clampScroll)(this.scroll - 10, this.messages, this.cols(), this.chatHeight());
491
508
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agen-vektor",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "VectorHead (agen-vektor) — AI Coding Agent CLI/TUI for Linux & Termux. Multi-provider, tool calling, session, permission system.",
5
5
  "type": "commonjs",
6
6
  "bin": {