@nandoblanco/opencode-local-search 1.0.2 → 1.2.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/src/gui.css ADDED
@@ -0,0 +1,662 @@
1
+ /* OpenCode Desktop GUI styles for opencode-local-search */
2
+ /* Uses OpenCode V2 native design tokens (--v2-*) so it automatically matches all Desktop themes & light/dark mode */
3
+
4
+ .ols-root {
5
+ --ols-bg-surface: var(--v2-background-bg-layer-01, #141417);
6
+ --ols-bg-subtle: var(--v2-background-bg-base, #0e0e11);
7
+ --ols-bg-elevated: var(--v2-background-bg-layer-02, #1c1c21);
8
+ --ols-bg-pill: var(--v2-background-bg-layer-03, #25252c);
9
+ --ols-bg-hover: var(--v2-overlay-simple-overlay-hover, rgba(255, 255, 255, 0.05));
10
+ --ols-bg-pressed: var(--v2-overlay-simple-overlay-pressed, rgba(255, 255, 255, 0.09));
11
+ --ols-border: var(--v2-border-border-muted, rgba(255, 255, 255, 0.08));
12
+ --ols-border-strong: var(--v2-border-border-strong, rgba(255, 255, 255, 0.14));
13
+ --ols-focus: var(--v2-border-border-focus, #3b82f6);
14
+ --ols-text: var(--v2-text-text-base, #ededf0);
15
+ --ols-text-muted: var(--v2-text-text-muted, #9ca3af);
16
+ --ols-text-faint: var(--v2-text-text-faint, #6b7280);
17
+ --ols-danger: var(--v2-state-fg-danger, #ef4444);
18
+ --ols-mark-bg: rgba(245, 158, 11, 0.22);
19
+ --ols-mark-fg: var(--v2-text-text-base, #fde68a);
20
+
21
+ box-sizing: border-box;
22
+ display: flex;
23
+ flex-direction: column;
24
+ width: 100%;
25
+ height: 100%;
26
+ min-height: 0;
27
+ color: var(--ols-text);
28
+ font-family: var(--font-family-text, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
29
+ font-size: 13px;
30
+ font-weight: 440;
31
+ letter-spacing: -0.04px;
32
+ line-height: 1.45;
33
+ user-select: none;
34
+ overflow: hidden;
35
+ }
36
+
37
+ .ols-root[data-scheme="light"] {
38
+ --ols-bg-surface: var(--v2-background-bg-layer-01, #ffffff);
39
+ --ols-bg-subtle: var(--v2-background-bg-base, #f6f6f8);
40
+ --ols-bg-elevated: var(--v2-background-bg-layer-02, #f0f0f3);
41
+ --ols-bg-pill: var(--v2-background-bg-layer-03, #e6e6eb);
42
+ --ols-bg-hover: var(--v2-overlay-simple-overlay-hover, rgba(0, 0, 0, 0.045));
43
+ --ols-bg-pressed: var(--v2-overlay-simple-overlay-pressed, rgba(0, 0, 0, 0.08));
44
+ --ols-border: var(--v2-border-border-muted, rgba(0, 0, 0, 0.08));
45
+ --ols-border-strong: var(--v2-border-border-strong, rgba(0, 0, 0, 0.14));
46
+ --ols-text: var(--v2-text-text-base, #161618);
47
+ --ols-text-muted: var(--v2-text-text-muted, #5c606a);
48
+ --ols-text-faint: var(--v2-text-text-faint, #8c909a);
49
+ --ols-mark-bg: rgba(245, 158, 11, 0.28);
50
+ --ols-mark-fg: #78350f;
51
+ }
52
+
53
+ .ols-root *,
54
+ .ols-root *::before,
55
+ .ols-root *::after {
56
+ box-sizing: border-box;
57
+ }
58
+
59
+ .ols-root--modal {
60
+ flex: 1;
61
+ height: min(64vh, 480px);
62
+ max-height: 100%;
63
+ overflow: hidden;
64
+ border-top: 1px solid var(--ols-border);
65
+ border-bottom: 1px solid var(--ols-border);
66
+ }
67
+
68
+ .ols-root--panel {
69
+ height: 100%;
70
+ min-height: 360px;
71
+ }
72
+
73
+ /* Header: Search input + filter controls */
74
+ .ols-header {
75
+ display: flex;
76
+ flex-direction: column;
77
+ gap: 8px;
78
+ padding: 10px 16px;
79
+ border-bottom: 1px solid var(--ols-border);
80
+ flex-shrink: 0;
81
+ }
82
+
83
+ .ols-root--panel .ols-header {
84
+ padding: 10px 12px;
85
+ }
86
+
87
+ .ols-input-wrap {
88
+ display: flex;
89
+ width: 100%;
90
+ }
91
+
92
+ .ols-input-wrap [data-component="text-input-v2"] {
93
+ width: 100%;
94
+ flex: 1;
95
+ }
96
+
97
+ .ols-controls-bar {
98
+ display: flex;
99
+ align-items: center;
100
+ justify-content: space-between;
101
+ gap: 8px;
102
+ flex-wrap: wrap;
103
+ }
104
+
105
+ .ols-controls-left {
106
+ display: flex;
107
+ align-items: center;
108
+ gap: 6px;
109
+ flex-wrap: wrap;
110
+ min-width: 0;
111
+ }
112
+
113
+ .ols-controls-right {
114
+ display: flex;
115
+ align-items: center;
116
+ gap: 6px;
117
+ flex-shrink: 0;
118
+ margin-inline-start: auto;
119
+ }
120
+
121
+ /* Segmented Scope Toggle (Project vs All workspaces) */
122
+ .ols-segment {
123
+ display: inline-flex;
124
+ align-items: center;
125
+ padding: 2px;
126
+ border-radius: 6px;
127
+ background: var(--ols-bg-elevated);
128
+ box-shadow: inset 0 0 0 1px var(--ols-border);
129
+ }
130
+
131
+ .ols-segment-btn {
132
+ display: inline-flex;
133
+ align-items: center;
134
+ gap: 5px;
135
+ height: 20px;
136
+ padding: 0 8px;
137
+ border: 0;
138
+ border-radius: 4px;
139
+ background: transparent;
140
+ color: var(--ols-text-muted);
141
+ font-family: inherit;
142
+ font-size: 12px;
143
+ font-weight: 440;
144
+ letter-spacing: -0.04px;
145
+ cursor: pointer;
146
+ transition: background-color 85ms ease-out, color 85ms ease-out;
147
+ }
148
+
149
+ .ols-segment-btn:hover {
150
+ color: var(--ols-text);
151
+ }
152
+
153
+ .ols-segment-btn:focus-visible {
154
+ outline: 2px solid var(--ols-focus);
155
+ outline-offset: 1px;
156
+ }
157
+
158
+ .ols-segment-btn--active {
159
+ background: var(--ols-bg-surface);
160
+ color: var(--ols-text);
161
+ font-weight: 530;
162
+ box-shadow: var(--v2-elevation-button-neutral, 0 1px 2px rgba(0, 0, 0, 0.16));
163
+ }
164
+
165
+ /* Active filter chips (dismissible) */
166
+ .ols-active-pill {
167
+ display: inline-flex;
168
+ align-items: center;
169
+ gap: 4px;
170
+ height: 22px;
171
+ padding: 0 6px 0 8px;
172
+ border: 0;
173
+ border-radius: 4px;
174
+ background: var(--ols-bg-pill);
175
+ color: var(--ols-text);
176
+ font-family: inherit;
177
+ font-size: 12px;
178
+ font-weight: 440;
179
+ cursor: pointer;
180
+ transition: background-color 85ms ease-out;
181
+ }
182
+
183
+ .ols-active-pill:hover {
184
+ background: var(--ols-bg-pressed);
185
+ }
186
+
187
+ .ols-active-pill:focus-visible {
188
+ outline: 2px solid var(--ols-focus);
189
+ outline-offset: 1px;
190
+ }
191
+
192
+ .ols-error-pill {
193
+ display: inline-flex;
194
+ align-items: center;
195
+ height: 22px;
196
+ padding: 0 8px;
197
+ border-radius: 4px;
198
+ background: rgba(239, 68, 68, 0.12);
199
+ color: var(--ols-danger);
200
+ font-size: 12px;
201
+ font-weight: 530;
202
+ }
203
+
204
+ .ols-status-count {
205
+ display: inline-flex;
206
+ align-items: center;
207
+ color: var(--ols-text-faint);
208
+ font-size: 12px;
209
+ font-variant-numeric: tabular-nums;
210
+ }
211
+
212
+ /* Split layout */
213
+ .ols-split {
214
+ position: relative;
215
+ display: grid;
216
+ grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
217
+ flex: 1;
218
+ min-height: 0;
219
+ overflow: hidden;
220
+ }
221
+
222
+ .ols-loading-center {
223
+ position: absolute;
224
+ inset: 0;
225
+ z-index: 20;
226
+ display: flex;
227
+ align-items: center;
228
+ justify-content: center;
229
+ background: rgba(14, 14, 17, 0.42);
230
+ backdrop-filter: blur(1.5px);
231
+ pointer-events: none;
232
+ }
233
+
234
+ .ols-root[data-scheme="light"] .ols-loading-center {
235
+ background: rgba(246, 246, 248, 0.52);
236
+ }
237
+
238
+ .ols-loading-pill {
239
+ display: inline-flex;
240
+ align-items: center;
241
+ gap: 8px;
242
+ padding: 8px 14px;
243
+ border-radius: 999px;
244
+ background: var(--ols-bg-elevated);
245
+ border: 1px solid var(--ols-border-strong);
246
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
247
+ color: var(--ols-text);
248
+ font-size: 12px;
249
+ font-weight: 530;
250
+ }
251
+
252
+ .ols-spinner {
253
+ width: 14px;
254
+ height: 14px;
255
+ border-radius: 50%;
256
+ border: 2px solid var(--ols-border-strong);
257
+ border-top-color: var(--ols-focus);
258
+ animation: ols-spin 0.65s linear infinite;
259
+ }
260
+
261
+ @keyframes ols-spin {
262
+ to {
263
+ transform: rotate(360deg);
264
+ }
265
+ }
266
+
267
+ .ols-root--panel .ols-split {
268
+ grid-template-columns: 1fr;
269
+ grid-template-rows: minmax(170px, 44%) minmax(0, 1fr);
270
+ }
271
+
272
+ .ols-column {
273
+ display: flex;
274
+ flex-direction: column;
275
+ min-width: 0;
276
+ min-height: 0;
277
+ overflow: hidden;
278
+ }
279
+
280
+ .ols-column--list {
281
+ border-right: 1px solid var(--ols-border);
282
+ background: var(--ols-bg-subtle);
283
+ }
284
+
285
+ .ols-root--panel .ols-column--list {
286
+ border-right: 0;
287
+ border-bottom: 1px solid var(--ols-border);
288
+ }
289
+
290
+ .ols-column--detail {
291
+ background: var(--ols-bg-surface);
292
+ }
293
+
294
+ /* Session list rows */
295
+ .ols-list-scroll,
296
+ .ols-detail-scroll {
297
+ flex: 1;
298
+ min-height: 0;
299
+ overflow-y: auto;
300
+ overflow-x: hidden;
301
+ }
302
+
303
+ .ols-list-scroll {
304
+ padding: 6px;
305
+ display: flex;
306
+ flex-direction: column;
307
+ gap: 2px;
308
+ }
309
+
310
+ .ols-row {
311
+ display: flex;
312
+ flex-direction: column;
313
+ gap: 3px;
314
+ width: 100%;
315
+ padding: 8px 10px;
316
+ border: 0;
317
+ border-radius: 6px;
318
+ background: transparent;
319
+ color: var(--ols-text);
320
+ text-align: left;
321
+ font-family: inherit;
322
+ cursor: pointer;
323
+ transition: background-color 65ms ease-out;
324
+ }
325
+
326
+ .ols-row:hover {
327
+ background: var(--ols-bg-hover);
328
+ }
329
+
330
+ .ols-row:focus-visible {
331
+ outline: 2px solid var(--ols-focus);
332
+ outline-offset: -2px;
333
+ }
334
+
335
+ .ols-row--selected {
336
+ background: var(--ols-bg-pressed);
337
+ }
338
+
339
+ .ols-row--selected:hover {
340
+ background: var(--ols-bg-pressed);
341
+ }
342
+
343
+ .ols-row-top {
344
+ display: flex;
345
+ align-items: baseline;
346
+ justify-content: space-between;
347
+ gap: 8px;
348
+ min-width: 0;
349
+ }
350
+
351
+ .ols-row-title {
352
+ font-size: 13px;
353
+ font-weight: 530;
354
+ color: var(--ols-text);
355
+ white-space: nowrap;
356
+ overflow: hidden;
357
+ text-overflow: ellipsis;
358
+ min-width: 0;
359
+ flex: 1;
360
+ }
361
+
362
+ .ols-row-time {
363
+ font-size: 11px;
364
+ color: var(--ols-text-faint);
365
+ font-variant-numeric: tabular-nums;
366
+ flex-shrink: 0;
367
+ }
368
+
369
+ .ols-row-snippet {
370
+ font-size: 12px;
371
+ color: var(--ols-text-muted);
372
+ line-height: 1.38;
373
+ display: -webkit-box;
374
+ -webkit-line-clamp: 2;
375
+ -webkit-box-orient: vertical;
376
+ overflow: hidden;
377
+ overflow-wrap: anywhere;
378
+ }
379
+
380
+ .ols-row-meta {
381
+ display: flex;
382
+ align-items: center;
383
+ gap: 6px;
384
+ margin-top: 2px;
385
+ font-size: 11px;
386
+ color: var(--ols-text-faint);
387
+ font-variant-numeric: tabular-nums;
388
+ white-space: nowrap;
389
+ overflow: hidden;
390
+ }
391
+
392
+ .ols-row-hit-badge {
393
+ display: inline-flex;
394
+ align-items: center;
395
+ height: 16px;
396
+ padding: 0 5px;
397
+ border-radius: 3px;
398
+ background: var(--ols-bg-pill);
399
+ color: var(--ols-text-muted);
400
+ font-size: 10px;
401
+ font-weight: 530;
402
+ letter-spacing: 0.01em;
403
+ }
404
+
405
+ .ols-row-folder {
406
+ color: var(--ols-text-muted);
407
+ overflow: hidden;
408
+ text-overflow: ellipsis;
409
+ }
410
+
411
+ /* Detail pane header */
412
+ .ols-detail-header {
413
+ display: flex;
414
+ align-items: center;
415
+ justify-content: space-between;
416
+ gap: 12px;
417
+ padding: 12px 16px;
418
+ border-bottom: 1px solid var(--ols-border);
419
+ flex-shrink: 0;
420
+ }
421
+
422
+ .ols-detail-heading {
423
+ display: flex;
424
+ flex-direction: column;
425
+ gap: 2px;
426
+ min-width: 0;
427
+ flex: 1;
428
+ }
429
+
430
+ .ols-detail-title {
431
+ font-size: 14px;
432
+ font-weight: 530;
433
+ color: var(--ols-text);
434
+ white-space: nowrap;
435
+ overflow: hidden;
436
+ text-overflow: ellipsis;
437
+ }
438
+
439
+ .ols-detail-meta {
440
+ display: flex;
441
+ align-items: center;
442
+ gap: 6px;
443
+ font-size: 12px;
444
+ color: var(--ols-text-faint);
445
+ white-space: nowrap;
446
+ overflow: hidden;
447
+ text-overflow: ellipsis;
448
+ }
449
+
450
+ .ols-detail-actions {
451
+ display: flex;
452
+ align-items: center;
453
+ gap: 6px;
454
+ flex-shrink: 0;
455
+ }
456
+
457
+ /* Quick syntax suggestions bar */
458
+ .ols-quick-bar {
459
+ display: flex;
460
+ align-items: center;
461
+ gap: 6px;
462
+ padding: 7px 16px;
463
+ border-bottom: 1px solid var(--ols-border);
464
+ background: var(--ols-bg-subtle);
465
+ flex-wrap: wrap;
466
+ flex-shrink: 0;
467
+ }
468
+
469
+ .ols-quick-label {
470
+ font-size: 11px;
471
+ color: var(--ols-text-faint);
472
+ }
473
+
474
+ .ols-quick-chip {
475
+ display: inline-flex;
476
+ align-items: center;
477
+ height: 20px;
478
+ padding: 0 7px;
479
+ border: 0;
480
+ border-radius: 4px;
481
+ background: var(--ols-bg-elevated);
482
+ box-shadow: inset 0 0 0 1px var(--ols-border);
483
+ color: var(--ols-text-muted);
484
+ font-family: var(--font-family-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
485
+ font-size: 11px;
486
+ cursor: pointer;
487
+ transition: background-color 65ms ease-out, color 65ms ease-out;
488
+ }
489
+
490
+ .ols-quick-chip:hover {
491
+ background: var(--ols-bg-hover);
492
+ color: var(--ols-text);
493
+ }
494
+
495
+ /* Conversation timeline turns */
496
+ .ols-timeline {
497
+ display: flex;
498
+ flex-direction: column;
499
+ divide-y: 1px solid var(--ols-border);
500
+ }
501
+
502
+ .ols-turn {
503
+ display: flex;
504
+ flex-direction: column;
505
+ gap: 4px;
506
+ padding: 12px 16px;
507
+ border-bottom: 1px solid var(--ols-border);
508
+ cursor: pointer;
509
+ transition: background-color 65ms ease-out;
510
+ }
511
+
512
+ .ols-turn:hover {
513
+ background: var(--ols-bg-hover);
514
+ }
515
+
516
+ .ols-turn--selected {
517
+ background: var(--ols-bg-pressed);
518
+ }
519
+
520
+ .ols-turn-header {
521
+ display: flex;
522
+ align-items: center;
523
+ gap: 6px;
524
+ font-size: 12px;
525
+ }
526
+
527
+ .ols-turn-author {
528
+ font-weight: 530;
529
+ color: var(--ols-text);
530
+ }
531
+
532
+ .ols-turn-author--user {
533
+ color: var(--ols-text);
534
+ }
535
+
536
+ .ols-turn-author--assistant {
537
+ color: var(--ols-text-muted);
538
+ }
539
+
540
+ .ols-turn-author--shell {
541
+ color: var(--v2-state-fg-warning, #f59e0b);
542
+ }
543
+
544
+ .ols-turn-chip {
545
+ display: inline-flex;
546
+ align-items: center;
547
+ height: 16px;
548
+ padding: 0 5px;
549
+ border-radius: 3px;
550
+ background: var(--ols-bg-pill);
551
+ color: var(--ols-text-muted);
552
+ font-family: var(--font-family-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
553
+ font-size: 10px;
554
+ }
555
+
556
+ .ols-turn-time {
557
+ margin-inline-start: auto;
558
+ font-size: 11px;
559
+ color: var(--ols-text-faint);
560
+ font-variant-numeric: tabular-nums;
561
+ }
562
+
563
+ .ols-turn-body {
564
+ font-size: 13px;
565
+ line-height: 1.5;
566
+ color: var(--ols-text-muted);
567
+ white-space: pre-wrap;
568
+ overflow-wrap: anywhere;
569
+ user-select: text;
570
+ }
571
+
572
+ /* Highlighted search term */
573
+ .ols-mark {
574
+ background: var(--ols-mark-bg);
575
+ color: var(--ols-mark-fg);
576
+ border-radius: 2px;
577
+ padding: 0 2px;
578
+ font-weight: 530;
579
+ }
580
+
581
+ /* Empty states */
582
+ .ols-empty {
583
+ display: flex;
584
+ flex-direction: column;
585
+ align-items: center;
586
+ justify-content: center;
587
+ gap: 4px;
588
+ padding: 36px 20px;
589
+ text-align: center;
590
+ flex: 1;
591
+ }
592
+
593
+ .ols-empty-title {
594
+ font-size: 13px;
595
+ font-weight: 530;
596
+ color: var(--ols-text);
597
+ }
598
+
599
+ .ols-empty-sub {
600
+ font-size: 12px;
601
+ color: var(--ols-text-faint);
602
+ max-width: 280px;
603
+ }
604
+
605
+ .ols-inline-link {
606
+ padding: 0;
607
+ border: 0;
608
+ background: transparent;
609
+ color: var(--ols-text);
610
+ font: inherit;
611
+ font-weight: 530;
612
+ text-decoration: underline;
613
+ text-underline-offset: 2px;
614
+ cursor: pointer;
615
+ }
616
+
617
+ /* Native Dialog Footer */
618
+ .ols-dialog-footer {
619
+ display: flex;
620
+ align-items: center;
621
+ justify-content: space-between;
622
+ gap: 12px;
623
+ width: 100%;
624
+ }
625
+
626
+ .ols-dialog-shortcuts {
627
+ display: flex;
628
+ align-items: center;
629
+ gap: 14px;
630
+ flex-wrap: wrap;
631
+ }
632
+
633
+ .ols-shortcut-item {
634
+ display: inline-flex;
635
+ align-items: center;
636
+ gap: 5px;
637
+ font-size: 12px;
638
+ color: var(--ols-text-faint);
639
+ }
640
+
641
+ @media (max-width: 720px) {
642
+ .ols-split {
643
+ grid-template-columns: 1fr;
644
+ grid-template-rows: minmax(160px, 42%) minmax(0, 1fr);
645
+ }
646
+
647
+ .ols-column--list {
648
+ border-right: 0;
649
+ border-bottom: 1px solid var(--ols-border);
650
+ }
651
+ }
652
+
653
+ /* Built-in Home session search bar acts as a launcher for full-history search */
654
+ [data-component="home-session-search"],
655
+ [data-component="home-session-search"] label,
656
+ [data-component="home-session-search"] input {
657
+ cursor: pointer;
658
+ }
659
+
660
+ #home-session-search-results {
661
+ display: none;
662
+ }