lance-context 1.2.1 → 1.4.0
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/dashboard/ui.d.ts.map +1 -1
- package/dist/dashboard/ui.js +127 -56
- package/dist/dashboard/ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/dashboard/ui.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/dashboard/ui.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CA86CzC"}
|
package/dist/dashboard/ui.js
CHANGED
|
@@ -482,31 +482,14 @@ export function getDashboardHTML() {
|
|
|
482
482
|
animation: pulse 2s ease-in-out infinite;
|
|
483
483
|
}
|
|
484
484
|
|
|
485
|
-
/* Charts.css Customization */
|
|
486
|
-
.charts-css {
|
|
487
|
-
--color-1: #58a6ff;
|
|
488
|
-
--color-2: #3fb950;
|
|
489
|
-
--color-3: #a371f7;
|
|
490
|
-
--color-4: #f85149;
|
|
491
|
-
--color-5: #d29922;
|
|
492
|
-
}
|
|
493
|
-
|
|
485
|
+
/* Charts.css Customization - use aspect-ratio per docs */
|
|
494
486
|
#chartWrapper {
|
|
495
487
|
width: 100%;
|
|
496
488
|
max-width: 100%;
|
|
497
|
-
overflow: hidden;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
#chartWrapper #usage-chart {
|
|
501
|
-
--aspect-ratio: 21 / 9;
|
|
502
|
-
width: 100%;
|
|
503
|
-
max-width: 100%;
|
|
504
|
-
margin: 0 auto;
|
|
505
489
|
}
|
|
506
490
|
|
|
507
|
-
#
|
|
508
|
-
|
|
509
|
-
color: var(--text-secondary);
|
|
491
|
+
#chartWrapper .column {
|
|
492
|
+
--aspect-ratio: 16 / 4;
|
|
510
493
|
}
|
|
511
494
|
|
|
512
495
|
#usage-chart td {
|
|
@@ -525,6 +508,40 @@ export function getDashboardHTML() {
|
|
|
525
508
|
#usageChartContainer .legend li {
|
|
526
509
|
font-size: 12px;
|
|
527
510
|
color: var(--text-secondary);
|
|
511
|
+
cursor: pointer;
|
|
512
|
+
transition: opacity 0.15s ease;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/* Apply --color variable to legend squares - override charts.css defaults */
|
|
516
|
+
#chartLegend.legend.legend-square li::before {
|
|
517
|
+
background: var(--color) !important;
|
|
518
|
+
border-color: var(--color) !important;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
#usageChartContainer .legend li:hover {
|
|
522
|
+
opacity: 1;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
#usage-chart tr {
|
|
526
|
+
transition: opacity 0.15s ease;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
#usage-chart.legend-hover tr {
|
|
530
|
+
opacity: 0.3;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
#usage-chart.legend-hover tr.highlight {
|
|
534
|
+
opacity: 1;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/* Bar hover highlighting for legend */
|
|
538
|
+
#chartLegend.bar-hover li {
|
|
539
|
+
opacity: 0.3;
|
|
540
|
+
transition: opacity 0.15s ease;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
#chartLegend.bar-hover li.highlight {
|
|
544
|
+
opacity: 1;
|
|
528
545
|
}
|
|
529
546
|
|
|
530
547
|
.usage-total {
|
|
@@ -850,21 +867,14 @@ export function getDashboardHTML() {
|
|
|
850
867
|
<div class="stat-label">Search Weights</div>
|
|
851
868
|
<div class="stat-value small" id="searchWeights">-</div>
|
|
852
869
|
</div>
|
|
853
|
-
</div>
|
|
854
|
-
|
|
855
|
-
<!-- Patterns Card -->
|
|
856
|
-
<div class="card">
|
|
857
|
-
<div class="card-header">
|
|
858
|
-
<span class="card-title">File Patterns</span>
|
|
859
|
-
</div>
|
|
860
870
|
<div class="stat">
|
|
861
|
-
<div class="stat-label">Include</div>
|
|
871
|
+
<div class="stat-label">Include Patterns</div>
|
|
862
872
|
<div class="patterns-list" id="includePatterns">
|
|
863
873
|
<span class="pattern-tag">Loading...</span>
|
|
864
874
|
</div>
|
|
865
875
|
</div>
|
|
866
|
-
<div class="stat"
|
|
867
|
-
<div class="stat-label">Exclude</div>
|
|
876
|
+
<div class="stat">
|
|
877
|
+
<div class="stat-label">Exclude Patterns</div>
|
|
868
878
|
<div class="patterns-list" id="excludePatterns">
|
|
869
879
|
<span class="pattern-tag exclude">Loading...</span>
|
|
870
880
|
</div>
|
|
@@ -872,7 +882,7 @@ export function getDashboardHTML() {
|
|
|
872
882
|
</div>
|
|
873
883
|
|
|
874
884
|
<!-- Command Usage Card -->
|
|
875
|
-
<div class="card
|
|
885
|
+
<div class="card full-width">
|
|
876
886
|
<div class="card-header">
|
|
877
887
|
<span class="card-title">Command Usage</span>
|
|
878
888
|
<span class="badge" id="sessionBadge">This Session</span>
|
|
@@ -880,17 +890,11 @@ export function getDashboardHTML() {
|
|
|
880
890
|
<div id="usageChartContainer">
|
|
881
891
|
<div class="usage-empty" id="usageEmpty">No commands executed yet</div>
|
|
882
892
|
<div id="chartWrapper">
|
|
883
|
-
<table class="charts-css column show-primary-axis
|
|
893
|
+
<table class="charts-css column show-primary-axis data-spacing-5" id="usage-chart" style="display: none;">
|
|
884
894
|
<tbody id="usageChartBody"></tbody>
|
|
885
895
|
</table>
|
|
886
896
|
</div>
|
|
887
|
-
<ul class="charts-css legend legend-inline legend-square" id="chartLegend" style="display: none;">
|
|
888
|
-
<li style="--color: #58a6ff;">Search Code</li>
|
|
889
|
-
<li style="--color: #3fb950;">Index Codebase</li>
|
|
890
|
-
<li style="--color: #a371f7;">Get Status</li>
|
|
891
|
-
<li style="--color: #f85149;">Clear Index</li>
|
|
892
|
-
<li style="--color: #d29922;">Get Instructions</li>
|
|
893
|
-
</ul>
|
|
897
|
+
<ul class="charts-css legend legend-inline legend-square" id="chartLegend" style="display: none;"></ul>
|
|
894
898
|
<div class="usage-total" id="usageTotal" style="display: none;">
|
|
895
899
|
<span class="usage-total-label">Total Commands</span>
|
|
896
900
|
<span class="usage-total-count" id="totalCount">0</span>
|
|
@@ -1171,15 +1175,42 @@ export function getDashboardHTML() {
|
|
|
1171
1175
|
progressText.textContent = progress.message;
|
|
1172
1176
|
}
|
|
1173
1177
|
|
|
1174
|
-
// Charts.css color mapping
|
|
1178
|
+
// Charts.css color mapping - distinct colors for all commands
|
|
1175
1179
|
const commandColors = {
|
|
1176
|
-
|
|
1177
|
-
'
|
|
1178
|
-
'
|
|
1179
|
-
|
|
1180
|
-
'
|
|
1181
|
-
'
|
|
1182
|
-
'
|
|
1180
|
+
// Core search
|
|
1181
|
+
'search_code': '#58a6ff', // blue
|
|
1182
|
+
'search_similar': '#39c5cf', // cyan
|
|
1183
|
+
// Indexing
|
|
1184
|
+
'index_codebase': '#3fb950', // green
|
|
1185
|
+
'get_index_status': '#a371f7', // purple
|
|
1186
|
+
'clear_index': '#f85149', // red
|
|
1187
|
+
'get_project_instructions': '#d29922', // orange
|
|
1188
|
+
// Git
|
|
1189
|
+
'commit': '#f778ba', // pink
|
|
1190
|
+
// Symbol analysis
|
|
1191
|
+
'get_symbols_overview': '#79c0ff', // light blue
|
|
1192
|
+
'find_symbol': '#56d364', // bright green
|
|
1193
|
+
'find_referencing_symbols': '#bc8cff', // light purple
|
|
1194
|
+
'search_for_pattern': '#ff9f43', // bright orange
|
|
1195
|
+
'replace_symbol_body': '#ff6b6b', // coral
|
|
1196
|
+
'insert_before_symbol': '#feca57', // yellow
|
|
1197
|
+
'insert_after_symbol': '#48dbfb', // sky blue
|
|
1198
|
+
'rename_symbol': '#ff9ff3', // light pink
|
|
1199
|
+
// Memory
|
|
1200
|
+
'write_memory': '#1dd1a1', // teal
|
|
1201
|
+
'read_memory': '#5f27cd', // deep purple
|
|
1202
|
+
'list_memories': '#ee5a24', // burnt orange
|
|
1203
|
+
'delete_memory': '#c23616', // dark red
|
|
1204
|
+
'edit_memory': '#009432', // forest green
|
|
1205
|
+
// Worktree
|
|
1206
|
+
'create_worktree': '#12CBC4', // turquoise
|
|
1207
|
+
'list_worktrees': '#B53471', // magenta
|
|
1208
|
+
'remove_worktree': '#ED4C67', // watermelon
|
|
1209
|
+
'worktree_status': '#F79F1F', // golden
|
|
1210
|
+
// Clustering
|
|
1211
|
+
'list_concepts': '#A3CB38', // lime
|
|
1212
|
+
'search_by_concept': '#1289A7', // cerulean
|
|
1213
|
+
'summarize_codebase': '#D980FA' // lavender
|
|
1183
1214
|
};
|
|
1184
1215
|
|
|
1185
1216
|
// Update usage chart using charts.css
|
|
@@ -1202,27 +1233,67 @@ export function getDashboardHTML() {
|
|
|
1202
1233
|
}
|
|
1203
1234
|
|
|
1204
1235
|
usageEmpty.style.display = 'none';
|
|
1205
|
-
usageChartEl.style.display = '
|
|
1236
|
+
usageChartEl.style.display = '';
|
|
1206
1237
|
chartLegend.style.display = 'flex';
|
|
1207
1238
|
usageTotal.style.display = 'flex';
|
|
1208
1239
|
|
|
1209
|
-
|
|
1240
|
+
// Sort by count descending (most used first)
|
|
1241
|
+
const sortedUsage = usage.slice().sort(function(a, b) { return b.count - a.count; });
|
|
1242
|
+
const maxCount = Math.max(...sortedUsage.map(u => u.count));
|
|
1210
1243
|
|
|
1211
|
-
let
|
|
1212
|
-
|
|
1244
|
+
let chartHtml = '';
|
|
1245
|
+
let legendHtml = '';
|
|
1246
|
+
let idx = 0;
|
|
1247
|
+
for (const item of sortedUsage) {
|
|
1213
1248
|
if (item.count === 0) continue;
|
|
1214
1249
|
|
|
1215
1250
|
const percent = maxCount > 0 ? (item.count / maxCount) : 0;
|
|
1216
1251
|
const color = commandColors[item.command] || '#58a6ff';
|
|
1217
1252
|
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1253
|
+
chartHtml += '<tr data-idx="' + idx + '">';
|
|
1254
|
+
chartHtml += '<th scope="row"></th>';
|
|
1255
|
+
chartHtml += '<td style="--size: ' + percent + '; --color: ' + color + ';"></td>';
|
|
1256
|
+
chartHtml += '</tr>';
|
|
1257
|
+
|
|
1258
|
+
legendHtml += '<li data-idx="' + idx + '" style="--color: ' + color + ';">' + escapeHtml(item.label) + ' (' + item.count + ')</li>';
|
|
1259
|
+
idx++;
|
|
1222
1260
|
}
|
|
1223
1261
|
|
|
1224
|
-
usageChartBody.innerHTML =
|
|
1262
|
+
usageChartBody.innerHTML = chartHtml;
|
|
1263
|
+
chartLegend.innerHTML = legendHtml;
|
|
1225
1264
|
totalCount.textContent = total;
|
|
1265
|
+
|
|
1266
|
+
// Legend hover highlighting
|
|
1267
|
+
chartLegend.querySelectorAll('li').forEach(function(li) {
|
|
1268
|
+
li.addEventListener('mouseenter', function() {
|
|
1269
|
+
var idx = this.getAttribute('data-idx');
|
|
1270
|
+
usageChartEl.classList.add('legend-hover');
|
|
1271
|
+
var row = usageChartBody.querySelector('tr[data-idx="' + idx + '"]');
|
|
1272
|
+
if (row) row.classList.add('highlight');
|
|
1273
|
+
});
|
|
1274
|
+
li.addEventListener('mouseleave', function() {
|
|
1275
|
+
usageChartEl.classList.remove('legend-hover');
|
|
1276
|
+
usageChartBody.querySelectorAll('tr').forEach(function(tr) {
|
|
1277
|
+
tr.classList.remove('highlight');
|
|
1278
|
+
});
|
|
1279
|
+
});
|
|
1280
|
+
});
|
|
1281
|
+
|
|
1282
|
+
// Bar hover highlighting (reverse - highlight legend item)
|
|
1283
|
+
usageChartBody.querySelectorAll('td').forEach(function(td) {
|
|
1284
|
+
td.addEventListener('mouseenter', function() {
|
|
1285
|
+
var idx = this.parentElement.getAttribute('data-idx');
|
|
1286
|
+
chartLegend.classList.add('bar-hover');
|
|
1287
|
+
var legendItem = chartLegend.querySelector('li[data-idx="' + idx + '"]');
|
|
1288
|
+
if (legendItem) legendItem.classList.add('highlight');
|
|
1289
|
+
});
|
|
1290
|
+
td.addEventListener('mouseleave', function() {
|
|
1291
|
+
chartLegend.classList.remove('bar-hover');
|
|
1292
|
+
chartLegend.querySelectorAll('li').forEach(function(li) {
|
|
1293
|
+
li.classList.remove('highlight');
|
|
1294
|
+
});
|
|
1295
|
+
});
|
|
1296
|
+
});
|
|
1226
1297
|
}
|
|
1227
1298
|
|
|
1228
1299
|
// Beads section elements
|
package/dist/dashboard/ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/dashboard/ui.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;OAwBV,CAAC;AAER;;GAEG;AACH,MAAM,WAAW,GAAG,sBAAsB,kBAAkB,CAAC,onCAAonC,CAAC,EAAE,CAAC;AAErrC;;;GAGG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO;;;;;;gDAMuC,WAAW
|
|
1
|
+
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../../src/dashboard/ui.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;OAwBV,CAAC;AAER;;GAEG;AACH,MAAM,WAAW,GAAG,sBAAsB,kBAAkB,CAAC,onCAAonC,CAAC,EAAE,CAAC;AAErrC;;;GAGG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO;;;;;;gDAMuC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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