open-agents-ai 0.187.61 → 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.
- package/dist/index.js +98 -6
- 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();
|
|
@@ -280423,7 +280477,14 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280423
280477
|
origTtyWrite(s2, key);
|
|
280424
280478
|
return;
|
|
280425
280479
|
}
|
|
280426
|
-
if (
|
|
280480
|
+
if (key?.name === "return" || key?.name === "enter") {
|
|
280481
|
+
self2.termWrite("\x1B[?25l");
|
|
280482
|
+
origTtyWrite(s2, key);
|
|
280483
|
+
self2.updateFooterHeight();
|
|
280484
|
+
self2.renderFooterAndPositionInput();
|
|
280485
|
+
return;
|
|
280486
|
+
}
|
|
280487
|
+
if (self2.inputStateProvider && key?.name !== "backspace") {
|
|
280427
280488
|
const { line = "" } = self2.inputStateProvider() ?? {};
|
|
280428
280489
|
const w = getTermWidth();
|
|
280429
280490
|
const avail = Math.max(1, w - self2.promptWidth);
|
|
@@ -280686,7 +280747,7 @@ function tuiSelect(opts) {
|
|
|
280686
280747
|
}
|
|
280687
280748
|
stdin.resume();
|
|
280688
280749
|
enterOverlay();
|
|
280689
|
-
overlayWrite(
|
|
280750
|
+
overlayWrite(`\x1B[?1049h${tuiBgSeq()}\x1B[2J\x1B[H\x1B[?25l\x1B[?1003h\x1B[?1006h`);
|
|
280690
280751
|
let listRowOffset = 0;
|
|
280691
280752
|
function clampScroll(displayList) {
|
|
280692
280753
|
const cursorPos = displayList.indexOf(cursor);
|
|
@@ -280706,7 +280767,7 @@ function tuiSelect(opts) {
|
|
|
280706
280767
|
if (!opts.maxVisible) {
|
|
280707
280768
|
maxVisible = Math.max(3, currentRows - selectChrome);
|
|
280708
280769
|
}
|
|
280709
|
-
overlayWrite(
|
|
280770
|
+
overlayWrite(`${tuiBgSeq()}\x1B[H\x1B[2J`);
|
|
280710
280771
|
const lines = [];
|
|
280711
280772
|
lines.push("", "", "");
|
|
280712
280773
|
if (hasBreadcrumbs) {
|
|
@@ -280788,8 +280849,9 @@ function tuiSelect(opts) {
|
|
|
280788
280849
|
lines.push(` ${selectColors.dim("\u2191/\u2193 navigate Enter/Click select" + actionHint + deleteHint + customHint + " Esc " + escLabel + " Type to filter")}`);
|
|
280789
280850
|
}
|
|
280790
280851
|
lines.push("");
|
|
280791
|
-
let output = lines.join("\n").replace(/\x1B\[0m/g,
|
|
280792
|
-
|
|
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");
|
|
280793
280855
|
lastRenderedLines = lines.length;
|
|
280794
280856
|
}
|
|
280795
280857
|
function cleanup() {
|
|
@@ -281172,6 +281234,7 @@ var init_tui_select = __esm({
|
|
|
281172
281234
|
"packages/cli/dist/tui/tui-select.js"() {
|
|
281173
281235
|
"use strict";
|
|
281174
281236
|
init_overlay_lock();
|
|
281237
|
+
init_theme();
|
|
281175
281238
|
isTTY3 = process.stdout.isTTY ?? false;
|
|
281176
281239
|
selectColors = {
|
|
281177
281240
|
orange: (t2) => fg2562(208, t2),
|
|
@@ -291968,7 +292031,7 @@ async function showSessionsMenu(ctx3) {
|
|
|
291968
292031
|
}
|
|
291969
292032
|
renderInfo("Session history loaded. Scroll up to review.");
|
|
291970
292033
|
}
|
|
291971
|
-
async function showColorMenu(
|
|
292034
|
+
async function showColorMenu(ctx3) {
|
|
291972
292035
|
const currentConfig = getThemeConfig();
|
|
291973
292036
|
const items = [
|
|
291974
292037
|
{
|
|
@@ -291995,6 +292058,7 @@ async function showColorMenu(_ctx) {
|
|
|
291995
292058
|
return;
|
|
291996
292059
|
setThemeMode(result.key);
|
|
291997
292060
|
refreshThemeVars();
|
|
292061
|
+
ctx3.refreshBanner?.();
|
|
291998
292062
|
renderInfo(`Theme set to: ${result.key}`);
|
|
291999
292063
|
try {
|
|
292000
292064
|
const settings = loadGlobalSettings();
|
|
@@ -296475,6 +296539,20 @@ var init_banner = __esm({
|
|
|
296475
296539
|
getDesign() {
|
|
296476
296540
|
return this.currentDesign;
|
|
296477
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
|
+
}
|
|
296478
296556
|
/**
|
|
296479
296557
|
* Start rendering the banner into the top 3 rows.
|
|
296480
296558
|
* Does NOT set DECSTBM scroll region — that's managed by StatusBar.activate()
|
|
@@ -308521,6 +308599,15 @@ async function startInteractive(config, repoPath) {
|
|
|
308521
308599
|
setEmojisEnabled(savedSettings.emojis);
|
|
308522
308600
|
if (savedSettings.colors !== void 0)
|
|
308523
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
|
+
}
|
|
308524
308611
|
if (!isResumed && isFirstRun() && config.backendType === "ollama") {
|
|
308525
308612
|
const needsSetup = !await isModelAvailable(config);
|
|
308526
308613
|
if (needsSetup) {
|
|
@@ -309846,6 +309933,11 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
309846
309933
|
if (statusBar.isActive)
|
|
309847
309934
|
statusBar.handleResize();
|
|
309848
309935
|
},
|
|
309936
|
+
refreshBanner() {
|
|
309937
|
+
banner.refreshDesign();
|
|
309938
|
+
statusBar.fillContentArea();
|
|
309939
|
+
statusBar.refreshHeaderContent();
|
|
309940
|
+
},
|
|
309849
309941
|
exit() {
|
|
309850
309942
|
statusBar.deactivate();
|
|
309851
309943
|
if (carousel.isRunning)
|
package/package.json
CHANGED