@hef2024/llmasaservice-ui 0.22.11 → 0.23.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/index.css +632 -1
- package/dist/index.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +3829 -3465
- package/dist/index.mjs +3760 -3398
- package/package.json +1 -1
- package/src/AIAgentPanel.tsx +96 -98
- package/src/AIChatPanel.css +365 -0
- package/src/AIChatPanel.tsx +251 -88
- package/src/ChatPanel.css +379 -3
- package/src/ChatPanel.tsx +264 -190
- package/src/components/ui/ThinkingBlock.tsx +150 -0
- package/src/components/ui/WordFadeIn.tsx +101 -0
- package/src/components/ui/index.ts +6 -0
package/src/ChatPanel.css
CHANGED
|
@@ -927,8 +927,8 @@
|
|
|
927
927
|
color: #999;
|
|
928
928
|
}
|
|
929
929
|
|
|
930
|
-
/* Reasoning and
|
|
931
|
-
.reasoning-section, .searching-section {
|
|
930
|
+
/* Reasoning, Searching, and Thinking Sections */
|
|
931
|
+
.reasoning-section, .searching-section, .thinking-section.thinking-section {
|
|
932
932
|
margin: 1rem 0;
|
|
933
933
|
padding: 0.75rem;
|
|
934
934
|
border-radius: var(--border-radius);
|
|
@@ -946,6 +946,12 @@
|
|
|
946
946
|
background-color: var(--searching-background-color, #f0fff0);
|
|
947
947
|
}
|
|
948
948
|
|
|
949
|
+
/* Thinking type (Claude-style extended thinking) - purple/violet theme */
|
|
950
|
+
.thinking-section.thinking-section {
|
|
951
|
+
border-left-color: var(--thinking-border-color, #8b5cf6);
|
|
952
|
+
background-color: var(--thinking-background-color, #f5f3ff);
|
|
953
|
+
}
|
|
954
|
+
|
|
949
955
|
.reasoning-header, .searching-header {
|
|
950
956
|
font-weight: 600;
|
|
951
957
|
font-size: 0.9rem;
|
|
@@ -962,7 +968,7 @@
|
|
|
962
968
|
font-style: italic;
|
|
963
969
|
}
|
|
964
970
|
|
|
965
|
-
/* Dark theme support for reasoning/searching */
|
|
971
|
+
/* Dark theme support for reasoning/searching/thinking */
|
|
966
972
|
.dark-theme .reasoning-section {
|
|
967
973
|
background-color: var(--reasoning-background-color-dark, #1a1a2e);
|
|
968
974
|
border-left-color: var(--reasoning-border-color-dark, #4a9eff);
|
|
@@ -973,6 +979,11 @@
|
|
|
973
979
|
border-left-color: var(--searching-border-color-dark, #4ade80);
|
|
974
980
|
}
|
|
975
981
|
|
|
982
|
+
.dark-theme .thinking-section.thinking-section {
|
|
983
|
+
background-color: var(--thinking-background-color-dark, #1e1a2e);
|
|
984
|
+
border-left-color: var(--thinking-border-color-dark, #a78bfa);
|
|
985
|
+
}
|
|
986
|
+
|
|
976
987
|
.dark-theme .reasoning-header,
|
|
977
988
|
.dark-theme .searching-header,
|
|
978
989
|
.dark-theme .reasoning-content,
|
|
@@ -1201,4 +1212,369 @@ button[data-pending="true"]::after {
|
|
|
1201
1212
|
opacity: 1;
|
|
1202
1213
|
transform: translateY(0);
|
|
1203
1214
|
}
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
/* ============================================================================
|
|
1218
|
+
Streaming Thinking Blocks - New Collapsible Design
|
|
1219
|
+
============================================================================ */
|
|
1220
|
+
|
|
1221
|
+
/* Word Fade-In Animation */
|
|
1222
|
+
.word-fade-in {
|
|
1223
|
+
animation: wordFadeIn 150ms ease-out forwards;
|
|
1224
|
+
}
|
|
1225
|
+
|
|
1226
|
+
@keyframes wordFadeIn {
|
|
1227
|
+
from {
|
|
1228
|
+
opacity: 0;
|
|
1229
|
+
transform: translateY(2px);
|
|
1230
|
+
}
|
|
1231
|
+
to {
|
|
1232
|
+
opacity: 1;
|
|
1233
|
+
transform: translateY(0);
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
/* Streaming Text Chunk Animation - for text appearing as it streams */
|
|
1238
|
+
.streaming-text-chunk {
|
|
1239
|
+
animation: streamingFadeIn var(--fade-duration, 400ms) ease-out forwards;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
@keyframes streamingFadeIn {
|
|
1243
|
+
0% {
|
|
1244
|
+
opacity: 0;
|
|
1245
|
+
background-color: rgba(99, 102, 241, 0.2);
|
|
1246
|
+
border-radius: 2px;
|
|
1247
|
+
}
|
|
1248
|
+
30% {
|
|
1249
|
+
opacity: 0.8;
|
|
1250
|
+
background-color: rgba(99, 102, 241, 0.15);
|
|
1251
|
+
}
|
|
1252
|
+
100% {
|
|
1253
|
+
opacity: 1;
|
|
1254
|
+
background-color: transparent;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/* Dark theme streaming highlight */
|
|
1259
|
+
.dark-theme .streaming-text-chunk {
|
|
1260
|
+
animation: streamingFadeInDark var(--fade-duration, 400ms) ease-out forwards;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
@keyframes streamingFadeInDark {
|
|
1264
|
+
0% {
|
|
1265
|
+
opacity: 0;
|
|
1266
|
+
background-color: rgba(129, 140, 248, 0.25);
|
|
1267
|
+
border-radius: 2px;
|
|
1268
|
+
}
|
|
1269
|
+
30% {
|
|
1270
|
+
opacity: 0.8;
|
|
1271
|
+
background-color: rgba(129, 140, 248, 0.15);
|
|
1272
|
+
}
|
|
1273
|
+
100% {
|
|
1274
|
+
opacity: 1;
|
|
1275
|
+
background-color: transparent;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
/* Thinking Block Container */
|
|
1280
|
+
.thinking-block {
|
|
1281
|
+
margin-bottom: 12px;
|
|
1282
|
+
border-radius: var(--border-radius, 8px);
|
|
1283
|
+
overflow: hidden;
|
|
1284
|
+
background-color: var(--input-background-color, #f9fafb);
|
|
1285
|
+
border: 1px solid var(--input-border-color, #e5e7eb);
|
|
1286
|
+
transition: all 0.2s ease-out;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
/* Type-specific themes */
|
|
1290
|
+
.thinking-block--thinking {
|
|
1291
|
+
--thinking-block-accent: #8b5cf6;
|
|
1292
|
+
--thinking-block-bg: #f5f3ff;
|
|
1293
|
+
--thinking-block-text: #5b21b6;
|
|
1294
|
+
background-color: var(--thinking-block-bg);
|
|
1295
|
+
border-color: var(--thinking-block-accent);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
.thinking-block--reasoning {
|
|
1299
|
+
--thinking-block-accent: #3b82f6;
|
|
1300
|
+
--thinking-block-bg: #eff6ff;
|
|
1301
|
+
--thinking-block-text: #1d4ed8;
|
|
1302
|
+
background-color: var(--thinking-block-bg);
|
|
1303
|
+
border-color: var(--thinking-block-accent);
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
.thinking-block--searching {
|
|
1307
|
+
--thinking-block-accent: #22c55e;
|
|
1308
|
+
--thinking-block-bg: #f0fdf4;
|
|
1309
|
+
--thinking-block-text: #166534;
|
|
1310
|
+
background-color: var(--thinking-block-bg);
|
|
1311
|
+
border-color: var(--thinking-block-accent);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
/* Dark theme type-specific */
|
|
1315
|
+
.dark-theme .thinking-block--thinking {
|
|
1316
|
+
--thinking-block-bg: #1e1b2e;
|
|
1317
|
+
--thinking-block-accent: #a78bfa;
|
|
1318
|
+
--thinking-block-text: #c4b5fd;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
.dark-theme .thinking-block--reasoning {
|
|
1322
|
+
--thinking-block-bg: #0c1929;
|
|
1323
|
+
--thinking-block-accent: #60a5fa;
|
|
1324
|
+
--thinking-block-text: #93c5fd;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
.dark-theme .thinking-block--searching {
|
|
1328
|
+
--thinking-block-bg: #052e16;
|
|
1329
|
+
--thinking-block-accent: #4ade80;
|
|
1330
|
+
--thinking-block-text: #86efac;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
/* Header (clickable toggle) */
|
|
1334
|
+
.thinking-block__header {
|
|
1335
|
+
display: flex;
|
|
1336
|
+
align-items: center;
|
|
1337
|
+
justify-content: space-between;
|
|
1338
|
+
width: 100%;
|
|
1339
|
+
padding: 10px 12px;
|
|
1340
|
+
background: none;
|
|
1341
|
+
border: none;
|
|
1342
|
+
cursor: pointer;
|
|
1343
|
+
font-family: inherit;
|
|
1344
|
+
text-align: left;
|
|
1345
|
+
transition: background-color 0.15s;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
.thinking-block__header:hover {
|
|
1349
|
+
background-color: rgba(0, 0, 0, 0.03);
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
.dark-theme .thinking-block__header:hover {
|
|
1353
|
+
background-color: rgba(255, 255, 255, 0.03);
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
.thinking-block__header-left {
|
|
1357
|
+
display: flex;
|
|
1358
|
+
align-items: center;
|
|
1359
|
+
gap: 8px;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
/* Icon */
|
|
1363
|
+
.thinking-block__icon {
|
|
1364
|
+
width: 16px;
|
|
1365
|
+
height: 16px;
|
|
1366
|
+
color: var(--thinking-block-accent, var(--title-text-color));
|
|
1367
|
+
flex-shrink: 0;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
/* Title */
|
|
1371
|
+
.thinking-block__title {
|
|
1372
|
+
font-weight: 600;
|
|
1373
|
+
font-size: 13px;
|
|
1374
|
+
color: var(--thinking-block-text, var(--title-text-color));
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
/* Chevron (collapse indicator) */
|
|
1378
|
+
.thinking-block__chevron {
|
|
1379
|
+
width: 16px;
|
|
1380
|
+
height: 16px;
|
|
1381
|
+
color: var(--thinking-block-text, var(--title-text-color));
|
|
1382
|
+
opacity: 0.6;
|
|
1383
|
+
transition: transform 0.2s ease-out;
|
|
1384
|
+
flex-shrink: 0;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
.thinking-block__chevron--collapsed {
|
|
1388
|
+
transform: rotate(-90deg);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
/* Streaming Indicator (three pulsing dots) */
|
|
1392
|
+
.thinking-block__streaming-indicator {
|
|
1393
|
+
display: flex;
|
|
1394
|
+
align-items: center;
|
|
1395
|
+
gap: 3px;
|
|
1396
|
+
margin-left: 4px;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
.thinking-block__streaming-dot {
|
|
1400
|
+
width: 4px;
|
|
1401
|
+
height: 4px;
|
|
1402
|
+
border-radius: 50%;
|
|
1403
|
+
background-color: var(--thinking-block-accent, var(--title-text-color));
|
|
1404
|
+
animation: streamingDotPulse 1.4s ease-in-out infinite;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
.thinking-block__streaming-dot:nth-child(1) {
|
|
1408
|
+
animation-delay: 0s;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
.thinking-block__streaming-dot:nth-child(2) {
|
|
1412
|
+
animation-delay: 0.2s;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1415
|
+
.thinking-block__streaming-dot:nth-child(3) {
|
|
1416
|
+
animation-delay: 0.4s;
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
@keyframes streamingDotPulse {
|
|
1420
|
+
0%, 60%, 100% {
|
|
1421
|
+
opacity: 0.3;
|
|
1422
|
+
transform: scale(0.8);
|
|
1423
|
+
}
|
|
1424
|
+
30% {
|
|
1425
|
+
opacity: 1;
|
|
1426
|
+
transform: scale(1);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
/* Blinking cursor for streaming content */
|
|
1431
|
+
.thinking-block__cursor {
|
|
1432
|
+
display: inline;
|
|
1433
|
+
color: var(--thinking-block-accent, var(--ai-chat-thinking-icon));
|
|
1434
|
+
animation: cursorBlink 0.8s step-end infinite;
|
|
1435
|
+
font-weight: bold;
|
|
1436
|
+
margin-left: 1px;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
@keyframes cursorBlink {
|
|
1440
|
+
0%, 100% { opacity: 1; }
|
|
1441
|
+
50% { opacity: 0; }
|
|
1442
|
+
}
|
|
1443
|
+
|
|
1444
|
+
/* Thinking In Progress Indicator - shown during pauses between blocks */
|
|
1445
|
+
.thinking-in-progress {
|
|
1446
|
+
padding: 12px 16px;
|
|
1447
|
+
margin: 8px 0;
|
|
1448
|
+
background: linear-gradient(135deg,
|
|
1449
|
+
rgba(139, 92, 246, 0.08) 0%,
|
|
1450
|
+
rgba(99, 102, 241, 0.08) 100%
|
|
1451
|
+
);
|
|
1452
|
+
border: 1px solid rgba(139, 92, 246, 0.2);
|
|
1453
|
+
border-radius: var(--border-radius, 8px);
|
|
1454
|
+
animation: thinkingPulse 2s ease-in-out infinite;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
.thinking-in-progress__content {
|
|
1458
|
+
display: flex;
|
|
1459
|
+
align-items: center;
|
|
1460
|
+
gap: 8px;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
.thinking-in-progress__icon {
|
|
1464
|
+
width: 16px;
|
|
1465
|
+
height: 16px;
|
|
1466
|
+
color: var(--thinking-block-accent, #8b5cf6);
|
|
1467
|
+
animation: iconSpin 2s linear infinite;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
.thinking-in-progress__text {
|
|
1471
|
+
color: var(--text-color, #374151);
|
|
1472
|
+
font-size: 14px;
|
|
1473
|
+
font-weight: 500;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
.thinking-in-progress__dots {
|
|
1477
|
+
display: flex;
|
|
1478
|
+
gap: 3px;
|
|
1479
|
+
margin-left: 2px;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
.thinking-in-progress__dot {
|
|
1483
|
+
width: 4px;
|
|
1484
|
+
height: 4px;
|
|
1485
|
+
border-radius: 50%;
|
|
1486
|
+
background-color: var(--thinking-block-accent, #8b5cf6);
|
|
1487
|
+
animation: dotPulse 1.4s ease-in-out infinite;
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
.thinking-in-progress__dot:nth-child(1) { animation-delay: 0s; }
|
|
1491
|
+
.thinking-in-progress__dot:nth-child(2) { animation-delay: 0.2s; }
|
|
1492
|
+
.thinking-in-progress__dot:nth-child(3) { animation-delay: 0.4s; }
|
|
1493
|
+
|
|
1494
|
+
@keyframes thinkingPulse {
|
|
1495
|
+
0%, 100% {
|
|
1496
|
+
opacity: 1;
|
|
1497
|
+
border-color: rgba(139, 92, 246, 0.2);
|
|
1498
|
+
}
|
|
1499
|
+
50% {
|
|
1500
|
+
opacity: 0.85;
|
|
1501
|
+
border-color: rgba(139, 92, 246, 0.4);
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
@keyframes iconSpin {
|
|
1506
|
+
from { transform: rotate(0deg); }
|
|
1507
|
+
to { transform: rotate(360deg); }
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
@keyframes dotPulse {
|
|
1511
|
+
0%, 60%, 100% {
|
|
1512
|
+
opacity: 0.3;
|
|
1513
|
+
transform: scale(0.8);
|
|
1514
|
+
}
|
|
1515
|
+
30% {
|
|
1516
|
+
opacity: 1;
|
|
1517
|
+
transform: scale(1.1);
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
/* Dark theme */
|
|
1522
|
+
.dark-theme .thinking-in-progress {
|
|
1523
|
+
background: linear-gradient(135deg,
|
|
1524
|
+
rgba(139, 92, 246, 0.12) 0%,
|
|
1525
|
+
rgba(99, 102, 241, 0.12) 100%
|
|
1526
|
+
);
|
|
1527
|
+
border-color: rgba(139, 92, 246, 0.3);
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
.dark-theme .thinking-in-progress__text {
|
|
1531
|
+
color: var(--text-color, #e5e7eb);
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
/* Content Wrapper (for collapse animation) */
|
|
1535
|
+
.thinking-block__content-wrapper {
|
|
1536
|
+
display: grid;
|
|
1537
|
+
grid-template-rows: 1fr;
|
|
1538
|
+
transition: grid-template-rows 0.2s ease-out;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
.thinking-block--collapsed .thinking-block__content-wrapper {
|
|
1542
|
+
grid-template-rows: 0fr;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
/* Content */
|
|
1546
|
+
.thinking-block__content {
|
|
1547
|
+
overflow: hidden;
|
|
1548
|
+
padding: 0 12px 12px 12px;
|
|
1549
|
+
font-size: 13px;
|
|
1550
|
+
line-height: 1.6;
|
|
1551
|
+
color: var(--thinking-block-text, var(--input-text-color));
|
|
1552
|
+
white-space: pre-wrap;
|
|
1553
|
+
word-break: break-word;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
.thinking-block--collapsed .thinking-block__content {
|
|
1557
|
+
padding-top: 0;
|
|
1558
|
+
padding-bottom: 0;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
/* Streaming state - subtle left border glow */
|
|
1562
|
+
.thinking-block:not(.thinking-block--collapsed) {
|
|
1563
|
+
border-left-width: 3px;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
/* Animation when block first appears */
|
|
1567
|
+
.thinking-block {
|
|
1568
|
+
animation: thinkingBlockAppear 0.2s ease-out;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
@keyframes thinkingBlockAppear {
|
|
1572
|
+
from {
|
|
1573
|
+
opacity: 0;
|
|
1574
|
+
transform: translateY(-4px);
|
|
1575
|
+
}
|
|
1576
|
+
to {
|
|
1577
|
+
opacity: 1;
|
|
1578
|
+
transform: translateY(0);
|
|
1579
|
+
}
|
|
1204
1580
|
}
|