claude-remote 0.5.2 → 0.6.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/lib/cli.js +1 -0
- package/lib/http-server.js +5 -0
- package/lib/state.js +1 -0
- package/package.json +3 -2
- package/server.js +6 -0
- package/web/index.html +346 -0
- package/web/main.js +68 -0
- package/web/modules/chat-cache.js +118 -0
- package/web/modules/confirm.js +25 -0
- package/web/modules/constants.js +59 -0
- package/web/modules/debug.js +81 -0
- package/web/modules/dir-picker.js +128 -0
- package/web/modules/hub.js +619 -0
- package/web/modules/image-upload.js +290 -0
- package/web/modules/input.js +279 -0
- package/web/modules/interactions.js +304 -0
- package/web/modules/keyboard.js +78 -0
- package/web/modules/model-picker.js +47 -0
- package/web/modules/permissions.js +94 -0
- package/web/modules/renderer.js +863 -0
- package/web/modules/sessions.js +108 -0
- package/web/modules/settings.js +74 -0
- package/web/modules/state.js +59 -0
- package/web/modules/toast.js +68 -0
- package/web/modules/todo.js +292 -0
- package/web/modules/utils.js +102 -0
- package/web/modules/waiting.js +93 -0
- package/web/modules/websocket.js +483 -0
- package/web/styles.css +1722 -0
package/web/styles.css
ADDED
|
@@ -0,0 +1,1722 @@
|
|
|
1
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
2
|
+
:root {
|
|
3
|
+
--keyboard-offset: 0px;
|
|
4
|
+
--bg: #f5f5f0;
|
|
5
|
+
--bg-white: #ffffff;
|
|
6
|
+
--bg-hover: #eeeee8;
|
|
7
|
+
--border: #e2e2da;
|
|
8
|
+
--border-light: #ebebeb;
|
|
9
|
+
--text: #1a1a1a;
|
|
10
|
+
--text-secondary: #6b6b6b;
|
|
11
|
+
--text-muted: #9a9a9a;
|
|
12
|
+
--accent: #2d8a6e;
|
|
13
|
+
--accent-light: #e8f5ef;
|
|
14
|
+
--accent-bg: #f0faf5;
|
|
15
|
+
--user-accent: #1967d2;
|
|
16
|
+
--error: #d93025;
|
|
17
|
+
--error-bg: #fce8e6;
|
|
18
|
+
--timeline: #d0d0c8;
|
|
19
|
+
--code-bg: #f8f8f5;
|
|
20
|
+
--radius: 12px;
|
|
21
|
+
--radius-sm: 8px;
|
|
22
|
+
--mono: 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
|
|
23
|
+
}
|
|
24
|
+
html, body {
|
|
25
|
+
height: 100%; background: var(--bg);
|
|
26
|
+
color: var(--text);
|
|
27
|
+
font-family: 'Noto Sans SC', 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
28
|
+
font-size: 15px; line-height: 1.65; overflow: hidden;
|
|
29
|
+
-webkit-font-smoothing: antialiased;
|
|
30
|
+
-webkit-tap-highlight-color: transparent;
|
|
31
|
+
-webkit-touch-callout: none;
|
|
32
|
+
}
|
|
33
|
+
.hidden { display: none !important; }
|
|
34
|
+
|
|
35
|
+
/* ===== Hub Screen ===== */
|
|
36
|
+
#connect-screen {
|
|
37
|
+
display: flex; flex-direction: column;
|
|
38
|
+
height: 100vh; height: 100dvh;
|
|
39
|
+
background: var(--bg);
|
|
40
|
+
}
|
|
41
|
+
.hub-header {
|
|
42
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
43
|
+
padding: 12px 16px;
|
|
44
|
+
padding-top: calc(12px + env(safe-area-inset-top, 0px));
|
|
45
|
+
border-bottom: 1px solid var(--border);
|
|
46
|
+
flex-shrink: 0;
|
|
47
|
+
min-height: calc(52px + env(safe-area-inset-top, 0px));
|
|
48
|
+
}
|
|
49
|
+
.hub-header-left {
|
|
50
|
+
display: flex; align-items: center; gap: 10px;
|
|
51
|
+
}
|
|
52
|
+
.hub-logo-icon { color: var(--accent); opacity: .7; }
|
|
53
|
+
.hub-header-title {
|
|
54
|
+
font-size: 18px; font-weight: 700; color: var(--text);
|
|
55
|
+
}
|
|
56
|
+
.hub-add-btn {
|
|
57
|
+
width: 40px; height: 40px; border: none; border-radius: 10px;
|
|
58
|
+
background: transparent; color: var(--accent); cursor: pointer;
|
|
59
|
+
display: flex; align-items: center; justify-content: center;
|
|
60
|
+
transition: all .15s;
|
|
61
|
+
}
|
|
62
|
+
.hub-add-btn:hover, .hub-add-btn:active { background: var(--accent-light); }
|
|
63
|
+
|
|
64
|
+
.hub-body {
|
|
65
|
+
flex: 1; overflow-y: auto; overflow-x: hidden;
|
|
66
|
+
padding: 8px 0 24px;
|
|
67
|
+
-webkit-overflow-scrolling: touch;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.hub-empty {
|
|
71
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
72
|
+
padding: 80px 24px; color: var(--text-muted); text-align: center;
|
|
73
|
+
}
|
|
74
|
+
.hub-empty svg { opacity: .3; margin-bottom: 16px; }
|
|
75
|
+
.hub-empty p { font-size: 16px; font-weight: 600; color: var(--text-secondary); }
|
|
76
|
+
.hub-empty-sub { font-size: 14px; font-weight: 400; color: var(--text-muted); margin-top: 4px; }
|
|
77
|
+
|
|
78
|
+
.hub-section { padding: 0 16px; }
|
|
79
|
+
.hub-section-header {
|
|
80
|
+
font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
|
|
81
|
+
color: var(--text-muted); padding: 12px 0 6px;
|
|
82
|
+
}
|
|
83
|
+
.hub-card-list { display: flex; flex-direction: column; gap: 6px; }
|
|
84
|
+
|
|
85
|
+
.hub-card {
|
|
86
|
+
display: flex; align-items: center; gap: 12px;
|
|
87
|
+
padding: 14px 16px; border-radius: var(--radius);
|
|
88
|
+
background: var(--bg-white); border: 1px solid var(--border);
|
|
89
|
+
cursor: pointer; transition: all .15s;
|
|
90
|
+
}
|
|
91
|
+
.hub-card:hover, .hub-card:active { border-color: var(--accent); background: var(--accent-bg); }
|
|
92
|
+
|
|
93
|
+
.hub-card-status {
|
|
94
|
+
width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
|
|
95
|
+
}
|
|
96
|
+
.hub-card-status.online { background: var(--accent); }
|
|
97
|
+
.hub-card-status.unstable { background: #d5a000; animation: pulse 1.2s infinite; }
|
|
98
|
+
.hub-card-status.offline { background: #bbb; }
|
|
99
|
+
.hub-card-status.probing { background: #e8a000; animation: pulse 1.2s infinite; }
|
|
100
|
+
|
|
101
|
+
.hub-card-info { flex: 1; min-width: 0; }
|
|
102
|
+
.hub-card-name {
|
|
103
|
+
font-size: 15px; font-weight: 600; color: var(--text);
|
|
104
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
105
|
+
}
|
|
106
|
+
.hub-card-addr {
|
|
107
|
+
font-size: 13px; color: var(--text-muted); font-family: var(--mono);
|
|
108
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
109
|
+
}
|
|
110
|
+
.hub-card-side {
|
|
111
|
+
display: flex; flex-direction: column; align-items: center; gap: 4px;
|
|
112
|
+
min-width: 72px; flex-shrink: 0;
|
|
113
|
+
}
|
|
114
|
+
.hub-card-ping {
|
|
115
|
+
min-width: 58px; padding: 3px 8px; border-radius: 999px;
|
|
116
|
+
font-size: 11px; font-weight: 700; text-align: center;
|
|
117
|
+
background: var(--bg-hover); color: var(--text-muted);
|
|
118
|
+
}
|
|
119
|
+
.hub-card-ping.excellent { background: #daf5e8; color: #18794e; }
|
|
120
|
+
.hub-card-ping.good { background: #dff1ff; color: #0f5ea8; }
|
|
121
|
+
.hub-card-ping.warn { background: #fff0bf; color: #9a6b00; }
|
|
122
|
+
.hub-card-ping.bad { background: #fde2de; color: #b42318; }
|
|
123
|
+
.hub-card-ping.probing { background: #fff0bf; color: #9a6b00; }
|
|
124
|
+
.hub-card-ping.offline { background: var(--bg-hover); color: var(--text-muted); }
|
|
125
|
+
.hub-card-ping.stale { box-shadow: inset 0 0 0 1px rgba(154, 107, 0, .18); }
|
|
126
|
+
.hub-card-time {
|
|
127
|
+
font-size: 12px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0;
|
|
128
|
+
}
|
|
129
|
+
.hub-card-edit {
|
|
130
|
+
width: 32px; height: 32px; border: none; border-radius: 8px;
|
|
131
|
+
background: transparent; color: var(--text-muted); cursor: pointer;
|
|
132
|
+
display: flex; align-items: center; justify-content: center;
|
|
133
|
+
transition: all .15s; flex-shrink: 0;
|
|
134
|
+
}
|
|
135
|
+
.hub-card-edit:hover, .hub-card-edit:active { background: var(--bg-hover); color: var(--text); }
|
|
136
|
+
|
|
137
|
+
@media (max-width: 420px) {
|
|
138
|
+
.hub-card { gap: 10px; padding: 12px 14px; }
|
|
139
|
+
.hub-card-side { min-width: 62px; }
|
|
140
|
+
.hub-card-ping { min-width: 52px; padding: 3px 6px; }
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
#hub-connect-overlay {
|
|
144
|
+
position: fixed; inset: 0;
|
|
145
|
+
background: rgba(245, 247, 250, .82);
|
|
146
|
+
backdrop-filter: blur(6px);
|
|
147
|
+
display: none; align-items: center; justify-content: center;
|
|
148
|
+
z-index: 180;
|
|
149
|
+
}
|
|
150
|
+
#hub-connect-overlay.visible { display: flex; }
|
|
151
|
+
.hub-connect-card {
|
|
152
|
+
width: min(280px, calc(100vw - 32px));
|
|
153
|
+
padding: 22px 20px;
|
|
154
|
+
border-radius: 18px;
|
|
155
|
+
background: rgba(255,255,255,.96);
|
|
156
|
+
border: 1px solid rgba(33, 98, 76, .12);
|
|
157
|
+
box-shadow: 0 16px 40px rgba(18, 35, 28, .14);
|
|
158
|
+
text-align: center;
|
|
159
|
+
}
|
|
160
|
+
.hub-connect-spinner {
|
|
161
|
+
width: 34px; height: 34px; margin: 0 auto 14px;
|
|
162
|
+
border-radius: 50%;
|
|
163
|
+
border: 3px solid rgba(42, 138, 107, .16);
|
|
164
|
+
border-top-color: var(--accent);
|
|
165
|
+
animation: spin .8s linear infinite;
|
|
166
|
+
}
|
|
167
|
+
.hub-connect-title {
|
|
168
|
+
font-size: 17px; font-weight: 700; color: var(--text);
|
|
169
|
+
}
|
|
170
|
+
.hub-connect-sub {
|
|
171
|
+
margin-top: 6px;
|
|
172
|
+
font-size: 13px; color: var(--text-muted);
|
|
173
|
+
word-break: break-word;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* Hub Add/Edit Dialog */
|
|
177
|
+
#hub-add-overlay {
|
|
178
|
+
position: fixed; inset: 0; background: rgba(0,0,0,.35);
|
|
179
|
+
display: none; align-items: flex-end; justify-content: center;
|
|
180
|
+
z-index: 200;
|
|
181
|
+
}
|
|
182
|
+
#hub-add-overlay.visible { display: flex; }
|
|
183
|
+
#hub-add-dialog {
|
|
184
|
+
width: 100%; max-width: 420px;
|
|
185
|
+
background: var(--bg-white); border-radius: 16px 16px 0 0;
|
|
186
|
+
padding: 24px 20px; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
|
|
187
|
+
animation: slideUp .2s ease;
|
|
188
|
+
margin-bottom: var(--keyboard-offset);
|
|
189
|
+
max-height: calc(100dvh - var(--keyboard-offset) - env(safe-area-inset-top, 0px) - 12px);
|
|
190
|
+
overflow-y: auto;
|
|
191
|
+
-webkit-overflow-scrolling: touch;
|
|
192
|
+
}
|
|
193
|
+
@keyframes slideUp { from{transform:translateY(100%)}to{transform:translateY(0)} }
|
|
194
|
+
.hub-dialog-title {
|
|
195
|
+
font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 16px;
|
|
196
|
+
}
|
|
197
|
+
.hub-dialog-label {
|
|
198
|
+
display: block; font-size: 13px; font-weight: 600;
|
|
199
|
+
color: var(--text-secondary); margin-bottom: 6px; margin-top: 12px;
|
|
200
|
+
}
|
|
201
|
+
.hub-dialog-label:first-of-type { margin-top: 0; }
|
|
202
|
+
#hub-dialog-addr, #hub-dialog-alias, #hub-dialog-token {
|
|
203
|
+
width: 100%; height: 46px; padding: 0 14px;
|
|
204
|
+
border: 1.5px solid var(--border); border-radius: var(--radius-sm);
|
|
205
|
+
font-size: 15px; color: var(--text); background: var(--bg);
|
|
206
|
+
outline: none; transition: border-color .15s;
|
|
207
|
+
}
|
|
208
|
+
#hub-dialog-addr { font-family: var(--mono); }
|
|
209
|
+
#hub-dialog-addr:focus, #hub-dialog-alias:focus, #hub-dialog-token:focus { border-color: var(--accent); }
|
|
210
|
+
.hub-dialog-token-row {
|
|
211
|
+
display: flex; gap: 8px; align-items: center;
|
|
212
|
+
}
|
|
213
|
+
.hub-dialog-token-row #hub-dialog-token { flex: 1; font-family: var(--mono); }
|
|
214
|
+
.hub-dialog-token-toggle {
|
|
215
|
+
width: 46px; height: 46px; border: 1.5px solid var(--border);
|
|
216
|
+
border-radius: var(--radius-sm); background: var(--bg);
|
|
217
|
+
color: var(--text-secondary); cursor: pointer; display: flex;
|
|
218
|
+
align-items: center; justify-content: center; flex-shrink: 0;
|
|
219
|
+
transition: border-color .15s, color .15s;
|
|
220
|
+
}
|
|
221
|
+
.hub-dialog-token-toggle:hover { border-color: var(--accent); color: var(--text); }
|
|
222
|
+
.hub-dialog-error {
|
|
223
|
+
margin-top: 8px; font-size: 13px; color: var(--error); min-height: 18px;
|
|
224
|
+
}
|
|
225
|
+
.hub-dialog-actions {
|
|
226
|
+
display: flex; gap: 8px; margin-top: 16px;
|
|
227
|
+
}
|
|
228
|
+
.hub-dialog-btn {
|
|
229
|
+
flex: 1; height: 46px; border: none; border-radius: var(--radius-sm);
|
|
230
|
+
font-size: 15px; font-weight: 600; cursor: pointer; transition: all .15s;
|
|
231
|
+
}
|
|
232
|
+
.hub-dialog-btn.cancel {
|
|
233
|
+
background: var(--bg-hover); color: var(--text-secondary);
|
|
234
|
+
}
|
|
235
|
+
.hub-dialog-btn.cancel:hover { background: var(--border); }
|
|
236
|
+
.hub-dialog-btn.save {
|
|
237
|
+
background: var(--accent); color: #fff;
|
|
238
|
+
}
|
|
239
|
+
.hub-dialog-btn.save:hover { background: #247a5e; }
|
|
240
|
+
.hub-dialog-btn.delete {
|
|
241
|
+
background: var(--error-bg); color: var(--error); flex: 0 0 auto; padding: 0 20px;
|
|
242
|
+
}
|
|
243
|
+
.hub-dialog-btn.delete:hover { background: #f5c6c2; }
|
|
244
|
+
|
|
245
|
+
/* ===== Main App ===== */
|
|
246
|
+
#app {
|
|
247
|
+
display: flex; flex-direction: column;
|
|
248
|
+
height: 100vh; height: 100dvh;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* ===== Header ===== */
|
|
252
|
+
header {
|
|
253
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
254
|
+
padding: 10px 12px;
|
|
255
|
+
padding-top: 10px;
|
|
256
|
+
padding-top: calc(16px + env(safe-area-inset-top, 0px));
|
|
257
|
+
background: var(--bg);
|
|
258
|
+
border-bottom: 1px solid var(--border);
|
|
259
|
+
flex-shrink: 0; z-index: 10;
|
|
260
|
+
gap: 0;
|
|
261
|
+
min-height: 56px;
|
|
262
|
+
min-height: calc(56px + env(safe-area-inset-top, 0px));
|
|
263
|
+
}
|
|
264
|
+
.header-left {
|
|
265
|
+
display: flex; align-items: center; gap: 8px;
|
|
266
|
+
min-width: 0; flex: 1;
|
|
267
|
+
}
|
|
268
|
+
.header-info { min-width: 0; flex: 1; }
|
|
269
|
+
.header-left h1 {
|
|
270
|
+
font-size: 14px; font-weight: 600; color: var(--text);
|
|
271
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
272
|
+
line-height: 1.3;
|
|
273
|
+
}
|
|
274
|
+
.header-meta {
|
|
275
|
+
font-size: 11px; color: var(--text-muted); font-weight: 400;
|
|
276
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
277
|
+
display: flex; align-items: center; gap: 6px; line-height: 1.3;
|
|
278
|
+
}
|
|
279
|
+
.hbtn {
|
|
280
|
+
width: 40px; height: 40px; border: none; border-radius: 10px;
|
|
281
|
+
background: transparent; color: var(--text-muted); cursor: pointer;
|
|
282
|
+
display: flex; align-items: center; justify-content: center;
|
|
283
|
+
transition: all 0.15s; flex-shrink: 0;
|
|
284
|
+
}
|
|
285
|
+
.hbtn:hover, .hbtn:active { background: var(--bg-hover); color: var(--text); }
|
|
286
|
+
.status-dot {
|
|
287
|
+
width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
|
|
288
|
+
}
|
|
289
|
+
.status-dot.connected { background: var(--accent); }
|
|
290
|
+
.status-dot.disconnected { background: var(--error); }
|
|
291
|
+
.status-dot.starting { background: #e8a000; animation: pulse 1.2s infinite; }
|
|
292
|
+
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.3} }
|
|
293
|
+
|
|
294
|
+
/* ===== Chat Area ===== */
|
|
295
|
+
#chat-area {
|
|
296
|
+
flex: 1; overflow-y: auto; overflow-x: hidden;
|
|
297
|
+
padding: 0 0 16px;
|
|
298
|
+
-webkit-overflow-scrolling: touch;
|
|
299
|
+
overscroll-behavior: contain;
|
|
300
|
+
min-height: 0;
|
|
301
|
+
}
|
|
302
|
+
#chat-area::-webkit-scrollbar { width: 3px; }
|
|
303
|
+
#chat-area::-webkit-scrollbar-thumb { background: var(--timeline); border-radius: 2px; }
|
|
304
|
+
#messages { max-width: 720px; margin: 0 auto; padding: 12px 16px; }
|
|
305
|
+
|
|
306
|
+
/* ===== User Message ===== */
|
|
307
|
+
.user-msg {
|
|
308
|
+
margin: 16px 0 8px;
|
|
309
|
+
margin-left: auto;
|
|
310
|
+
max-width: 80%;
|
|
311
|
+
width: fit-content;
|
|
312
|
+
padding: 10px 16px;
|
|
313
|
+
background: #1967d2;
|
|
314
|
+
color: #fff;
|
|
315
|
+
border-radius: 18px 18px 4px 18px;
|
|
316
|
+
font-size: 15px; line-height: 1.5;
|
|
317
|
+
word-break: break-word;
|
|
318
|
+
animation: fadeUp .2s ease;
|
|
319
|
+
}
|
|
320
|
+
.user-msg p { margin: 0; }
|
|
321
|
+
.user-msg p + p { margin-top: 4px; }
|
|
322
|
+
.user-msg code {
|
|
323
|
+
background: rgba(255,255,255,.18); border: none;
|
|
324
|
+
padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: .88em;
|
|
325
|
+
color: #fff;
|
|
326
|
+
}
|
|
327
|
+
.user-msg pre {
|
|
328
|
+
background: rgba(255,255,255,.12);
|
|
329
|
+
border: none; border-radius: 8px; padding: 10px; margin: 6px 0;
|
|
330
|
+
overflow-x: auto;
|
|
331
|
+
}
|
|
332
|
+
.user-msg pre code { background: none; padding: 0; font-size: 13px; }
|
|
333
|
+
.user-msg a { color: #b3d4ff; }
|
|
334
|
+
@keyframes fadeUp { from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)} }
|
|
335
|
+
|
|
336
|
+
/* Toast */
|
|
337
|
+
#toast-container {
|
|
338
|
+
position: fixed;
|
|
339
|
+
left: 12px;
|
|
340
|
+
right: 12px;
|
|
341
|
+
top: 12px;
|
|
342
|
+
top: calc(12px + env(safe-area-inset-top, 0px));
|
|
343
|
+
z-index: 9999; display: flex; flex-direction: column; gap: 8px;
|
|
344
|
+
align-items: center;
|
|
345
|
+
pointer-events: none;
|
|
346
|
+
}
|
|
347
|
+
.toast {
|
|
348
|
+
width: min(100%, 420px);
|
|
349
|
+
background: rgba(26, 26, 26, .96);
|
|
350
|
+
color: #fff;
|
|
351
|
+
padding: 12px 14px;
|
|
352
|
+
border-radius: 16px;
|
|
353
|
+
font-size: 14px;
|
|
354
|
+
line-height: 1.5;
|
|
355
|
+
white-space: pre-wrap;
|
|
356
|
+
word-break: break-word;
|
|
357
|
+
overflow-wrap: anywhere;
|
|
358
|
+
text-align: left;
|
|
359
|
+
animation: toastIn .3s ease, toastOut .3s ease 3.1s forwards;
|
|
360
|
+
box-shadow: 0 10px 24px rgba(0,0,0,.18);
|
|
361
|
+
border: 1px solid rgba(255,255,255,.08);
|
|
362
|
+
}
|
|
363
|
+
@keyframes toastIn { from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)} }
|
|
364
|
+
@keyframes toastOut { from{opacity:1}to{opacity:0;transform:translateY(-10px)} }
|
|
365
|
+
|
|
366
|
+
@media (max-width: 640px) {
|
|
367
|
+
#toast-container {
|
|
368
|
+
left: 10px;
|
|
369
|
+
right: 10px;
|
|
370
|
+
top: calc(10px + env(safe-area-inset-top, 0px));
|
|
371
|
+
}
|
|
372
|
+
.toast {
|
|
373
|
+
width: 100%;
|
|
374
|
+
font-size: 13px;
|
|
375
|
+
padding: 11px 12px;
|
|
376
|
+
border-radius: 14px;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* ===== Assistant Text ===== */
|
|
381
|
+
.assistant-text {
|
|
382
|
+
margin: 0px 0;
|
|
383
|
+
font-size: 15px; line-height: 1.7;
|
|
384
|
+
color: var(--text);
|
|
385
|
+
animation: fadeUp .2s ease;
|
|
386
|
+
}
|
|
387
|
+
.assistant-text p { margin: 8px 0; }
|
|
388
|
+
.assistant-text h1,.assistant-text h2,.assistant-text h3 { margin: 16px 0 8px; font-weight: 600; color: var(--text); }
|
|
389
|
+
.assistant-text h1{font-size:1.25em} .assistant-text h2{font-size:1.12em} .assistant-text h3{font-size:1.05em}
|
|
390
|
+
.assistant-text ul,.assistant-text ol { margin: 8px 0 8px 24px; }
|
|
391
|
+
.assistant-text li { margin: 4px 0; }
|
|
392
|
+
.assistant-text a { color: var(--user-accent); text-decoration: none; }
|
|
393
|
+
.assistant-text a:hover { text-decoration: underline; }
|
|
394
|
+
.assistant-text code {
|
|
395
|
+
background: var(--code-bg); border: 1px solid var(--border);
|
|
396
|
+
padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: .88em;
|
|
397
|
+
}
|
|
398
|
+
.assistant-text pre {
|
|
399
|
+
background: var(--code-bg); border: 1px solid var(--border);
|
|
400
|
+
border-radius: var(--radius-sm); padding: 14px; margin: 10px 0;
|
|
401
|
+
overflow-x: auto;
|
|
402
|
+
}
|
|
403
|
+
.assistant-text pre code {
|
|
404
|
+
background: none; border: none; padding: 0;
|
|
405
|
+
font-size: 13px; line-height: 1.55;
|
|
406
|
+
}
|
|
407
|
+
.assistant-text blockquote {
|
|
408
|
+
border-left: 3px solid var(--accent); padding-left: 14px;
|
|
409
|
+
margin: 10px 0; color: var(--text-secondary);
|
|
410
|
+
}
|
|
411
|
+
.assistant-text table { border-collapse: collapse; margin: 10px 0; width: 100%; font-size: 14px; }
|
|
412
|
+
.assistant-text th,.assistant-text td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
|
|
413
|
+
.assistant-text th { background: var(--bg-hover); font-weight: 600; }
|
|
414
|
+
.assistant-text hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
|
|
415
|
+
|
|
416
|
+
/* ===== Thinking ===== */
|
|
417
|
+
.thinking {
|
|
418
|
+
margin: 0; border-radius: var(--radius-sm);
|
|
419
|
+
overflow: hidden; animation: fadeUp .2s ease;
|
|
420
|
+
}
|
|
421
|
+
.thinking-toggle {
|
|
422
|
+
display: flex; align-items: baseline; gap: 8px;
|
|
423
|
+
padding: 0; cursor: pointer; user-select: none;
|
|
424
|
+
color: var(--text-muted); font-size: 13px;
|
|
425
|
+
line-height: 1.7;
|
|
426
|
+
}
|
|
427
|
+
.thinking-toggle:hover { color: var(--text-secondary); }
|
|
428
|
+
.thinking-chevron {
|
|
429
|
+
width: 16px; height: 16px; transition: transform .2s;
|
|
430
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
431
|
+
flex-shrink: 0; align-self: center;
|
|
432
|
+
}
|
|
433
|
+
.thinking.open .thinking-chevron { transform: rotate(90deg); }
|
|
434
|
+
.thinking-content {
|
|
435
|
+
display: none; padding: 8px 0 8px 24px;
|
|
436
|
+
font-size: 13px; color: var(--text-muted); line-height: 1.6;
|
|
437
|
+
white-space: pre-wrap; word-break: break-word;
|
|
438
|
+
max-height: 300px; overflow-y: auto;
|
|
439
|
+
overscroll-behavior-y: contain;
|
|
440
|
+
}
|
|
441
|
+
.thinking.open .thinking-content { display: block; }
|
|
442
|
+
.thinking + .assistant-text { margin-top: 0; }
|
|
443
|
+
|
|
444
|
+
/* ===== Step Group (tool calls) ===== */
|
|
445
|
+
.step-group { margin: 0; animation: fadeUp .2s ease; }
|
|
446
|
+
.assistant-text + .step-group { margin-top: -4px; }
|
|
447
|
+
.step-group-header {
|
|
448
|
+
display: flex; align-items: center; gap: 8px;
|
|
449
|
+
padding: 4px 0; cursor: pointer; user-select: none;
|
|
450
|
+
color: var(--text-muted); font-size: 14px; font-weight: 500;
|
|
451
|
+
min-height: 36px;
|
|
452
|
+
}
|
|
453
|
+
.step-group-header:hover { color: var(--text-secondary); }
|
|
454
|
+
.step-chevron {
|
|
455
|
+
width: 18px; height: 18px; transition: transform .2s;
|
|
456
|
+
display: flex; align-items: center; justify-content: center;
|
|
457
|
+
}
|
|
458
|
+
.step-group.open .step-chevron { transform: rotate(90deg); }
|
|
459
|
+
.step-list { display: none; padding: 0; }
|
|
460
|
+
.step-group.open .step-list { display: block; }
|
|
461
|
+
|
|
462
|
+
/* ===== Step Item (single tool call) ===== */
|
|
463
|
+
.step-item {
|
|
464
|
+
display: flex; align-items: baseline; gap: 10px;
|
|
465
|
+
padding: 6px 8px 6px 0; min-height: 40px;
|
|
466
|
+
position: relative; cursor: pointer;
|
|
467
|
+
border-radius: var(--radius-sm);
|
|
468
|
+
transition: background .1s;
|
|
469
|
+
overflow: hidden;
|
|
470
|
+
}
|
|
471
|
+
.step-item:hover, .step-item:active { background: var(--bg-hover); }
|
|
472
|
+
.step-item::before {
|
|
473
|
+
content: ''; position: absolute;
|
|
474
|
+
left: 15px; top: 0; bottom: 0; width: 1.5px;
|
|
475
|
+
background: var(--timeline);
|
|
476
|
+
}
|
|
477
|
+
.step-item:first-child::before { top: 50%; }
|
|
478
|
+
.step-item:last-child::before { bottom: 50%; }
|
|
479
|
+
.step-item:only-child::before { display: none; }
|
|
480
|
+
|
|
481
|
+
/* Shimmer loading effect for running tools */
|
|
482
|
+
.step-item.loading::after {
|
|
483
|
+
content: ''; position: absolute;
|
|
484
|
+
inset: 0;
|
|
485
|
+
background: linear-gradient(
|
|
486
|
+
90deg,
|
|
487
|
+
transparent 0%,
|
|
488
|
+
rgba(45,138,110,.06) 30%,
|
|
489
|
+
rgba(45,138,110,.12) 50%,
|
|
490
|
+
rgba(45,138,110,.06) 70%,
|
|
491
|
+
transparent 100%
|
|
492
|
+
);
|
|
493
|
+
animation: shimmer 1.8s infinite ease-in-out;
|
|
494
|
+
pointer-events: none;
|
|
495
|
+
}
|
|
496
|
+
@keyframes shimmer {
|
|
497
|
+
0% { transform: translateX(-100%); }
|
|
498
|
+
100% { transform: translateX(100%); }
|
|
499
|
+
}
|
|
500
|
+
.step-item.loading .step-icon {
|
|
501
|
+
border-color: var(--accent);
|
|
502
|
+
animation: pulse 1.2s infinite;
|
|
503
|
+
}
|
|
504
|
+
.step-icon {
|
|
505
|
+
width: 32px; height: 32px; border-radius: 50%;
|
|
506
|
+
background: var(--bg); border: 1.5px solid var(--timeline);
|
|
507
|
+
display: flex; align-items: center; justify-content: center;
|
|
508
|
+
flex-shrink: 0; z-index: 1; font-size: 14px; color: var(--text-secondary);
|
|
509
|
+
}
|
|
510
|
+
.step-name {
|
|
511
|
+
font-weight: 600; font-size: 14px; color: var(--text);
|
|
512
|
+
white-space: nowrap; flex-shrink: 0;
|
|
513
|
+
}
|
|
514
|
+
.step-desc {
|
|
515
|
+
flex: 1; min-width: 0;
|
|
516
|
+
font-size: 13px; color: var(--text-muted);
|
|
517
|
+
font-family: var(--mono);
|
|
518
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
519
|
+
}
|
|
520
|
+
.step-duration {
|
|
521
|
+
font-size: 12px; color: var(--text-muted);
|
|
522
|
+
white-space: nowrap; flex-shrink: 0;
|
|
523
|
+
}
|
|
524
|
+
.step-arrow {
|
|
525
|
+
color: var(--text-muted); flex-shrink: 0;
|
|
526
|
+
font-size: 14px; opacity: .5;
|
|
527
|
+
}
|
|
528
|
+
.step-detail {
|
|
529
|
+
display: none; margin: 0 0 4px 0;
|
|
530
|
+
background: var(--code-bg); border: 1px solid var(--border);
|
|
531
|
+
border-radius: var(--radius-sm); overflow: hidden;
|
|
532
|
+
animation: fadeUp .15s ease;
|
|
533
|
+
}
|
|
534
|
+
.step-detail.open { display: block; }
|
|
535
|
+
.step-detail pre {
|
|
536
|
+
margin: 0; padding: 12px; font-size: 12px;
|
|
537
|
+
font-family: var(--mono); line-height: 1.5;
|
|
538
|
+
overflow-x: auto; white-space: pre-wrap; word-break: break-word;
|
|
539
|
+
max-height: 300px; overflow-y: auto;
|
|
540
|
+
overscroll-behavior-y: contain;
|
|
541
|
+
color: var(--text-secondary);
|
|
542
|
+
}
|
|
543
|
+
.step-detail.error pre { color: var(--error); }
|
|
544
|
+
.step-detail .detail-input {
|
|
545
|
+
padding: 10px 12px; font-size: 12px; font-family: var(--mono);
|
|
546
|
+
color: var(--text-secondary); border-bottom: 1px solid var(--border);
|
|
547
|
+
white-space: pre-wrap; word-break: break-word;
|
|
548
|
+
}
|
|
549
|
+
.step-detail .detail-result {
|
|
550
|
+
padding: 10px 12px; font-size: 12px; font-family: var(--mono);
|
|
551
|
+
white-space: pre-wrap; word-break: break-word;
|
|
552
|
+
max-height: 250px; overflow-y: auto;
|
|
553
|
+
overscroll-behavior-y: contain;
|
|
554
|
+
}
|
|
555
|
+
.result-image-block {
|
|
556
|
+
margin: 12px 0; animation: fadeUp .2s ease;
|
|
557
|
+
}
|
|
558
|
+
.result-image-block img {
|
|
559
|
+
max-width: 100%; border-radius: 10px; cursor: pointer;
|
|
560
|
+
border: 1px solid var(--border);
|
|
561
|
+
box-shadow: 0 2px 8px rgba(0,0,0,.12);
|
|
562
|
+
}
|
|
563
|
+
.image-overlay {
|
|
564
|
+
display: none; position: fixed; inset: 0; z-index: 9999;
|
|
565
|
+
background: rgba(0,0,0,.85); align-items: center; justify-content: center;
|
|
566
|
+
cursor: pointer; -webkit-tap-highlight-color: transparent;
|
|
567
|
+
}
|
|
568
|
+
.image-overlay.visible { display: flex; }
|
|
569
|
+
.image-overlay img {
|
|
570
|
+
max-width: 95vw; max-height: 95vh; object-fit: contain;
|
|
571
|
+
border-radius: 8px;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/* ===== Diff View ===== */
|
|
575
|
+
.diff-view {
|
|
576
|
+
overflow: hidden;
|
|
577
|
+
}
|
|
578
|
+
.diff-header {
|
|
579
|
+
display: flex; align-items: center; gap: 6px;
|
|
580
|
+
padding: 8px 12px;
|
|
581
|
+
background: var(--bg-hover);
|
|
582
|
+
border-bottom: 1px solid var(--border);
|
|
583
|
+
font-size: 12px; font-family: var(--mono);
|
|
584
|
+
color: var(--text-secondary);
|
|
585
|
+
}
|
|
586
|
+
.diff-header .diff-file-icon {
|
|
587
|
+
opacity: .5; flex-shrink: 0;
|
|
588
|
+
}
|
|
589
|
+
.diff-header .diff-file-path {
|
|
590
|
+
font-weight: 600; color: var(--text);
|
|
591
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
592
|
+
min-width: 0;
|
|
593
|
+
}
|
|
594
|
+
.diff-body {
|
|
595
|
+
overflow-x: auto; max-height: 350px; overflow-y: auto;
|
|
596
|
+
overscroll-behavior-y: contain;
|
|
597
|
+
}
|
|
598
|
+
.diff-table {
|
|
599
|
+
width: 100%; border-collapse: collapse;
|
|
600
|
+
font-size: 12px; font-family: var(--mono);
|
|
601
|
+
line-height: 1.6;
|
|
602
|
+
}
|
|
603
|
+
.diff-table td {
|
|
604
|
+
padding: 0; vertical-align: top;
|
|
605
|
+
border: none;
|
|
606
|
+
}
|
|
607
|
+
.diff-ln {
|
|
608
|
+
min-width: 32px; width: 32px;
|
|
609
|
+
white-space: nowrap;
|
|
610
|
+
padding: 0 6px;
|
|
611
|
+
text-align: right;
|
|
612
|
+
color: var(--text-muted);
|
|
613
|
+
opacity: .5;
|
|
614
|
+
user-select: none;
|
|
615
|
+
font-size: 11px;
|
|
616
|
+
}
|
|
617
|
+
.diff-sign {
|
|
618
|
+
width: 16px; min-width: 16px;
|
|
619
|
+
white-space: nowrap;
|
|
620
|
+
padding: 0;
|
|
621
|
+
text-align: center;
|
|
622
|
+
user-select: none;
|
|
623
|
+
font-weight: 700;
|
|
624
|
+
}
|
|
625
|
+
.diff-code {
|
|
626
|
+
padding: 0 12px 0 0;
|
|
627
|
+
white-space: pre-wrap;
|
|
628
|
+
word-break: break-all;
|
|
629
|
+
}
|
|
630
|
+
/* Delete line */
|
|
631
|
+
.diff-del { background: rgba(255,0,0,.06); }
|
|
632
|
+
.diff-del .diff-sign { color: #d73a49; }
|
|
633
|
+
.diff-del .diff-code { color: #6e3630; }
|
|
634
|
+
.diff-del .diff-ln { background: rgba(255,0,0,.08); }
|
|
635
|
+
/* Add line */
|
|
636
|
+
.diff-add { background: rgba(0,180,0,.06); }
|
|
637
|
+
.diff-add .diff-sign { color: #22863a; }
|
|
638
|
+
.diff-add .diff-code { color: #24602e; }
|
|
639
|
+
.diff-add .diff-ln { background: rgba(0,180,0,.08); }
|
|
640
|
+
/* Context line */
|
|
641
|
+
.diff-ctx { background: var(--code-bg); }
|
|
642
|
+
.diff-ctx .diff-sign { color: transparent; }
|
|
643
|
+
.diff-ctx .diff-code { color: var(--text-secondary); }
|
|
644
|
+
/* Hunk separator */
|
|
645
|
+
.diff-hunk {
|
|
646
|
+
background: #f1f8ff; color: #7b93a8;
|
|
647
|
+
font-size: 11px;
|
|
648
|
+
}
|
|
649
|
+
.diff-hunk td { padding: 4px 12px; }
|
|
650
|
+
/* Stats badge */
|
|
651
|
+
.diff-stats {
|
|
652
|
+
display: inline-flex; align-items: center; gap: 4px;
|
|
653
|
+
margin-left: auto; font-size: 11px; font-weight: 600;
|
|
654
|
+
}
|
|
655
|
+
.diff-stats .ds-add { color: #22863a; }
|
|
656
|
+
.diff-stats .ds-del { color: #d73a49; }
|
|
657
|
+
|
|
658
|
+
/* Token count */
|
|
659
|
+
.token-count {
|
|
660
|
+
font-size: 12px; color: var(--accent);
|
|
661
|
+
padding: 2px 0 4px;
|
|
662
|
+
opacity: .8;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/* ===== Todo Panel ===== */
|
|
666
|
+
#todo-panel {
|
|
667
|
+
flex-shrink: 0;
|
|
668
|
+
background: var(--bg-white);
|
|
669
|
+
border-top: 1px solid var(--border);
|
|
670
|
+
overflow: hidden;
|
|
671
|
+
max-height: 0;
|
|
672
|
+
opacity: 0;
|
|
673
|
+
transition: max-height .3s ease, opacity .2s ease;
|
|
674
|
+
pointer-events: none;
|
|
675
|
+
}
|
|
676
|
+
#todo-panel.has-tasks {
|
|
677
|
+
max-height: 44px;
|
|
678
|
+
opacity: 1;
|
|
679
|
+
pointer-events: auto;
|
|
680
|
+
}
|
|
681
|
+
#todo-panel.has-tasks.open {
|
|
682
|
+
max-height: 320px;
|
|
683
|
+
}
|
|
684
|
+
#todo-header {
|
|
685
|
+
display: flex;
|
|
686
|
+
align-items: center;
|
|
687
|
+
gap: 8px;
|
|
688
|
+
padding: 10px 16px;
|
|
689
|
+
cursor: pointer;
|
|
690
|
+
user-select: none;
|
|
691
|
+
min-height: 44px;
|
|
692
|
+
}
|
|
693
|
+
#todo-header:active { background: var(--bg-hover); }
|
|
694
|
+
.todo-header-left {
|
|
695
|
+
display: flex; align-items: center; gap: 8px;
|
|
696
|
+
flex-shrink: 0;
|
|
697
|
+
}
|
|
698
|
+
.todo-chevron {
|
|
699
|
+
transition: transform .2s;
|
|
700
|
+
color: var(--text-muted);
|
|
701
|
+
flex-shrink: 0;
|
|
702
|
+
}
|
|
703
|
+
#todo-panel.open .todo-chevron { transform: rotate(90deg); }
|
|
704
|
+
.todo-title {
|
|
705
|
+
font-size: 13px; font-weight: 600; color: var(--text);
|
|
706
|
+
white-space: nowrap;
|
|
707
|
+
}
|
|
708
|
+
.todo-badge {
|
|
709
|
+
min-width: 20px; height: 20px;
|
|
710
|
+
border-radius: 10px;
|
|
711
|
+
background: var(--accent);
|
|
712
|
+
color: #fff;
|
|
713
|
+
font-size: 11px; font-weight: 700;
|
|
714
|
+
display: flex; align-items: center; justify-content: center;
|
|
715
|
+
padding: 0 6px;
|
|
716
|
+
}
|
|
717
|
+
.todo-badge.done { background: var(--text-muted); }
|
|
718
|
+
.todo-progress-mini {
|
|
719
|
+
flex: 1; height: 4px; min-width: 40px;
|
|
720
|
+
background: var(--border);
|
|
721
|
+
border-radius: 2px;
|
|
722
|
+
overflow: hidden;
|
|
723
|
+
}
|
|
724
|
+
.todo-progress-bar {
|
|
725
|
+
height: 100%; width: 0%;
|
|
726
|
+
background: var(--accent);
|
|
727
|
+
border-radius: 2px;
|
|
728
|
+
transition: width .4s ease;
|
|
729
|
+
}
|
|
730
|
+
.todo-progress-bar.all-done { background: #4caf50; }
|
|
731
|
+
.todo-summary {
|
|
732
|
+
font-size: 12px; color: var(--text-muted);
|
|
733
|
+
white-space: nowrap; flex-shrink: 0;
|
|
734
|
+
}
|
|
735
|
+
#todo-list {
|
|
736
|
+
display: none;
|
|
737
|
+
padding: 0 12px 10px;
|
|
738
|
+
max-height: 260px;
|
|
739
|
+
overflow-y: auto;
|
|
740
|
+
}
|
|
741
|
+
#todo-panel.open #todo-list { display: block; }
|
|
742
|
+
.todo-item {
|
|
743
|
+
display: flex; align-items: flex-start; gap: 10px;
|
|
744
|
+
padding: 8px 8px;
|
|
745
|
+
border-radius: var(--radius-sm);
|
|
746
|
+
transition: background .1s;
|
|
747
|
+
animation: fadeUp .2s ease;
|
|
748
|
+
}
|
|
749
|
+
.todo-item + .todo-item { border-top: 1px solid var(--border-light); }
|
|
750
|
+
.todo-icon {
|
|
751
|
+
width: 22px; height: 22px;
|
|
752
|
+
border-radius: 50%;
|
|
753
|
+
display: flex; align-items: center; justify-content: center;
|
|
754
|
+
flex-shrink: 0;
|
|
755
|
+
margin-top: 1px;
|
|
756
|
+
font-size: 12px;
|
|
757
|
+
border: 1.5px solid var(--border);
|
|
758
|
+
background: var(--bg);
|
|
759
|
+
color: var(--text-muted);
|
|
760
|
+
transition: all .3s ease;
|
|
761
|
+
}
|
|
762
|
+
.todo-item.pending .todo-icon {
|
|
763
|
+
border-color: var(--border);
|
|
764
|
+
color: var(--text-muted);
|
|
765
|
+
}
|
|
766
|
+
.todo-item.in_progress .todo-icon {
|
|
767
|
+
border-color: var(--accent);
|
|
768
|
+
background: var(--accent-light);
|
|
769
|
+
color: var(--accent);
|
|
770
|
+
animation: pulse 1.2s infinite;
|
|
771
|
+
}
|
|
772
|
+
.todo-item.completed .todo-icon {
|
|
773
|
+
border-color: #4caf50;
|
|
774
|
+
background: #e8f5e9;
|
|
775
|
+
color: #4caf50;
|
|
776
|
+
}
|
|
777
|
+
.todo-body { flex: 1; min-width: 0; }
|
|
778
|
+
.todo-subject {
|
|
779
|
+
font-size: 13px; font-weight: 500; color: var(--text);
|
|
780
|
+
line-height: 1.4;
|
|
781
|
+
word-break: break-word;
|
|
782
|
+
}
|
|
783
|
+
.todo-item.completed .todo-subject {
|
|
784
|
+
color: var(--text-muted);
|
|
785
|
+
text-decoration: line-through;
|
|
786
|
+
}
|
|
787
|
+
.todo-active-form {
|
|
788
|
+
font-size: 11px; color: var(--accent);
|
|
789
|
+
margin-top: 2px;
|
|
790
|
+
display: flex; align-items: center; gap: 4px;
|
|
791
|
+
}
|
|
792
|
+
.todo-active-form::before {
|
|
793
|
+
content: '';
|
|
794
|
+
width: 4px; height: 4px;
|
|
795
|
+
border-radius: 50%;
|
|
796
|
+
background: var(--accent);
|
|
797
|
+
animation: pulse 1.2s infinite;
|
|
798
|
+
flex-shrink: 0;
|
|
799
|
+
}
|
|
800
|
+
.todo-status-tag {
|
|
801
|
+
font-size: 10px; font-weight: 600;
|
|
802
|
+
padding: 2px 6px;
|
|
803
|
+
border-radius: 4px;
|
|
804
|
+
flex-shrink: 0;
|
|
805
|
+
margin-top: 2px;
|
|
806
|
+
}
|
|
807
|
+
.todo-item.pending .todo-status-tag {
|
|
808
|
+
background: var(--bg); color: var(--text-muted);
|
|
809
|
+
}
|
|
810
|
+
.todo-item.in_progress .todo-status-tag {
|
|
811
|
+
background: var(--accent-light); color: var(--accent);
|
|
812
|
+
}
|
|
813
|
+
.todo-item.completed .todo-status-tag {
|
|
814
|
+
background: #e8f5e9; color: #4caf50;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/* ===== Input Area ===== */
|
|
818
|
+
#input-area {
|
|
819
|
+
flex-shrink: 0;
|
|
820
|
+
padding: 10px 12px;
|
|
821
|
+
padding-bottom: 10px;
|
|
822
|
+
padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
|
|
823
|
+
background: var(--bg); border-top: 1px solid var(--border);
|
|
824
|
+
position: relative;
|
|
825
|
+
}
|
|
826
|
+
#input-row {
|
|
827
|
+
max-width: 720px; margin: 0 auto;
|
|
828
|
+
display: flex; align-items: center; gap: 8px;
|
|
829
|
+
}
|
|
830
|
+
.input-pill {
|
|
831
|
+
flex: 1; display: flex; align-items: center; gap: 6px;
|
|
832
|
+
background: var(--bg-white); border: 1px solid var(--border);
|
|
833
|
+
border-radius: 24px; padding: 0 6px 0 16px;
|
|
834
|
+
transition: border-color .15s;
|
|
835
|
+
}
|
|
836
|
+
.input-pill:focus-within { border-color: var(--accent); }
|
|
837
|
+
#input {
|
|
838
|
+
flex: 1; border: none; background: none; outline: none;
|
|
839
|
+
font-size: 16px; font-family: inherit; color: var(--text);
|
|
840
|
+
padding: 12px 0; line-height: 1.4;
|
|
841
|
+
resize: none; max-height: 120px;
|
|
842
|
+
}
|
|
843
|
+
#input::placeholder { color: var(--text-muted); }
|
|
844
|
+
#btn-send {
|
|
845
|
+
width: 40px; height: 40px; border-radius: 50%;
|
|
846
|
+
background: var(--accent-light); border: 1px solid var(--border);
|
|
847
|
+
color: var(--accent); cursor: pointer;
|
|
848
|
+
display: flex; align-items: center; justify-content: center;
|
|
849
|
+
transition: all .15s; flex-shrink: 0; margin: 2px;
|
|
850
|
+
}
|
|
851
|
+
#btn-send:hover, #btn-send:active { background: var(--accent); color: #fff; }
|
|
852
|
+
#btn-send.stop-mode {
|
|
853
|
+
background: var(--bg); color: var(--text-muted); border-color: var(--border);
|
|
854
|
+
opacity: 1; pointer-events: auto;
|
|
855
|
+
animation: pulse 1.5s infinite ease-in-out;
|
|
856
|
+
}
|
|
857
|
+
#btn-send.stop-mode:hover, #btn-send.stop-mode:active {
|
|
858
|
+
background: var(--error-bg); color: var(--error); border-color: rgba(217,48,37,.3);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/* ===== Welcome ===== */
|
|
862
|
+
.welcome {
|
|
863
|
+
text-align: center; padding: 60px 24px; color: var(--text-muted);
|
|
864
|
+
display: flex; flex-direction: column; align-items: center; gap: 10px;
|
|
865
|
+
}
|
|
866
|
+
.welcome svg { opacity: .2; }
|
|
867
|
+
.welcome h2 { font-size: 18px; color: var(--text-secondary); font-weight: 500; }
|
|
868
|
+
.welcome p { font-size: 14px; max-width: 360px; line-height: 1.6; }
|
|
869
|
+
|
|
870
|
+
/* ===== Command Overlay (compact spinner etc.) ===== */
|
|
871
|
+
#cmd-overlay {
|
|
872
|
+
display: none; position: fixed; inset: 0; z-index: 150;
|
|
873
|
+
background: rgba(0,0,0,.25);
|
|
874
|
+
align-items: center; justify-content: center;
|
|
875
|
+
}
|
|
876
|
+
#cmd-overlay.visible { display: flex; }
|
|
877
|
+
.cmd-overlay-card {
|
|
878
|
+
display: flex; flex-direction: column; align-items: center; gap: 16px;
|
|
879
|
+
padding: 32px 40px; border-radius: 16px;
|
|
880
|
+
background: var(--bg-white);
|
|
881
|
+
box-shadow: 0 8px 32px rgba(0,0,0,.12);
|
|
882
|
+
animation: fadeUp .2s ease;
|
|
883
|
+
}
|
|
884
|
+
.cmd-overlay-spinner {
|
|
885
|
+
width: 36px; height: 36px;
|
|
886
|
+
border: 3px solid var(--border);
|
|
887
|
+
border-top-color: var(--accent);
|
|
888
|
+
border-radius: 50%;
|
|
889
|
+
animation: spin .8s linear infinite;
|
|
890
|
+
}
|
|
891
|
+
@keyframes spin { to { transform: rotate(360deg); } }
|
|
892
|
+
.cmd-overlay-label {
|
|
893
|
+
font-size: 14px; font-weight: 500; color: var(--text-secondary);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
/* ===== Compact Summary Divider ===== */
|
|
897
|
+
.compact-divider {
|
|
898
|
+
display: flex; align-items: center; gap: 12px;
|
|
899
|
+
margin: 20px 0 16px; animation: fadeUp .3s ease;
|
|
900
|
+
}
|
|
901
|
+
.compact-line {
|
|
902
|
+
flex: 1; height: 1px; background: var(--border);
|
|
903
|
+
}
|
|
904
|
+
.compact-badge {
|
|
905
|
+
display: flex; align-items: center; gap: 6px;
|
|
906
|
+
padding: 6px 14px; border-radius: 16px;
|
|
907
|
+
background: var(--bg-white); border: 1px solid var(--border);
|
|
908
|
+
font-size: 12px; color: var(--text-muted); font-weight: 500;
|
|
909
|
+
white-space: nowrap; flex-shrink: 0;
|
|
910
|
+
}
|
|
911
|
+
.compact-badge svg { opacity: .6; }
|
|
912
|
+
|
|
913
|
+
/* ===== Working Indicator ===== */
|
|
914
|
+
.working-indicator {
|
|
915
|
+
display: flex; align-items: center; gap: 8px;
|
|
916
|
+
padding: 10px 0; animation: fadeUp .2s ease;
|
|
917
|
+
color: var(--text-muted); font-size: 13px;
|
|
918
|
+
}
|
|
919
|
+
.working-spinner {
|
|
920
|
+
width: 14px; height: 14px; border-radius: 50%;
|
|
921
|
+
border: 2px solid var(--border);
|
|
922
|
+
border-top-color: var(--accent);
|
|
923
|
+
animation: spin .8s linear infinite;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/* ===== Elapsed Time Badge ===== */
|
|
927
|
+
.elapsed-time {
|
|
928
|
+
display: inline-flex; align-items: center; gap: 5px;
|
|
929
|
+
padding: 4px 0; animation: fadeUp .2s ease;
|
|
930
|
+
color: var(--text-muted); font-size: 12px; opacity: .7;
|
|
931
|
+
}
|
|
932
|
+
.elapsed-time svg { opacity: .6; }
|
|
933
|
+
|
|
934
|
+
/* ===== Interrupt Banner ===== */
|
|
935
|
+
.interrupt-banner {
|
|
936
|
+
display: flex; align-items: center; justify-content: center; gap: 8px;
|
|
937
|
+
padding: 6px 16px; width: fit-content;
|
|
938
|
+
background: var(--bg);
|
|
939
|
+
border-radius: 20px;
|
|
940
|
+
color: var(--text-muted); font-size: 12px; font-weight: 500;
|
|
941
|
+
animation: fadeUp .2s ease;
|
|
942
|
+
position: relative; z-index: 1;
|
|
943
|
+
margin: 0 auto;
|
|
944
|
+
}
|
|
945
|
+
.interrupt-banner svg { opacity: .5; }
|
|
946
|
+
|
|
947
|
+
/* ===== Input Disabled State ===== */
|
|
948
|
+
#input-area.waiting .input-pill {
|
|
949
|
+
border-color: var(--border);
|
|
950
|
+
background: var(--bg);
|
|
951
|
+
position: relative;
|
|
952
|
+
overflow: hidden;
|
|
953
|
+
}
|
|
954
|
+
#input-area.waiting .input-pill::after {
|
|
955
|
+
content: '';
|
|
956
|
+
position: absolute;
|
|
957
|
+
inset: 0;
|
|
958
|
+
background: linear-gradient(
|
|
959
|
+
90deg,
|
|
960
|
+
transparent 0%,
|
|
961
|
+
rgba(45,138,110,.05) 40%,
|
|
962
|
+
rgba(45,138,110,.10) 50%,
|
|
963
|
+
rgba(45,138,110,.05) 60%,
|
|
964
|
+
transparent 100%
|
|
965
|
+
);
|
|
966
|
+
animation: inputShimmer 2s infinite ease-in-out;
|
|
967
|
+
pointer-events: none;
|
|
968
|
+
border-radius: inherit;
|
|
969
|
+
}
|
|
970
|
+
@keyframes inputShimmer {
|
|
971
|
+
0% { transform: translateX(-100%); }
|
|
972
|
+
100% { transform: translateX(100%); }
|
|
973
|
+
}
|
|
974
|
+
#input-area.waiting #input {
|
|
975
|
+
color: var(--text-muted); pointer-events: none;
|
|
976
|
+
}
|
|
977
|
+
#input-area.waiting #btn-send {
|
|
978
|
+
/* Overridden by .stop-mode when waiting — keep button clickable */
|
|
979
|
+
}
|
|
980
|
+
#input-area.waiting #btn-send.stop-mode {
|
|
981
|
+
opacity: 1; pointer-events: auto;
|
|
982
|
+
}
|
|
983
|
+
#btn-send.empty {
|
|
984
|
+
opacity: .35; pointer-events: none;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
/* ===== Image Upload Button ===== */
|
|
988
|
+
.pill-icon-btn {
|
|
989
|
+
width: 36px; height: 36px; border-radius: 50%;
|
|
990
|
+
background: transparent; border: none;
|
|
991
|
+
color: var(--text-muted); cursor: pointer;
|
|
992
|
+
display: flex; align-items: center; justify-content: center;
|
|
993
|
+
transition: all .15s; flex-shrink: 0;
|
|
994
|
+
-webkit-tap-highlight-color: transparent;
|
|
995
|
+
}
|
|
996
|
+
.pill-icon-btn:hover, .pill-icon-btn:active { color: var(--accent); background: var(--accent-light); }
|
|
997
|
+
#input-area.waiting .pill-icon-btn { opacity: .3; pointer-events: none; }
|
|
998
|
+
|
|
999
|
+
/* ===== Image Preview Strip ===== */
|
|
1000
|
+
#image-preview {
|
|
1001
|
+
max-width: 720px; margin: 0 auto 8px;
|
|
1002
|
+
padding: 0 6px;
|
|
1003
|
+
}
|
|
1004
|
+
#image-preview-inner {
|
|
1005
|
+
display: inline-flex; align-items: center; gap: 6px;
|
|
1006
|
+
background: var(--bg-white); border: 1px solid var(--border);
|
|
1007
|
+
border-radius: var(--radius-sm); padding: 6px;
|
|
1008
|
+
animation: fadeUp .2s ease;
|
|
1009
|
+
position: relative;
|
|
1010
|
+
overflow: hidden;
|
|
1011
|
+
}
|
|
1012
|
+
#image-preview-img {
|
|
1013
|
+
max-height: 80px; max-width: 160px;
|
|
1014
|
+
border-radius: 6px; object-fit: cover;
|
|
1015
|
+
}
|
|
1016
|
+
#image-upload-overlay {
|
|
1017
|
+
position: absolute; inset: 0;
|
|
1018
|
+
display: flex; align-items: center; justify-content: center;
|
|
1019
|
+
background: rgba(0, 0, 0, 0.45);
|
|
1020
|
+
backdrop-filter: blur(2px);
|
|
1021
|
+
border-radius: var(--radius-sm);
|
|
1022
|
+
color: #fff;
|
|
1023
|
+
pointer-events: none;
|
|
1024
|
+
z-index: 1;
|
|
1025
|
+
}
|
|
1026
|
+
#image-upload-overlay.hidden { display: none; }
|
|
1027
|
+
.upload-ring-wrap {
|
|
1028
|
+
position: relative;
|
|
1029
|
+
display: flex; align-items: center; justify-content: center;
|
|
1030
|
+
width: 52px; height: 52px;
|
|
1031
|
+
}
|
|
1032
|
+
.upload-ring {
|
|
1033
|
+
position: absolute; inset: 0;
|
|
1034
|
+
width: 52px; height: 52px;
|
|
1035
|
+
transform: rotate(-90deg);
|
|
1036
|
+
filter: drop-shadow(0 0 4px rgba(255,255,255,.25));
|
|
1037
|
+
}
|
|
1038
|
+
.upload-ring-track,
|
|
1039
|
+
.upload-ring-progress {
|
|
1040
|
+
fill: none;
|
|
1041
|
+
stroke-width: 3.5;
|
|
1042
|
+
stroke-linecap: round;
|
|
1043
|
+
stroke-dasharray: 97.4;
|
|
1044
|
+
}
|
|
1045
|
+
.upload-ring-track { stroke: rgba(255,255,255,.18); }
|
|
1046
|
+
.upload-ring-progress {
|
|
1047
|
+
stroke: #fff;
|
|
1048
|
+
stroke-dashoffset: 97.4;
|
|
1049
|
+
transition: stroke-dashoffset .25s cubic-bezier(.4,0,.2,1);
|
|
1050
|
+
}
|
|
1051
|
+
#image-upload-text {
|
|
1052
|
+
position: relative;
|
|
1053
|
+
font-size: 12px;
|
|
1054
|
+
font-weight: 700;
|
|
1055
|
+
letter-spacing: .03em;
|
|
1056
|
+
text-shadow: 0 1px 3px rgba(0,0,0,.4);
|
|
1057
|
+
}
|
|
1058
|
+
#image-preview-remove {
|
|
1059
|
+
position: absolute; top: -6px; right: -6px; z-index: 2;
|
|
1060
|
+
width: 22px; height: 22px; border-radius: 50%;
|
|
1061
|
+
background: var(--text); color: #fff; border: 2px solid var(--bg);
|
|
1062
|
+
font-size: 13px; line-height: 1; cursor: pointer;
|
|
1063
|
+
display: flex; align-items: center; justify-content: center;
|
|
1064
|
+
}
|
|
1065
|
+
#image-preview-remove:active { background: var(--error); }
|
|
1066
|
+
#image-preview-remove[disabled] {
|
|
1067
|
+
opacity: .45;
|
|
1068
|
+
pointer-events: none;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
/* ===== Scroll-to-bottom ===== */
|
|
1072
|
+
#btn-scroll {
|
|
1073
|
+
width: 40px; height: 40px; border-radius: 50%;
|
|
1074
|
+
background: var(--bg-white); border: 1px solid var(--border);
|
|
1075
|
+
color: var(--text-muted); cursor: pointer;
|
|
1076
|
+
display: none; align-items: center; justify-content: center;
|
|
1077
|
+
transition: all .15s; flex-shrink: 0;
|
|
1078
|
+
}
|
|
1079
|
+
#btn-scroll.visible { display: flex; }
|
|
1080
|
+
#btn-scroll:hover, #btn-scroll:active { background: var(--bg-hover); color: var(--text); }
|
|
1081
|
+
|
|
1082
|
+
/* ===== Connection Banner ===== */
|
|
1083
|
+
#conn-banner {
|
|
1084
|
+
display: none; align-items: center; justify-content: center; gap: 8px;
|
|
1085
|
+
padding: 6px 16px; font-size: 13px; font-weight: 500;
|
|
1086
|
+
color: #fff; background: var(--error);
|
|
1087
|
+
flex-shrink: 0; z-index: 11;
|
|
1088
|
+
animation: fadeUp .2s ease;
|
|
1089
|
+
}
|
|
1090
|
+
#conn-banner.visible { display: flex; }
|
|
1091
|
+
#conn-banner.reconnecting { background: #e8a000; color: #1a1a1a; }
|
|
1092
|
+
#conn-banner .banner-dot {
|
|
1093
|
+
width: 6px; height: 6px; border-radius: 50%;
|
|
1094
|
+
background: currentColor; animation: pulse 1.2s infinite;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
/* ===== Permission Overlay ===== */
|
|
1098
|
+
#perm-overlay {
|
|
1099
|
+
display: none; position: fixed; inset: 0; z-index: 200;
|
|
1100
|
+
background: rgba(0,0,0,.35);
|
|
1101
|
+
align-items: flex-end; justify-content: center;
|
|
1102
|
+
animation: fadeIn .15s ease;
|
|
1103
|
+
}
|
|
1104
|
+
#perm-overlay.visible { display: flex; }
|
|
1105
|
+
@keyframes fadeIn { from{opacity:0}to{opacity:1} }
|
|
1106
|
+
|
|
1107
|
+
#perm-dialog {
|
|
1108
|
+
width: 100%; max-width: 480px;
|
|
1109
|
+
background: var(--bg-white); border-radius: 16px 16px 0 0;
|
|
1110
|
+
padding: 20px 20px 24px;
|
|
1111
|
+
padding-bottom: 24px;
|
|
1112
|
+
padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
|
|
1113
|
+
box-shadow: 0 -4px 24px rgba(0,0,0,.12);
|
|
1114
|
+
animation: slideUp .2s ease;
|
|
1115
|
+
}
|
|
1116
|
+
@keyframes slideUp { from{transform:translateY(30px);opacity:0}to{transform:translateY(0);opacity:1} }
|
|
1117
|
+
|
|
1118
|
+
.perm-header {
|
|
1119
|
+
display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
|
|
1120
|
+
}
|
|
1121
|
+
.perm-icon {
|
|
1122
|
+
width: 40px; height: 40px; border-radius: 10px;
|
|
1123
|
+
background: #fff3e0; color: #e8a000;
|
|
1124
|
+
display: flex; align-items: center; justify-content: center;
|
|
1125
|
+
flex-shrink: 0;
|
|
1126
|
+
}
|
|
1127
|
+
.perm-title { font-size: 16px; font-weight: 600; color: var(--text); }
|
|
1128
|
+
.perm-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
|
|
1129
|
+
|
|
1130
|
+
.perm-detail {
|
|
1131
|
+
background: var(--code-bg); border: 1px solid var(--border);
|
|
1132
|
+
border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px;
|
|
1133
|
+
font-family: var(--mono); font-size: 13px; color: var(--text-secondary);
|
|
1134
|
+
white-space: pre-wrap; word-break: break-word;
|
|
1135
|
+
max-height: 200px; overflow-y: auto; line-height: 1.5;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
.perm-actions {
|
|
1139
|
+
display: flex; gap: 10px;
|
|
1140
|
+
}
|
|
1141
|
+
.perm-actions button {
|
|
1142
|
+
flex: 1; padding: 14px; border-radius: 12px;
|
|
1143
|
+
font-size: 15px; font-weight: 600; cursor: pointer;
|
|
1144
|
+
border: none; transition: all .15s;
|
|
1145
|
+
min-height: 48px;
|
|
1146
|
+
}
|
|
1147
|
+
.perm-btn-deny {
|
|
1148
|
+
background: var(--bg); color: var(--text-secondary);
|
|
1149
|
+
border: 1px solid var(--border) !important;
|
|
1150
|
+
}
|
|
1151
|
+
.perm-btn-deny:hover, .perm-btn-deny:active { background: var(--error-bg); color: var(--error); }
|
|
1152
|
+
.perm-btn-allow {
|
|
1153
|
+
background: var(--accent); color: #fff;
|
|
1154
|
+
}
|
|
1155
|
+
.perm-btn-allow:hover, .perm-btn-allow:active { background: #247a5e; }
|
|
1156
|
+
|
|
1157
|
+
/* ===== Question Overlay (AskUserQuestion) ===== */
|
|
1158
|
+
#question-overlay {
|
|
1159
|
+
display: none; position: fixed; inset: 0; z-index: 200;
|
|
1160
|
+
background: rgba(0,0,0,.35);
|
|
1161
|
+
align-items: flex-end; justify-content: center;
|
|
1162
|
+
animation: fadeIn .15s ease;
|
|
1163
|
+
}
|
|
1164
|
+
#question-overlay.visible { display: flex; }
|
|
1165
|
+
#question-dialog {
|
|
1166
|
+
width: 100%; max-width: 480px;
|
|
1167
|
+
background: var(--bg-white); border-radius: 16px 16px 0 0;
|
|
1168
|
+
padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
|
|
1169
|
+
box-shadow: 0 -4px 24px rgba(0,0,0,.12);
|
|
1170
|
+
animation: slideUp .2s ease;
|
|
1171
|
+
margin-bottom: var(--keyboard-offset);
|
|
1172
|
+
max-height: calc(100dvh - var(--keyboard-offset) - env(safe-area-inset-top, 0px) - 12px);
|
|
1173
|
+
overflow-y: auto;
|
|
1174
|
+
-webkit-overflow-scrolling: touch;
|
|
1175
|
+
}
|
|
1176
|
+
.question-header {
|
|
1177
|
+
display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
|
|
1178
|
+
}
|
|
1179
|
+
.question-icon {
|
|
1180
|
+
width: 36px; height: 36px; border-radius: 10px;
|
|
1181
|
+
background: var(--accent-light); color: var(--accent);
|
|
1182
|
+
display: flex; align-items: center; justify-content: center;
|
|
1183
|
+
flex-shrink: 0;
|
|
1184
|
+
}
|
|
1185
|
+
.question-title { font-size: 15px; font-weight: 600; color: var(--text); }
|
|
1186
|
+
.question-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
|
|
1187
|
+
.question-text {
|
|
1188
|
+
font-size: 14px; color: var(--text); margin-bottom: 14px; line-height: 1.5;
|
|
1189
|
+
}
|
|
1190
|
+
.question-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
|
|
1191
|
+
.question-opt {
|
|
1192
|
+
display: flex; align-items: flex-start; gap: 10px;
|
|
1193
|
+
padding: 12px 14px; border-radius: var(--radius-sm);
|
|
1194
|
+
background: var(--bg); border: 1px solid var(--border);
|
|
1195
|
+
cursor: pointer; transition: all .15s; text-align: left;
|
|
1196
|
+
font-family: inherit; font-size: 14px; color: var(--text);
|
|
1197
|
+
-webkit-tap-highlight-color: transparent;
|
|
1198
|
+
}
|
|
1199
|
+
.question-opt:active { transform: scale(.98); background: var(--accent-bg); border-color: var(--accent); }
|
|
1200
|
+
.question-opt-num {
|
|
1201
|
+
width: 24px; height: 24px; border-radius: 50%;
|
|
1202
|
+
background: var(--accent-light); color: var(--accent);
|
|
1203
|
+
display: flex; align-items: center; justify-content: center;
|
|
1204
|
+
font-size: 12px; font-weight: 700; flex-shrink: 0;
|
|
1205
|
+
}
|
|
1206
|
+
.question-opt-body { min-width: 0; }
|
|
1207
|
+
.question-opt-label { font-weight: 600; }
|
|
1208
|
+
.question-opt-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
|
|
1209
|
+
.question-other-row {
|
|
1210
|
+
display: flex; gap: 8px;
|
|
1211
|
+
}
|
|
1212
|
+
.question-other-input {
|
|
1213
|
+
flex: 1; padding: 10px 12px; border-radius: var(--radius-sm);
|
|
1214
|
+
border: 1px solid var(--border); font-family: inherit;
|
|
1215
|
+
font-size: 14px; color: var(--text); background: var(--bg-white);
|
|
1216
|
+
outline: none;
|
|
1217
|
+
}
|
|
1218
|
+
.question-other-input:focus { border-color: var(--accent); }
|
|
1219
|
+
.question-other-btn {
|
|
1220
|
+
padding: 10px 18px; border-radius: var(--radius-sm);
|
|
1221
|
+
background: var(--accent); color: #fff; border: none;
|
|
1222
|
+
font-size: 14px; font-weight: 600; cursor: pointer;
|
|
1223
|
+
font-family: inherit;
|
|
1224
|
+
}
|
|
1225
|
+
.question-other-btn:active { background: #247a5e; }
|
|
1226
|
+
|
|
1227
|
+
/* ===== Plan Approval Overlay (ExitPlanMode) ===== */
|
|
1228
|
+
#plan-overlay {
|
|
1229
|
+
display: none; position: fixed; inset: 0; z-index: 200;
|
|
1230
|
+
background: rgba(0,0,0,.35);
|
|
1231
|
+
align-items: flex-end; justify-content: center;
|
|
1232
|
+
animation: fadeIn .15s ease;
|
|
1233
|
+
}
|
|
1234
|
+
#plan-overlay.visible { display: flex; }
|
|
1235
|
+
#plan-dialog {
|
|
1236
|
+
width: 100%; max-width: 480px;
|
|
1237
|
+
background: var(--bg-white); border-radius: 16px 16px 0 0;
|
|
1238
|
+
padding: 20px 20px calc(24px + env(safe-area-inset-bottom, 0px));
|
|
1239
|
+
box-shadow: 0 -4px 24px rgba(0,0,0,.12);
|
|
1240
|
+
animation: slideUp .2s ease;
|
|
1241
|
+
margin-bottom: var(--keyboard-offset);
|
|
1242
|
+
max-height: calc(100dvh - var(--keyboard-offset) - env(safe-area-inset-top, 0px) - 12px);
|
|
1243
|
+
overflow-y: auto;
|
|
1244
|
+
-webkit-overflow-scrolling: touch;
|
|
1245
|
+
}
|
|
1246
|
+
.plan-header {
|
|
1247
|
+
display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
|
|
1248
|
+
}
|
|
1249
|
+
.plan-icon {
|
|
1250
|
+
width: 36px; height: 36px; border-radius: 10px;
|
|
1251
|
+
background: #e8f0fe; color: #1967d2;
|
|
1252
|
+
display: flex; align-items: center; justify-content: center;
|
|
1253
|
+
flex-shrink: 0;
|
|
1254
|
+
}
|
|
1255
|
+
.plan-title { font-size: 15px; font-weight: 600; color: var(--text); }
|
|
1256
|
+
.plan-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
|
|
1257
|
+
.plan-content {
|
|
1258
|
+
background: var(--code-bg); border: 1px solid var(--border);
|
|
1259
|
+
border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px;
|
|
1260
|
+
font-size: 13px; color: var(--text-secondary);
|
|
1261
|
+
max-height: 200px; overflow-y: auto; line-height: 1.6;
|
|
1262
|
+
}
|
|
1263
|
+
.plan-content h1,.plan-content h2,.plan-content h3 {
|
|
1264
|
+
font-size: 14px; margin: 8px 0 4px; color: var(--text);
|
|
1265
|
+
}
|
|
1266
|
+
.plan-content p { margin: 4px 0; }
|
|
1267
|
+
.plan-content ul,.plan-content ol { padding-left: 18px; margin: 4px 0; }
|
|
1268
|
+
.plan-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
|
|
1269
|
+
.plan-other-row {
|
|
1270
|
+
display: flex; gap: 8px;
|
|
1271
|
+
}
|
|
1272
|
+
.plan-other-input {
|
|
1273
|
+
flex: 1; padding: 10px 12px; border-radius: var(--radius-sm);
|
|
1274
|
+
border: 1px solid var(--border); font-family: inherit;
|
|
1275
|
+
font-size: 14px; color: var(--text); background: var(--bg-white);
|
|
1276
|
+
outline: none;
|
|
1277
|
+
}
|
|
1278
|
+
.plan-other-input:focus { border-color: var(--accent); }
|
|
1279
|
+
.plan-other-btn {
|
|
1280
|
+
padding: 10px 18px; border-radius: var(--radius-sm);
|
|
1281
|
+
background: var(--accent); color: #fff; border: none;
|
|
1282
|
+
font-size: 14px; font-weight: 600; cursor: pointer;
|
|
1283
|
+
font-family: inherit;
|
|
1284
|
+
}
|
|
1285
|
+
.plan-other-btn:active { background: #247a5e; }
|
|
1286
|
+
|
|
1287
|
+
/* ===== Settings Overlay ===== */
|
|
1288
|
+
#settings-overlay {
|
|
1289
|
+
display: none; position: fixed; inset: 0; z-index: 300;
|
|
1290
|
+
background: rgba(0,0,0,.35);
|
|
1291
|
+
align-items: flex-end; justify-content: center;
|
|
1292
|
+
animation: fadeIn .15s ease;
|
|
1293
|
+
}
|
|
1294
|
+
#settings-overlay.visible { display: flex; }
|
|
1295
|
+
#settings-dialog {
|
|
1296
|
+
width: 100%; max-width: 480px;
|
|
1297
|
+
background: var(--bg-white); border-radius: 16px 16px 0 0;
|
|
1298
|
+
padding: 20px 20px 24px;
|
|
1299
|
+
padding-bottom: 24px;
|
|
1300
|
+
padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
|
|
1301
|
+
box-shadow: 0 -4px 24px rgba(0,0,0,.12);
|
|
1302
|
+
animation: slideUp .2s ease;
|
|
1303
|
+
max-height: 80vh; overflow-y: auto;
|
|
1304
|
+
}
|
|
1305
|
+
.settings-header {
|
|
1306
|
+
display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px;
|
|
1307
|
+
}
|
|
1308
|
+
.settings-title { font-size: 17px; font-weight: 700; color: var(--text); }
|
|
1309
|
+
.settings-close {
|
|
1310
|
+
width: 36px; height: 36px; border: none; border-radius: 8px;
|
|
1311
|
+
background: var(--bg); color: var(--text-muted); cursor: pointer;
|
|
1312
|
+
display: flex; align-items: center; justify-content: center;
|
|
1313
|
+
transition: all .15s;
|
|
1314
|
+
}
|
|
1315
|
+
.settings-close:active { background: var(--bg-hover); color: var(--text); }
|
|
1316
|
+
.settings-section { margin-bottom: 16px; }
|
|
1317
|
+
.settings-label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
|
|
1318
|
+
.settings-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
|
|
1319
|
+
.settings-options { display: flex; flex-direction: column; gap: 8px; }
|
|
1320
|
+
.settings-opt {
|
|
1321
|
+
display: flex; align-items: flex-start; gap: 10px;
|
|
1322
|
+
padding: 12px; border-radius: var(--radius-sm);
|
|
1323
|
+
border: 1.5px solid var(--border); cursor: pointer;
|
|
1324
|
+
transition: all .15s; background: var(--bg-white);
|
|
1325
|
+
}
|
|
1326
|
+
.settings-opt.active { border-color: var(--accent); background: var(--accent-bg); }
|
|
1327
|
+
.settings-opt input[type="radio"] {
|
|
1328
|
+
margin-top: 2px; accent-color: var(--accent); flex-shrink: 0;
|
|
1329
|
+
}
|
|
1330
|
+
.settings-opt-label { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
|
|
1331
|
+
.settings-opt-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
|
|
1332
|
+
.header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
|
|
1333
|
+
|
|
1334
|
+
/* ===== Confirm Dialog ===== */
|
|
1335
|
+
#confirm-overlay {
|
|
1336
|
+
display: none; position: fixed; inset: 0; z-index: 400;
|
|
1337
|
+
background: rgba(0,0,0,.45);
|
|
1338
|
+
align-items: center; justify-content: center;
|
|
1339
|
+
animation: fadeIn .15s ease;
|
|
1340
|
+
}
|
|
1341
|
+
#confirm-overlay.visible { display: flex; }
|
|
1342
|
+
#confirm-dialog {
|
|
1343
|
+
width: calc(100% - 48px); max-width: 340px;
|
|
1344
|
+
background: var(--bg-white); border-radius: 16px;
|
|
1345
|
+
padding: 24px; box-shadow: 0 8px 32px rgba(0,0,0,.18);
|
|
1346
|
+
text-align: center; animation: slideUp .2s ease;
|
|
1347
|
+
}
|
|
1348
|
+
.confirm-icon {
|
|
1349
|
+
width: 48px; height: 48px; border-radius: 50%;
|
|
1350
|
+
background: #fff3e0; color: #e8a000;
|
|
1351
|
+
display: flex; align-items: center; justify-content: center;
|
|
1352
|
+
margin: 0 auto 12px;
|
|
1353
|
+
}
|
|
1354
|
+
.confirm-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
|
|
1355
|
+
.confirm-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 18px; }
|
|
1356
|
+
.confirm-actions { display: flex; gap: 10px; }
|
|
1357
|
+
.confirm-actions button {
|
|
1358
|
+
flex: 1; padding: 10px; border-radius: 10px;
|
|
1359
|
+
font-size: 14px; font-weight: 600; cursor: pointer;
|
|
1360
|
+
border: none; transition: all .15s; font-family: inherit;
|
|
1361
|
+
}
|
|
1362
|
+
.confirm-btn-cancel { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border) !important; }
|
|
1363
|
+
.confirm-btn-cancel:active { background: var(--bg-hover); }
|
|
1364
|
+
.confirm-btn-ok { background: #e8a000; color: #fff; }
|
|
1365
|
+
.confirm-btn-ok:active { background: #d49200; }
|
|
1366
|
+
|
|
1367
|
+
/* ===== Slash Command Menu ===== */
|
|
1368
|
+
#cmd-menu {
|
|
1369
|
+
display: none; position: absolute; bottom: 100%; left: 0; right: 0;
|
|
1370
|
+
background: var(--bg-white); border: 1px solid var(--border);
|
|
1371
|
+
border-radius: var(--radius) var(--radius) 0 0;
|
|
1372
|
+
box-shadow: 0 -4px 16px rgba(0,0,0,.08);
|
|
1373
|
+
max-height: 260px; overflow-y: auto; z-index: 20;
|
|
1374
|
+
}
|
|
1375
|
+
#cmd-menu.visible { display: block; }
|
|
1376
|
+
.cmd-item {
|
|
1377
|
+
display: flex; align-items: center; gap: 10px;
|
|
1378
|
+
padding: 12px 16px; cursor: pointer; transition: background .1s;
|
|
1379
|
+
min-height: 48px;
|
|
1380
|
+
}
|
|
1381
|
+
.cmd-item:hover, .cmd-item.active { background: var(--bg-hover); }
|
|
1382
|
+
.cmd-icon {
|
|
1383
|
+
width: 32px; height: 32px; border-radius: 8px;
|
|
1384
|
+
background: var(--accent-light); color: var(--accent);
|
|
1385
|
+
display: flex; align-items: center; justify-content: center;
|
|
1386
|
+
flex-shrink: 0; font-size: 14px;
|
|
1387
|
+
}
|
|
1388
|
+
.cmd-name { font-size: 14px; font-weight: 600; color: var(--text); }
|
|
1389
|
+
.cmd-desc { font-size: 12px; color: var(--text-muted); }
|
|
1390
|
+
|
|
1391
|
+
/* ===== Model Picker Overlay ===== */
|
|
1392
|
+
#model-picker {
|
|
1393
|
+
display: none; position: fixed; inset: 0; z-index: 200;
|
|
1394
|
+
background: rgba(0,0,0,.35);
|
|
1395
|
+
align-items: flex-end; justify-content: center;
|
|
1396
|
+
}
|
|
1397
|
+
#model-picker.visible { display: flex; }
|
|
1398
|
+
#model-dialog {
|
|
1399
|
+
width: 100%; max-width: 400px;
|
|
1400
|
+
background: var(--bg-white); border-radius: 16px 16px 0 0;
|
|
1401
|
+
padding: 16px 0 20px;
|
|
1402
|
+
padding-bottom: 20px;
|
|
1403
|
+
padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
|
|
1404
|
+
box-shadow: 0 -4px 24px rgba(0,0,0,.12);
|
|
1405
|
+
animation: slideUp .2s ease;
|
|
1406
|
+
}
|
|
1407
|
+
.model-title {
|
|
1408
|
+
padding: 0 20px 12px; font-size: 15px; font-weight: 600;
|
|
1409
|
+
color: var(--text); border-bottom: 1px solid var(--border);
|
|
1410
|
+
}
|
|
1411
|
+
.model-item {
|
|
1412
|
+
display: flex; align-items: center; gap: 10px;
|
|
1413
|
+
padding: 14px 20px; cursor: pointer; transition: background .1s;
|
|
1414
|
+
min-height: 52px;
|
|
1415
|
+
}
|
|
1416
|
+
.model-item:hover, .model-item:active { background: var(--bg-hover); }
|
|
1417
|
+
.model-item .mi-num {
|
|
1418
|
+
width: 24px; height: 24px; border-radius: 6px;
|
|
1419
|
+
background: var(--bg); border: 1px solid var(--border);
|
|
1420
|
+
display: flex; align-items: center; justify-content: center;
|
|
1421
|
+
font-size: 12px; font-weight: 600; color: var(--text-muted); flex-shrink: 0;
|
|
1422
|
+
}
|
|
1423
|
+
.model-item .mi-info { display: flex; flex-direction: column; gap: 2px; }
|
|
1424
|
+
.model-item .mi-name { font-size: 14px; color: var(--text); }
|
|
1425
|
+
.model-item .mi-desc { font-size: 12px; color: var(--text-muted); }
|
|
1426
|
+
|
|
1427
|
+
/* ===== Cost Card ===== */
|
|
1428
|
+
.cost-card {
|
|
1429
|
+
margin: 12px 0; padding: 0;
|
|
1430
|
+
background: var(--bg-white); border: 1px solid var(--border);
|
|
1431
|
+
border-radius: var(--radius); overflow: hidden;
|
|
1432
|
+
animation: fadeUp .25s ease; font-size: 14px;
|
|
1433
|
+
}
|
|
1434
|
+
.cost-header {
|
|
1435
|
+
display: flex; align-items: center; gap: 8px;
|
|
1436
|
+
padding: 12px 16px; font-weight: 600; font-size: 14px;
|
|
1437
|
+
color: var(--accent); border-bottom: 1px solid var(--border);
|
|
1438
|
+
background: var(--accent-bg);
|
|
1439
|
+
}
|
|
1440
|
+
.cost-header svg { flex-shrink: 0; }
|
|
1441
|
+
.cost-grid {
|
|
1442
|
+
display: grid; grid-template-columns: 1fr 1fr;
|
|
1443
|
+
gap: 0;
|
|
1444
|
+
}
|
|
1445
|
+
.cost-item {
|
|
1446
|
+
padding: 12px 16px;
|
|
1447
|
+
border-bottom: 1px solid var(--border-light);
|
|
1448
|
+
}
|
|
1449
|
+
.cost-item:nth-child(odd) { border-right: 1px solid var(--border-light); }
|
|
1450
|
+
.cost-label {
|
|
1451
|
+
font-size: 11px; color: var(--text-muted); text-transform: uppercase;
|
|
1452
|
+
letter-spacing: .5px; margin-bottom: 2px;
|
|
1453
|
+
}
|
|
1454
|
+
.cost-value {
|
|
1455
|
+
font-size: 15px; font-weight: 600; color: var(--text);
|
|
1456
|
+
font-family: var(--mono);
|
|
1457
|
+
}
|
|
1458
|
+
.cost-highlight { color: var(--accent); }
|
|
1459
|
+
.cost-models {
|
|
1460
|
+
padding: 12px 16px;
|
|
1461
|
+
}
|
|
1462
|
+
.cost-models-title {
|
|
1463
|
+
font-size: 11px; color: var(--text-muted); text-transform: uppercase;
|
|
1464
|
+
letter-spacing: .5px; margin-bottom: 8px;
|
|
1465
|
+
}
|
|
1466
|
+
.cost-model-row {
|
|
1467
|
+
padding: 8px 12px; margin-bottom: 6px;
|
|
1468
|
+
background: var(--bg); border-radius: var(--radius-sm);
|
|
1469
|
+
border: 1px solid var(--border-light);
|
|
1470
|
+
}
|
|
1471
|
+
.cost-model-row:last-child { margin-bottom: 0; }
|
|
1472
|
+
.cost-model-name {
|
|
1473
|
+
font-size: 13px; font-weight: 600; color: var(--text);
|
|
1474
|
+
font-family: var(--mono); margin-bottom: 2px;
|
|
1475
|
+
}
|
|
1476
|
+
.cost-model-detail {
|
|
1477
|
+
font-size: 12px; color: var(--text-secondary); line-height: 1.5;
|
|
1478
|
+
}
|
|
1479
|
+
.cost-model-cost {
|
|
1480
|
+
font-size: 13px; font-weight: 600; color: var(--accent);
|
|
1481
|
+
font-family: var(--mono); margin-top: 2px;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
/* ===== Plan Inline Card (session switch) ===== */
|
|
1485
|
+
.plan-inline-card {
|
|
1486
|
+
margin: 12px 0; padding: 0;
|
|
1487
|
+
background: var(--bg-white); border: 1px solid var(--border);
|
|
1488
|
+
border-radius: var(--radius); overflow: hidden;
|
|
1489
|
+
animation: fadeUp .25s ease; font-size: 14px;
|
|
1490
|
+
}
|
|
1491
|
+
.plan-inline-header {
|
|
1492
|
+
display: flex; align-items: center; gap: 8px;
|
|
1493
|
+
padding: 12px 16px; font-weight: 600; font-size: 14px;
|
|
1494
|
+
color: #1967d2; border-bottom: 1px solid var(--border);
|
|
1495
|
+
background: #e8f0fe;
|
|
1496
|
+
}
|
|
1497
|
+
.plan-inline-header svg { flex-shrink: 0; }
|
|
1498
|
+
.plan-inline-body {
|
|
1499
|
+
padding: 12px 16px; font-size: 13px; color: var(--text-secondary);
|
|
1500
|
+
line-height: 1.6; max-height: 300px; overflow-y: auto;
|
|
1501
|
+
}
|
|
1502
|
+
.plan-inline-body h1,.plan-inline-body h2,.plan-inline-body h3 {
|
|
1503
|
+
font-size: 14px; margin: 8px 0 4px; color: var(--text);
|
|
1504
|
+
}
|
|
1505
|
+
.plan-inline-body p { margin: 4px 0; }
|
|
1506
|
+
.plan-inline-body ul,.plan-inline-body ol { padding-left: 18px; margin: 4px 0; }
|
|
1507
|
+
.plan-inline-body code {
|
|
1508
|
+
background: var(--code-bg); padding: 1px 4px; border-radius: 3px;
|
|
1509
|
+
font-size: 12px;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
/* ===== Mobile-specific ===== */
|
|
1513
|
+
@media (max-width: 600px) {
|
|
1514
|
+
#messages { padding: 10px 14px; }
|
|
1515
|
+
.step-desc { max-width: 100px; }
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
/* ===== Session Drawer ===== */
|
|
1519
|
+
#session-overlay {
|
|
1520
|
+
position: fixed; inset: 0; z-index: 350;
|
|
1521
|
+
background: rgba(0,0,0,.35);
|
|
1522
|
+
display: none; opacity: 0;
|
|
1523
|
+
transition: opacity .2s ease;
|
|
1524
|
+
}
|
|
1525
|
+
#session-overlay.visible { display: flex; opacity: 1; }
|
|
1526
|
+
#session-drawer {
|
|
1527
|
+
position: fixed; right: 0; top: 0; bottom: 0;
|
|
1528
|
+
width: 280px; max-width: 85vw;
|
|
1529
|
+
background: var(--bg-white);
|
|
1530
|
+
display: flex; flex-direction: column;
|
|
1531
|
+
transform: translateX(100%);
|
|
1532
|
+
transition: transform .25s cubic-bezier(.4,0,.2,1);
|
|
1533
|
+
box-shadow: -4px 0 20px rgba(0,0,0,.1);
|
|
1534
|
+
}
|
|
1535
|
+
#session-overlay.visible #session-drawer { transform: translateX(0); }
|
|
1536
|
+
.drawer-header {
|
|
1537
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
1538
|
+
padding: 16px;
|
|
1539
|
+
padding-top: calc(16px + env(safe-area-inset-top, 0px));
|
|
1540
|
+
border-bottom: 1px solid var(--border);
|
|
1541
|
+
flex-shrink: 0;
|
|
1542
|
+
}
|
|
1543
|
+
.drawer-title { font-size: 16px; font-weight: 600; color: var(--text); }
|
|
1544
|
+
.drawer-close {
|
|
1545
|
+
width: 32px; height: 32px; border: none; border-radius: 8px;
|
|
1546
|
+
background: transparent; color: var(--text-muted); cursor: pointer;
|
|
1547
|
+
display: flex; align-items: center; justify-content: center;
|
|
1548
|
+
}
|
|
1549
|
+
.drawer-close:active { background: var(--bg-hover); }
|
|
1550
|
+
.drawer-body {
|
|
1551
|
+
flex: 1; overflow-y: auto; padding: 8px;
|
|
1552
|
+
-webkit-overflow-scrolling: touch;
|
|
1553
|
+
}
|
|
1554
|
+
.drawer-loading {
|
|
1555
|
+
padding: 24px; text-align: center;
|
|
1556
|
+
color: var(--text-muted); font-size: 14px;
|
|
1557
|
+
}
|
|
1558
|
+
.session-item {
|
|
1559
|
+
padding: 12px; margin-bottom: 4px;
|
|
1560
|
+
border-radius: var(--radius-sm);
|
|
1561
|
+
border-left: 3px solid transparent;
|
|
1562
|
+
cursor: pointer; transition: background .15s;
|
|
1563
|
+
}
|
|
1564
|
+
.session-item:active { background: var(--bg-hover); }
|
|
1565
|
+
.session-item.active {
|
|
1566
|
+
border-left-color: var(--accent);
|
|
1567
|
+
background: var(--accent-bg);
|
|
1568
|
+
cursor: default;
|
|
1569
|
+
}
|
|
1570
|
+
.session-summary {
|
|
1571
|
+
font-size: 14px; font-weight: 500; color: var(--text);
|
|
1572
|
+
line-height: 1.4;
|
|
1573
|
+
overflow: hidden; text-overflow: ellipsis;
|
|
1574
|
+
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
|
|
1575
|
+
}
|
|
1576
|
+
.session-meta {
|
|
1577
|
+
display: flex; align-items: center; gap: 8px;
|
|
1578
|
+
margin-top: 4px; font-size: 12px; color: var(--text-muted);
|
|
1579
|
+
}
|
|
1580
|
+
.session-branch {
|
|
1581
|
+
background: var(--code-bg); border: 1px solid var(--border);
|
|
1582
|
+
padding: 1px 6px; border-radius: 4px;
|
|
1583
|
+
font-family: var(--mono); font-size: 11px;
|
|
1584
|
+
}
|
|
1585
|
+
.drawer-footer {
|
|
1586
|
+
padding: 12px; border-top: 1px solid var(--border);
|
|
1587
|
+
padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
|
|
1588
|
+
flex-shrink: 0;
|
|
1589
|
+
}
|
|
1590
|
+
.drawer-btn-new {
|
|
1591
|
+
width: 100%; height: 42px; border: 1.5px dashed var(--border);
|
|
1592
|
+
border-radius: var(--radius-sm);
|
|
1593
|
+
background: transparent; color: var(--text-secondary);
|
|
1594
|
+
font-size: 14px; font-weight: 500; cursor: pointer;
|
|
1595
|
+
transition: all .15s;
|
|
1596
|
+
}
|
|
1597
|
+
.drawer-btn-new:active {
|
|
1598
|
+
border-color: var(--accent); color: var(--accent);
|
|
1599
|
+
background: var(--accent-bg);
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
/* ===== Settings: CWD Section ===== */
|
|
1603
|
+
.settings-cwd-current {
|
|
1604
|
+
margin: 8px 0; padding: 8px 12px;
|
|
1605
|
+
background: var(--code-bg); border: 1px solid var(--border);
|
|
1606
|
+
border-radius: var(--radius-sm);
|
|
1607
|
+
font-family: var(--mono); font-size: 13px;
|
|
1608
|
+
color: var(--text); word-break: break-all;
|
|
1609
|
+
line-height: 1.5;
|
|
1610
|
+
}
|
|
1611
|
+
.settings-cwd-list {
|
|
1612
|
+
display: flex; flex-wrap: wrap; gap: 6px;
|
|
1613
|
+
margin-bottom: 8px; min-height: 0;
|
|
1614
|
+
}
|
|
1615
|
+
.cwd-chip {
|
|
1616
|
+
padding: 5px 10px; border-radius: 14px;
|
|
1617
|
+
background: var(--bg); border: 1px solid var(--border);
|
|
1618
|
+
font-size: 12px; font-family: var(--mono);
|
|
1619
|
+
color: var(--text-secondary); cursor: pointer;
|
|
1620
|
+
transition: all .15s; max-width: 100%;
|
|
1621
|
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
1622
|
+
}
|
|
1623
|
+
.cwd-chip:active { border-color: var(--accent); color: var(--accent); }
|
|
1624
|
+
.settings-cwd-input-row {
|
|
1625
|
+
display: flex; gap: 8px; margin-top: 4px;
|
|
1626
|
+
}
|
|
1627
|
+
.settings-cwd-input-row input {
|
|
1628
|
+
flex: 1; height: 40px; padding: 0 12px;
|
|
1629
|
+
border: 1.5px solid var(--border); border-radius: var(--radius-sm);
|
|
1630
|
+
font-size: 14px; font-family: var(--mono);
|
|
1631
|
+
color: var(--text); background: var(--bg-white);
|
|
1632
|
+
outline: none; transition: border-color .15s;
|
|
1633
|
+
}
|
|
1634
|
+
.settings-cwd-input-row input:focus { border-color: var(--accent); }
|
|
1635
|
+
.settings-cwd-input-row input[readonly] { cursor: pointer; }
|
|
1636
|
+
.settings-cwd-btn {
|
|
1637
|
+
height: 40px; padding: 0 16px; border: none;
|
|
1638
|
+
border-radius: var(--radius-sm);
|
|
1639
|
+
background: var(--accent); color: #fff;
|
|
1640
|
+
font-size: 14px; font-weight: 500; cursor: pointer;
|
|
1641
|
+
flex-shrink: 0; transition: background .15s;
|
|
1642
|
+
}
|
|
1643
|
+
.settings-cwd-btn:active { background: #247a5e; }
|
|
1644
|
+
|
|
1645
|
+
/* ===== Directory Picker ===== */
|
|
1646
|
+
#dir-overlay {
|
|
1647
|
+
position: fixed; inset: 0; z-index: 360;
|
|
1648
|
+
background: rgba(0,0,0,.35);
|
|
1649
|
+
display: none; opacity: 0;
|
|
1650
|
+
transition: opacity .2s ease;
|
|
1651
|
+
}
|
|
1652
|
+
#dir-overlay.visible { display: flex; opacity: 1; }
|
|
1653
|
+
#dir-drawer {
|
|
1654
|
+
position: fixed; left: 0; right: 0; bottom: 0;
|
|
1655
|
+
width: 100%; max-width: 480px; margin: 0 auto;
|
|
1656
|
+
max-height: 85vh;
|
|
1657
|
+
background: var(--bg-white);
|
|
1658
|
+
border-radius: 16px 16px 0 0;
|
|
1659
|
+
display: flex; flex-direction: column;
|
|
1660
|
+
transform: translateY(100%);
|
|
1661
|
+
transition: transform .25s cubic-bezier(.4,0,.2,1);
|
|
1662
|
+
box-shadow: 0 -4px 20px rgba(0,0,0,.12);
|
|
1663
|
+
}
|
|
1664
|
+
#dir-overlay.visible #dir-drawer { transform: translateY(0); }
|
|
1665
|
+
.dir-toolbar {
|
|
1666
|
+
padding: 12px 16px 8px;
|
|
1667
|
+
border-bottom: 1px solid var(--border);
|
|
1668
|
+
display: flex; flex-direction: column; gap: 10px;
|
|
1669
|
+
}
|
|
1670
|
+
.dir-current {
|
|
1671
|
+
font-family: var(--mono); font-size: 12px; line-height: 1.5;
|
|
1672
|
+
color: var(--text-secondary); word-break: break-all;
|
|
1673
|
+
}
|
|
1674
|
+
.dir-roots {
|
|
1675
|
+
display: flex; flex-wrap: wrap; gap: 6px;
|
|
1676
|
+
}
|
|
1677
|
+
.dir-root-chip {
|
|
1678
|
+
padding: 5px 10px; border-radius: 999px;
|
|
1679
|
+
border: 1px solid var(--border); background: var(--bg);
|
|
1680
|
+
color: var(--text-secondary); font-size: 12px; font-family: var(--mono);
|
|
1681
|
+
cursor: pointer;
|
|
1682
|
+
}
|
|
1683
|
+
.dir-root-chip:active,
|
|
1684
|
+
.dir-root-chip.active {
|
|
1685
|
+
border-color: var(--accent); color: var(--accent); background: var(--accent-bg);
|
|
1686
|
+
}
|
|
1687
|
+
.dir-item {
|
|
1688
|
+
display: flex; align-items: center; justify-content: space-between;
|
|
1689
|
+
gap: 12px; padding: 12px; border-radius: var(--radius-sm);
|
|
1690
|
+
cursor: pointer; transition: background .15s;
|
|
1691
|
+
}
|
|
1692
|
+
.dir-item:active { background: var(--bg-hover); }
|
|
1693
|
+
.dir-item-main {
|
|
1694
|
+
min-width: 0; display: flex; align-items: center; gap: 10px;
|
|
1695
|
+
}
|
|
1696
|
+
.dir-item-icon {
|
|
1697
|
+
width: 28px; height: 28px; border-radius: 8px;
|
|
1698
|
+
background: var(--accent-bg); color: var(--accent);
|
|
1699
|
+
display: flex; align-items: center; justify-content: center;
|
|
1700
|
+
flex-shrink: 0;
|
|
1701
|
+
}
|
|
1702
|
+
.dir-item-name {
|
|
1703
|
+
font-size: 14px; color: var(--text);
|
|
1704
|
+
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
1705
|
+
}
|
|
1706
|
+
.dir-item-path {
|
|
1707
|
+
font-size: 11px; color: var(--text-muted); font-family: var(--mono);
|
|
1708
|
+
}
|
|
1709
|
+
.dir-item-arrow {
|
|
1710
|
+
color: var(--text-muted); font-size: 16px; flex-shrink: 0;
|
|
1711
|
+
}
|
|
1712
|
+
.dir-empty {
|
|
1713
|
+
padding: 24px; text-align: center;
|
|
1714
|
+
color: var(--text-muted); font-size: 14px;
|
|
1715
|
+
}
|
|
1716
|
+
.drawer-btn-select {
|
|
1717
|
+
width: 100%; height: 42px; border: none;
|
|
1718
|
+
border-radius: var(--radius-sm);
|
|
1719
|
+
background: var(--accent); color: #fff;
|
|
1720
|
+
font-size: 14px; font-weight: 600; cursor: pointer;
|
|
1721
|
+
}
|
|
1722
|
+
.drawer-btn-select:active { background: #247a5e; }
|