llm-api-gateway-cli 1.0.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/.env.example +10 -0
- package/README.md +1127 -0
- package/cli-agent.js +666 -0
- package/cli-anthropic.js +236 -0
- package/cli-claude-code.js +317 -0
- package/cli-openai.js +212 -0
- package/completions/_llm-api-gateway-cli +65 -0
- package/completions/llm-api-gateway-cli.bash +64 -0
- package/completions/llm-api-gateway-cli.fish +43 -0
- package/images/chat.png +0 -0
- package/images/settings.png +0 -0
- package/images/task.png +0 -0
- package/lib/agent.js +607 -0
- package/lib/commands.js +468 -0
- package/lib/common.js +196 -0
- package/lib/config.js +70 -0
- package/lib/configcmd.js +230 -0
- package/lib/hub.js +1494 -0
- package/lib/jsonstore.js +49 -0
- package/lib/mcp.js +375 -0
- package/lib/memory.js +109 -0
- package/lib/plandoc.js +178 -0
- package/lib/pricing.js +52 -0
- package/lib/runner.js +234 -0
- package/lib/runstore.js +96 -0
- package/lib/secrets.js +198 -0
- package/lib/sessionstore.js +269 -0
- package/lib/settings.js +517 -0
- package/lib/tasksession.js +594 -0
- package/lib/taskstore.js +740 -0
- package/lib/tools.js +927 -0
- package/package.json +55 -0
- package/public/app.js +1055 -0
- package/public/index.html +167 -0
- package/public/manual.css +215 -0
- package/public/manual.html +381 -0
- package/public/manual.js +186 -0
- package/public/models.js +121 -0
- package/public/render.js +250 -0
- package/public/styles.css +955 -0
- package/public/task-slash.js +493 -0
- package/public/task.css +739 -0
- package/public/task.html +220 -0
- package/public/task.js +3127 -0
- package/public/theme.js +91 -0
- package/public/tint.js +261 -0
- package/scripts/install.ps1 +537 -0
- package/scripts/install.sh +510 -0
- package/server.js +14 -0
- package/task-server.js +15 -0
package/public/task.css
ADDED
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
/* 模式五 · 任务模式专属样式(叠加在 styles.css 之上) */
|
|
2
|
+
|
|
3
|
+
/* ---------- 侧边栏里的任务项 ---------- */
|
|
4
|
+
|
|
5
|
+
/* 复用聊天页的 .session-item 结构,只把第二行换成「目录名 · 时间」 */
|
|
6
|
+
.session-wd {
|
|
7
|
+
font-size: 11px;
|
|
8
|
+
color: var(--text-faint);
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
text-overflow: ellipsis;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.session-item.active .session-wd { color: var(--text-dim); }
|
|
15
|
+
|
|
16
|
+
/* ---------- 侧边栏按工作目录分组 ---------- */
|
|
17
|
+
|
|
18
|
+
/* 一个工作目录就是一「堆」:标题行 + 该目录下的若干任务 */
|
|
19
|
+
.task-group { margin-bottom: 6px; }
|
|
20
|
+
|
|
21
|
+
.task-group-head {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: 2px;
|
|
25
|
+
padding: 1px 4px;
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.task-group-head:hover { background: var(--bg-soft); }
|
|
30
|
+
|
|
31
|
+
.task-group-toggle {
|
|
32
|
+
flex: 1;
|
|
33
|
+
min-width: 0;
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: 5px;
|
|
37
|
+
background: none;
|
|
38
|
+
border: none;
|
|
39
|
+
color: var(--text-dim);
|
|
40
|
+
font: inherit;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
text-align: left;
|
|
43
|
+
padding: 4px 2px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.task-group-caret {
|
|
48
|
+
flex: none;
|
|
49
|
+
width: 9px;
|
|
50
|
+
font-size: 9px;
|
|
51
|
+
color: var(--text-faint);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.task-group-icon { flex: none; font-size: 12px; }
|
|
55
|
+
|
|
56
|
+
.task-group-name {
|
|
57
|
+
flex: 1;
|
|
58
|
+
min-width: 0;
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
text-overflow: ellipsis;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.task-group-count {
|
|
66
|
+
flex: none;
|
|
67
|
+
font-size: 10px;
|
|
68
|
+
line-height: 1.6;
|
|
69
|
+
color: var(--text-faint);
|
|
70
|
+
background: var(--bg-raised);
|
|
71
|
+
border-radius: 999px;
|
|
72
|
+
padding: 0 6px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* 「+」平时不抢眼,悬停整行时才露出来 */
|
|
76
|
+
.task-group-add { opacity: 0; }
|
|
77
|
+
.task-group-head:hover .task-group-add,
|
|
78
|
+
.task-group-add:focus-visible { opacity: 1; }
|
|
79
|
+
|
|
80
|
+
/* 触屏没有 hover,藏起来就等于没有这个按钮 */
|
|
81
|
+
@media (hover: none) {
|
|
82
|
+
.task-group-add { opacity: 1; }
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* 组内任务缩进一级,视觉上从属于目录 */
|
|
86
|
+
.task-group-body { padding-left: 11px; }
|
|
87
|
+
.task-group-body[hidden] { display: none; }
|
|
88
|
+
|
|
89
|
+
/* 草稿(还没落盘的新任务):只作提示,不可点 */
|
|
90
|
+
.session-item.draft { cursor: default; opacity: .65; }
|
|
91
|
+
.session-item.draft .session-title { font-style: italic; }
|
|
92
|
+
|
|
93
|
+
/* ---------- 任务树:一条任务下的派生任务 ---------- */
|
|
94
|
+
|
|
95
|
+
/* 子任务缩进一级,左侧再画一条细线,表明它是从上面那条派生出来的 */
|
|
96
|
+
.session-item.child { position: relative; margin-left: 13px; }
|
|
97
|
+
.session-item.child.depth-2 { margin-left: 26px; }
|
|
98
|
+
.session-item.child.depth-3 { margin-left: 39px; }
|
|
99
|
+
|
|
100
|
+
.session-item.child::before {
|
|
101
|
+
content: "";
|
|
102
|
+
position: absolute;
|
|
103
|
+
left: -7px;
|
|
104
|
+
top: 4px;
|
|
105
|
+
bottom: 4px;
|
|
106
|
+
width: 2px;
|
|
107
|
+
border-radius: 1px;
|
|
108
|
+
background: var(--border);
|
|
109
|
+
pointer-events: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* 有子任务的那条:行首多一个展开/折叠箭头 */
|
|
113
|
+
.task-caret {
|
|
114
|
+
flex: none;
|
|
115
|
+
width: 13px;
|
|
116
|
+
padding: 0;
|
|
117
|
+
border: none;
|
|
118
|
+
background: none;
|
|
119
|
+
color: var(--text-faint);
|
|
120
|
+
font-size: 9px;
|
|
121
|
+
line-height: 1;
|
|
122
|
+
text-align: center;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.task-caret:hover { color: var(--text); }
|
|
127
|
+
|
|
128
|
+
/* ---------- 存储位置展示 ---------- */
|
|
129
|
+
|
|
130
|
+
/* 侧边栏最底下那行:告诉用户任务数据落在磁盘哪,hover 看完整路径 */
|
|
131
|
+
.store-line {
|
|
132
|
+
padding: 6px 12px 10px;
|
|
133
|
+
font-size: 11px;
|
|
134
|
+
color: var(--text-faint);
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
text-overflow: ellipsis;
|
|
138
|
+
border-top: 1px solid var(--border);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* 设置面板里的完整路径:很长,允许换行并可选(左对齐,不靠右) */
|
|
142
|
+
.info-row-wide { align-items: flex-start; }
|
|
143
|
+
.path-code {
|
|
144
|
+
word-break: break-all;
|
|
145
|
+
white-space: normal;
|
|
146
|
+
user-select: all;
|
|
147
|
+
font-size: 11px;
|
|
148
|
+
line-height: 1.5;
|
|
149
|
+
text-align: left;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.settings-note {
|
|
153
|
+
margin: 10px 0 0;
|
|
154
|
+
font-size: 11px;
|
|
155
|
+
line-height: 1.6;
|
|
156
|
+
color: var(--text-faint);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.settings-note code {
|
|
160
|
+
font-size: 11px;
|
|
161
|
+
padding: 1px 4px;
|
|
162
|
+
border-radius: 3px;
|
|
163
|
+
background: var(--bg-soft);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ---------- 顶部工作目录 ---------- */
|
|
167
|
+
|
|
168
|
+
.workdir-chip {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
gap: 8px;
|
|
172
|
+
max-width: 460px;
|
|
173
|
+
min-width: 0;
|
|
174
|
+
background: var(--bg-raised);
|
|
175
|
+
border: 1px solid var(--border);
|
|
176
|
+
border-radius: 8px;
|
|
177
|
+
padding: 5px 10px;
|
|
178
|
+
color: var(--text-dim);
|
|
179
|
+
font: inherit;
|
|
180
|
+
font-size: 12px;
|
|
181
|
+
cursor: pointer;
|
|
182
|
+
transition: border-color .12s;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.workdir-chip:hover { border-color: var(--border-strong); color: var(--text); }
|
|
186
|
+
.workdir-chip .wd-label { flex: none; color: var(--text-faint); font-size: 11px; }
|
|
187
|
+
.workdir-chip code {
|
|
188
|
+
font-family: var(--mono);
|
|
189
|
+
font-size: 12px;
|
|
190
|
+
color: var(--accent);
|
|
191
|
+
overflow: hidden;
|
|
192
|
+
text-overflow: ellipsis;
|
|
193
|
+
white-space: nowrap;
|
|
194
|
+
direction: rtl; /* 路径过长时优先显示末尾(更能看出是哪个目录) */
|
|
195
|
+
text-align: left;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-ring); }
|
|
199
|
+
|
|
200
|
+
/* ---------- 工具调用步骤 ---------- */
|
|
201
|
+
|
|
202
|
+
.steps { margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
|
|
203
|
+
|
|
204
|
+
.step {
|
|
205
|
+
border: 1px solid var(--border);
|
|
206
|
+
border-radius: 8px;
|
|
207
|
+
background: var(--bg-code);
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.step > summary {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
gap: 8px;
|
|
215
|
+
padding: 7px 11px;
|
|
216
|
+
font-size: 12.5px;
|
|
217
|
+
color: var(--text-dim);
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
list-style: none;
|
|
220
|
+
user-select: none;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.step > summary::-webkit-details-marker { display: none; }
|
|
224
|
+
|
|
225
|
+
.step-icon { flex: none; width: 14px; text-align: center; font-weight: 700; }
|
|
226
|
+
.step.ok .step-icon { color: var(--ok); }
|
|
227
|
+
.step.fail .step-icon { color: var(--danger); }
|
|
228
|
+
.step.running .step-icon { color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
|
|
229
|
+
|
|
230
|
+
@keyframes pulse { 50% { opacity: .35; } }
|
|
231
|
+
|
|
232
|
+
.step-label { flex: none; color: var(--text); }
|
|
233
|
+
.step-brief {
|
|
234
|
+
flex: 1;
|
|
235
|
+
min-width: 0;
|
|
236
|
+
color: var(--text-faint);
|
|
237
|
+
font-size: 11.5px;
|
|
238
|
+
overflow: hidden;
|
|
239
|
+
text-overflow: ellipsis;
|
|
240
|
+
white-space: nowrap;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* 写入是「自动放行」还是「被计划模式挡下」,标在步骤行尾 */
|
|
244
|
+
.step-note {
|
|
245
|
+
flex: none;
|
|
246
|
+
padding: 1px 6px;
|
|
247
|
+
border-radius: 999px;
|
|
248
|
+
font-size: 10.5px;
|
|
249
|
+
color: var(--warn);
|
|
250
|
+
border: 1px solid currentColor;
|
|
251
|
+
opacity: .85;
|
|
252
|
+
}
|
|
253
|
+
.step-note.bad { color: var(--danger); }
|
|
254
|
+
|
|
255
|
+
.step-body {
|
|
256
|
+
margin: 0;
|
|
257
|
+
padding: 9px 11px;
|
|
258
|
+
border-top: 1px solid var(--border);
|
|
259
|
+
max-height: 340px;
|
|
260
|
+
overflow: auto;
|
|
261
|
+
font-family: var(--mono);
|
|
262
|
+
font-size: 12px;
|
|
263
|
+
line-height: 1.6;
|
|
264
|
+
color: var(--text-dim);
|
|
265
|
+
white-space: pre-wrap;
|
|
266
|
+
word-break: break-word;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* ---------- 写入批准卡片 ---------- */
|
|
270
|
+
|
|
271
|
+
.approval {
|
|
272
|
+
border: 1px solid var(--warn-border);
|
|
273
|
+
background: var(--warn-soft);
|
|
274
|
+
border-radius: 10px;
|
|
275
|
+
padding: 12px 13px;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.approval-head {
|
|
279
|
+
font-size: 13px;
|
|
280
|
+
font-weight: 600;
|
|
281
|
+
color: var(--warn);
|
|
282
|
+
margin-bottom: 8px;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.approval-head::before { content: "⚠ "; }
|
|
286
|
+
|
|
287
|
+
.approval-meta {
|
|
288
|
+
display: flex;
|
|
289
|
+
align-items: baseline;
|
|
290
|
+
gap: 10px;
|
|
291
|
+
flex-wrap: wrap;
|
|
292
|
+
font-size: 12px;
|
|
293
|
+
color: var(--text-faint);
|
|
294
|
+
margin-bottom: 10px;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.approval-meta code {
|
|
298
|
+
font-family: var(--mono);
|
|
299
|
+
font-size: 12.5px;
|
|
300
|
+
color: var(--text);
|
|
301
|
+
background: var(--bg);
|
|
302
|
+
border: 1px solid var(--border);
|
|
303
|
+
border-radius: 5px;
|
|
304
|
+
padding: 2px 7px;
|
|
305
|
+
word-break: break-all;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.approval-preview { margin-bottom: 11px; }
|
|
309
|
+
|
|
310
|
+
.approval-preview > summary {
|
|
311
|
+
font-size: 12px;
|
|
312
|
+
color: var(--text-dim);
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
list-style: none;
|
|
315
|
+
padding: 3px 0;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.approval-preview > summary::-webkit-details-marker { display: none; }
|
|
319
|
+
.approval-preview > summary::before { content: "▸ "; color: var(--accent); }
|
|
320
|
+
.approval-preview[open] > summary::before { content: "▾ "; }
|
|
321
|
+
|
|
322
|
+
.approval-preview pre {
|
|
323
|
+
margin: 6px 0 0;
|
|
324
|
+
padding: 10px 11px;
|
|
325
|
+
background: var(--bg-deep);
|
|
326
|
+
border: 1px solid var(--border);
|
|
327
|
+
border-radius: 8px;
|
|
328
|
+
max-height: 300px;
|
|
329
|
+
overflow: auto;
|
|
330
|
+
font-family: var(--mono);
|
|
331
|
+
font-size: 12px;
|
|
332
|
+
line-height: 1.6;
|
|
333
|
+
color: var(--text-dim);
|
|
334
|
+
white-space: pre-wrap;
|
|
335
|
+
word-break: break-word;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.approval-actions { display: flex; gap: 8px; justify-content: flex-end; }
|
|
339
|
+
|
|
340
|
+
/* ---------- 目录选择器 ---------- */
|
|
341
|
+
|
|
342
|
+
.modal {
|
|
343
|
+
position: fixed;
|
|
344
|
+
inset: 0;
|
|
345
|
+
z-index: 50;
|
|
346
|
+
background: var(--overlay);
|
|
347
|
+
display: grid;
|
|
348
|
+
place-items: center;
|
|
349
|
+
padding: 24px;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.modal[hidden] { display: none; }
|
|
353
|
+
|
|
354
|
+
.modal-card {
|
|
355
|
+
width: min(880px, 100%);
|
|
356
|
+
height: min(640px, 100%);
|
|
357
|
+
display: flex;
|
|
358
|
+
flex-direction: column;
|
|
359
|
+
background: var(--bg-soft);
|
|
360
|
+
border: 1px solid var(--border);
|
|
361
|
+
border-radius: 14px;
|
|
362
|
+
box-shadow: var(--shadow);
|
|
363
|
+
overflow: hidden;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.modal-head {
|
|
367
|
+
display: flex;
|
|
368
|
+
align-items: baseline;
|
|
369
|
+
gap: 12px;
|
|
370
|
+
padding: 15px 18px;
|
|
371
|
+
border-bottom: 1px solid var(--border);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.modal-head h2 { margin: 0; font-size: 15px; }
|
|
375
|
+
.modal-sub { font-size: 12px; color: var(--text-faint); }
|
|
376
|
+
|
|
377
|
+
.modal-path {
|
|
378
|
+
display: flex;
|
|
379
|
+
gap: 8px;
|
|
380
|
+
padding: 11px 18px;
|
|
381
|
+
border-bottom: 1px solid var(--border);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.modal-path input {
|
|
385
|
+
flex: 1;
|
|
386
|
+
min-width: 0;
|
|
387
|
+
background: var(--bg);
|
|
388
|
+
border: 1px solid var(--border);
|
|
389
|
+
border-radius: 8px;
|
|
390
|
+
color: var(--text);
|
|
391
|
+
font-family: var(--mono);
|
|
392
|
+
font-size: 12.5px;
|
|
393
|
+
padding: 6px 10px;
|
|
394
|
+
outline: none;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.modal-path input:focus { border-color: var(--border-focus); }
|
|
398
|
+
|
|
399
|
+
.modal-body {
|
|
400
|
+
flex: 1;
|
|
401
|
+
min-height: 0;
|
|
402
|
+
display: flex;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.dir-roots {
|
|
406
|
+
width: 180px;
|
|
407
|
+
flex: none;
|
|
408
|
+
border-right: 1px solid var(--border);
|
|
409
|
+
padding: 10px;
|
|
410
|
+
overflow-y: auto;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.dir-root {
|
|
414
|
+
display: block;
|
|
415
|
+
width: 100%;
|
|
416
|
+
text-align: left;
|
|
417
|
+
background: none;
|
|
418
|
+
border: none;
|
|
419
|
+
border-radius: 7px;
|
|
420
|
+
color: var(--text-dim);
|
|
421
|
+
font: inherit;
|
|
422
|
+
font-size: 12.5px;
|
|
423
|
+
padding: 7px 9px;
|
|
424
|
+
cursor: pointer;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.dir-root:hover { background: var(--bg-raised); color: var(--text); }
|
|
428
|
+
|
|
429
|
+
.dir-list { flex: 1; min-width: 0; overflow-y: auto; padding: 8px; }
|
|
430
|
+
|
|
431
|
+
.dir-row {
|
|
432
|
+
display: flex;
|
|
433
|
+
align-items: center;
|
|
434
|
+
gap: 9px;
|
|
435
|
+
padding: 6px 10px;
|
|
436
|
+
border-radius: 7px;
|
|
437
|
+
font-size: 13px;
|
|
438
|
+
cursor: default;
|
|
439
|
+
outline: none;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.dir-row.dir { cursor: pointer; color: var(--text); }
|
|
443
|
+
.dir-row.dir:hover { background: var(--bg-raised); }
|
|
444
|
+
.dir-row.dir:focus { box-shadow: inset 0 0 0 1px var(--border); }
|
|
445
|
+
.dir-row.selected { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--border-strong); }
|
|
446
|
+
.dir-row.file { color: var(--text-faint); font-size: 12.5px; }
|
|
447
|
+
|
|
448
|
+
.dir-icon { flex: none; font-size: 13px; }
|
|
449
|
+
.dir-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
450
|
+
.dir-size { flex: none; font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
|
|
451
|
+
|
|
452
|
+
.dir-empty { padding: 16px 12px; font-size: 12.5px; color: var(--text-faint); }
|
|
453
|
+
|
|
454
|
+
.modal-foot {
|
|
455
|
+
display: flex;
|
|
456
|
+
align-items: center;
|
|
457
|
+
justify-content: space-between;
|
|
458
|
+
gap: 12px;
|
|
459
|
+
padding: 12px 18px;
|
|
460
|
+
border-top: 1px solid var(--border);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.modal-note { font-size: 12px; color: var(--text-faint); min-width: 0; }
|
|
464
|
+
.modal-actions { display: flex; gap: 8px; flex: none; }
|
|
465
|
+
|
|
466
|
+
/* ---------- 审批模式切换(手动 / 自动 / 计划) ---------- */
|
|
467
|
+
|
|
468
|
+
.mode-bar {
|
|
469
|
+
display: flex;
|
|
470
|
+
align-items: center;
|
|
471
|
+
gap: 8px;
|
|
472
|
+
padding: 7px 10px 0;
|
|
473
|
+
flex-wrap: wrap;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.mode-label { font-size: 11.5px; color: var(--text-faint); flex: none; }
|
|
477
|
+
|
|
478
|
+
.mode-switch {
|
|
479
|
+
display: inline-flex;
|
|
480
|
+
border: 1px solid var(--border);
|
|
481
|
+
border-radius: 8px;
|
|
482
|
+
overflow: hidden;
|
|
483
|
+
flex: none;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.mode-btn {
|
|
487
|
+
appearance: none;
|
|
488
|
+
border: 0;
|
|
489
|
+
background: transparent;
|
|
490
|
+
color: var(--text-dim);
|
|
491
|
+
font: inherit;
|
|
492
|
+
font-size: 12px;
|
|
493
|
+
padding: 4px 12px;
|
|
494
|
+
cursor: pointer;
|
|
495
|
+
border-right: 1px solid var(--border);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.mode-btn:last-child { border-right: 0; }
|
|
499
|
+
.mode-btn:hover { background: var(--bg-soft); color: var(--text); }
|
|
500
|
+
.mode-btn.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
|
|
501
|
+
|
|
502
|
+
/* 自动模式是「不再问你」的状态,用告警色标出来,免得开完忘了 */
|
|
503
|
+
.mode-switch[data-mode="auto"] .mode-btn.active { background: var(--warn-soft-strong); color: var(--warn); }
|
|
504
|
+
.mode-switch[data-mode="plan"] .mode-btn.active { background: var(--plan-soft); color: var(--plan); }
|
|
505
|
+
|
|
506
|
+
.mode-note { font-size: 11px; color: var(--text-faint); min-width: 0; }
|
|
507
|
+
.mode-note.warn { color: var(--warn); }
|
|
508
|
+
|
|
509
|
+
/* ---------- 计划模式的「按计划执行」 ---------- */
|
|
510
|
+
|
|
511
|
+
.plan-bar {
|
|
512
|
+
display: flex;
|
|
513
|
+
align-items: center;
|
|
514
|
+
gap: 8px;
|
|
515
|
+
flex-wrap: wrap;
|
|
516
|
+
margin-top: 10px;
|
|
517
|
+
padding: 9px 11px;
|
|
518
|
+
border: 1px dashed var(--border-dashed);
|
|
519
|
+
border-radius: 8px;
|
|
520
|
+
background: var(--bg-code);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.plan-hint { font-size: 11.5px; color: var(--text-faint); min-width: 0; }
|
|
524
|
+
|
|
525
|
+
@media (max-width: 720px) {
|
|
526
|
+
.dir-roots { width: 120px; }
|
|
527
|
+
.workdir-chip { max-width: 200px; }
|
|
528
|
+
.modal-foot { flex-direction: column; align-items: stretch; }
|
|
529
|
+
.modal-actions { justify-content: flex-end; }
|
|
530
|
+
.mode-note { display: none; }
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/* ---------- 任务列表的状态点 ---------- */
|
|
534
|
+
|
|
535
|
+
/* 只表达一件事:在进行中,还是已完成。不加文字,避免列表变吵 */
|
|
536
|
+
.task-dot {
|
|
537
|
+
flex: none;
|
|
538
|
+
width: 7px;
|
|
539
|
+
height: 7px;
|
|
540
|
+
border-radius: 50%;
|
|
541
|
+
background: var(--border);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.task-dot.done { background: var(--ok); }
|
|
545
|
+
|
|
546
|
+
.task-dot.running {
|
|
547
|
+
background: var(--warn);
|
|
548
|
+
animation: dot-breathe 1.3s ease-in-out infinite;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/* 正在跑的那条,左侧再亮一条竖线(inset 阴影,不造成 2px 抖动) */
|
|
552
|
+
.session-item.running {
|
|
553
|
+
box-shadow: inset 2px 0 0 var(--warn);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
@keyframes dot-breathe {
|
|
557
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
558
|
+
50% { opacity: .45; transform: scale(.72); }
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
@media (prefers-reduced-motion: reduce) {
|
|
562
|
+
.task-dot.running { animation: none; }
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/* ---------- 撞到轮次上限后的「继续执行」 ---------- */
|
|
566
|
+
|
|
567
|
+
.resume-bar {
|
|
568
|
+
display: flex;
|
|
569
|
+
align-items: center;
|
|
570
|
+
gap: 10px;
|
|
571
|
+
margin-top: 10px;
|
|
572
|
+
padding-top: 10px;
|
|
573
|
+
border-top: 1px dashed var(--border-dashed);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/* ---------- 提示横幅与「正在工作」标记 ---------- */
|
|
577
|
+
|
|
578
|
+
/* 「已达上限而停止」「上游没返回正文」这类提示。以前会被静默丢掉,
|
|
579
|
+
现在单独成条显示在正文之前,用户不会再有「查完就没下文」的感觉。 */
|
|
580
|
+
.msg-notices {
|
|
581
|
+
display: flex;
|
|
582
|
+
flex-direction: column;
|
|
583
|
+
gap: 6px;
|
|
584
|
+
margin: 0 0 10px;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.msg-notice {
|
|
588
|
+
padding: 8px 11px;
|
|
589
|
+
border: 1px solid var(--warn-border);
|
|
590
|
+
border-radius: var(--radius-sm);
|
|
591
|
+
background: var(--warn-soft);
|
|
592
|
+
color: var(--warn);
|
|
593
|
+
font-size: 12.5px;
|
|
594
|
+
line-height: 1.6;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/* 模型正在生成时的呼吸动画:告诉用户「还在动,别关页面」 */
|
|
598
|
+
.bubble.working .content::after {
|
|
599
|
+
content: "";
|
|
600
|
+
display: inline-block;
|
|
601
|
+
width: 7px;
|
|
602
|
+
height: 14px;
|
|
603
|
+
margin-left: 3px;
|
|
604
|
+
vertical-align: text-bottom;
|
|
605
|
+
background: var(--accent);
|
|
606
|
+
border-radius: 1px;
|
|
607
|
+
animation: caret 1s steps(2, start) infinite;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.bubble.working .content:empty::before {
|
|
611
|
+
content: "模型正在生成…";
|
|
612
|
+
color: var(--text-faint);
|
|
613
|
+
font-size: 12.5px;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
@keyframes caret {
|
|
617
|
+
0%, 50% { opacity: 1; }
|
|
618
|
+
50.01%, 100% { opacity: 0; }
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/* 状态栏圆点在忙的时候也呼吸,和大段静默区分开 */
|
|
622
|
+
.dot.warn { animation: pulse 1.6s ease-in-out infinite; }
|
|
623
|
+
|
|
624
|
+
@media (prefers-reduced-motion: reduce) {
|
|
625
|
+
.bubble.working .content::after, .dot.warn { animation: none; }
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/* ---------- 细节打磨 ---------- */
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
/* 模式切换、目录行、工作目录按钮都加上过渡,切换时不跳变 */
|
|
632
|
+
.mode-btn,
|
|
633
|
+
.dir-row,
|
|
634
|
+
.workdir-chip {
|
|
635
|
+
transition: background-color var(--t), border-color var(--t), color var(--t), box-shadow var(--t);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/* 模式按钮按下时轻微内缩,像是真的按下去了 */
|
|
639
|
+
.mode-btn:active { transform: translateY(1px); }
|
|
640
|
+
.mode-switch { overflow: hidden; }
|
|
641
|
+
|
|
642
|
+
/* 目录行:圆角 + 悬停更明显,长目录名不撑破布局 */
|
|
643
|
+
.dir-row { border-radius: 6px; }
|
|
644
|
+
.dir-row.dir:hover { box-shadow: inset 0 0 0 1px var(--border); }
|
|
645
|
+
|
|
646
|
+
/* 计划执行条在浅色下也要有边界感 */
|
|
647
|
+
.plan-bar { transition: background-color var(--t), border-color var(--t); }
|
|
648
|
+
|
|
649
|
+
/* 待批准卡片顶部的强调边,深浅两套下都成立 */
|
|
650
|
+
.approval { border-radius: var(--radius-sm); transition: background-color var(--t), border-color var(--t); }
|
|
651
|
+
|
|
652
|
+
/* 步骤行悬停时略微提亮,方便在大段输出里定位(步骤是 details>summary) */
|
|
653
|
+
.step > summary { transition: background-color var(--t); }
|
|
654
|
+
.step > summary:hover { background: var(--bg-soft); }
|
|
655
|
+
|
|
656
|
+
@media (prefers-reduced-motion: reduce) {
|
|
657
|
+
* { transition: none !important; animation: none !important; }
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
/* ---------- 斜杠指令(E 组) ----------
|
|
661
|
+
* 面板贴着输入框上沿浮起:拿 composer-box 当定位上下文(.composer 是布局容器,
|
|
662
|
+
* 在它上面加 position 会影响排版,所以选更内层的 .composer-box)。
|
|
663
|
+
*/
|
|
664
|
+
.composer-box { position: relative; }
|
|
665
|
+
|
|
666
|
+
.slash-menu {
|
|
667
|
+
position: absolute;
|
|
668
|
+
left: 0;
|
|
669
|
+
right: 0;
|
|
670
|
+
bottom: calc(100% + 6px);
|
|
671
|
+
max-height: 280px;
|
|
672
|
+
overflow-y: auto;
|
|
673
|
+
padding: 6px 0;
|
|
674
|
+
background: var(--bg-raised);
|
|
675
|
+
border: 1px solid var(--border);
|
|
676
|
+
border-radius: 10px;
|
|
677
|
+
box-shadow: var(--shadow-strong);
|
|
678
|
+
z-index: 40;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.slash-menu-group {
|
|
682
|
+
padding: 6px 12px 2px;
|
|
683
|
+
font-size: 11px;
|
|
684
|
+
color: var(--text-dim);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
.slash-menu-item {
|
|
688
|
+
display: flex;
|
|
689
|
+
gap: 10px;
|
|
690
|
+
align-items: baseline;
|
|
691
|
+
padding: 5px 12px;
|
|
692
|
+
cursor: pointer;
|
|
693
|
+
font-size: 13px;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.slash-menu-item.hl { background: var(--accent-soft); }
|
|
697
|
+
|
|
698
|
+
.slash-name {
|
|
699
|
+
font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
700
|
+
color: var(--accent);
|
|
701
|
+
white-space: nowrap;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.slash-desc {
|
|
705
|
+
color: var(--text-dim);
|
|
706
|
+
font-size: 12px;
|
|
707
|
+
overflow: hidden;
|
|
708
|
+
text-overflow: ellipsis;
|
|
709
|
+
white-space: nowrap;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.slash-menu-foot {
|
|
713
|
+
margin-top: 4px;
|
|
714
|
+
padding: 4px 12px 0;
|
|
715
|
+
border-top: 1px solid var(--border);
|
|
716
|
+
font-size: 11px;
|
|
717
|
+
color: var(--text-dim);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
/* 指令输出:不进对白、不进模型上下文,样式上也与普通气泡区分开 */
|
|
721
|
+
.slash-msg { justify-content: center; }
|
|
722
|
+
|
|
723
|
+
.slash-out {
|
|
724
|
+
max-width: 92%;
|
|
725
|
+
padding: 8px 12px;
|
|
726
|
+
border: 1px dashed var(--border);
|
|
727
|
+
border-radius: 8px;
|
|
728
|
+
background: var(--bg-soft);
|
|
729
|
+
color: var(--text-dim);
|
|
730
|
+
font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
731
|
+
font-size: 12px;
|
|
732
|
+
line-height: 1.6;
|
|
733
|
+
white-space: pre-wrap;
|
|
734
|
+
word-break: break-word;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.slash-msg.error .slash-out { border-color: var(--danger); color: var(--danger); }
|
|
738
|
+
.slash-msg.warn .slash-out { border-color: var(--warn, var(--danger)); }
|
|
739
|
+
|