lance-context 1.2.0 → 1.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/dashboard/ui.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAu2CzC"}
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../src/dashboard/ui.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAk5CzC"}
@@ -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
- #usage-chart th {
508
- font-size: 11px;
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,30 @@ 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;
528
535
  }
529
536
 
530
537
  .usage-total {
@@ -850,21 +857,14 @@ export function getDashboardHTML() {
850
857
  <div class="stat-label">Search Weights</div>
851
858
  <div class="stat-value small" id="searchWeights">-</div>
852
859
  </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
860
  <div class="stat">
861
- <div class="stat-label">Include</div>
861
+ <div class="stat-label">Include Patterns</div>
862
862
  <div class="patterns-list" id="includePatterns">
863
863
  <span class="pattern-tag">Loading...</span>
864
864
  </div>
865
865
  </div>
866
- <div class="stat" style="margin-top: 12px;">
867
- <div class="stat-label">Exclude</div>
866
+ <div class="stat">
867
+ <div class="stat-label">Exclude Patterns</div>
868
868
  <div class="patterns-list" id="excludePatterns">
869
869
  <span class="pattern-tag exclude">Loading...</span>
870
870
  </div>
@@ -872,7 +872,7 @@ export function getDashboardHTML() {
872
872
  </div>
873
873
 
874
874
  <!-- Command Usage Card -->
875
- <div class="card double-width">
875
+ <div class="card full-width">
876
876
  <div class="card-header">
877
877
  <span class="card-title">Command Usage</span>
878
878
  <span class="badge" id="sessionBadge">This Session</span>
@@ -880,17 +880,11 @@ export function getDashboardHTML() {
880
880
  <div id="usageChartContainer">
881
881
  <div class="usage-empty" id="usageEmpty">No commands executed yet</div>
882
882
  <div id="chartWrapper">
883
- <table class="charts-css column show-labels show-primary-axis show-data data-spacing-20" id="usage-chart" style="display: none;">
883
+ <table class="charts-css column show-primary-axis data-spacing-5" id="usage-chart" style="display: none;">
884
884
  <tbody id="usageChartBody"></tbody>
885
885
  </table>
886
886
  </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>
887
+ <ul class="charts-css legend legend-inline legend-square" id="chartLegend" style="display: none;"></ul>
894
888
  <div class="usage-total" id="usageTotal" style="display: none;">
895
889
  <span class="usage-total-label">Total Commands</span>
896
890
  <span class="usage-total-count" id="totalCount">0</span>
@@ -1171,15 +1165,42 @@ export function getDashboardHTML() {
1171
1165
  progressText.textContent = progress.message;
1172
1166
  }
1173
1167
 
1174
- // Charts.css color mapping
1168
+ // Charts.css color mapping - distinct colors for all commands
1175
1169
  const commandColors = {
1176
- 'search_code': '#58a6ff',
1177
- 'search_similar': '#79c0ff',
1178
- 'index_codebase': '#3fb950',
1179
- 'get_index_status': '#a371f7',
1180
- 'clear_index': '#f85149',
1181
- 'get_project_instructions': '#d29922',
1182
- 'commit': '#56d364'
1170
+ // Core search
1171
+ 'search_code': '#58a6ff', // blue
1172
+ 'search_similar': '#39c5cf', // cyan
1173
+ // Indexing
1174
+ 'index_codebase': '#3fb950', // green
1175
+ 'get_index_status': '#a371f7', // purple
1176
+ 'clear_index': '#f85149', // red
1177
+ 'get_project_instructions': '#d29922', // orange
1178
+ // Git
1179
+ 'commit': '#f778ba', // pink
1180
+ // Symbol analysis
1181
+ 'get_symbols_overview': '#79c0ff', // light blue
1182
+ 'find_symbol': '#56d364', // bright green
1183
+ 'find_referencing_symbols': '#bc8cff', // light purple
1184
+ 'search_for_pattern': '#ff9f43', // bright orange
1185
+ 'replace_symbol_body': '#ff6b6b', // coral
1186
+ 'insert_before_symbol': '#feca57', // yellow
1187
+ 'insert_after_symbol': '#48dbfb', // sky blue
1188
+ 'rename_symbol': '#ff9ff3', // light pink
1189
+ // Memory
1190
+ 'write_memory': '#1dd1a1', // teal
1191
+ 'read_memory': '#5f27cd', // deep purple
1192
+ 'list_memories': '#ee5a24', // burnt orange
1193
+ 'delete_memory': '#c23616', // dark red
1194
+ 'edit_memory': '#009432', // forest green
1195
+ // Worktree
1196
+ 'create_worktree': '#12CBC4', // turquoise
1197
+ 'list_worktrees': '#B53471', // magenta
1198
+ 'remove_worktree': '#ED4C67', // watermelon
1199
+ 'worktree_status': '#F79F1F', // golden
1200
+ // Clustering
1201
+ 'list_concepts': '#A3CB38', // lime
1202
+ 'search_by_concept': '#1289A7', // cerulean
1203
+ 'summarize_codebase': '#D980FA' // lavender
1183
1204
  };
1184
1205
 
1185
1206
  // Update usage chart using charts.css
@@ -1202,27 +1223,49 @@ export function getDashboardHTML() {
1202
1223
  }
1203
1224
 
1204
1225
  usageEmpty.style.display = 'none';
1205
- usageChartEl.style.display = 'block';
1226
+ usageChartEl.style.display = '';
1206
1227
  chartLegend.style.display = 'flex';
1207
1228
  usageTotal.style.display = 'flex';
1208
1229
 
1209
1230
  const maxCount = Math.max(...usage.map(u => u.count));
1210
1231
 
1211
- let html = '';
1232
+ let chartHtml = '';
1233
+ let legendHtml = '';
1234
+ let idx = 0;
1212
1235
  for (const item of usage) {
1213
1236
  if (item.count === 0) continue;
1214
1237
 
1215
1238
  const percent = maxCount > 0 ? (item.count / maxCount) : 0;
1216
1239
  const color = commandColors[item.command] || '#58a6ff';
1217
1240
 
1218
- html += '<tr>';
1219
- html += '<th scope="row">' + escapeHtml(item.label) + '</th>';
1220
- html += '<td style="--size: ' + percent + '; --color: ' + color + ';"><span class="data">' + item.count + '</span></td>';
1221
- html += '</tr>';
1241
+ chartHtml += '<tr data-idx="' + idx + '">';
1242
+ chartHtml += '<th scope="row"></th>';
1243
+ chartHtml += '<td style="--size: ' + percent + '; --color: ' + color + ';"></td>';
1244
+ chartHtml += '</tr>';
1245
+
1246
+ legendHtml += '<li data-idx="' + idx + '" style="--color: ' + color + ';">' + escapeHtml(item.label) + ' (' + item.count + ')</li>';
1247
+ idx++;
1222
1248
  }
1223
1249
 
1224
- usageChartBody.innerHTML = html;
1250
+ usageChartBody.innerHTML = chartHtml;
1251
+ chartLegend.innerHTML = legendHtml;
1225
1252
  totalCount.textContent = total;
1253
+
1254
+ // Legend hover highlighting
1255
+ chartLegend.querySelectorAll('li').forEach(function(li) {
1256
+ li.addEventListener('mouseenter', function() {
1257
+ var idx = this.getAttribute('data-idx');
1258
+ usageChartEl.classList.add('legend-hover');
1259
+ var row = usageChartBody.querySelector('tr[data-idx="' + idx + '"]');
1260
+ if (row) row.classList.add('highlight');
1261
+ });
1262
+ li.addEventListener('mouseleave', function() {
1263
+ usageChartEl.classList.remove('legend-hover');
1264
+ usageChartBody.querySelectorAll('tr').forEach(function(tr) {
1265
+ tr.classList.remove('highlight');
1266
+ });
1267
+ });
1268
+ });
1226
1269
  }
1227
1270
 
1228
1271
  // Beads section elements
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA+rB9B,CAAC;AACT,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lance-context",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "MCP plugin for semantic code search using LanceDB - gives AI coding agents deep context from your entire codebase",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",