open-agents-ai 0.187.202 → 0.187.204
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 +62 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -315247,6 +315247,38 @@ function getWebUI() {
|
|
|
315247
315247
|
<title>Open Agents</title>
|
|
315248
315248
|
<style>
|
|
315249
315249
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
315250
|
+
|
|
315251
|
+
/* \u2500\u2500\u2500 Cross-browser custom scrollbars \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
315252
|
+
* Yellow (#b2920a) thumb, grey (#2a2a30) track. Applies to every
|
|
315253
|
+
* scrollable container in the app via the universal selector.
|
|
315254
|
+
* Firefox uses the standard scrollbar-* properties; WebKit/Blink
|
|
315255
|
+
* uses the ::-webkit-scrollbar pseudo-elements. Both render the
|
|
315256
|
+
* same brand colors.
|
|
315257
|
+
*/
|
|
315258
|
+
html {
|
|
315259
|
+
scrollbar-width: thin;
|
|
315260
|
+
scrollbar-color: #b2920a #2a2a30;
|
|
315261
|
+
}
|
|
315262
|
+
*::-webkit-scrollbar {
|
|
315263
|
+
width: 10px;
|
|
315264
|
+
height: 10px;
|
|
315265
|
+
}
|
|
315266
|
+
*::-webkit-scrollbar-track {
|
|
315267
|
+
background: #2a2a30;
|
|
315268
|
+
border-radius: 0;
|
|
315269
|
+
}
|
|
315270
|
+
*::-webkit-scrollbar-thumb {
|
|
315271
|
+
background: #b2920a;
|
|
315272
|
+
border-radius: 4px;
|
|
315273
|
+
border: 2px solid #2a2a30;
|
|
315274
|
+
}
|
|
315275
|
+
*::-webkit-scrollbar-thumb:hover {
|
|
315276
|
+
background: #d4ac0e;
|
|
315277
|
+
}
|
|
315278
|
+
*::-webkit-scrollbar-corner {
|
|
315279
|
+
background: #2a2a30;
|
|
315280
|
+
}
|
|
315281
|
+
|
|
315250
315282
|
body {
|
|
315251
315283
|
font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
|
|
315252
315284
|
background: #1a1a1e;
|
|
@@ -315255,6 +315287,8 @@ body {
|
|
|
315255
315287
|
flex-direction: column;
|
|
315256
315288
|
height: 100vh;
|
|
315257
315289
|
overflow: hidden;
|
|
315290
|
+
scrollbar-width: thin;
|
|
315291
|
+
scrollbar-color: #b2920a #2a2a30;
|
|
315258
315292
|
}
|
|
315259
315293
|
#header {
|
|
315260
315294
|
display: flex;
|
|
@@ -315515,7 +315549,7 @@ body {
|
|
|
315515
315549
|
background: #2a2a30;
|
|
315516
315550
|
border: 1px solid #3a3a42;
|
|
315517
315551
|
color: #b2920a;
|
|
315518
|
-
padding:
|
|
315552
|
+
padding: 10px 16px;
|
|
315519
315553
|
border-radius: 3px;
|
|
315520
315554
|
font-family: inherit;
|
|
315521
315555
|
font-size: 0.75rem;
|
|
@@ -316564,6 +316598,12 @@ let contextFiles = []; // list of absolute file paths
|
|
|
316564
316598
|
const treeExpanded = new Set();
|
|
316565
316599
|
// Cached children: absolute path \u2192 array of {name, type}
|
|
316566
316600
|
const treeCache = new Map();
|
|
316601
|
+
// Explicit root path \u2014 stored ONCE at loadWorkspaceRoot() and NEVER
|
|
316602
|
+
// overwritten by expand/collapse. Fixes a bug where clicking a folder
|
|
316603
|
+
// replaced the root with the clicked folder's path because the previous
|
|
316604
|
+
// derivation algorithm (find key where every other key doesn't start
|
|
316605
|
+
// with it) picked the deepest leaf, not the shallowest root.
|
|
316606
|
+
let treeRoot = null;
|
|
316567
316607
|
|
|
316568
316608
|
function toggleWorkspace() {
|
|
316569
316609
|
const sb = document.getElementById('workspace-sidebar');
|
|
@@ -316590,20 +316630,28 @@ async function loadWorkspaceRoot() {
|
|
|
316590
316630
|
wdSpan.textContent = 'CWD: ' + (chatWorkingDir || rootPath);
|
|
316591
316631
|
cwdEl.appendChild(wdSpan);
|
|
316592
316632
|
|
|
316593
|
-
// Cache the root's children and expand it
|
|
316633
|
+
// Cache the root's children and expand it. Store treeRoot explicitly
|
|
316634
|
+
// so subsequent expand/collapse clicks never lose the original root.
|
|
316594
316635
|
treeCache.set(rootPath, d.entries || []);
|
|
316595
316636
|
treeExpanded.add(rootPath);
|
|
316596
|
-
|
|
316637
|
+
treeRoot = rootPath;
|
|
316638
|
+
renderWorkspaceTree();
|
|
316597
316639
|
} catch {
|
|
316598
316640
|
document.getElementById('workspace-tree').innerHTML = '<div style="color:#555">Could not load files</div>';
|
|
316599
316641
|
}
|
|
316600
316642
|
}
|
|
316601
316643
|
|
|
316602
|
-
function renderWorkspaceTree(
|
|
316644
|
+
function renderWorkspaceTree(rootPathOverride) {
|
|
316645
|
+
// Always render from the stored treeRoot unless an explicit override
|
|
316646
|
+
// is passed (which no caller does anymore, but keep the param for
|
|
316647
|
+
// backwards compatibility). This prevents the bug where a folder
|
|
316648
|
+
// click replaced the sidebar with only that folder's contents.
|
|
316649
|
+
const root = rootPathOverride || treeRoot;
|
|
316650
|
+
if (!root) return;
|
|
316603
316651
|
const tree = document.getElementById('workspace-tree');
|
|
316604
316652
|
tree.innerHTML = '';
|
|
316605
316653
|
const rootContainer = document.createElement('div');
|
|
316606
|
-
renderTreeNode(rootContainer,
|
|
316654
|
+
renderTreeNode(rootContainer, root, 0, true);
|
|
316607
316655
|
tree.appendChild(rootContainer);
|
|
316608
316656
|
}
|
|
316609
316657
|
|
|
@@ -316642,6 +316690,7 @@ function renderTreeNode(parentEl, absPath, depth, isRoot) {
|
|
|
316642
316690
|
row.addEventListener('click', async (ev) => {
|
|
316643
316691
|
ev.stopPropagation();
|
|
316644
316692
|
if (treeExpanded.has(childAbs)) {
|
|
316693
|
+
// Collapse: also remove cached children so expand re-fetches
|
|
316645
316694
|
treeExpanded.delete(childAbs);
|
|
316646
316695
|
} else {
|
|
316647
316696
|
treeExpanded.add(childAbs);
|
|
@@ -316655,9 +316704,10 @@ function renderTreeNode(parentEl, absPath, depth, isRoot) {
|
|
|
316655
316704
|
}
|
|
316656
316705
|
}
|
|
316657
316706
|
}
|
|
316658
|
-
//
|
|
316659
|
-
|
|
316660
|
-
|
|
316707
|
+
// Re-render from the single stored root \u2014 never from the clicked
|
|
316708
|
+
// folder. This keeps the whole tree visible with the nested expand
|
|
316709
|
+
// in place.
|
|
316710
|
+
renderWorkspaceTree();
|
|
316661
316711
|
});
|
|
316662
316712
|
} else {
|
|
316663
316713
|
const pad = document.createElement('span');
|
|
@@ -316741,9 +316791,8 @@ function setChatWorkingDir(path) {
|
|
|
316741
316791
|
chatWorkingDir = path;
|
|
316742
316792
|
const label = document.getElementById('workspace-dir-label');
|
|
316743
316793
|
if (label) label.textContent = 'CWD: ' + (path || '(daemon default)');
|
|
316744
|
-
// Refresh the tree to update the highlight
|
|
316745
|
-
|
|
316746
|
-
if (root) renderWorkspaceTree(root);
|
|
316794
|
+
// Refresh the tree to update the highlight \u2014 uses the stable treeRoot
|
|
316795
|
+
renderWorkspaceTree();
|
|
316747
316796
|
// Flash status
|
|
316748
316797
|
const s = document.getElementById('status');
|
|
316749
316798
|
if (s) {
|
|
@@ -316761,8 +316810,7 @@ function toggleFileInContext(path) {
|
|
|
316761
316810
|
const i = contextFiles.indexOf(path);
|
|
316762
316811
|
if (i >= 0) contextFiles.splice(i, 1);
|
|
316763
316812
|
else contextFiles.push(path);
|
|
316764
|
-
|
|
316765
|
-
if (root) renderWorkspaceTree(root);
|
|
316813
|
+
renderWorkspaceTree();
|
|
316766
316814
|
const s = document.getElementById('status');
|
|
316767
316815
|
if (s) {
|
|
316768
316816
|
const old = s.textContent;
|
|
@@ -316783,8 +316831,7 @@ async function addDirToContext(dirPath) {
|
|
|
316783
316831
|
if (!contextFiles.includes(abs)) contextFiles.push(abs);
|
|
316784
316832
|
}
|
|
316785
316833
|
}
|
|
316786
|
-
|
|
316787
|
-
if (root) renderWorkspaceTree(root);
|
|
316834
|
+
renderWorkspaceTree();
|
|
316788
316835
|
alert('Added ' + contextFiles.length + ' files to context');
|
|
316789
316836
|
} catch (e) { alert('Failed: ' + e.message); }
|
|
316790
316837
|
}
|
package/package.json
CHANGED