@webskill/chatbot 0.2.0 → 0.3.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/README.md CHANGED
@@ -109,6 +109,23 @@ export function App() {
109
109
  See `examples/chatbot-playground` for a complete `ChatbotHostAdapter`
110
110
  implementation (OPFS storage, skills, demo/model providers, console embedding).
111
111
 
112
+ ## Session list ordering and paging
113
+
114
+ `ChatEngine.listSessions()` forwards straight to the `SessionStore`, so the
115
+ default `FsSessionStore` decides what you see:
116
+
117
+ - Sessions are sorted by `createdAt` **ascending**, and a page is taken from the
118
+ **tail** of that list. The first screen therefore holds the *newest* sessions,
119
+ and the oldest session is not on it.
120
+ - The page size is the store's (`FS_SESSION_PAGE_SIZE`, 50). `<Chatbot>` does
121
+ not override it — pass your own `sessionStore` if you need another size.
122
+ - `nextCursor` points further back in history. While it is set, the session list
123
+ shows a **Load earlier sessions** entry; when it is absent the list is at the
124
+ end and the entry disappears, so "no button" always means "nothing older".
125
+ - Session files that cannot be parsed are skipped rather than failing the whole
126
+ list. Their file names come back in `skipped` and are shown above the list, so
127
+ a session you expected to see but cannot is always accounted for.
128
+
112
129
  ## Embedding models
113
130
 
114
131
  - **As a component** inside an existing web app — mount `<Chatbot>` in your own
package/dist/chatbot.css CHANGED
@@ -200,6 +200,9 @@
200
200
  }
201
201
  }
202
202
  @layer utilities {
203
+ .pointer-events-auto {
204
+ pointer-events: auto;
205
+ }
203
206
  .pointer-events-none {
204
207
  pointer-events: none;
205
208
  }
@@ -235,9 +238,15 @@
235
238
  .inset-0 {
236
239
  inset: 0px;
237
240
  }
241
+ .inset-x-0 {
242
+ inset-inline: 0px;
243
+ }
238
244
  .inset-y-0 {
239
245
  inset-block: 0px;
240
246
  }
247
+ .top-0 {
248
+ top: 0px;
249
+ }
241
250
  .top-1\.5 {
242
251
  top: calc(var(--spacing) * 1.5);
243
252
  }
@@ -271,6 +280,9 @@
271
280
  .right-4 {
272
281
  right: calc(var(--spacing) * 4);
273
282
  }
283
+ .-bottom-7 {
284
+ bottom: calc(var(--spacing) * -7);
285
+ }
274
286
  .bottom-4 {
275
287
  bottom: calc(var(--spacing) * 4);
276
288
  }
@@ -313,6 +325,9 @@
313
325
  .m-3 {
314
326
  margin: calc(var(--spacing) * 3);
315
327
  }
328
+ .mx-1 {
329
+ margin-inline: var(--spacing);
330
+ }
316
331
  .mx-2 {
317
332
  margin-inline: calc(var(--spacing) * 2);
318
333
  }
@@ -355,8 +370,8 @@
355
370
  .mb-2 {
356
371
  margin-bottom: calc(var(--spacing) * 2);
357
372
  }
358
- .mb-4 {
359
- margin-bottom: calc(var(--spacing) * 4);
373
+ .mb-7 {
374
+ margin-bottom: calc(var(--spacing) * 7);
360
375
  }
361
376
  .block {
362
377
  display: block;
@@ -429,6 +444,9 @@
429
444
  width: 100%;
430
445
  height: 100%;
431
446
  }
447
+ .h-0 {
448
+ height: 0px;
449
+ }
432
450
  .h-2\.5 {
433
451
  height: calc(var(--spacing) * 2.5);
434
452
  }
@@ -489,6 +507,9 @@
489
507
  .w-\(--sidebar-width\) {
490
508
  width: var(--sidebar-width);
491
509
  }
510
+ .w-0 {
511
+ width: 0px;
512
+ }
492
513
  .w-2 {
493
514
  width: calc(var(--spacing) * 2);
494
515
  }
@@ -510,8 +531,8 @@
510
531
  .w-72 {
511
532
  width: calc(var(--spacing) * 72);
512
533
  }
513
- .w-96 {
514
- width: calc(var(--spacing) * 96);
534
+ .w-\[44rem\] {
535
+ width: 44rem;
515
536
  }
516
537
  .w-\[min\(22rem\,calc\(100vw-2rem\)\)\] {
517
538
  width: min(22rem, calc(100vw - 2rem));
@@ -540,8 +561,11 @@
540
561
  .max-w-3xl {
541
562
  max-width: var(--container-3xl);
542
563
  }
543
- .max-w-56 {
544
- max-width: calc(var(--spacing) * 56);
564
+ .max-w-48 {
565
+ max-width: calc(var(--spacing) * 48);
566
+ }
567
+ .max-w-72 {
568
+ max-width: calc(var(--spacing) * 72);
545
569
  }
546
570
  .max-w-\[calc\(100vw-2rem\)\] {
547
571
  max-width: calc(100vw - 2rem);
@@ -653,6 +677,9 @@
653
677
  .grid-cols-1 {
654
678
  grid-template-columns: repeat(1, minmax(0, 1fr));
655
679
  }
680
+ .grid-cols-2 {
681
+ grid-template-columns: repeat(2, minmax(0, 1fr));
682
+ }
656
683
  .grid-cols-\[1fr_auto\] {
657
684
  grid-template-columns: 1fr auto;
658
685
  }
@@ -671,9 +698,6 @@
671
698
  .items-center {
672
699
  align-items: center;
673
700
  }
674
- .items-end {
675
- align-items: flex-end;
676
- }
677
701
  .items-start {
678
702
  align-items: flex-start;
679
703
  }
@@ -707,9 +731,6 @@
707
731
  .gap-4 {
708
732
  gap: calc(var(--spacing) * 4);
709
733
  }
710
- .gap-6 {
711
- gap: calc(var(--spacing) * 6);
712
- }
713
734
  :where(.space-y-1 > :not(:last-child)) {
714
735
  --tw-space-y-reverse: 0;
715
736
  margin-block-start: calc(var(--spacing) * var(--tw-space-y-reverse));
@@ -794,6 +815,10 @@
794
815
  border-style: var(--tw-border-style);
795
816
  border-width: 0px;
796
817
  }
818
+ .border-e {
819
+ border-inline-end-style: var(--tw-border-style);
820
+ border-inline-end-width: 1px;
821
+ }
797
822
  .border-t {
798
823
  border-top-style: var(--tw-border-style);
799
824
  border-top-width: 1px;
@@ -991,9 +1016,6 @@
991
1016
  .p-4 {
992
1017
  padding: calc(var(--spacing) * 4);
993
1018
  }
994
- .p-5 {
995
- padding: calc(var(--spacing) * 5);
996
- }
997
1019
  .px-1 {
998
1020
  padding-inline: var(--spacing);
999
1021
  }
@@ -1054,9 +1076,6 @@
1054
1076
  .ps-9 {
1055
1077
  padding-inline-start: calc(var(--spacing) * 9);
1056
1078
  }
1057
- .pt-0\.5 {
1058
- padding-top: calc(var(--spacing) * 0.5);
1059
- }
1060
1079
  .pt-2 {
1061
1080
  padding-top: calc(var(--spacing) * 2);
1062
1081
  }
@@ -1066,9 +1085,6 @@
1066
1085
  .pt-4 {
1067
1086
  padding-top: calc(var(--spacing) * 4);
1068
1087
  }
1069
- .pt-5 {
1070
- padding-top: calc(var(--spacing) * 5);
1071
- }
1072
1088
  .pr-2 {
1073
1089
  padding-right: calc(var(--spacing) * 2);
1074
1090
  }
@@ -1102,6 +1118,12 @@
1102
1118
  .text-left {
1103
1119
  text-align: left;
1104
1120
  }
1121
+ .text-right {
1122
+ text-align: right;
1123
+ }
1124
+ .text-start {
1125
+ text-align: start;
1126
+ }
1105
1127
  .font-display {
1106
1128
  font-family: var(--font-sans);
1107
1129
  }
@@ -1134,6 +1156,9 @@
1134
1156
  .text-\[0\.85em\] {
1135
1157
  font-size: 0.85em;
1136
1158
  }
1159
+ .text-\[10px\] {
1160
+ font-size: 10px;
1161
+ }
1137
1162
  .text-\[11px\] {
1138
1163
  font-size: 11px;
1139
1164
  }
@@ -1194,6 +1219,9 @@
1194
1219
  .text-ink {
1195
1220
  color: var(--foreground);
1196
1221
  }
1222
+ .text-input {
1223
+ color: var(--input);
1224
+ }
1197
1225
  .text-muted {
1198
1226
  color: var(--muted-foreground);
1199
1227
  }
@@ -1345,6 +1373,9 @@
1345
1373
  -webkit-user-select: none;
1346
1374
  user-select: none;
1347
1375
  }
1376
+ .group-focus-within\:opacity-100:is(:where(.group):focus-within *) {
1377
+ opacity: 100%;
1378
+ }
1348
1379
  .group-focus-within\/menu-item\:opacity-100:is(:where(.group\/menu-item):focus-within *) {
1349
1380
  opacity: 100%;
1350
1381
  }
@@ -1471,9 +1502,6 @@
1471
1502
  .hover\:bg-accent:hover {
1472
1503
  background-color: var(--accent);
1473
1504
  }
1474
- .hover\:bg-danger-soft:hover {
1475
- background-color: var(--destructive-soft);
1476
- }
1477
1505
  .hover\:bg-destructive-soft:hover {
1478
1506
  background-color: var(--destructive-soft);
1479
1507
  }
@@ -1505,9 +1533,6 @@
1505
1533
  .hover\:bg-surface:hover {
1506
1534
  background-color: var(--card);
1507
1535
  }
1508
- .hover\:text-danger:hover {
1509
- color: var(--destructive);
1510
- }
1511
1536
  .hover\:text-foreground:hover {
1512
1537
  color: var(--foreground);
1513
1538
  }
@@ -1595,6 +1620,9 @@
1595
1620
  .disabled\:opacity-60:disabled {
1596
1621
  opacity: 60%;
1597
1622
  }
1623
+ .has-\[\[aria-expanded\=true\]\]\:opacity-100:has(:is([aria-expanded=true])) {
1624
+ opacity: 100%;
1625
+ }
1598
1626
  .aria-disabled\:pointer-events-none[aria-disabled="true"] {
1599
1627
  pointer-events: none;
1600
1628
  }
@@ -2000,19 +2028,11 @@
2000
2028
  background: color-mix(in oklab, var(--muted-foreground) 60%, transparent);
2001
2029
  }
2002
2030
  }
2003
- ::-webkit-scrollbar {
2004
- width: 4px;
2005
- height: 4px;
2006
- }
2007
- ::-webkit-scrollbar-track {
2008
- background: transparent;
2031
+ [data-webskill-theme='light'] {
2032
+ color-scheme: light;
2009
2033
  }
2010
- ::-webkit-scrollbar-thumb {
2011
- background: rgb(148 163 184 / 0.25);
2012
- border-radius: 999px;
2013
- }
2014
- ::-webkit-scrollbar-thumb:hover {
2015
- background: rgb(148 163 184 / 0.45);
2034
+ [data-webskill-theme='dark'] {
2035
+ color-scheme: dark;
2016
2036
  }
2017
2037
  .webskill-surface-list {
2018
2038
  display: flex;