open-agents-ai 0.187.62 → 0.187.63

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.
Files changed (2) hide show
  1. package/dist/index.js +90 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -276801,12 +276801,37 @@ var init_oa_directory = __esm({
276801
276801
  });
276802
276802
 
276803
276803
  // packages/cli/dist/tui/theme.js
276804
+ var theme_exports = {};
276805
+ __export(theme_exports, {
276806
+ getThemeConfig: () => getThemeConfig,
276807
+ setThemeAccent: () => setThemeAccent,
276808
+ setThemeBackground: () => setThemeBackground,
276809
+ setThemeCustom: () => setThemeCustom,
276810
+ setThemeMode: () => setThemeMode,
276811
+ setThemeTextDim: () => setThemeTextDim,
276812
+ setThemeTextPrimary: () => setThemeTextPrimary,
276813
+ themeMode: () => themeMode,
276814
+ tuiAccent: () => tuiAccent,
276815
+ tuiAccentFg: () => tuiAccentFg,
276816
+ tuiBg: () => tuiBg,
276817
+ tuiBgSeq: () => tuiBgSeq,
276818
+ tuiBoxFg: () => tuiBoxFg,
276819
+ tuiTextDim: () => tuiTextDim,
276820
+ tuiTextPrimary: () => tuiTextPrimary,
276821
+ tuiTextPrimaryFg: () => tuiTextPrimaryFg
276822
+ });
276823
+ function themeMode() {
276824
+ return _config2.mode;
276825
+ }
276804
276826
  function tuiBgSeq() {
276805
276827
  return _config2.bg < 0 ? "\x1B[49m" : `\x1B[48;5;${_config2.bg}m`;
276806
276828
  }
276807
276829
  function tuiBg() {
276808
276830
  return _config2.bg;
276809
276831
  }
276832
+ function tuiAccentFg() {
276833
+ return _config2.accent < 0 ? "\x1B[39m" : `\x1B[38;5;${_config2.accent}m`;
276834
+ }
276810
276835
  function tuiAccent() {
276811
276836
  return _config2.accent;
276812
276837
  }
@@ -276816,15 +276841,37 @@ function tuiBoxFg() {
276816
276841
  function tuiTextPrimary() {
276817
276842
  return _config2.textPrimary;
276818
276843
  }
276844
+ function tuiTextPrimaryFg() {
276845
+ return _config2.textPrimary < 0 ? "\x1B[39m" : `\x1B[38;5;${_config2.textPrimary}m`;
276846
+ }
276819
276847
  function tuiTextDim() {
276820
276848
  return _config2.textDim;
276821
276849
  }
276822
276850
  function setThemeMode(mode) {
276823
276851
  _config2 = { ...PRESETS[mode] };
276824
276852
  }
276853
+ function setThemeCustom(overrides) {
276854
+ _config2 = { ..._config2, ...overrides, mode: "custom" };
276855
+ }
276825
276856
  function getThemeConfig() {
276826
276857
  return _config2;
276827
276858
  }
276859
+ function setThemeBackground(color) {
276860
+ _config2.bg = color;
276861
+ _config2.mode = "custom";
276862
+ }
276863
+ function setThemeAccent(color) {
276864
+ _config2.accent = color;
276865
+ _config2.mode = "custom";
276866
+ }
276867
+ function setThemeTextPrimary(color) {
276868
+ _config2.textPrimary = color;
276869
+ _config2.mode = "custom";
276870
+ }
276871
+ function setThemeTextDim(color) {
276872
+ _config2.textDim = color;
276873
+ _config2.mode = "custom";
276874
+ }
276828
276875
  var PRESETS, _config2;
276829
276876
  var init_theme = __esm({
276830
276877
  "packages/cli/dist/tui/theme.js"() {
@@ -277877,6 +277924,13 @@ var init_daemon_registry = __esm({
277877
277924
  });
277878
277925
 
277879
277926
  // packages/cli/dist/tui/status-bar.js
277927
+ var status_bar_exports = {};
277928
+ __export(status_bar_exports, {
277929
+ HumanSpeedTracker: () => HumanSpeedTracker,
277930
+ StatusBar: () => StatusBar,
277931
+ refreshThemeVars: () => refreshThemeVars,
277932
+ setTerminalTitle: () => setTerminalTitle
277933
+ });
277880
277934
  import { readFileSync as readFileSync32 } from "node:fs";
277881
277935
  function refreshThemeVars() {
277882
277936
  PANEL_BG_SEQ = tuiBgSeq();
@@ -280693,7 +280747,7 @@ function tuiSelect(opts) {
280693
280747
  }
280694
280748
  stdin.resume();
280695
280749
  enterOverlay();
280696
- overlayWrite("\x1B[?1049h\x1B[48;5;0m\x1B[2J\x1B[H\x1B[?25l\x1B[?1003h\x1B[?1006h");
280750
+ overlayWrite(`\x1B[?1049h${tuiBgSeq()}\x1B[2J\x1B[H\x1B[?25l\x1B[?1003h\x1B[?1006h`);
280697
280751
  let listRowOffset = 0;
280698
280752
  function clampScroll(displayList) {
280699
280753
  const cursorPos = displayList.indexOf(cursor);
@@ -280713,7 +280767,7 @@ function tuiSelect(opts) {
280713
280767
  if (!opts.maxVisible) {
280714
280768
  maxVisible = Math.max(3, currentRows - selectChrome);
280715
280769
  }
280716
- overlayWrite("\x1B[48;5;0m\x1B[H\x1B[2J");
280770
+ overlayWrite(`${tuiBgSeq()}\x1B[H\x1B[2J`);
280717
280771
  const lines = [];
280718
280772
  lines.push("", "", "");
280719
280773
  if (hasBreadcrumbs) {
@@ -280795,8 +280849,9 @@ function tuiSelect(opts) {
280795
280849
  lines.push(` ${selectColors.dim("\u2191/\u2193 navigate Enter/Click select" + actionHint + deleteHint + customHint + " Esc " + escLabel + " Type to filter")}`);
280796
280850
  }
280797
280851
  lines.push("");
280798
- let output = lines.join("\n").replace(/\x1B\[0m/g, "\x1B[0m\x1B[48;5;0m").replace(/\n/g, "\x1B[K\n\x1B[48;5;0m");
280799
- overlayWrite("\x1B[48;5;0m" + output + "\x1B[K");
280852
+ let output = lines.join("\n").replace(/\x1B\[0m/g, `\x1B[0m${tuiBgSeq()}`).replace(/\n/g, `\x1B[K
280853
+ ${tuiBgSeq()}`);
280854
+ overlayWrite(tuiBgSeq() + output + "\x1B[K");
280800
280855
  lastRenderedLines = lines.length;
280801
280856
  }
280802
280857
  function cleanup() {
@@ -281179,6 +281234,7 @@ var init_tui_select = __esm({
281179
281234
  "packages/cli/dist/tui/tui-select.js"() {
281180
281235
  "use strict";
281181
281236
  init_overlay_lock();
281237
+ init_theme();
281182
281238
  isTTY3 = process.stdout.isTTY ?? false;
281183
281239
  selectColors = {
281184
281240
  orange: (t2) => fg2562(208, t2),
@@ -291975,7 +292031,7 @@ async function showSessionsMenu(ctx3) {
291975
292031
  }
291976
292032
  renderInfo("Session history loaded. Scroll up to review.");
291977
292033
  }
291978
- async function showColorMenu(_ctx) {
292034
+ async function showColorMenu(ctx3) {
291979
292035
  const currentConfig = getThemeConfig();
291980
292036
  const items = [
291981
292037
  {
@@ -292002,6 +292058,7 @@ async function showColorMenu(_ctx) {
292002
292058
  return;
292003
292059
  setThemeMode(result.key);
292004
292060
  refreshThemeVars();
292061
+ ctx3.refreshBanner?.();
292005
292062
  renderInfo(`Theme set to: ${result.key}`);
292006
292063
  try {
292007
292064
  const settings = loadGlobalSettings();
@@ -296482,6 +296539,20 @@ var init_banner = __esm({
296482
296539
  getDesign() {
296483
296540
  return this.currentDesign;
296484
296541
  }
296542
+ /** Recreate the banner with current theme colors and re-render.
296543
+ * Call after setThemeMode() + refreshThemeVars(). */
296544
+ refreshDesign() {
296545
+ if (!this.currentDesign)
296546
+ return;
296547
+ const version4 = this.currentDesign.version ?? "0.0.0";
296548
+ if (this.currentDesign.type === "default") {
296549
+ this.currentDesign = createDefaultBanner(version4);
296550
+ } else if (this.currentDesign.type === "cohere") {
296551
+ this.currentDesign = createCohereBanner();
296552
+ }
296553
+ this.width = process.stdout.columns ?? 80;
296554
+ this.renderCurrentFrame();
296555
+ }
296485
296556
  /**
296486
296557
  * Start rendering the banner into the top 3 rows.
296487
296558
  * Does NOT set DECSTBM scroll region — that's managed by StatusBar.activate()
@@ -308528,6 +308599,15 @@ async function startInteractive(config, repoPath) {
308528
308599
  setEmojisEnabled(savedSettings.emojis);
308529
308600
  if (savedSettings.colors !== void 0)
308530
308601
  setColorsEnabled(savedSettings.colors);
308602
+ if (savedSettings.colorTheme) {
308603
+ try {
308604
+ const { setThemeMode: setThemeMode2 } = await Promise.resolve().then(() => (init_theme(), theme_exports));
308605
+ const { refreshThemeVars: refreshThemeVars2 } = await Promise.resolve().then(() => (init_status_bar(), status_bar_exports));
308606
+ setThemeMode2(savedSettings.colorTheme);
308607
+ refreshThemeVars2();
308608
+ } catch {
308609
+ }
308610
+ }
308531
308611
  if (!isResumed && isFirstRun() && config.backendType === "ollama") {
308532
308612
  const needsSetup = !await isModelAvailable(config);
308533
308613
  if (needsSetup) {
@@ -309853,6 +309933,11 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
309853
309933
  if (statusBar.isActive)
309854
309934
  statusBar.handleResize();
309855
309935
  },
309936
+ refreshBanner() {
309937
+ banner.refreshDesign();
309938
+ statusBar.fillContentArea();
309939
+ statusBar.refreshHeaderContent();
309940
+ },
309856
309941
  exit() {
309857
309942
  statusBar.deactivate();
309858
309943
  if (carousel.isRunning)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.62",
3
+ "version": "0.187.63",
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",