@pheem49/mint 1.5.2 → 1.5.4
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/GUIDE_TH.md +23 -11
- package/README.md +148 -66
- package/assets/Agent_Mint.png +0 -0
- package/assets/Settings.png +0 -0
- package/install.ps1 +64 -0
- package/install.sh +54 -0
- package/main.js +12 -0
- package/package.json +5 -3
- package/preload.js +4 -0
- package/scripts/install_linux_desktop_entry.js +48 -0
- package/src/AI_Brain/Gemini_API.js +231 -498
- package/src/AI_Brain/autonomous_brain.js +46 -19
- package/src/AI_Brain/headless_agent.js +21 -2
- package/src/AI_Brain/provider_adapter.js +358 -0
- package/src/Automation_Layer/file_operations.js +17 -5
- package/src/CLI/approval_handler.js +5 -0
- package/src/CLI/chat_router.js +7 -0
- package/src/CLI/chat_ui.js +397 -76
- package/src/CLI/cli_colors.js +86 -3
- package/src/CLI/cli_formatters.js +6 -1
- package/src/CLI/code_agent.js +706 -273
- package/src/CLI/interactive_chat.js +311 -149
- package/src/CLI/slash_command_handler.js +2 -2
- package/src/CLI/updater.js +21 -1
- package/src/System/config_manager.js +5 -1
- package/src/System/ipc_handlers.js +95 -1
- package/src/System/picture_store.js +109 -0
- package/src/System/smart_context.js +227 -0
- package/src/System/task_manager.js +127 -0
- package/src/System/tool_registry.js +13 -0
- package/src/System/window_manager.js +16 -8
- package/src/UI/live2d_manager.js +42 -8
- package/src/UI/preload-spotlight.js +1 -0
- package/src/UI/renderer.js +837 -63
- package/src/UI/settings.css +160 -96
- package/src/UI/settings.html +9 -0
- package/src/UI/settings.js +35 -2
- package/src/UI/spotlight.js +13 -9
- package/src/UI/styles.css +1592 -165
- package/privacy.txt +0 -1
package/src/UI/settings.css
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--bg-color: #
|
|
3
|
-
--bg-gradient:
|
|
4
|
-
--panel-bg:
|
|
5
|
-
--sidebar-bg:
|
|
6
|
-
--chrome-bg:
|
|
7
|
-
--surface-bg:
|
|
8
|
-
--surface-strong:
|
|
9
|
-
--
|
|
10
|
-
--input-
|
|
11
|
-
--
|
|
12
|
-
--text-
|
|
13
|
-
--text-
|
|
14
|
-
--
|
|
15
|
-
--accent
|
|
16
|
-
--accent-
|
|
17
|
-
--
|
|
18
|
-
--border
|
|
19
|
-
--
|
|
20
|
-
--
|
|
21
|
-
--
|
|
22
|
-
--
|
|
2
|
+
--bg-color: #101010;
|
|
3
|
+
--bg-gradient: #101010;
|
|
4
|
+
--panel-bg: #101010;
|
|
5
|
+
--sidebar-bg: #1b1b1c;
|
|
6
|
+
--chrome-bg: #101010;
|
|
7
|
+
--surface-bg: #151515;
|
|
8
|
+
--surface-strong: #1d1d1e;
|
|
9
|
+
--surface-hover: #29292b;
|
|
10
|
+
--input-bg: #2f2f30;
|
|
11
|
+
--input-focus-bg: #343435;
|
|
12
|
+
--text-main: #e8e8ea;
|
|
13
|
+
--text-muted: #8c8c90;
|
|
14
|
+
--text-soft: #c4c4c7;
|
|
15
|
+
--accent: #4f83e6;
|
|
16
|
+
--accent-hover: #75a2ff;
|
|
17
|
+
--accent-soft: #343435;
|
|
18
|
+
--border: rgba(255, 255, 255, 0.075);
|
|
19
|
+
--border-strong: rgba(255, 255, 255, 0.12);
|
|
20
|
+
--danger: #ff4d4d;
|
|
21
|
+
--placeholder: #77777c;
|
|
22
|
+
--shadow: 0 24px 72px rgba(0, 0, 0, 0.5);
|
|
23
|
+
--glass-blur: none;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
[data-theme="light"] {
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
--chrome-bg: rgba(255, 255, 255, 0.82);
|
|
31
32
|
--surface-bg: rgba(15, 23, 42, 0.035);
|
|
32
33
|
--surface-strong: rgba(15, 23, 42, 0.065);
|
|
34
|
+
--surface-hover: rgba(15, 23, 42, 0.085);
|
|
33
35
|
--input-bg: rgba(15, 23, 42, 0.045);
|
|
34
36
|
--input-focus-bg: #ffffff;
|
|
35
37
|
--text-main: #0f172a;
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
--chrome-bg: rgba(2, 6, 23, 0.78);
|
|
50
52
|
--surface-bg: rgba(99, 102, 241, 0.055);
|
|
51
53
|
--surface-strong: rgba(99, 102, 241, 0.085);
|
|
54
|
+
--surface-hover: rgba(99, 102, 241, 0.13);
|
|
52
55
|
--input-bg: rgba(0, 0, 0, 0.46);
|
|
53
56
|
--input-focus-bg: rgba(0, 0, 0, 0.64);
|
|
54
57
|
--text-main: #e2e8f0;
|
|
@@ -68,9 +71,9 @@
|
|
|
68
71
|
body {
|
|
69
72
|
height: 100vh;
|
|
70
73
|
overflow: hidden;
|
|
71
|
-
background:
|
|
74
|
+
background: transparent;
|
|
72
75
|
color: var(--text-main);
|
|
73
|
-
font-family:
|
|
76
|
+
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
74
77
|
user-select: none;
|
|
75
78
|
}
|
|
76
79
|
|
|
@@ -86,16 +89,15 @@ button {
|
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
.settings-container {
|
|
89
|
-
display:
|
|
90
|
-
|
|
92
|
+
display: grid;
|
|
93
|
+
grid-template-rows: 0 minmax(0, 1fr) auto;
|
|
91
94
|
height: 100vh;
|
|
92
95
|
overflow: hidden;
|
|
93
96
|
background: var(--panel-bg);
|
|
94
97
|
border: 1px solid var(--border);
|
|
95
|
-
border-radius:
|
|
98
|
+
border-radius: 10px;
|
|
96
99
|
box-shadow: var(--shadow);
|
|
97
|
-
opacity:
|
|
98
|
-
animation: appEntrance 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
|
100
|
+
opacity: 1;
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
@keyframes appEntrance {
|
|
@@ -113,23 +115,22 @@ button {
|
|
|
113
115
|
.settings-footer {
|
|
114
116
|
display: flex;
|
|
115
117
|
align-items: center;
|
|
116
|
-
background: var(--
|
|
118
|
+
background: var(--panel-bg);
|
|
117
119
|
border-color: var(--border);
|
|
118
120
|
backdrop-filter: var(--glass-blur);
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
.settings-header {
|
|
122
124
|
-webkit-app-region: drag;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
position: relative;
|
|
126
|
+
z-index: 3;
|
|
127
|
+
min-height: 0;
|
|
128
|
+
padding: 0;
|
|
129
|
+
border-bottom: 0;
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
.header-left {
|
|
130
|
-
display:
|
|
131
|
-
align-items: center;
|
|
132
|
-
gap: 12px;
|
|
133
|
+
display: none;
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
.settings-icon {
|
|
@@ -158,6 +159,10 @@ h1 {
|
|
|
158
159
|
}
|
|
159
160
|
|
|
160
161
|
.close-btn {
|
|
162
|
+
position: absolute;
|
|
163
|
+
top: 24px;
|
|
164
|
+
right: 24px;
|
|
165
|
+
z-index: 5;
|
|
161
166
|
display: grid;
|
|
162
167
|
place-items: center;
|
|
163
168
|
width: 32px;
|
|
@@ -184,9 +189,9 @@ h1 {
|
|
|
184
189
|
}
|
|
185
190
|
|
|
186
191
|
.settings-sidebar {
|
|
187
|
-
width:
|
|
188
|
-
min-width:
|
|
189
|
-
padding:
|
|
192
|
+
width: 194px;
|
|
193
|
+
min-width: 194px;
|
|
194
|
+
padding: 96px 8px 12px;
|
|
190
195
|
overflow-y: auto;
|
|
191
196
|
background: var(--sidebar-bg);
|
|
192
197
|
border-right: 1px solid var(--border);
|
|
@@ -198,9 +203,9 @@ h1 {
|
|
|
198
203
|
width: 100%;
|
|
199
204
|
min-height: 42px;
|
|
200
205
|
gap: 10px;
|
|
201
|
-
padding: 10px
|
|
206
|
+
padding: 9px 10px;
|
|
202
207
|
border: 1px solid transparent;
|
|
203
|
-
border-radius:
|
|
208
|
+
border-radius: 7px;
|
|
204
209
|
background: transparent;
|
|
205
210
|
color: var(--text-muted);
|
|
206
211
|
cursor: pointer;
|
|
@@ -213,11 +218,7 @@ h1 {
|
|
|
213
218
|
}
|
|
214
219
|
|
|
215
220
|
.tab-btn span {
|
|
216
|
-
display:
|
|
217
|
-
place-items: center;
|
|
218
|
-
width: 22px;
|
|
219
|
-
min-width: 22px;
|
|
220
|
-
color: var(--text-soft);
|
|
221
|
+
display: none;
|
|
221
222
|
}
|
|
222
223
|
|
|
223
224
|
.tab-btn strong {
|
|
@@ -227,23 +228,23 @@ h1 {
|
|
|
227
228
|
}
|
|
228
229
|
|
|
229
230
|
.tab-btn:hover {
|
|
230
|
-
background: var(--surface-
|
|
231
|
+
background: var(--surface-hover);
|
|
231
232
|
color: var(--text-main);
|
|
232
|
-
transform:
|
|
233
|
+
transform: none;
|
|
233
234
|
}
|
|
234
235
|
|
|
235
236
|
.tab-btn.active {
|
|
236
|
-
background: var(--
|
|
237
|
-
border-color:
|
|
237
|
+
background: var(--surface-strong);
|
|
238
|
+
border-color: transparent;
|
|
238
239
|
color: var(--text-main);
|
|
239
|
-
box-shadow:
|
|
240
|
+
box-shadow: none;
|
|
240
241
|
}
|
|
241
242
|
|
|
242
243
|
.settings-content {
|
|
243
244
|
flex: 1;
|
|
244
245
|
min-width: 0;
|
|
245
246
|
overflow-y: auto;
|
|
246
|
-
padding:
|
|
247
|
+
padding: 84px 92px 42px;
|
|
247
248
|
}
|
|
248
249
|
|
|
249
250
|
.settings-content::-webkit-scrollbar,
|
|
@@ -261,7 +262,7 @@ h1 {
|
|
|
261
262
|
display: none;
|
|
262
263
|
flex-direction: column;
|
|
263
264
|
gap: 18px;
|
|
264
|
-
max-width:
|
|
265
|
+
max-width: 624px;
|
|
265
266
|
animation: fadeTab 0.18s ease;
|
|
266
267
|
}
|
|
267
268
|
|
|
@@ -281,18 +282,18 @@ h1 {
|
|
|
281
282
|
}
|
|
282
283
|
|
|
283
284
|
.setting-section {
|
|
284
|
-
padding:
|
|
285
|
+
padding: 0;
|
|
285
286
|
border: 1px solid var(--border);
|
|
286
287
|
border-radius: 12px;
|
|
287
|
-
background: var(--surface-bg);
|
|
288
|
+
background: color-mix(in srgb, var(--surface-bg) 74%, transparent);
|
|
289
|
+
overflow: hidden;
|
|
290
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
|
|
288
291
|
}
|
|
289
292
|
|
|
290
293
|
.section-heading {
|
|
291
|
-
display:
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
margin-bottom: 17px;
|
|
295
|
-
padding-bottom: 14px;
|
|
294
|
+
display: block;
|
|
295
|
+
margin-bottom: 0;
|
|
296
|
+
padding: 20px 14px 14px;
|
|
296
297
|
border-bottom: 1px solid var(--border);
|
|
297
298
|
}
|
|
298
299
|
|
|
@@ -307,12 +308,13 @@ h1 {
|
|
|
307
308
|
|
|
308
309
|
.section-title {
|
|
309
310
|
color: var(--text-main);
|
|
310
|
-
font-size:
|
|
311
|
-
font-weight:
|
|
311
|
+
font-size: 1rem;
|
|
312
|
+
font-weight: 500;
|
|
312
313
|
}
|
|
313
314
|
|
|
314
315
|
.section-description {
|
|
315
|
-
max-width:
|
|
316
|
+
max-width: none;
|
|
317
|
+
margin-top: 8px;
|
|
316
318
|
color: var(--text-muted);
|
|
317
319
|
font-size: 0.82rem;
|
|
318
320
|
line-height: 1.45;
|
|
@@ -320,12 +322,13 @@ h1 {
|
|
|
320
322
|
|
|
321
323
|
.form-grid {
|
|
322
324
|
display: grid;
|
|
323
|
-
grid-template-columns:
|
|
324
|
-
gap:
|
|
325
|
+
grid-template-columns: minmax(0, 1fr);
|
|
326
|
+
gap: 0;
|
|
327
|
+
padding: 0;
|
|
325
328
|
}
|
|
326
329
|
|
|
327
330
|
.form-grid.compact {
|
|
328
|
-
grid-template-columns:
|
|
331
|
+
grid-template-columns: minmax(0, 1fr);
|
|
329
332
|
}
|
|
330
333
|
|
|
331
334
|
.form-grid.single {
|
|
@@ -335,6 +338,19 @@ h1 {
|
|
|
335
338
|
|
|
336
339
|
.setting-row {
|
|
337
340
|
min-width: 0;
|
|
341
|
+
display: grid;
|
|
342
|
+
grid-template-columns: minmax(180px, 1fr) minmax(180px, 220px);
|
|
343
|
+
align-items: center;
|
|
344
|
+
gap: 18px;
|
|
345
|
+
min-height: 48px;
|
|
346
|
+
padding: 10px 12px;
|
|
347
|
+
border-top: 1px solid var(--border);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.setting-section .form-grid:first-child .setting-row:first-child,
|
|
351
|
+
.setting-section .section-heading + .form-grid .setting-row:first-child,
|
|
352
|
+
.custom-theme-panel .setting-row:first-child {
|
|
353
|
+
border-top: 0;
|
|
338
354
|
}
|
|
339
355
|
|
|
340
356
|
.setting-row.wide {
|
|
@@ -345,7 +361,7 @@ h1 {
|
|
|
345
361
|
.color-section label,
|
|
346
362
|
.toggle-row label {
|
|
347
363
|
display: block;
|
|
348
|
-
margin-bottom:
|
|
364
|
+
margin-bottom: 0;
|
|
349
365
|
color: var(--text-soft);
|
|
350
366
|
font-size: 0.83rem;
|
|
351
367
|
font-weight: 500;
|
|
@@ -358,10 +374,10 @@ input[type="url"],
|
|
|
358
374
|
select,
|
|
359
375
|
textarea {
|
|
360
376
|
width: 100%;
|
|
361
|
-
min-height:
|
|
362
|
-
padding: 10px
|
|
377
|
+
min-height: 32px;
|
|
378
|
+
padding: 6px 10px;
|
|
363
379
|
border: 1px solid var(--border);
|
|
364
|
-
border-radius:
|
|
380
|
+
border-radius: 7px;
|
|
365
381
|
outline: none;
|
|
366
382
|
background: var(--input-bg);
|
|
367
383
|
color: var(--text-main);
|
|
@@ -405,6 +421,21 @@ input[type="color"] {
|
|
|
405
421
|
cursor: pointer;
|
|
406
422
|
}
|
|
407
423
|
|
|
424
|
+
#sect-theme .form-grid {
|
|
425
|
+
padding: 0;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
#sect-theme .form-grid .setting-row {
|
|
429
|
+
min-height: 56px;
|
|
430
|
+
background: transparent;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
#sect-theme select {
|
|
434
|
+
height: 36px;
|
|
435
|
+
border-radius: 8px;
|
|
436
|
+
background: var(--input-bg);
|
|
437
|
+
}
|
|
438
|
+
|
|
408
439
|
.input-group {
|
|
409
440
|
display: flex;
|
|
410
441
|
align-items: stretch;
|
|
@@ -450,14 +481,16 @@ input[type="color"] {
|
|
|
450
481
|
}
|
|
451
482
|
|
|
452
483
|
.toggle-row {
|
|
453
|
-
display:
|
|
484
|
+
display: grid;
|
|
485
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
454
486
|
align-items: center;
|
|
455
487
|
justify-content: space-between;
|
|
456
488
|
gap: 20px;
|
|
457
|
-
|
|
489
|
+
min-height: 58px;
|
|
490
|
+
padding: 10px 12px;
|
|
458
491
|
border: 1px solid var(--border);
|
|
459
492
|
border-radius: 11px;
|
|
460
|
-
background:
|
|
493
|
+
background: transparent;
|
|
461
494
|
}
|
|
462
495
|
|
|
463
496
|
.toggle-row label {
|
|
@@ -592,9 +625,9 @@ input:checked + .toggle-slider::before {
|
|
|
592
625
|
|
|
593
626
|
.btn-primary {
|
|
594
627
|
border: 1px solid transparent;
|
|
595
|
-
background:
|
|
628
|
+
background: var(--accent);
|
|
596
629
|
color: #ffffff;
|
|
597
|
-
box-shadow:
|
|
630
|
+
box-shadow: none;
|
|
598
631
|
}
|
|
599
632
|
|
|
600
633
|
.btn-primary:hover,
|
|
@@ -607,7 +640,7 @@ input:checked + .toggle-slider::before {
|
|
|
607
640
|
|
|
608
641
|
.btn-secondary {
|
|
609
642
|
border: 1px solid var(--border);
|
|
610
|
-
background:
|
|
643
|
+
background: #252526;
|
|
611
644
|
color: var(--text-soft);
|
|
612
645
|
}
|
|
613
646
|
|
|
@@ -642,36 +675,62 @@ input:checked + .toggle-slider::before {
|
|
|
642
675
|
.theme-grid {
|
|
643
676
|
display: grid;
|
|
644
677
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
645
|
-
gap:
|
|
678
|
+
gap: 10px;
|
|
679
|
+
padding: 14px;
|
|
646
680
|
}
|
|
647
681
|
|
|
648
682
|
.theme-card {
|
|
683
|
+
position: relative;
|
|
649
684
|
display: flex;
|
|
650
685
|
flex-direction: column;
|
|
651
|
-
gap:
|
|
686
|
+
gap: 10px;
|
|
687
|
+
min-height: 102px;
|
|
652
688
|
padding: 10px;
|
|
653
689
|
border: 1px solid var(--border);
|
|
654
|
-
border-radius:
|
|
655
|
-
background: var(--
|
|
690
|
+
border-radius: 10px;
|
|
691
|
+
background: var(--input-bg);
|
|
656
692
|
color: var(--text-soft);
|
|
657
693
|
cursor: pointer;
|
|
658
694
|
text-align: left;
|
|
695
|
+
overflow: hidden;
|
|
696
|
+
transition: border-color 0.16s, background 0.16s, color 0.16s, transform 0.16s, box-shadow 0.16s;
|
|
659
697
|
}
|
|
660
698
|
|
|
661
|
-
.theme-card:hover
|
|
662
|
-
|
|
663
|
-
border-color:
|
|
699
|
+
.theme-card:hover {
|
|
700
|
+
background: var(--surface-hover);
|
|
701
|
+
border-color: var(--border-strong);
|
|
664
702
|
color: var(--text-main);
|
|
665
703
|
}
|
|
666
704
|
|
|
667
705
|
.theme-card.active {
|
|
668
|
-
|
|
706
|
+
border-color: var(--accent);
|
|
707
|
+
color: var(--text-main);
|
|
708
|
+
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.theme-card.active::after {
|
|
712
|
+
content: "";
|
|
713
|
+
position: absolute;
|
|
714
|
+
top: 10px;
|
|
715
|
+
right: 10px;
|
|
716
|
+
width: 8px;
|
|
717
|
+
height: 8px;
|
|
718
|
+
border-radius: 999px;
|
|
719
|
+
background: var(--accent);
|
|
720
|
+
box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 70%, transparent);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.theme-card span {
|
|
724
|
+
font-size: 0.88rem;
|
|
725
|
+
font-weight: 500;
|
|
669
726
|
}
|
|
670
727
|
|
|
671
728
|
.theme-preview {
|
|
672
729
|
width: 100%;
|
|
673
730
|
height: 54px;
|
|
674
731
|
border-radius: 8px;
|
|
732
|
+
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
733
|
+
box-shadow: inset 0 -18px 30px rgba(0, 0, 0, 0.12);
|
|
675
734
|
}
|
|
676
735
|
|
|
677
736
|
.dark-preview {
|
|
@@ -692,11 +751,12 @@ input:checked + .toggle-slider::before {
|
|
|
692
751
|
}
|
|
693
752
|
|
|
694
753
|
.custom-theme-panel {
|
|
695
|
-
margin
|
|
696
|
-
padding:
|
|
754
|
+
margin: 0 14px 14px;
|
|
755
|
+
padding: 0;
|
|
697
756
|
border: 1px dashed var(--border-strong);
|
|
698
|
-
border-radius:
|
|
699
|
-
background: var(--
|
|
757
|
+
border-radius: 10px;
|
|
758
|
+
background: var(--input-bg);
|
|
759
|
+
overflow: hidden;
|
|
700
760
|
}
|
|
701
761
|
|
|
702
762
|
.custom-theme-panel .setting-row + .setting-row {
|
|
@@ -711,10 +771,12 @@ input:checked + .toggle-slider::before {
|
|
|
711
771
|
}
|
|
712
772
|
|
|
713
773
|
.color-section {
|
|
714
|
-
display:
|
|
715
|
-
|
|
774
|
+
display: grid;
|
|
775
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
776
|
+
align-items: center;
|
|
716
777
|
justify-content: space-between;
|
|
717
778
|
gap: 20px;
|
|
779
|
+
padding: 14px;
|
|
718
780
|
}
|
|
719
781
|
|
|
720
782
|
.color-presets {
|
|
@@ -724,12 +786,13 @@ input:checked + .toggle-slider::before {
|
|
|
724
786
|
}
|
|
725
787
|
|
|
726
788
|
.color-dot {
|
|
727
|
-
width:
|
|
728
|
-
height:
|
|
789
|
+
width: 31px;
|
|
790
|
+
height: 31px;
|
|
729
791
|
border: 3px solid transparent;
|
|
730
792
|
border-radius: 50%;
|
|
731
793
|
cursor: pointer;
|
|
732
|
-
|
|
794
|
+
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
|
|
795
|
+
transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
|
|
733
796
|
}
|
|
734
797
|
|
|
735
798
|
.color-dot:hover {
|
|
@@ -738,7 +801,7 @@ input:checked + .toggle-slider::before {
|
|
|
738
801
|
|
|
739
802
|
.color-dot.active {
|
|
740
803
|
border-color: #ffffff;
|
|
741
|
-
box-shadow: 0 0 0 1px rgba(
|
|
804
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 44%, transparent), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
|
|
742
805
|
}
|
|
743
806
|
|
|
744
807
|
.accent-purple { background: #8b5cf6; }
|
|
@@ -888,9 +951,10 @@ kbd {
|
|
|
888
951
|
.settings-footer {
|
|
889
952
|
justify-content: space-between;
|
|
890
953
|
gap: 14px;
|
|
891
|
-
min-height:
|
|
892
|
-
padding:
|
|
954
|
+
min-height: 64px;
|
|
955
|
+
padding: 12px 20px;
|
|
893
956
|
border-top: 1px solid var(--border);
|
|
957
|
+
background: var(--panel-bg);
|
|
894
958
|
}
|
|
895
959
|
|
|
896
960
|
.settings-footer .btn-danger {
|
package/src/UI/settings.html
CHANGED
|
@@ -434,6 +434,15 @@
|
|
|
434
434
|
<option value="'Sarabun', sans-serif">Sarabun (Formal Thai)</option>
|
|
435
435
|
</select>
|
|
436
436
|
</div>
|
|
437
|
+
<div class="setting-row">
|
|
438
|
+
<label for="font-size-select">Font Size</label>
|
|
439
|
+
<select id="font-size-select">
|
|
440
|
+
<option value="14px">Small</option>
|
|
441
|
+
<option value="15px">Medium (Default)</option>
|
|
442
|
+
<option value="16px">Large</option>
|
|
443
|
+
<option value="17px">Extra Large</option>
|
|
444
|
+
</select>
|
|
445
|
+
</div>
|
|
437
446
|
</div>
|
|
438
447
|
</section>
|
|
439
448
|
</div>
|
package/src/UI/settings.js
CHANGED
|
@@ -8,10 +8,12 @@ const DEFAULT_CONFIG = {
|
|
|
8
8
|
apiKey: '',
|
|
9
9
|
geminiModel: 'gemini-2.5-flash',
|
|
10
10
|
language: 'th-TH',
|
|
11
|
+
assistantMode: 'chat',
|
|
11
12
|
proactiveInterval: 60,
|
|
12
13
|
proactiveCooldown: 120,
|
|
13
14
|
glassBlur: 'blur(16px)',
|
|
14
15
|
fontFamily: "'Outfit', sans-serif",
|
|
16
|
+
fontSize: '15px',
|
|
15
17
|
aiProvider: 'gemini',
|
|
16
18
|
ollamaModel: 'llama3:latest',
|
|
17
19
|
enableVoiceReply: true,
|
|
@@ -55,8 +57,15 @@ function applyConfig(config) {
|
|
|
55
57
|
} else {
|
|
56
58
|
document.getElementById('custom-theme-controls').style.display = 'none';
|
|
57
59
|
// Reset dynamic style variables if not custom
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
[
|
|
61
|
+
'--bg-gradient',
|
|
62
|
+
'--panel-bg',
|
|
63
|
+
'--sidebar-bg',
|
|
64
|
+
'--chrome-bg',
|
|
65
|
+
'--surface-bg',
|
|
66
|
+
'--surface-strong',
|
|
67
|
+
'--input-bg'
|
|
68
|
+
].forEach(name => document.documentElement.style.removeProperty(name));
|
|
60
69
|
}
|
|
61
70
|
|
|
62
71
|
// Apply accent color
|
|
@@ -171,6 +180,9 @@ function applyConfig(config) {
|
|
|
171
180
|
document.getElementById('font-family-select').value = config.fontFamily || "'Outfit', sans-serif";
|
|
172
181
|
document.body.style.fontFamily = config.fontFamily || "'Outfit', sans-serif";
|
|
173
182
|
|
|
183
|
+
document.getElementById('font-size-select').value = config.fontSize || '15px';
|
|
184
|
+
document.documentElement.style.fontSize = config.fontSize || '15px';
|
|
185
|
+
|
|
174
186
|
// Update active theme card
|
|
175
187
|
document.querySelectorAll('.theme-card').forEach(card => {
|
|
176
188
|
card.classList.toggle('active', card.dataset.theme === config.theme);
|
|
@@ -423,6 +435,11 @@ function applyCustomThemeStyles(cfg) {
|
|
|
423
435
|
// Convert hex to rgba for panel bg to keep transparency
|
|
424
436
|
const panelRgb = hexToRgb(cfg.customPanelBg);
|
|
425
437
|
document.documentElement.style.setProperty('--panel-bg', `rgba(${panelRgb.r}, ${panelRgb.g}, ${panelRgb.b}, 0.75)`);
|
|
438
|
+
document.documentElement.style.setProperty('--sidebar-bg', `rgba(${panelRgb.r}, ${panelRgb.g}, ${panelRgb.b}, 0.82)`);
|
|
439
|
+
document.documentElement.style.setProperty('--chrome-bg', `rgba(${panelRgb.r}, ${panelRgb.g}, ${panelRgb.b}, 0.78)`);
|
|
440
|
+
document.documentElement.style.setProperty('--surface-bg', `rgba(${panelRgb.r}, ${panelRgb.g}, ${panelRgb.b}, 0.42)`);
|
|
441
|
+
document.documentElement.style.setProperty('--surface-strong', `rgba(${panelRgb.r}, ${panelRgb.g}, ${panelRgb.b}, 0.62)`);
|
|
442
|
+
document.documentElement.style.setProperty('--input-bg', `rgba(${panelRgb.r}, ${panelRgb.g}, ${panelRgb.b}, 0.58)`);
|
|
426
443
|
updateCustomPreviewBox(cfg);
|
|
427
444
|
}
|
|
428
445
|
|
|
@@ -455,6 +472,21 @@ document.getElementById('custom-panel-bg').addEventListener('input', (e) => {
|
|
|
455
472
|
if (currentConfig.theme === 'custom') applyCustomThemeStyles(currentConfig);
|
|
456
473
|
});
|
|
457
474
|
|
|
475
|
+
document.getElementById('glass-blur-select').addEventListener('change', (e) => {
|
|
476
|
+
currentConfig.glassBlur = e.target.value;
|
|
477
|
+
document.documentElement.style.setProperty('--glass-blur', e.target.value);
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
document.getElementById('font-family-select').addEventListener('change', (e) => {
|
|
481
|
+
currentConfig.fontFamily = e.target.value;
|
|
482
|
+
document.body.style.fontFamily = e.target.value;
|
|
483
|
+
});
|
|
484
|
+
|
|
485
|
+
document.getElementById('font-size-select').addEventListener('change', (e) => {
|
|
486
|
+
currentConfig.fontSize = e.target.value;
|
|
487
|
+
document.documentElement.style.fontSize = e.target.value;
|
|
488
|
+
});
|
|
489
|
+
|
|
458
490
|
// Proactive sliders
|
|
459
491
|
function formatSeconds(s) {
|
|
460
492
|
if (s < 60) return `${s} sec`;
|
|
@@ -560,6 +592,7 @@ document.getElementById('save-btn').addEventListener('click', async () => {
|
|
|
560
592
|
currentConfig.systemTextColor = document.getElementById('system-text-color').value;
|
|
561
593
|
currentConfig.glassBlur = document.getElementById('glass-blur-select').value;
|
|
562
594
|
currentConfig.fontFamily = document.getElementById('font-family-select').value;
|
|
595
|
+
currentConfig.fontSize = document.getElementById('font-size-select').value;
|
|
563
596
|
|
|
564
597
|
currentConfig.customBgStart = document.getElementById('custom-bg-start').value;
|
|
565
598
|
currentConfig.customBgEnd = document.getElementById('custom-bg-end').value;
|
package/src/UI/spotlight.js
CHANGED
|
@@ -57,7 +57,7 @@ spotlightInput.addEventListener('input', () => {
|
|
|
57
57
|
label: `Result: ${result}`,
|
|
58
58
|
desc: 'Calculation result (Press Enter to copy)',
|
|
59
59
|
icon: '🧮',
|
|
60
|
-
action: { type: '
|
|
60
|
+
action: { type: 'clipboard_write', target: result.toString() }
|
|
61
61
|
}]);
|
|
62
62
|
return;
|
|
63
63
|
} catch {}
|
|
@@ -119,17 +119,21 @@ spotlightInput.addEventListener('keydown', (e) => {
|
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
function handleAction(action) {
|
|
122
|
+
async function handleAction(action) {
|
|
123
123
|
if (action.type === 'chat') {
|
|
124
124
|
window.spotlightAPI.submit(action.query);
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (window.spotlightAPI.executeAction) {
|
|
129
|
+
const result = await window.spotlightAPI.executeAction(action);
|
|
130
|
+
if (!result || result.success === false) {
|
|
131
|
+
window.spotlightAPI.submit(`Spotlight action failed: ${result?.message || 'Unknown error'}`);
|
|
132
|
+
}
|
|
133
|
+
return;
|
|
132
134
|
}
|
|
135
|
+
|
|
136
|
+
window.spotlightAPI.submit(action.target || action.value || '');
|
|
133
137
|
}
|
|
134
138
|
|
|
135
139
|
// Auto-focus on show
|