omnius 1.0.153 → 1.0.154

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/index.js CHANGED
@@ -529185,11 +529185,11 @@ async function cleanupStaleOllamaProcesses(options2 = {}) {
529185
529185
  continue;
529186
529186
  }
529187
529187
  try {
529188
- system.kill(proc.pid, "SIGTERM");
529188
+ signalOllamaProcess(system, proc, "SIGTERM");
529189
529189
  await system.sleep(options2.graceMs ?? DEFAULT_GRACE_MS);
529190
529190
  let signal = "SIGTERM";
529191
529191
  if (system.isPidAlive(proc.pid)) {
529192
- system.kill(proc.pid, "SIGKILL");
529192
+ signalOllamaProcess(system, proc, "SIGKILL");
529193
529193
  signal = "SIGKILL";
529194
529194
  await system.sleep(250);
529195
529195
  }
@@ -529282,6 +529282,23 @@ function decision(proc, action, classification, protectedProc, eligible, source,
529282
529282
  reasons
529283
529283
  };
529284
529284
  }
529285
+ function signalOllamaProcess(system, proc, signal) {
529286
+ let delivered = false;
529287
+ if (proc.isOllamaServe) {
529288
+ try {
529289
+ system.kill(-proc.pid, signal);
529290
+ delivered = true;
529291
+ } catch {
529292
+ }
529293
+ }
529294
+ try {
529295
+ system.kill(proc.pid, signal);
529296
+ delivered = true;
529297
+ } catch (err) {
529298
+ if (!delivered)
529299
+ throw err;
529300
+ }
529301
+ }
529285
529302
  async function maybeApplyInference(scan, options2, system) {
529286
529303
  const mode = options2.useInference ?? "auto";
529287
529304
  if (mode === false || process.env["OMNIUS_OLLAMA_CLEANUP_INFERENCE"] === "0") {
@@ -582534,6 +582551,15 @@ ${CONTENT_BG_SEQ}`);
582534
582551
  return;
582535
582552
  }
582536
582553
  if (key?.name === "return" || key?.name === "enter") {
582554
+ if (key?.shift) {
582555
+ const currentLine2 = rl.line ?? "";
582556
+ const cursor = typeof rl.cursor === "number" ? rl.cursor : currentLine2.length;
582557
+ rl.line = currentLine2.slice(0, cursor) + "\n" + currentLine2.slice(cursor);
582558
+ rl.cursor = cursor + 1;
582559
+ self2.updateFooterHeight();
582560
+ self2.renderFooterAndPositionInput();
582561
+ return;
582562
+ }
582537
582563
  const currentLine = rl.line ?? "";
582538
582564
  rl.line = "";
582539
582565
  rl.cursor = 0;
@@ -634089,6 +634115,12 @@ var init_direct_input = __esm({
634089
634115
  }
634090
634116
  break;
634091
634117
  }
634118
+ if (remaining.length >= 2 && (remaining[1] === "\r" || remaining[1] === "\n")) {
634119
+ this._insertText("\n");
634120
+ i2 += 2;
634121
+ if (remaining[1] === "\r" && remaining[2] === "\n") i2++;
634122
+ continue;
634123
+ }
634092
634124
  if (remaining.length === 1) {
634093
634125
  break;
634094
634126
  }
@@ -634096,6 +634128,21 @@ var init_direct_input = __esm({
634096
634128
  continue;
634097
634129
  }
634098
634130
  if (code8 < 32 || code8 === 127) {
634131
+ if (code8 === 13) {
634132
+ if (this._preSubmit?.()) {
634133
+ i2++;
634134
+ continue;
634135
+ }
634136
+ this._submit();
634137
+ i2++;
634138
+ if (this._buffer[i2] === "\n") i2++;
634139
+ continue;
634140
+ }
634141
+ if (code8 === 10) {
634142
+ this._insertText("\n");
634143
+ i2++;
634144
+ continue;
634145
+ }
634099
634146
  this._handleControl(code8);
634100
634147
  i2++;
634101
634148
  continue;
@@ -634298,12 +634345,6 @@ var init_direct_input = __esm({
634298
634345
  /** Handle control characters (ASCII < 32 and DEL) */
634299
634346
  _handleControl(code8) {
634300
634347
  switch (code8) {
634301
- case 13:
634302
- // Enter (CR)
634303
- case 10:
634304
- if (this._preSubmit?.()) return;
634305
- this._submit();
634306
- return;
634307
634348
  case 127:
634308
634349
  // Backspace (DEL)
634309
634350
  case 8:
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.153",
3
+ "version": "1.0.154",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.153",
9
+ "version": "1.0.154",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.153",
3
+ "version": "1.0.154",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",