open-agents-ai 0.187.62 → 0.187.64
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 +94 -7
- 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();
|
|
@@ -280424,8 +280478,10 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280424
280478
|
return;
|
|
280425
280479
|
}
|
|
280426
280480
|
if (key?.name === "return" || key?.name === "enter") {
|
|
280427
|
-
|
|
280428
|
-
|
|
280481
|
+
const currentLine = rl.line ?? "";
|
|
280482
|
+
rl.line = "";
|
|
280483
|
+
rl.cursor = 0;
|
|
280484
|
+
rl.emit("line", currentLine);
|
|
280429
280485
|
self2.updateFooterHeight();
|
|
280430
280486
|
self2.renderFooterAndPositionInput();
|
|
280431
280487
|
return;
|
|
@@ -280693,7 +280749,7 @@ function tuiSelect(opts) {
|
|
|
280693
280749
|
}
|
|
280694
280750
|
stdin.resume();
|
|
280695
280751
|
enterOverlay();
|
|
280696
|
-
overlayWrite(
|
|
280752
|
+
overlayWrite(`\x1B[?1049h${tuiBgSeq()}\x1B[2J\x1B[H\x1B[?25l\x1B[?1003h\x1B[?1006h`);
|
|
280697
280753
|
let listRowOffset = 0;
|
|
280698
280754
|
function clampScroll(displayList) {
|
|
280699
280755
|
const cursorPos = displayList.indexOf(cursor);
|
|
@@ -280713,7 +280769,7 @@ function tuiSelect(opts) {
|
|
|
280713
280769
|
if (!opts.maxVisible) {
|
|
280714
280770
|
maxVisible = Math.max(3, currentRows - selectChrome);
|
|
280715
280771
|
}
|
|
280716
|
-
overlayWrite(
|
|
280772
|
+
overlayWrite(`${tuiBgSeq()}\x1B[H\x1B[2J`);
|
|
280717
280773
|
const lines = [];
|
|
280718
280774
|
lines.push("", "", "");
|
|
280719
280775
|
if (hasBreadcrumbs) {
|
|
@@ -280795,8 +280851,9 @@ function tuiSelect(opts) {
|
|
|
280795
280851
|
lines.push(` ${selectColors.dim("\u2191/\u2193 navigate Enter/Click select" + actionHint + deleteHint + customHint + " Esc " + escLabel + " Type to filter")}`);
|
|
280796
280852
|
}
|
|
280797
280853
|
lines.push("");
|
|
280798
|
-
let output = lines.join("\n").replace(/\x1B\[0m/g,
|
|
280799
|
-
|
|
280854
|
+
let output = lines.join("\n").replace(/\x1B\[0m/g, `\x1B[0m${tuiBgSeq()}`).replace(/\n/g, `\x1B[K
|
|
280855
|
+
${tuiBgSeq()}`);
|
|
280856
|
+
overlayWrite(tuiBgSeq() + output + "\x1B[K");
|
|
280800
280857
|
lastRenderedLines = lines.length;
|
|
280801
280858
|
}
|
|
280802
280859
|
function cleanup() {
|
|
@@ -281179,6 +281236,7 @@ var init_tui_select = __esm({
|
|
|
281179
281236
|
"packages/cli/dist/tui/tui-select.js"() {
|
|
281180
281237
|
"use strict";
|
|
281181
281238
|
init_overlay_lock();
|
|
281239
|
+
init_theme();
|
|
281182
281240
|
isTTY3 = process.stdout.isTTY ?? false;
|
|
281183
281241
|
selectColors = {
|
|
281184
281242
|
orange: (t2) => fg2562(208, t2),
|
|
@@ -291975,7 +292033,7 @@ async function showSessionsMenu(ctx3) {
|
|
|
291975
292033
|
}
|
|
291976
292034
|
renderInfo("Session history loaded. Scroll up to review.");
|
|
291977
292035
|
}
|
|
291978
|
-
async function showColorMenu(
|
|
292036
|
+
async function showColorMenu(ctx3) {
|
|
291979
292037
|
const currentConfig = getThemeConfig();
|
|
291980
292038
|
const items = [
|
|
291981
292039
|
{
|
|
@@ -292002,6 +292060,7 @@ async function showColorMenu(_ctx) {
|
|
|
292002
292060
|
return;
|
|
292003
292061
|
setThemeMode(result.key);
|
|
292004
292062
|
refreshThemeVars();
|
|
292063
|
+
ctx3.refreshBanner?.();
|
|
292005
292064
|
renderInfo(`Theme set to: ${result.key}`);
|
|
292006
292065
|
try {
|
|
292007
292066
|
const settings = loadGlobalSettings();
|
|
@@ -296482,6 +296541,20 @@ var init_banner = __esm({
|
|
|
296482
296541
|
getDesign() {
|
|
296483
296542
|
return this.currentDesign;
|
|
296484
296543
|
}
|
|
296544
|
+
/** Recreate the banner with current theme colors and re-render.
|
|
296545
|
+
* Call after setThemeMode() + refreshThemeVars(). */
|
|
296546
|
+
refreshDesign() {
|
|
296547
|
+
if (!this.currentDesign)
|
|
296548
|
+
return;
|
|
296549
|
+
const version4 = this.currentDesign.version ?? "0.0.0";
|
|
296550
|
+
if (this.currentDesign.type === "default") {
|
|
296551
|
+
this.currentDesign = createDefaultBanner(version4);
|
|
296552
|
+
} else if (this.currentDesign.type === "cohere") {
|
|
296553
|
+
this.currentDesign = createCohereBanner();
|
|
296554
|
+
}
|
|
296555
|
+
this.width = process.stdout.columns ?? 80;
|
|
296556
|
+
this.renderCurrentFrame();
|
|
296557
|
+
}
|
|
296485
296558
|
/**
|
|
296486
296559
|
* Start rendering the banner into the top 3 rows.
|
|
296487
296560
|
* Does NOT set DECSTBM scroll region — that's managed by StatusBar.activate()
|
|
@@ -308528,6 +308601,15 @@ async function startInteractive(config, repoPath) {
|
|
|
308528
308601
|
setEmojisEnabled(savedSettings.emojis);
|
|
308529
308602
|
if (savedSettings.colors !== void 0)
|
|
308530
308603
|
setColorsEnabled(savedSettings.colors);
|
|
308604
|
+
if (savedSettings.colorTheme) {
|
|
308605
|
+
try {
|
|
308606
|
+
const { setThemeMode: setThemeMode2 } = await Promise.resolve().then(() => (init_theme(), theme_exports));
|
|
308607
|
+
const { refreshThemeVars: refreshThemeVars2 } = await Promise.resolve().then(() => (init_status_bar(), status_bar_exports));
|
|
308608
|
+
setThemeMode2(savedSettings.colorTheme);
|
|
308609
|
+
refreshThemeVars2();
|
|
308610
|
+
} catch {
|
|
308611
|
+
}
|
|
308612
|
+
}
|
|
308531
308613
|
if (!isResumed && isFirstRun() && config.backendType === "ollama") {
|
|
308532
308614
|
const needsSetup = !await isModelAvailable(config);
|
|
308533
308615
|
if (needsSetup) {
|
|
@@ -309853,6 +309935,11 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
309853
309935
|
if (statusBar.isActive)
|
|
309854
309936
|
statusBar.handleResize();
|
|
309855
309937
|
},
|
|
309938
|
+
refreshBanner() {
|
|
309939
|
+
banner.refreshDesign();
|
|
309940
|
+
statusBar.fillContentArea();
|
|
309941
|
+
statusBar.refreshHeaderContent();
|
|
309942
|
+
},
|
|
309856
309943
|
exit() {
|
|
309857
309944
|
statusBar.deactivate();
|
|
309858
309945
|
if (carousel.isRunning)
|
package/package.json
CHANGED