@veltra/ai 2.1.11 → 2.2.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/components/ai-chat/chat-input.js +11 -6
- package/dist/components/ai-chat/chat-input.js.map +1 -1
- package/dist/components/ai-chat/message-list.js +2 -2
- package/dist/components/ai-chat/message-list.js.map +1 -1
- package/dist/components/ai-chat/model-picker.js +31 -95
- package/dist/components/ai-chat/model-picker.js.map +1 -1
- package/dist/components/ai-chat/reasoning-picker.js +68 -0
- package/dist/components/ai-chat/reasoning-picker.js.map +1 -0
- package/dist/components/ai-chat/style2.css +52 -57
- package/package.json +1 -1
- package/src/components/ai-chat/__test__/ai-chat.test.ts +59 -9
- package/src/components/ai-chat/chat-input.vue +10 -3
- package/src/components/ai-chat/message-list.vue +6 -5
- package/src/components/ai-chat/model-picker.vue +11 -110
- package/src/components/ai-chat/reasoning-picker.vue +70 -0
- package/src/components/ai-chat/style.scss +55 -62
|
@@ -1137,12 +1137,40 @@ $root-name: ai-chat;
|
|
|
1137
1137
|
@include m.ellipsis;
|
|
1138
1138
|
}
|
|
1139
1139
|
|
|
1140
|
-
@include m.e(model-trigger-
|
|
1140
|
+
@include m.e(model-trigger-arrow) {
|
|
1141
1141
|
flex-shrink: 0;
|
|
1142
|
+
font-size: 12px;
|
|
1142
1143
|
color: fn.use-var(text-color, assist);
|
|
1143
1144
|
}
|
|
1144
1145
|
|
|
1145
|
-
@include m.e(
|
|
1146
|
+
@include m.e(reasoning-trigger) {
|
|
1147
|
+
@include m.flex(flex, flex-start, center);
|
|
1148
|
+
gap: 4px;
|
|
1149
|
+
flex-shrink: 0;
|
|
1150
|
+
padding: 2px fn.use-var(gap, small);
|
|
1151
|
+
border: none;
|
|
1152
|
+
border-radius: fn.use-var(radius, default);
|
|
1153
|
+
background: transparent;
|
|
1154
|
+
color: fn.use-var(text-color, assist);
|
|
1155
|
+
font-family: inherit;
|
|
1156
|
+
font-size: inherit;
|
|
1157
|
+
cursor: pointer;
|
|
1158
|
+
transition:
|
|
1159
|
+
background-color 0.15s ease,
|
|
1160
|
+
color 0.15s ease;
|
|
1161
|
+
|
|
1162
|
+
&:hover {
|
|
1163
|
+
background-color: fn.use-var(bg-color, hover);
|
|
1164
|
+
color: fn.use-var(text-color, main);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
@include m.e(reasoning-trigger-label) {
|
|
1169
|
+
@include m.ellipsis;
|
|
1170
|
+
max-width: 72px;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
@include m.e(reasoning-trigger-arrow) {
|
|
1146
1174
|
flex-shrink: 0;
|
|
1147
1175
|
font-size: 12px;
|
|
1148
1176
|
color: fn.use-var(text-color, assist);
|
|
@@ -1278,8 +1306,10 @@ $root-name: ai-chat;
|
|
|
1278
1306
|
padding: 4px;
|
|
1279
1307
|
user-select: none;
|
|
1280
1308
|
|
|
1309
|
+
// 面板从贴底的输入栏向上弹出,超出高度在列表内滚动
|
|
1281
1310
|
.u-#{$root-name}__model-panel-list {
|
|
1282
1311
|
min-width: 0;
|
|
1312
|
+
max-height: 280px;
|
|
1283
1313
|
}
|
|
1284
1314
|
|
|
1285
1315
|
.u-#{$root-name}__model-option-main {
|
|
@@ -1294,60 +1324,28 @@ $root-name: ai-chat;
|
|
|
1294
1324
|
}
|
|
1295
1325
|
|
|
1296
1326
|
.u-#{$root-name}__model-option-head {
|
|
1297
|
-
@include m.flex(flex,
|
|
1298
|
-
gap:
|
|
1327
|
+
@include m.flex(flex, flex-start, center);
|
|
1328
|
+
gap: 8px;
|
|
1329
|
+
min-width: 0;
|
|
1299
1330
|
color: fn.use-var(text-color, main);
|
|
1300
1331
|
}
|
|
1301
1332
|
|
|
1302
|
-
.u-#{$root-name}__model-option-
|
|
1303
|
-
|
|
1333
|
+
.u-#{$root-name}__model-option.is-active {
|
|
1334
|
+
.u-#{$root-name}__model-option-name {
|
|
1335
|
+
color: fn.use-var(color, primary);
|
|
1336
|
+
font-weight: 600;
|
|
1337
|
+
}
|
|
1304
1338
|
}
|
|
1305
1339
|
|
|
1306
|
-
.u-#{$root-name}__model-option-
|
|
1307
|
-
@include m.
|
|
1308
|
-
flex-shrink: 0;
|
|
1309
|
-
gap: 6px;
|
|
1340
|
+
.u-#{$root-name}__model-option-name {
|
|
1341
|
+
@include m.ellipsis;
|
|
1310
1342
|
}
|
|
1311
1343
|
|
|
1312
1344
|
.u-#{$root-name}__model-option-check {
|
|
1313
1345
|
flex-shrink: 0;
|
|
1346
|
+
margin-left: auto;
|
|
1314
1347
|
font-size: 14px;
|
|
1315
1348
|
color: fn.use-var(color, primary);
|
|
1316
|
-
|
|
1317
|
-
@include m.is(hidden) {
|
|
1318
|
-
visibility: hidden;
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
.u-#{$root-name}__model-option-reasoning {
|
|
1323
|
-
@include m.flex(flex, flex-start, center);
|
|
1324
|
-
gap: 2px;
|
|
1325
|
-
flex-shrink: 0;
|
|
1326
|
-
padding: 1px 6px;
|
|
1327
|
-
border: none;
|
|
1328
|
-
border-radius: fn.use-var(radius, small);
|
|
1329
|
-
background: fn.use-var(color, primary, 'light-9');
|
|
1330
|
-
color: fn.use-var(color, primary);
|
|
1331
|
-
font-size: fn.use-var(font-size-main, small);
|
|
1332
|
-
cursor: pointer;
|
|
1333
|
-
transition:
|
|
1334
|
-
background-color 0.15s ease,
|
|
1335
|
-
color 0.15s ease;
|
|
1336
|
-
|
|
1337
|
-
&:hover {
|
|
1338
|
-
background: fn.use-var(color, primary, 'light-7');
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
.u-#{$root-name}__model-option-reasoning-arrow {
|
|
1343
|
-
font-size: 12px;
|
|
1344
|
-
transition: transform 0.2s ease;
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
|
-
.u-#{$root-name}__model-option-reasoning.is-expanded {
|
|
1348
|
-
.u-#{$root-name}__model-option-reasoning-arrow {
|
|
1349
|
-
transform: rotate(180deg);
|
|
1350
|
-
}
|
|
1351
1349
|
}
|
|
1352
1350
|
|
|
1353
1351
|
.u-#{$root-name}__model-option-desc {
|
|
@@ -1355,28 +1353,17 @@ $root-name: ai-chat;
|
|
|
1355
1353
|
font-size: fn.use-var(font-size-main, small);
|
|
1356
1354
|
color: fn.use-var(text-color, assist);
|
|
1357
1355
|
}
|
|
1356
|
+
}
|
|
1358
1357
|
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
transition: grid-template-rows 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1364
|
-
|
|
1365
|
-
@include m.is(expanded) {
|
|
1366
|
-
grid-template-rows: 1fr;
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
.u-#{$root-name}__reasoning-levels-inner {
|
|
1371
|
-
min-height: 0;
|
|
1372
|
-
overflow: hidden;
|
|
1373
|
-
}
|
|
1358
|
+
// 推理等级选择面板经 teleport 挂载到 popper 容器,同样需独立定义
|
|
1359
|
+
.u-#{$root-name}__reasoning-panel {
|
|
1360
|
+
padding: 4px;
|
|
1361
|
+
user-select: none;
|
|
1374
1362
|
|
|
1375
1363
|
.u-#{$root-name}__reasoning-option {
|
|
1376
1364
|
@include m.flex(flex, space-between, center);
|
|
1377
1365
|
gap: 12px;
|
|
1378
|
-
|
|
1379
|
-
padding: 5px 8px;
|
|
1366
|
+
padding: 6px 8px;
|
|
1380
1367
|
border-radius: calc(fn.use-var(radius, default) + 1px);
|
|
1381
1368
|
font-size: fn.use-var(font-size-main, small);
|
|
1382
1369
|
color: fn.use-var(text-color, main);
|
|
@@ -1393,4 +1380,10 @@ $root-name: ai-chat;
|
|
|
1393
1380
|
color: fn.use-var(color, primary);
|
|
1394
1381
|
}
|
|
1395
1382
|
}
|
|
1383
|
+
|
|
1384
|
+
.u-#{$root-name}__reasoning-check {
|
|
1385
|
+
flex-shrink: 0;
|
|
1386
|
+
font-size: 14px;
|
|
1387
|
+
color: fn.use-var(color, primary);
|
|
1388
|
+
}
|
|
1396
1389
|
}
|