open-agents-ai 0.184.97 → 0.184.99
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 +57 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -60116,7 +60116,7 @@ function setTerminalTitle(task, version) {
|
|
|
60116
60116
|
const title = task ? `${task.slice(0, 60)} \xB7 ${ver}` : ver;
|
|
60117
60117
|
process.stdout.write(`\x1B]2;${title}\x07`);
|
|
60118
60118
|
}
|
|
60119
|
-
var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG, CONTENT_BG, TEXT_PRIMARY, PANEL_BG_SEQ, CONTENT_BG_SEQ, RESET, StatusBar;
|
|
60119
|
+
var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG, CONTENT_BG, TEXT_PRIMARY, TEXT_DIM, PANEL_BG_SEQ, CONTENT_BG_SEQ, RESET, StatusBar;
|
|
60120
60120
|
var init_status_bar = __esm({
|
|
60121
60121
|
"packages/cli/dist/tui/status-bar.js"() {
|
|
60122
60122
|
"use strict";
|
|
@@ -60284,6 +60284,7 @@ var init_status_bar = __esm({
|
|
|
60284
60284
|
PANEL_BG = 234;
|
|
60285
60285
|
CONTENT_BG = 233;
|
|
60286
60286
|
TEXT_PRIMARY = 178;
|
|
60287
|
+
TEXT_DIM = 240;
|
|
60287
60288
|
PANEL_BG_SEQ = `\x1B[48;5;${PANEL_BG}m`;
|
|
60288
60289
|
CONTENT_BG_SEQ = `\x1B[48;5;${CONTENT_BG}m`;
|
|
60289
60290
|
RESET = "\x1B[0m";
|
|
@@ -60369,6 +60370,10 @@ var init_status_bar = __esm({
|
|
|
60369
60370
|
_headerFocusHandler = null;
|
|
60370
60371
|
/** Focus indicator animation frame counter — driven by braille spinner timer */
|
|
60371
60372
|
_focusFrame = 0;
|
|
60373
|
+
/** Slash command suggestion list (shown when user types /) */
|
|
60374
|
+
_suggestions = [];
|
|
60375
|
+
/** Callback to get available slash commands for suggestion matching */
|
|
60376
|
+
_commandListProvider = null;
|
|
60372
60377
|
/** Whether agent is actively processing (braille animation) */
|
|
60373
60378
|
_processing = false;
|
|
60374
60379
|
_brailleSpinner = new BrailleSpinner();
|
|
@@ -60970,6 +60975,26 @@ var init_status_bar = __esm({
|
|
|
60970
60975
|
}
|
|
60971
60976
|
return IDLE_CYCLE[Math.floor(this._focusFrame / 6) % IDLE_CYCLE.length];
|
|
60972
60977
|
}
|
|
60978
|
+
/** Set the provider for slash command names (used for inline suggestions) */
|
|
60979
|
+
setCommandListProvider(provider) {
|
|
60980
|
+
this._commandListProvider = provider;
|
|
60981
|
+
}
|
|
60982
|
+
/** Update the suggestion list based on current input. Called on every render. */
|
|
60983
|
+
_updateSuggestions() {
|
|
60984
|
+
if (!this.inputStateProvider || !this._commandListProvider) {
|
|
60985
|
+
this._suggestions = [];
|
|
60986
|
+
return;
|
|
60987
|
+
}
|
|
60988
|
+
const { line } = this.inputStateProvider();
|
|
60989
|
+
if (!line.startsWith("/") || line.length < 2 || line.includes(" ")) {
|
|
60990
|
+
this._suggestions = [];
|
|
60991
|
+
return;
|
|
60992
|
+
}
|
|
60993
|
+
const query = line.slice(1).toLowerCase();
|
|
60994
|
+
const commands = this._commandListProvider();
|
|
60995
|
+
const matches = commands.filter((c3) => c3.toLowerCase().startsWith(query)).slice(0, 5);
|
|
60996
|
+
this._suggestions = matches;
|
|
60997
|
+
}
|
|
60973
60998
|
/** Cycle focus: footer → header → content → footer */
|
|
60974
60999
|
cycleFocus() {
|
|
60975
61000
|
const order = ["footer", "header", "content"];
|
|
@@ -61916,10 +61941,12 @@ ${CONTENT_BG_SEQ}`);
|
|
|
61916
61941
|
return 1;
|
|
61917
61942
|
return Math.ceil(line.length / availWidth);
|
|
61918
61943
|
}
|
|
61919
|
-
/** Update _currentFooterHeight based on current input. Returns true if height changed. */
|
|
61944
|
+
/** Update _currentFooterHeight based on current input + suggestions. Returns true if height changed. */
|
|
61920
61945
|
updateFooterHeight(termWidth) {
|
|
61946
|
+
this._updateSuggestions();
|
|
61921
61947
|
const inputLines = this.computeInputLineCount(termWidth);
|
|
61922
|
-
const
|
|
61948
|
+
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length : 1;
|
|
61949
|
+
const newHeight = 1 + inputLines + suggestionRows;
|
|
61923
61950
|
if (newHeight !== this._currentFooterHeight) {
|
|
61924
61951
|
this._currentFooterHeight = newHeight;
|
|
61925
61952
|
return true;
|
|
@@ -61928,28 +61955,30 @@ ${CONTENT_BG_SEQ}`);
|
|
|
61928
61955
|
}
|
|
61929
61956
|
/** Check if footer height would change, WITHOUT actually updating it */
|
|
61930
61957
|
footerHeightChanged(termWidth) {
|
|
61958
|
+
this._updateSuggestions();
|
|
61931
61959
|
const inputLines = this.computeInputLineCount(termWidth);
|
|
61932
|
-
|
|
61960
|
+
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length : 1;
|
|
61961
|
+
return 1 + inputLines + suggestionRows !== this._currentFooterHeight;
|
|
61933
61962
|
}
|
|
61934
61963
|
/** Compute absolute row positions for all footer elements.
|
|
61935
|
-
*
|
|
61936
|
-
*
|
|
61964
|
+
* Layout (top to bottom): input → suggestions/braille → metrics.
|
|
61965
|
+
* When suggestions are active, they replace the braille row and expand upward. */
|
|
61937
61966
|
rowPositions(rows) {
|
|
61938
61967
|
const fh = this._currentFooterHeight;
|
|
61939
|
-
const
|
|
61968
|
+
const suggestionRows = this._suggestions.length > 0 ? this._suggestions.length : 1;
|
|
61969
|
+
const inputLines = fh - 1 - suggestionRows;
|
|
61940
61970
|
const tabBarH = this.hasSubAgents ? 1 : 0;
|
|
61941
61971
|
const totalFooter = fh + tabBarH;
|
|
61942
61972
|
return {
|
|
61943
61973
|
scrollEnd: Math.max(rows - totalFooter, this.scrollRegionTop + 1),
|
|
61944
61974
|
inputStartRow: rows - totalFooter + 1,
|
|
61945
|
-
|
|
61946
|
-
|
|
61947
|
-
//
|
|
61975
|
+
tabBarRow: tabBarH > 0 ? rows - suggestionRows - 1 : -1,
|
|
61976
|
+
// When suggestions active: multiple rows between input and metrics
|
|
61977
|
+
// When no suggestions: single braille row at N-1
|
|
61948
61978
|
bufferRow: rows - 1,
|
|
61949
|
-
// braille
|
|
61979
|
+
// braille (only used when no suggestions)
|
|
61980
|
+
suggestStartRow: this._suggestions.length > 0 ? rows - suggestionRows : -1,
|
|
61950
61981
|
metricsRow: rows,
|
|
61951
|
-
// metrics at BOTTOM
|
|
61952
|
-
// Legacy (unused but keeps TS happy for any remaining refs)
|
|
61953
61982
|
topSepRow: -1,
|
|
61954
61983
|
bottomSepRow: -1
|
|
61955
61984
|
};
|
|
@@ -62058,7 +62087,16 @@ ${CONTENT_BG_SEQ}`);
|
|
|
62058
62087
|
if (pos.tabBarRow > 0) {
|
|
62059
62088
|
buf += `\x1B[${pos.tabBarRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET}`;
|
|
62060
62089
|
}
|
|
62061
|
-
|
|
62090
|
+
if (this._suggestions.length > 0 && pos.suggestStartRow > 0) {
|
|
62091
|
+
for (let si = 0; si < this._suggestions.length; si++) {
|
|
62092
|
+
const row = pos.suggestStartRow + si;
|
|
62093
|
+
const cmd = this._suggestions[si];
|
|
62094
|
+
const prefix = si === 0 ? `\x1B[38;5;${TEXT_DIM}m/` : `\x1B[38;5;${TEXT_DIM}m `;
|
|
62095
|
+
buf += `\x1B[${row};1H${PANEL_BG_SEQ}\x1B[2K ${prefix}\x1B[38;5;${TEXT_PRIMARY}m${cmd}\x1B[0m${RESET}`;
|
|
62096
|
+
}
|
|
62097
|
+
} else {
|
|
62098
|
+
buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildBufferContent(w)}${RESET}`;
|
|
62099
|
+
}
|
|
62062
62100
|
buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET}`;
|
|
62063
62101
|
const focusChar = this._getFocusQuadrant();
|
|
62064
62102
|
if (this._focusedZone === "footer") {
|
|
@@ -66515,6 +66553,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
66515
66553
|
line: rl.line ?? "",
|
|
66516
66554
|
cursor: rl.cursor ?? 0
|
|
66517
66555
|
}));
|
|
66556
|
+
statusBar.setCommandListProvider(() => allCompletions.map((c3) => c3.startsWith("/") ? c3.slice(1) : c3));
|
|
66518
66557
|
}
|
|
66519
66558
|
process.stdout.on("resize", () => {
|
|
66520
66559
|
statusBar.handleResize();
|
|
@@ -66545,6 +66584,8 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
66545
66584
|
}
|
|
66546
66585
|
}
|
|
66547
66586
|
function writeContent(fn) {
|
|
66587
|
+
if (!statusBar.isActive)
|
|
66588
|
+
return;
|
|
66548
66589
|
if (isNeovimActive()) {
|
|
66549
66590
|
const origWrite = process.stdout.write;
|
|
66550
66591
|
let captured = "";
|
|
@@ -66589,6 +66630,8 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
66589
66630
|
}
|
|
66590
66631
|
}
|
|
66591
66632
|
async function writeContentAsync(fn) {
|
|
66633
|
+
if (!statusBar.isActive)
|
|
66634
|
+
return fn();
|
|
66592
66635
|
if (isNeovimActive()) {
|
|
66593
66636
|
const origWrite = process.stdout.write;
|
|
66594
66637
|
let captured = "";
|
package/package.json
CHANGED