@veltra/ai 2.0.0 → 2.1.1
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/dist/chat/index.d.ts +2 -2
- package/dist/chat/transports/openai.js +1 -1
- package/dist/chat/transports/openai.js.map +1 -1
- package/dist/chat/types.d.ts +37 -2
- package/dist/chat/use-chat.d.ts +23 -1
- package/dist/chat/use-chat.js +91 -10
- package/dist/chat/use-chat.js.map +1 -1
- package/dist/components/ai-chat/ai-chat.js +207 -46
- package/dist/components/ai-chat/ai-chat.js.map +1 -1
- package/dist/components/ai-chat/chat-input.js +37 -12
- package/dist/components/ai-chat/chat-input.js.map +1 -1
- package/dist/components/ai-chat/di.js.map +1 -1
- package/dist/components/ai-chat/message-item.js +101 -23
- package/dist/components/ai-chat/message-item.js.map +1 -1
- package/dist/components/ai-chat/message-list.js +217 -32
- package/dist/components/ai-chat/message-list.js.map +1 -1
- package/dist/components/ai-chat/model-picker.js +69 -46
- package/dist/components/ai-chat/model-picker.js.map +1 -1
- package/dist/components/ai-chat/queue-list.js +70 -0
- package/dist/components/ai-chat/queue-list.js.map +1 -0
- package/dist/components/ai-chat/side-panel.js +96 -0
- package/dist/components/ai-chat/side-panel.js.map +1 -0
- package/dist/components/ai-chat/style.d.ts +4 -0
- package/dist/components/ai-chat/style.js +4 -0
- package/dist/components/ai-chat/style2.css +457 -74
- package/dist/components/ai-chat/tool-call.js +60 -26
- package/dist/components/ai-chat/tool-call.js.map +1 -1
- package/dist/components/ai-orb/ai-orb.js +94 -0
- package/dist/components/ai-orb/ai-orb.js.map +1 -0
- package/dist/components/ai-orb/orb-renderer.js +411 -0
- package/dist/components/ai-orb/orb-renderer.js.map +1 -0
- package/dist/components/ai-orb/style.d.ts +1 -0
- package/dist/components/ai-orb/style.js +1 -0
- package/dist/components/ai-orb/style2.css +23 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/style.js +1 -0
- package/dist/types/ai-chat.d.ts +21 -7
- package/dist/types/ai-orb.d.ts +27 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +5 -5
- package/src/chat/__test__/use-chat.test.ts +266 -13
- package/src/chat/transports/__test__/openai.test.ts +78 -0
- package/src/chat/transports/openai.ts +2 -2
- package/src/chat/types.ts +37 -1
- package/src/chat/use-chat.ts +120 -11
- package/src/components/ai-chat/__test__/ai-chat.test.ts +628 -12
- package/src/components/ai-chat/ai-chat.vue +227 -31
- package/src/components/ai-chat/chat-input.vue +41 -11
- package/src/components/ai-chat/di.ts +2 -0
- package/src/components/ai-chat/message-item.vue +98 -11
- package/src/components/ai-chat/message-list.vue +261 -21
- package/src/components/ai-chat/model-picker.vue +110 -59
- package/src/components/ai-chat/queue-list.vue +63 -0
- package/src/components/ai-chat/side-panel.vue +76 -0
- package/src/components/ai-chat/style.scss +527 -74
- package/src/components/ai-chat/style.ts +4 -0
- package/src/components/ai-chat/tool-call.vue +86 -42
- package/src/components/ai-orb/__test__/ai-orb.test.ts +251 -0
- package/src/components/ai-orb/ai-orb.vue +107 -0
- package/src/components/ai-orb/index.ts +1 -0
- package/src/components/ai-orb/orb-renderer.ts +505 -0
- package/src/components/ai-orb/style.scss +10 -0
- package/src/components/ai-orb/style.ts +1 -0
- package/src/components/index.ts +1 -0
- package/src/style.ts +1 -0
- package/src/tools/ask-question/__test__/ask-question.test.ts +1 -1
- package/src/types/ai-chat.ts +21 -6
- package/src/types/ai-orb.ts +27 -0
- package/src/types/index.ts +1 -0
|
@@ -16,27 +16,267 @@
|
|
|
16
16
|
*/
|
|
17
17
|
/** 暗色:data-theme 与系统偏好,与 UITheme.injectBuiltInThemes 选择器策略一致 */
|
|
18
18
|
.u-ai-chat {
|
|
19
|
+
height: 100%;
|
|
20
|
+
min-height: 0;
|
|
21
|
+
font-size: var(--u-font-size-main-default);
|
|
22
|
+
color: var(--u-text-color-main);
|
|
23
|
+
background-color: var(--u-bg-color-bottom);
|
|
24
|
+
}
|
|
25
|
+
.u-ai-chat__main {
|
|
26
|
+
min-width: 0;
|
|
27
|
+
min-height: 0;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: center;
|
|
31
|
+
padding: 0 var(--u-gap-default);
|
|
32
|
+
}
|
|
33
|
+
.u-ai-chat__main.is-empty::after {
|
|
34
|
+
content: "";
|
|
35
|
+
flex: 1;
|
|
36
|
+
}
|
|
37
|
+
.u-ai-chat.is-resizing {
|
|
38
|
+
cursor: col-resize;
|
|
39
|
+
}
|
|
40
|
+
.u-ai-chat.is-resizing .u-ai-chat__panel-body {
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
.u-ai-chat__panel {
|
|
44
|
+
min-width: 0;
|
|
45
|
+
padding: var(--u-gap-small);
|
|
46
|
+
padding-left: calc(var(--u-gap-small) / 2);
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
animation: u-ai-chat-panel-in 0.2s ease-out;
|
|
49
|
+
}
|
|
50
|
+
@media (prefers-reduced-motion: reduce) {
|
|
51
|
+
.u-ai-chat__panel {
|
|
52
|
+
animation: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.u-ai-chat__panel-card {
|
|
19
56
|
display: flex;
|
|
20
57
|
flex-direction: column;
|
|
21
58
|
height: 100%;
|
|
22
59
|
min-height: 0;
|
|
23
|
-
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
border-radius: var(--u-radius-large);
|
|
62
|
+
background-color: var(--u-bg-color-top);
|
|
63
|
+
box-shadow: var(--u-shadow-sm);
|
|
64
|
+
}
|
|
65
|
+
@keyframes u-ai-chat-panel-in {
|
|
66
|
+
from {
|
|
67
|
+
transform: translateX(16px);
|
|
68
|
+
opacity: 0;
|
|
69
|
+
}
|
|
70
|
+
to {
|
|
71
|
+
transform: translateX(0);
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
.u-ai-chat__panel-header {
|
|
76
|
+
flex: none;
|
|
77
|
+
display: flex;
|
|
78
|
+
justify-content: flex-start;
|
|
79
|
+
align-items: center;
|
|
80
|
+
flex-wrap: nowrap;
|
|
81
|
+
gap: var(--u-gap-small);
|
|
82
|
+
padding: var(--u-gap-default);
|
|
83
|
+
padding-bottom: var(--u-gap-small);
|
|
84
|
+
}
|
|
85
|
+
.u-ai-chat__panel-icon {
|
|
86
|
+
flex-shrink: 0;
|
|
87
|
+
width: 26px;
|
|
88
|
+
height: 26px;
|
|
89
|
+
border-radius: var(--u-radius-small);
|
|
90
|
+
background-color: var(--u-bg-color-middle);
|
|
91
|
+
font-size: 14px;
|
|
92
|
+
display: flex;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
align-items: center;
|
|
95
|
+
flex-wrap: nowrap;
|
|
96
|
+
}
|
|
97
|
+
.u-ai-chat__panel-icon.is-active {
|
|
98
|
+
color: var(--u-color-primary);
|
|
99
|
+
}
|
|
100
|
+
.u-ai-chat__panel-icon.is-warning {
|
|
101
|
+
color: var(--u-color-warning);
|
|
102
|
+
}
|
|
103
|
+
.u-ai-chat__panel-icon.is-success {
|
|
104
|
+
color: var(--u-color-success);
|
|
105
|
+
}
|
|
106
|
+
.u-ai-chat__panel-icon.is-danger {
|
|
107
|
+
color: var(--u-color-danger);
|
|
108
|
+
}
|
|
109
|
+
.u-ai-chat__panel-title {
|
|
110
|
+
flex: 1;
|
|
111
|
+
min-width: 0;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
text-overflow: ellipsis;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
font-weight: 600;
|
|
116
|
+
color: var(--u-text-color-title);
|
|
117
|
+
}
|
|
118
|
+
.u-ai-chat__panel-close {
|
|
119
|
+
flex-shrink: 0;
|
|
120
|
+
width: 22px;
|
|
121
|
+
height: 22px;
|
|
122
|
+
border-radius: 50%;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
color: var(--u-text-color-assist);
|
|
125
|
+
transition: color 0.15s ease, background-color 0.15s ease;
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
align-items: center;
|
|
129
|
+
flex-wrap: nowrap;
|
|
130
|
+
}
|
|
131
|
+
.u-ai-chat__panel-close:hover {
|
|
24
132
|
color: var(--u-text-color-main);
|
|
133
|
+
background-color: var(--u-bg-color-hover);
|
|
134
|
+
}
|
|
135
|
+
.u-ai-chat__panel-body {
|
|
136
|
+
flex: 1;
|
|
137
|
+
min-height: 0;
|
|
138
|
+
}
|
|
139
|
+
.u-ai-chat__panel-fallback {
|
|
140
|
+
margin: 0;
|
|
141
|
+
padding: var(--u-gap-default);
|
|
142
|
+
font-family: var(--u-font-family-code);
|
|
143
|
+
font-size: var(--u-font-size-main-small);
|
|
144
|
+
line-height: 1.5;
|
|
145
|
+
white-space: pre-wrap;
|
|
146
|
+
word-break: break-all;
|
|
147
|
+
}
|
|
148
|
+
.u-ai-chat__tool-call-panel-entry {
|
|
149
|
+
display: flex;
|
|
150
|
+
justify-content: flex-start;
|
|
151
|
+
align-items: center;
|
|
152
|
+
flex-wrap: nowrap;
|
|
153
|
+
gap: var(--u-gap-small);
|
|
154
|
+
}
|
|
155
|
+
.u-ai-chat__tool-call-panel-hint {
|
|
156
|
+
color: var(--u-text-color-assist);
|
|
157
|
+
}
|
|
158
|
+
.u-ai-chat__list-wrap {
|
|
159
|
+
position: relative;
|
|
160
|
+
flex: 1;
|
|
161
|
+
min-height: 0;
|
|
162
|
+
width: 100%;
|
|
163
|
+
max-width: 800px;
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-direction: column;
|
|
25
166
|
}
|
|
26
167
|
.u-ai-chat__list {
|
|
27
168
|
flex: 1;
|
|
28
169
|
min-height: 0;
|
|
29
170
|
}
|
|
171
|
+
.u-ai-chat__list .u-scroll__content {
|
|
172
|
+
min-height: 100%;
|
|
173
|
+
display: flex;
|
|
174
|
+
flex-direction: column;
|
|
175
|
+
}
|
|
30
176
|
.u-ai-chat__welcome {
|
|
31
|
-
|
|
177
|
+
flex: 1;
|
|
32
178
|
display: flex;
|
|
33
179
|
justify-content: center;
|
|
34
|
-
align-items:
|
|
180
|
+
align-items: flex-end;
|
|
35
181
|
flex-wrap: nowrap;
|
|
36
182
|
color: var(--u-text-color-assist);
|
|
37
|
-
padding: var(--u-gap-default);
|
|
183
|
+
padding: var(--u-gap-default) 0;
|
|
38
184
|
text-align: center;
|
|
39
185
|
}
|
|
186
|
+
.u-ai-chat__welcome-inner {
|
|
187
|
+
display: flex;
|
|
188
|
+
justify-content: flex-start;
|
|
189
|
+
align-items: center;
|
|
190
|
+
flex-wrap: nowrap;
|
|
191
|
+
gap: var(--u-gap-default);
|
|
192
|
+
width: 100%;
|
|
193
|
+
}
|
|
194
|
+
.u-ai-chat__welcome-item-wrap {
|
|
195
|
+
flex: 1;
|
|
196
|
+
min-width: 0;
|
|
197
|
+
display: flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
min-height: 54px;
|
|
200
|
+
}
|
|
201
|
+
.u-ai-chat__welcome-item {
|
|
202
|
+
max-width: 100%;
|
|
203
|
+
padding: var(--u-gap-small) var(--u-gap-default);
|
|
204
|
+
border: none;
|
|
205
|
+
border-radius: var(--u-radius-large);
|
|
206
|
+
background-color: var(--u-bg-color-top);
|
|
207
|
+
color: var(--u-text-color-second);
|
|
208
|
+
font-size: 13px;
|
|
209
|
+
text-align: left;
|
|
210
|
+
cursor: pointer;
|
|
211
|
+
transition: color 0.15s ease, background-color 0.15s ease;
|
|
212
|
+
}
|
|
213
|
+
.u-ai-chat__welcome-item:hover {
|
|
214
|
+
color: var(--u-color-primary);
|
|
215
|
+
background-color: var(--u-color-primary-light-9);
|
|
216
|
+
}
|
|
217
|
+
.u-ai-chat__welcome--swap-enter-active {
|
|
218
|
+
transition: opacity 0.18s ease, transform 0.18s ease;
|
|
219
|
+
}
|
|
220
|
+
.u-ai-chat__welcome--swap-leave-active {
|
|
221
|
+
transition: opacity 0.12s ease, transform 0.12s ease;
|
|
222
|
+
}
|
|
223
|
+
.u-ai-chat__welcome--swap-enter-from {
|
|
224
|
+
opacity: 0;
|
|
225
|
+
transform: translateY(6px);
|
|
226
|
+
}
|
|
227
|
+
.u-ai-chat__welcome--swap-leave-to {
|
|
228
|
+
opacity: 0;
|
|
229
|
+
transform: translateY(-6px);
|
|
230
|
+
}
|
|
231
|
+
.u-ai-chat__working {
|
|
232
|
+
display: flex;
|
|
233
|
+
justify-content: flex-start;
|
|
234
|
+
align-items: center;
|
|
235
|
+
flex-wrap: nowrap;
|
|
236
|
+
gap: var(--u-gap-small);
|
|
237
|
+
padding: 0 var(--u-gap-default) var(--u-gap-small);
|
|
238
|
+
}
|
|
239
|
+
.u-ai-chat__working-text {
|
|
240
|
+
font-size: var(--u-font-size-main-small);
|
|
241
|
+
}
|
|
242
|
+
.u-ai-chat__to-latest {
|
|
243
|
+
position: absolute;
|
|
244
|
+
top: var(--u-gap-small);
|
|
245
|
+
left: 50%;
|
|
246
|
+
transform: translateX(-50%);
|
|
247
|
+
z-index: 1;
|
|
248
|
+
display: flex;
|
|
249
|
+
justify-content: center;
|
|
250
|
+
align-items: center;
|
|
251
|
+
flex-wrap: nowrap;
|
|
252
|
+
gap: 4px;
|
|
253
|
+
padding: 4px 12px;
|
|
254
|
+
border: none;
|
|
255
|
+
border-radius: 999px;
|
|
256
|
+
background-color: var(--u-bg-color-top);
|
|
257
|
+
color: var(--u-text-color-second);
|
|
258
|
+
font-size: var(--u-font-size-main-small);
|
|
259
|
+
box-shadow: 0 2px 8px var(--u-shadow-color-a-20);
|
|
260
|
+
cursor: pointer;
|
|
261
|
+
transition: color 0.15s ease;
|
|
262
|
+
}
|
|
263
|
+
.u-ai-chat__to-latest:hover {
|
|
264
|
+
color: var(--u-color-primary);
|
|
265
|
+
}
|
|
266
|
+
.u-ai-chat__to-latest--fade-enter-active {
|
|
267
|
+
transition: opacity 0.15s ease, transform 0.15s ease;
|
|
268
|
+
}
|
|
269
|
+
.u-ai-chat__to-latest--fade-leave-active {
|
|
270
|
+
transition: opacity 0.1s ease, transform 0.1s ease;
|
|
271
|
+
}
|
|
272
|
+
.u-ai-chat__to-latest--fade-enter-from {
|
|
273
|
+
opacity: 0;
|
|
274
|
+
transform: translateX(-50%) translateY(-4px);
|
|
275
|
+
}
|
|
276
|
+
.u-ai-chat__to-latest--fade-leave-to {
|
|
277
|
+
opacity: 0;
|
|
278
|
+
transform: translateX(-50%) translateY(-4px);
|
|
279
|
+
}
|
|
40
280
|
.u-ai-chat__message {
|
|
41
281
|
padding: var(--u-gap-small) var(--u-gap-default);
|
|
42
282
|
}
|
|
@@ -69,7 +309,32 @@
|
|
|
69
309
|
display: block;
|
|
70
310
|
}
|
|
71
311
|
.u-ai-chat__message-content {
|
|
72
|
-
|
|
312
|
+
font-size: 13px;
|
|
313
|
+
line-height: 1.6;
|
|
314
|
+
--ms-text-body: 13px;
|
|
315
|
+
--ms-leading-body: 1.6;
|
|
316
|
+
--ms-text-h1: 1.55em;
|
|
317
|
+
--ms-text-h2: 1.35em;
|
|
318
|
+
--ms-text-h3: 1.15em;
|
|
319
|
+
--ms-text-h4: 1em;
|
|
320
|
+
--ms-text-h5: 1em;
|
|
321
|
+
--ms-text-h6: 1em;
|
|
322
|
+
--ms-flow-heading-1-mt: 0.9em;
|
|
323
|
+
--ms-flow-heading-1-mb: 0.35em;
|
|
324
|
+
--ms-flow-heading-2-mt: 0.8em;
|
|
325
|
+
--ms-flow-heading-2-mb: 0.3em;
|
|
326
|
+
--ms-flow-heading-3-mt: 0.7em;
|
|
327
|
+
--ms-flow-heading-3-mb: 0.25em;
|
|
328
|
+
--ms-flow-paragraph-y: 0.55em;
|
|
329
|
+
--ms-flow-list-y: 0.45em;
|
|
330
|
+
--ms-flow-list-item-y: 0.08em;
|
|
331
|
+
--ms-flow-list-indent: 1.3em;
|
|
332
|
+
--ms-flow-codeblock-y: 0.7em;
|
|
333
|
+
--ms-flow-blockquote-y: 0.55em;
|
|
334
|
+
--ms-flow-table-y: 0.7em;
|
|
335
|
+
--ms-flow-hr-y: 0.9em;
|
|
336
|
+
--ms-flow-admonition-y: 0.7em;
|
|
337
|
+
--ms-flow-diagram-y: 0.7em;
|
|
73
338
|
}
|
|
74
339
|
.u-ai-chat__message-status {
|
|
75
340
|
margin-top: var(--u-gap-small);
|
|
@@ -77,52 +342,76 @@
|
|
|
77
342
|
font-size: var(--u-font-size-main-small);
|
|
78
343
|
}
|
|
79
344
|
.u-ai-chat__message-actions {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
display: inline-flex;
|
|
84
|
-
}
|
|
85
|
-
.u-ai-chat__message-actions:hover {
|
|
86
|
-
color: var(--u-color-primary);
|
|
345
|
+
display: flex;
|
|
346
|
+
flex-wrap: wrap;
|
|
347
|
+
gap: var(--u-gap-small);
|
|
87
348
|
}
|
|
88
349
|
.u-ai-chat__reasoning {
|
|
89
|
-
margin-bottom:
|
|
350
|
+
margin-bottom: 4px;
|
|
90
351
|
color: var(--u-text-color-assist);
|
|
91
352
|
}
|
|
92
353
|
.u-ai-chat__reasoning.is-expanded .u-ai-chat__reasoning-chevron {
|
|
93
|
-
transform: rotate(
|
|
354
|
+
transform: rotate(90deg);
|
|
94
355
|
}
|
|
95
356
|
.u-ai-chat__reasoning-header {
|
|
96
357
|
display: flex;
|
|
97
358
|
justify-content: flex-start;
|
|
98
359
|
align-items: center;
|
|
99
360
|
flex-wrap: nowrap;
|
|
100
|
-
gap:
|
|
361
|
+
gap: 4px;
|
|
101
362
|
cursor: pointer;
|
|
102
363
|
user-select: none;
|
|
103
364
|
font-size: var(--u-font-size-main-small);
|
|
104
365
|
}
|
|
366
|
+
.u-ai-chat__reasoning-title {
|
|
367
|
+
line-height: 1.5;
|
|
368
|
+
}
|
|
105
369
|
.u-ai-chat__reasoning-chevron {
|
|
370
|
+
font-size: 12px;
|
|
106
371
|
transition: transform 0.2s;
|
|
107
372
|
}
|
|
108
373
|
.u-ai-chat__reasoning-content {
|
|
109
|
-
margin-top:
|
|
110
|
-
padding-left: var(--u-gap-
|
|
374
|
+
margin-top: 4px;
|
|
375
|
+
padding-left: var(--u-gap-small);
|
|
111
376
|
border-left: var(--u-border-muted);
|
|
377
|
+
}
|
|
378
|
+
.u-ai-chat__reasoning-text {
|
|
379
|
+
padding-right: 4px;
|
|
112
380
|
white-space: pre-wrap;
|
|
113
381
|
word-break: break-word;
|
|
114
382
|
font-size: var(--u-font-size-main-small);
|
|
115
|
-
line-height: 1.
|
|
383
|
+
line-height: 1.55;
|
|
116
384
|
}
|
|
117
385
|
.u-ai-chat__tool-call {
|
|
118
|
-
margin:
|
|
386
|
+
margin: 4px 0;
|
|
387
|
+
background-color: var(--u-bg-color-top);
|
|
388
|
+
font-size: var(--u-font-size-main-small);
|
|
389
|
+
}
|
|
390
|
+
.u-ai-chat__tool-call + .u-ai-chat__tool-call {
|
|
391
|
+
margin-top: 4px;
|
|
392
|
+
}
|
|
393
|
+
.u-ai-chat__tool-call .u-collapse__header {
|
|
394
|
+
gap: 6px;
|
|
395
|
+
padding: 5px var(--u-gap-small);
|
|
396
|
+
font-weight: 400;
|
|
397
|
+
letter-spacing: normal;
|
|
398
|
+
}
|
|
399
|
+
.u-ai-chat__tool-call .u-collapse__content {
|
|
400
|
+
border-top: var(--u-border-muted);
|
|
401
|
+
padding: var(--u-gap-small);
|
|
402
|
+
line-height: 1.5;
|
|
403
|
+
}
|
|
404
|
+
.u-ai-chat__tool-call-chevron {
|
|
405
|
+
flex-shrink: 0;
|
|
406
|
+
font-size: 12px;
|
|
407
|
+
color: var(--u-text-color-assist);
|
|
119
408
|
}
|
|
120
409
|
.u-ai-chat__tool-call-status {
|
|
121
410
|
flex-shrink: 0;
|
|
411
|
+
font-size: 13px;
|
|
122
412
|
}
|
|
123
|
-
.u-ai-chat__tool-call-status.is-
|
|
413
|
+
.u-ai-chat__tool-call-status.is-active {
|
|
124
414
|
color: var(--u-color-primary);
|
|
125
|
-
animation: u-ai-chat-rotate 1s linear infinite;
|
|
126
415
|
}
|
|
127
416
|
.u-ai-chat__tool-call-status.is-warning {
|
|
128
417
|
color: var(--u-color-warning);
|
|
@@ -134,8 +423,7 @@
|
|
|
134
423
|
color: var(--u-color-danger);
|
|
135
424
|
}
|
|
136
425
|
.u-ai-chat__tool-call-name {
|
|
137
|
-
font-
|
|
138
|
-
font-size: var(--u-font-size-main-small);
|
|
426
|
+
font-weight: 500;
|
|
139
427
|
color: var(--u-text-color-title);
|
|
140
428
|
flex-shrink: 0;
|
|
141
429
|
}
|
|
@@ -146,7 +434,6 @@
|
|
|
146
434
|
text-overflow: ellipsis;
|
|
147
435
|
white-space: nowrap;
|
|
148
436
|
color: var(--u-text-color-assist);
|
|
149
|
-
font-size: var(--u-font-size-main-small);
|
|
150
437
|
}
|
|
151
438
|
.u-ai-chat__tool-call-confirm {
|
|
152
439
|
flex-shrink: 0;
|
|
@@ -154,23 +441,26 @@
|
|
|
154
441
|
justify-content: flex-start;
|
|
155
442
|
align-items: center;
|
|
156
443
|
flex-wrap: nowrap;
|
|
157
|
-
gap:
|
|
444
|
+
gap: 4px;
|
|
158
445
|
}
|
|
159
446
|
.u-ai-chat__tool-call-section {
|
|
160
|
-
font-size: var(--u-font-size-main-small);
|
|
161
447
|
color: var(--u-text-color-assist);
|
|
162
|
-
margin:
|
|
448
|
+
margin-bottom: 4px;
|
|
449
|
+
}
|
|
450
|
+
.u-ai-chat__tool-call-section:not(:first-child) {
|
|
451
|
+
margin-top: var(--u-gap-small);
|
|
163
452
|
}
|
|
164
453
|
.u-ai-chat__tool-call-code {
|
|
165
454
|
margin: 0;
|
|
166
|
-
padding: var(--u-gap-small);
|
|
167
|
-
border-radius: var(--u-radius-
|
|
455
|
+
padding: 4px var(--u-gap-small);
|
|
456
|
+
border-radius: var(--u-radius-small);
|
|
168
457
|
background-color: var(--u-bg-color-bottom);
|
|
169
458
|
font-family: var(--u-font-family-code);
|
|
170
459
|
font-size: var(--u-font-size-main-small);
|
|
460
|
+
line-height: 1.5;
|
|
171
461
|
white-space: pre-wrap;
|
|
172
462
|
word-break: break-all;
|
|
173
|
-
max-height:
|
|
463
|
+
max-height: 200px;
|
|
174
464
|
overflow: auto;
|
|
175
465
|
}
|
|
176
466
|
.u-ai-chat__ask-question {
|
|
@@ -326,17 +616,86 @@
|
|
|
326
616
|
.u-ai-chat__ask-question-status {
|
|
327
617
|
color: var(--u-text-color-assist);
|
|
328
618
|
}
|
|
619
|
+
.u-ai-chat__queue {
|
|
620
|
+
flex-shrink: 0;
|
|
621
|
+
width: 100%;
|
|
622
|
+
max-width: 800px;
|
|
623
|
+
box-sizing: border-box;
|
|
624
|
+
margin-bottom: 4px;
|
|
625
|
+
border-radius: var(--u-radius-default);
|
|
626
|
+
background-color: var(--u-bg-color-middle);
|
|
627
|
+
padding: 4px;
|
|
628
|
+
font-size: var(--u-font-size-main-small);
|
|
629
|
+
}
|
|
630
|
+
.u-ai-chat__queue-head {
|
|
631
|
+
padding: 2px 6px;
|
|
632
|
+
color: var(--u-text-color-assist);
|
|
633
|
+
}
|
|
634
|
+
.u-ai-chat__queue-item {
|
|
635
|
+
display: flex;
|
|
636
|
+
justify-content: flex-start;
|
|
637
|
+
align-items: center;
|
|
638
|
+
flex-wrap: nowrap;
|
|
639
|
+
gap: 6px;
|
|
640
|
+
padding: 3px 6px;
|
|
641
|
+
border-radius: var(--u-radius-small);
|
|
642
|
+
}
|
|
643
|
+
.u-ai-chat__queue-item:hover {
|
|
644
|
+
background-color: var(--u-bg-color-hover);
|
|
645
|
+
}
|
|
646
|
+
.u-ai-chat__queue-text {
|
|
647
|
+
flex: 1;
|
|
648
|
+
min-width: 0;
|
|
649
|
+
overflow: hidden;
|
|
650
|
+
text-overflow: ellipsis;
|
|
651
|
+
white-space: nowrap;
|
|
652
|
+
color: var(--u-text-color-main);
|
|
653
|
+
}
|
|
654
|
+
.u-ai-chat__queue-actions {
|
|
655
|
+
flex-shrink: 0;
|
|
656
|
+
display: flex;
|
|
657
|
+
justify-content: flex-start;
|
|
658
|
+
align-items: center;
|
|
659
|
+
flex-wrap: nowrap;
|
|
660
|
+
gap: 2px;
|
|
661
|
+
}
|
|
662
|
+
.u-ai-chat__queue-action {
|
|
663
|
+
display: flex;
|
|
664
|
+
justify-content: flex-start;
|
|
665
|
+
align-items: center;
|
|
666
|
+
flex-wrap: nowrap;
|
|
667
|
+
gap: 2px;
|
|
668
|
+
border: none;
|
|
669
|
+
background: none;
|
|
670
|
+
padding: 1px 4px;
|
|
671
|
+
border-radius: var(--u-radius-small);
|
|
672
|
+
color: var(--u-text-color-assist);
|
|
673
|
+
font-size: inherit;
|
|
674
|
+
font-family: inherit;
|
|
675
|
+
white-space: nowrap;
|
|
676
|
+
cursor: pointer;
|
|
677
|
+
transition: color 0.15s ease, background-color 0.15s ease;
|
|
678
|
+
}
|
|
679
|
+
.u-ai-chat__queue-action:hover {
|
|
680
|
+
color: var(--u-color-primary);
|
|
681
|
+
background-color: var(--u-color-primary-light-9);
|
|
682
|
+
}
|
|
683
|
+
.u-ai-chat__queue-action--primary {
|
|
684
|
+
color: var(--u-color-primary);
|
|
685
|
+
}
|
|
329
686
|
.u-ai-chat__input-area {
|
|
330
687
|
flex-shrink: 0;
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
688
|
+
width: 100%;
|
|
689
|
+
max-width: 800px;
|
|
690
|
+
box-sizing: border-box;
|
|
691
|
+
margin: var(--u-gap-small) 0 var(--u-gap-default);
|
|
334
692
|
border-radius: var(--u-radius-large);
|
|
335
693
|
background-color: var(--u-bg-color-top);
|
|
336
694
|
padding: var(--u-gap-small);
|
|
695
|
+
transition: box-shadow 0.15s ease;
|
|
337
696
|
}
|
|
338
697
|
.u-ai-chat__input-area:focus-within {
|
|
339
|
-
|
|
698
|
+
box-shadow: 0 0 0 1px var(--u-color-primary);
|
|
340
699
|
}
|
|
341
700
|
.u-ai-chat__input {
|
|
342
701
|
width: 100%;
|
|
@@ -458,28 +817,20 @@
|
|
|
458
817
|
font-size: 12px;
|
|
459
818
|
}
|
|
460
819
|
|
|
461
|
-
@keyframes u-ai-chat-rotate {
|
|
462
|
-
from {
|
|
463
|
-
transform: rotate(0deg);
|
|
464
|
-
}
|
|
465
|
-
to {
|
|
466
|
-
transform: rotate(360deg);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
820
|
.u-ai-chat__model-panel {
|
|
470
|
-
display: flex;
|
|
471
|
-
flex-direction: column;
|
|
472
|
-
gap: 1px;
|
|
473
821
|
padding: 4px;
|
|
474
822
|
user-select: none;
|
|
475
823
|
}
|
|
476
|
-
.u-ai-chat__model-panel .u-ai-chat__model-
|
|
824
|
+
.u-ai-chat__model-panel .u-ai-chat__model-panel-list {
|
|
825
|
+
min-width: 0;
|
|
826
|
+
}
|
|
827
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-main {
|
|
477
828
|
padding: 6px 8px;
|
|
478
829
|
border-radius: calc(var(--u-radius-default) + 1px);
|
|
479
830
|
cursor: pointer;
|
|
480
831
|
transition: background-color 0.15s ease;
|
|
481
832
|
}
|
|
482
|
-
.u-ai-chat__model-panel .u-ai-chat__model-option:hover {
|
|
833
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-main:hover {
|
|
483
834
|
background-color: var(--u-nav-hover-bg);
|
|
484
835
|
}
|
|
485
836
|
.u-ai-chat__model-panel .u-ai-chat__model-option-head {
|
|
@@ -487,58 +838,90 @@
|
|
|
487
838
|
justify-content: space-between;
|
|
488
839
|
align-items: center;
|
|
489
840
|
flex-wrap: nowrap;
|
|
490
|
-
gap:
|
|
841
|
+
gap: 12px;
|
|
491
842
|
color: var(--u-text-color-main);
|
|
492
843
|
}
|
|
844
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-name {
|
|
845
|
+
overflow: hidden;
|
|
846
|
+
text-overflow: ellipsis;
|
|
847
|
+
white-space: nowrap;
|
|
848
|
+
}
|
|
849
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-actions {
|
|
850
|
+
display: flex;
|
|
851
|
+
justify-content: flex-start;
|
|
852
|
+
align-items: center;
|
|
853
|
+
flex-wrap: nowrap;
|
|
854
|
+
flex-shrink: 0;
|
|
855
|
+
gap: 6px;
|
|
856
|
+
}
|
|
493
857
|
.u-ai-chat__model-panel .u-ai-chat__model-option-check {
|
|
494
858
|
flex-shrink: 0;
|
|
495
859
|
font-size: 14px;
|
|
496
860
|
color: var(--u-color-primary);
|
|
497
861
|
}
|
|
498
|
-
.u-ai-chat__model-panel .u-ai-chat__model-option-
|
|
499
|
-
|
|
500
|
-
font-size: var(--u-font-size-main-small);
|
|
501
|
-
color: var(--u-text-color-assist);
|
|
502
|
-
}
|
|
503
|
-
.u-ai-chat__model-panel .u-ai-chat__model-divider {
|
|
504
|
-
height: 0;
|
|
505
|
-
margin: 4px 8px;
|
|
506
|
-
border-top: 1px solid var(--u-border-color);
|
|
862
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-check.is-hidden {
|
|
863
|
+
visibility: hidden;
|
|
507
864
|
}
|
|
508
|
-
.u-ai-chat__model-panel .u-ai-
|
|
865
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-reasoning {
|
|
509
866
|
display: flex;
|
|
510
|
-
justify-content:
|
|
867
|
+
justify-content: flex-start;
|
|
511
868
|
align-items: center;
|
|
512
869
|
flex-wrap: nowrap;
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
870
|
+
gap: 2px;
|
|
871
|
+
flex-shrink: 0;
|
|
872
|
+
padding: 1px 6px;
|
|
873
|
+
border: none;
|
|
874
|
+
border-radius: var(--u-radius-small);
|
|
875
|
+
background: var(--u-color-primary-light-9);
|
|
876
|
+
color: var(--u-color-primary);
|
|
877
|
+
font-size: var(--u-font-size-main-small);
|
|
516
878
|
cursor: pointer;
|
|
517
|
-
transition: background-color 0.15s ease;
|
|
879
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
518
880
|
}
|
|
519
|
-
.u-ai-chat__model-panel .u-ai-
|
|
520
|
-
background
|
|
881
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-reasoning:hover {
|
|
882
|
+
background: var(--u-color-primary-light-7);
|
|
521
883
|
}
|
|
522
|
-
.u-ai-chat__model-panel .u-ai-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
884
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-reasoning-arrow {
|
|
885
|
+
font-size: 12px;
|
|
886
|
+
transition: transform 0.2s ease;
|
|
887
|
+
}
|
|
888
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-reasoning.is-expanded .u-ai-chat__model-option-reasoning-arrow {
|
|
889
|
+
transform: rotate(180deg);
|
|
890
|
+
}
|
|
891
|
+
.u-ai-chat__model-panel .u-ai-chat__model-option-desc {
|
|
892
|
+
margin-top: 2px;
|
|
893
|
+
font-size: var(--u-font-size-main-small);
|
|
528
894
|
color: var(--u-text-color-assist);
|
|
529
895
|
}
|
|
896
|
+
.u-ai-chat__model-panel .u-ai-chat__reasoning-levels {
|
|
897
|
+
display: grid;
|
|
898
|
+
grid-template-rows: 0fr;
|
|
899
|
+
transition: grid-template-rows 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
900
|
+
}
|
|
901
|
+
.u-ai-chat__model-panel .u-ai-chat__reasoning-levels.is-expanded {
|
|
902
|
+
grid-template-rows: 1fr;
|
|
903
|
+
}
|
|
904
|
+
.u-ai-chat__model-panel .u-ai-chat__reasoning-levels-inner {
|
|
905
|
+
min-height: 0;
|
|
906
|
+
overflow: hidden;
|
|
907
|
+
}
|
|
530
908
|
.u-ai-chat__model-panel .u-ai-chat__reasoning-option {
|
|
531
909
|
display: flex;
|
|
532
910
|
justify-content: space-between;
|
|
533
911
|
align-items: center;
|
|
534
912
|
flex-wrap: nowrap;
|
|
535
|
-
gap:
|
|
536
|
-
|
|
913
|
+
gap: 12px;
|
|
914
|
+
margin-left: 8px;
|
|
915
|
+
padding: 5px 8px;
|
|
537
916
|
border-radius: calc(var(--u-radius-default) + 1px);
|
|
917
|
+
font-size: var(--u-font-size-main-small);
|
|
538
918
|
color: var(--u-text-color-main);
|
|
539
919
|
cursor: pointer;
|
|
540
|
-
transition: background-color 0.15s ease;
|
|
920
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
541
921
|
}
|
|
542
922
|
.u-ai-chat__model-panel .u-ai-chat__reasoning-option:hover {
|
|
543
923
|
background-color: var(--u-nav-hover-bg);
|
|
544
924
|
}
|
|
925
|
+
.u-ai-chat__model-panel .u-ai-chat__reasoning-option.is-active {
|
|
926
|
+
color: var(--u-color-primary);
|
|
927
|
+
}
|