@nandoblanco/opencode-local-search 1.0.2 → 1.1.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,616 @@
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
+ display: grid;
215
+ grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
216
+ flex: 1;
217
+ min-height: 0;
218
+ overflow: hidden;
219
+ }
220
+
221
+ .ols-root--panel .ols-split {
222
+ grid-template-columns: 1fr;
223
+ grid-template-rows: minmax(170px, 44%) minmax(0, 1fr);
224
+ }
225
+
226
+ .ols-column {
227
+ display: flex;
228
+ flex-direction: column;
229
+ min-width: 0;
230
+ min-height: 0;
231
+ overflow: hidden;
232
+ }
233
+
234
+ .ols-column--list {
235
+ border-right: 1px solid var(--ols-border);
236
+ background: var(--ols-bg-subtle);
237
+ }
238
+
239
+ .ols-root--panel .ols-column--list {
240
+ border-right: 0;
241
+ border-bottom: 1px solid var(--ols-border);
242
+ }
243
+
244
+ .ols-column--detail {
245
+ background: var(--ols-bg-surface);
246
+ }
247
+
248
+ /* Session list rows */
249
+ .ols-list-scroll,
250
+ .ols-detail-scroll {
251
+ flex: 1;
252
+ min-height: 0;
253
+ overflow-y: auto;
254
+ overflow-x: hidden;
255
+ }
256
+
257
+ .ols-list-scroll {
258
+ padding: 6px;
259
+ display: flex;
260
+ flex-direction: column;
261
+ gap: 2px;
262
+ }
263
+
264
+ .ols-row {
265
+ display: flex;
266
+ flex-direction: column;
267
+ gap: 3px;
268
+ width: 100%;
269
+ padding: 8px 10px;
270
+ border: 0;
271
+ border-radius: 6px;
272
+ background: transparent;
273
+ color: var(--ols-text);
274
+ text-align: left;
275
+ font-family: inherit;
276
+ cursor: pointer;
277
+ transition: background-color 65ms ease-out;
278
+ }
279
+
280
+ .ols-row:hover {
281
+ background: var(--ols-bg-hover);
282
+ }
283
+
284
+ .ols-row:focus-visible {
285
+ outline: 2px solid var(--ols-focus);
286
+ outline-offset: -2px;
287
+ }
288
+
289
+ .ols-row--selected {
290
+ background: var(--ols-bg-pressed);
291
+ }
292
+
293
+ .ols-row--selected:hover {
294
+ background: var(--ols-bg-pressed);
295
+ }
296
+
297
+ .ols-row-top {
298
+ display: flex;
299
+ align-items: baseline;
300
+ justify-content: space-between;
301
+ gap: 8px;
302
+ min-width: 0;
303
+ }
304
+
305
+ .ols-row-title {
306
+ font-size: 13px;
307
+ font-weight: 530;
308
+ color: var(--ols-text);
309
+ white-space: nowrap;
310
+ overflow: hidden;
311
+ text-overflow: ellipsis;
312
+ min-width: 0;
313
+ flex: 1;
314
+ }
315
+
316
+ .ols-row-time {
317
+ font-size: 11px;
318
+ color: var(--ols-text-faint);
319
+ font-variant-numeric: tabular-nums;
320
+ flex-shrink: 0;
321
+ }
322
+
323
+ .ols-row-snippet {
324
+ font-size: 12px;
325
+ color: var(--ols-text-muted);
326
+ line-height: 1.38;
327
+ display: -webkit-box;
328
+ -webkit-line-clamp: 2;
329
+ -webkit-box-orient: vertical;
330
+ overflow: hidden;
331
+ overflow-wrap: anywhere;
332
+ }
333
+
334
+ .ols-row-meta {
335
+ display: flex;
336
+ align-items: center;
337
+ gap: 6px;
338
+ margin-top: 2px;
339
+ font-size: 11px;
340
+ color: var(--ols-text-faint);
341
+ font-variant-numeric: tabular-nums;
342
+ white-space: nowrap;
343
+ overflow: hidden;
344
+ }
345
+
346
+ .ols-row-hit-badge {
347
+ display: inline-flex;
348
+ align-items: center;
349
+ height: 16px;
350
+ padding: 0 5px;
351
+ border-radius: 3px;
352
+ background: var(--ols-bg-pill);
353
+ color: var(--ols-text-muted);
354
+ font-size: 10px;
355
+ font-weight: 530;
356
+ letter-spacing: 0.01em;
357
+ }
358
+
359
+ .ols-row-folder {
360
+ color: var(--ols-text-muted);
361
+ overflow: hidden;
362
+ text-overflow: ellipsis;
363
+ }
364
+
365
+ /* Detail pane header */
366
+ .ols-detail-header {
367
+ display: flex;
368
+ align-items: center;
369
+ justify-content: space-between;
370
+ gap: 12px;
371
+ padding: 12px 16px;
372
+ border-bottom: 1px solid var(--ols-border);
373
+ flex-shrink: 0;
374
+ }
375
+
376
+ .ols-detail-heading {
377
+ display: flex;
378
+ flex-direction: column;
379
+ gap: 2px;
380
+ min-width: 0;
381
+ flex: 1;
382
+ }
383
+
384
+ .ols-detail-title {
385
+ font-size: 14px;
386
+ font-weight: 530;
387
+ color: var(--ols-text);
388
+ white-space: nowrap;
389
+ overflow: hidden;
390
+ text-overflow: ellipsis;
391
+ }
392
+
393
+ .ols-detail-meta {
394
+ display: flex;
395
+ align-items: center;
396
+ gap: 6px;
397
+ font-size: 12px;
398
+ color: var(--ols-text-faint);
399
+ white-space: nowrap;
400
+ overflow: hidden;
401
+ text-overflow: ellipsis;
402
+ }
403
+
404
+ .ols-detail-actions {
405
+ display: flex;
406
+ align-items: center;
407
+ gap: 6px;
408
+ flex-shrink: 0;
409
+ }
410
+
411
+ /* Quick syntax suggestions bar */
412
+ .ols-quick-bar {
413
+ display: flex;
414
+ align-items: center;
415
+ gap: 6px;
416
+ padding: 7px 16px;
417
+ border-bottom: 1px solid var(--ols-border);
418
+ background: var(--ols-bg-subtle);
419
+ flex-wrap: wrap;
420
+ flex-shrink: 0;
421
+ }
422
+
423
+ .ols-quick-label {
424
+ font-size: 11px;
425
+ color: var(--ols-text-faint);
426
+ }
427
+
428
+ .ols-quick-chip {
429
+ display: inline-flex;
430
+ align-items: center;
431
+ height: 20px;
432
+ padding: 0 7px;
433
+ border: 0;
434
+ border-radius: 4px;
435
+ background: var(--ols-bg-elevated);
436
+ box-shadow: inset 0 0 0 1px var(--ols-border);
437
+ color: var(--ols-text-muted);
438
+ font-family: var(--font-family-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
439
+ font-size: 11px;
440
+ cursor: pointer;
441
+ transition: background-color 65ms ease-out, color 65ms ease-out;
442
+ }
443
+
444
+ .ols-quick-chip:hover {
445
+ background: var(--ols-bg-hover);
446
+ color: var(--ols-text);
447
+ }
448
+
449
+ /* Conversation timeline turns */
450
+ .ols-timeline {
451
+ display: flex;
452
+ flex-direction: column;
453
+ divide-y: 1px solid var(--ols-border);
454
+ }
455
+
456
+ .ols-turn {
457
+ display: flex;
458
+ flex-direction: column;
459
+ gap: 4px;
460
+ padding: 12px 16px;
461
+ border-bottom: 1px solid var(--ols-border);
462
+ cursor: pointer;
463
+ transition: background-color 65ms ease-out;
464
+ }
465
+
466
+ .ols-turn:hover {
467
+ background: var(--ols-bg-hover);
468
+ }
469
+
470
+ .ols-turn--selected {
471
+ background: var(--ols-bg-pressed);
472
+ }
473
+
474
+ .ols-turn-header {
475
+ display: flex;
476
+ align-items: center;
477
+ gap: 6px;
478
+ font-size: 12px;
479
+ }
480
+
481
+ .ols-turn-author {
482
+ font-weight: 530;
483
+ color: var(--ols-text);
484
+ }
485
+
486
+ .ols-turn-author--user {
487
+ color: var(--ols-text);
488
+ }
489
+
490
+ .ols-turn-author--assistant {
491
+ color: var(--ols-text-muted);
492
+ }
493
+
494
+ .ols-turn-author--shell {
495
+ color: var(--v2-state-fg-warning, #f59e0b);
496
+ }
497
+
498
+ .ols-turn-chip {
499
+ display: inline-flex;
500
+ align-items: center;
501
+ height: 16px;
502
+ padding: 0 5px;
503
+ border-radius: 3px;
504
+ background: var(--ols-bg-pill);
505
+ color: var(--ols-text-muted);
506
+ font-family: var(--font-family-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
507
+ font-size: 10px;
508
+ }
509
+
510
+ .ols-turn-time {
511
+ margin-inline-start: auto;
512
+ font-size: 11px;
513
+ color: var(--ols-text-faint);
514
+ font-variant-numeric: tabular-nums;
515
+ }
516
+
517
+ .ols-turn-body {
518
+ font-size: 13px;
519
+ line-height: 1.5;
520
+ color: var(--ols-text-muted);
521
+ white-space: pre-wrap;
522
+ overflow-wrap: anywhere;
523
+ user-select: text;
524
+ }
525
+
526
+ /* Highlighted search term */
527
+ .ols-mark {
528
+ background: var(--ols-mark-bg);
529
+ color: var(--ols-mark-fg);
530
+ border-radius: 2px;
531
+ padding: 0 2px;
532
+ font-weight: 530;
533
+ }
534
+
535
+ /* Empty states */
536
+ .ols-empty {
537
+ display: flex;
538
+ flex-direction: column;
539
+ align-items: center;
540
+ justify-content: center;
541
+ gap: 4px;
542
+ padding: 36px 20px;
543
+ text-align: center;
544
+ flex: 1;
545
+ }
546
+
547
+ .ols-empty-title {
548
+ font-size: 13px;
549
+ font-weight: 530;
550
+ color: var(--ols-text);
551
+ }
552
+
553
+ .ols-empty-sub {
554
+ font-size: 12px;
555
+ color: var(--ols-text-faint);
556
+ max-width: 280px;
557
+ }
558
+
559
+ .ols-inline-link {
560
+ padding: 0;
561
+ border: 0;
562
+ background: transparent;
563
+ color: var(--ols-text);
564
+ font: inherit;
565
+ font-weight: 530;
566
+ text-decoration: underline;
567
+ text-underline-offset: 2px;
568
+ cursor: pointer;
569
+ }
570
+
571
+ /* Native Dialog Footer */
572
+ .ols-dialog-footer {
573
+ display: flex;
574
+ align-items: center;
575
+ justify-content: space-between;
576
+ gap: 12px;
577
+ width: 100%;
578
+ }
579
+
580
+ .ols-dialog-shortcuts {
581
+ display: flex;
582
+ align-items: center;
583
+ gap: 14px;
584
+ flex-wrap: wrap;
585
+ }
586
+
587
+ .ols-shortcut-item {
588
+ display: inline-flex;
589
+ align-items: center;
590
+ gap: 5px;
591
+ font-size: 12px;
592
+ color: var(--ols-text-faint);
593
+ }
594
+
595
+ @media (max-width: 720px) {
596
+ .ols-split {
597
+ grid-template-columns: 1fr;
598
+ grid-template-rows: minmax(160px, 42%) minmax(0, 1fr);
599
+ }
600
+
601
+ .ols-column--list {
602
+ border-right: 0;
603
+ border-bottom: 1px solid var(--ols-border);
604
+ }
605
+ }
606
+
607
+ /* Built-in Home session search bar acts as a launcher for full-history search */
608
+ [data-component="home-session-search"],
609
+ [data-component="home-session-search"] label,
610
+ [data-component="home-session-search"] input {
611
+ cursor: pointer;
612
+ }
613
+
614
+ #home-session-search-results {
615
+ display: none;
616
+ }