omnius 1.0.99 → 1.0.101

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
@@ -563250,17 +563250,17 @@ function buildTopBorder(title, metrics2, width) {
563250
563250
  let metricsSegment;
563251
563251
  let fillerWidth;
563252
563252
  if (titleSpan + metricsSpan + 4 <= inner) {
563253
- titleSegment = `${FG_BORDER}[${FG_TITLE}${titleChip}${RESET}${FG_BORDER}]`;
563254
- metricsSegment = metricsChip ? `${FG_BORDER}[${FG_METRIC}${metricsChip}${RESET}${FG_BORDER}]` : "";
563253
+ titleSegment = `${FG_BORDER}├${FG_TITLE}${titleChip}${RESET}${FG_BORDER}┤`;
563254
+ metricsSegment = metricsChip ? `${FG_BORDER}├${FG_METRIC}${metricsChip}${RESET}${FG_BORDER}┤` : "";
563255
563255
  fillerWidth = inner - titleSpan - metricsSpan - 2;
563256
563256
  } else if (titleSpan + 4 <= inner) {
563257
- titleSegment = `${FG_BORDER}[${FG_TITLE}${titleChip}${RESET}${FG_BORDER}]`;
563257
+ titleSegment = `${FG_BORDER}├${FG_TITLE}${titleChip}${RESET}${FG_BORDER}┤`;
563258
563258
  metricsSegment = "";
563259
563259
  fillerWidth = inner - titleSpan - 2;
563260
563260
  } else {
563261
563261
  const room = Math.max(3, inner - 8);
563262
563262
  const truncated = titleVisible.length > room ? titleVisible.slice(0, Math.max(1, room - 1)) + "…" : titleVisible;
563263
- titleSegment = `${FG_BORDER}[${FG_TITLE} ${truncated} ${RESET}${FG_BORDER}]`;
563263
+ titleSegment = `${FG_BORDER}├${FG_TITLE} ${truncated} ${RESET}${FG_BORDER}┤`;
563264
563264
  metricsSegment = "";
563265
563265
  fillerWidth = Math.max(0, inner - (truncated.length + 4) - 2);
563266
563266
  }
@@ -563745,16 +563745,16 @@ function buildToolTopBorder(title, metrics2, width, colorCode) {
563745
563745
  let metricsSegment = "";
563746
563746
  let fillerWidth;
563747
563747
  if (titleSpan + metricsSpan + 4 <= inner) {
563748
- titleSegment = `${border}├${titleColor}${titleChip}${reset}${border}┤`;
563749
- metricsSegment = metricsChip ? `${border}├${metricColor}${metricsChip}${reset}${border}┤` : "";
563748
+ titleSegment = `${border}┤${titleColor}${titleChip}${reset}${border}├`;
563749
+ metricsSegment = metricsChip ? `${border}┤${metricColor}${metricsChip}${reset}${border}├` : "";
563750
563750
  fillerWidth = inner - titleSpan - metricsSpan - 2;
563751
563751
  } else if (titleSpan + 4 <= inner) {
563752
- titleSegment = `${border}├${titleColor}${titleChip}${reset}${border}┤`;
563752
+ titleSegment = `${border}┤${titleColor}${titleChip}${reset}${border}├`;
563753
563753
  fillerWidth = inner - titleSpan - 2;
563754
563754
  } else {
563755
563755
  const room = Math.max(3, inner - 8);
563756
563756
  const truncated = titleVisible.length > room ? titleVisible.slice(0, Math.max(1, room - 1)) + "…" : titleVisible;
563757
- titleSegment = `${border}├${titleColor} ${truncated} ${reset}${border}┤`;
563757
+ titleSegment = `${border}┤${titleColor} ${truncated} ${reset}${border}├`;
563758
563758
  fillerWidth = Math.max(0, inner - (truncated.length + 4) - 2);
563759
563759
  }
563760
563760
  return `${border}${BOX_TL2}${BOX_H2}${titleSegment}${BOX_H2.repeat(Math.max(0, fillerWidth))}${metricsSegment}${BOX_H2}${BOX_TR2}${reset}`;
@@ -564589,8 +564589,8 @@ var init_render = __esm({
564589
564589
  BOX_BR2 = "╯";
564590
564590
  BOX_H2 = "─";
564591
564591
  BOX_V2 = "│";
564592
- BOX_TJ_L2 = "";
564593
- BOX_TJ_R2 = "";
564592
+ BOX_TJ_L2 = "";
564593
+ BOX_TJ_R2 = "";
564594
564594
  RESET2 = "\x1B[0m";
564595
564595
  _contentWriteHook = null;
564596
564596
  HINTS = [
@@ -613667,21 +613667,6 @@ function cleanTelegramVisibleReply(text, options2 = {}) {
613667
613667
  if (!filtered) return "";
613668
613668
  return dedupeTelegramVisibleReply(filtered);
613669
613669
  }
613670
- function summarizeTelegramInferenceError(message2) {
613671
- if (/aborted due to timeout|aborterror|timed? out/i.test(message2)) {
613672
- return "backend inference timed out before a reply was delivered";
613673
- }
613674
- if (/model ['"]?[^'"]+['"]? not found|not_found_error/i.test(message2)) {
613675
- return "the configured model was not available on the selected Ollama runner";
613676
- }
613677
- if (/Backend HTTP 5\d\d/i.test(message2)) {
613678
- return "the backend returned a transient server error";
613679
- }
613680
- if (/Backend HTTP 4\d\d/i.test(message2)) {
613681
- return message2.slice(0, 180);
613682
- }
613683
- return message2.slice(0, 180) || "unknown backend failure";
613684
- }
613685
613670
  function dedupeTelegramVisibleReply(text) {
613686
613671
  const paragraphs = text.split(/\n{2,}/);
613687
613672
  const seenParagraphs = /* @__PURE__ */ new Set();
@@ -619808,11 +619793,12 @@ Join: ${newUrl}`);
619808
619793
  this.tuiWrite(() => renderTelegramSubAgentError(msg.username, errMsg));
619809
619794
  this.subAgentViewCallbacks?.onWrite(subAgent.viewId, `error: ${errMsg}`);
619810
619795
  this.subAgentViewCallbacks?.onStatus(subAgent.viewId, "failed");
619811
- if (subAgent.liveMessageId && !msg.guestQueryId) {
619812
- await this.editLiveMessage(msg.chatId, subAgent.liveMessageId, `Error: ${errMsg}`).catch(() => {
619796
+ if (subAgent.liveMessagePromise) {
619797
+ await subAgent.liveMessagePromise.catch(() => {
619813
619798
  });
619814
- } else {
619815
- await this.replyToTelegramMessage(msg, "Sorry, I encountered an error processing your message. Please try again.").catch(() => {
619799
+ }
619800
+ if (subAgent.liveMessageId && !msg.guestQueryId) {
619801
+ await this.deleteLiveMessage(msg.chatId, subAgent.liveMessageId).catch(() => {
619816
619802
  });
619817
619803
  }
619818
619804
  } finally {
@@ -619917,11 +619903,12 @@ Join: ${newUrl}`);
619917
619903
  this.tuiWrite(() => renderTelegramSubAgentError(msg.username, errMsg));
619918
619904
  this.subAgentViewCallbacks?.onWrite(subAgent.viewId, `error: ${errMsg}`);
619919
619905
  this.subAgentViewCallbacks?.onStatus(subAgent.viewId, "failed");
619920
- if (subAgent.liveMessageId && !msg.guestQueryId) {
619921
- await this.editLiveMessage(msg.chatId, subAgent.liveMessageId, `Error: ${escapeTelegramHTML(errMsg)}`).catch(() => {
619906
+ if (subAgent.liveMessagePromise) {
619907
+ await subAgent.liveMessagePromise.catch(() => {
619922
619908
  });
619923
- } else {
619924
- await this.replyToTelegramMessage(msg, "Sorry, I couldn't process that Telegram chat message.").catch(() => {
619909
+ }
619910
+ if (subAgent.liveMessageId && !msg.guestQueryId) {
619911
+ await this.deleteLiveMessage(msg.chatId, subAgent.liveMessageId).catch(() => {
619925
619912
  });
619926
619913
  }
619927
619914
  } finally {
@@ -620041,12 +620028,13 @@ Join: ${newUrl}`);
620041
620028
  this.tuiWrite(() => renderTelegramSubAgentError(msg.username, errMsg));
620042
620029
  this.subAgentViewCallbacks?.onWrite(viewId, `error: ${errMsg}`);
620043
620030
  this.subAgentViewCallbacks?.onStatus(viewId, "failed");
620044
- if (liveMessageId && !msg.guestQueryId) {
620045
- await this.editLiveMessage(msg.chatId, liveMessageId, `Error: ${escapeTelegramHTML(errMsg)}`).catch(() => {
620031
+ const pendingLiveMessage = liveMessagePromise;
620032
+ if (pendingLiveMessage) {
620033
+ await pendingLiveMessage.catch(() => {
620046
620034
  });
620047
- } else {
620048
- const summary = summarizeTelegramInferenceError(errMsg);
620049
- await this.replyToTelegramMessage(msg, `Sorry, quick chat inference failed: ${summary}.`).catch(() => {
620035
+ }
620036
+ if (liveMessageId && !msg.guestQueryId) {
620037
+ await this.deleteLiveMessage(msg.chatId, liveMessageId).catch(() => {
620050
620038
  });
620051
620039
  }
620052
620040
  } finally {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.99",
3
+ "version": "1.0.101",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.99",
9
+ "version": "1.0.101",
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.99",
3
+ "version": "1.0.101",
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",