@webskill/chatbot 0.1.0 → 0.2.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 +6 -15
- package/dist/chatbot.css +24 -0
- package/dist/index.d.ts +445 -28
- package/dist/index.js +1957 -549
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -76,27 +76,18 @@ probe (`pnpm test:install-smoke`), against the **published** `.d.ts`.
|
|
|
76
76
|
<!-- typecheck: chatbot-minimal.tsx -->
|
|
77
77
|
|
|
78
78
|
```tsx
|
|
79
|
-
import { Chatbot, type ChatbotHostAdapter
|
|
79
|
+
import { Chatbot, type ChatbotHostAdapter } from '@webskill/chatbot';
|
|
80
80
|
import { OpfsProvider } from '@webskill/sdk/browser';
|
|
81
81
|
import '@webskill/chatbot/chatbot.css';
|
|
82
82
|
|
|
83
|
-
// ChatbotHostAdapter: wire storage, skill roots
|
|
84
|
-
//
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
// ChatbotHostAdapter: wire storage, skill roots and a navigation port
|
|
84
|
+
// (openConsole / openConsoleTrace). <Chatbot> constructs its own ChatEngine
|
|
85
|
+
// from the adapter; pass config for options like generativeUi.
|
|
86
|
+
// Model configuration lives in the runtime config store (config.runtimeConfig):
|
|
87
|
+
// RuntimeConfig.llm.entries holds the model list, llm.defaultId the default one.
|
|
88
88
|
const adapter: ChatbotHostAdapter = {
|
|
89
89
|
storage: new OpfsProvider({ rootName: 'my-app' }),
|
|
90
90
|
skillRoots: ['/skills'],
|
|
91
|
-
llmConfig: {
|
|
92
|
-
load: async () => saved,
|
|
93
|
-
save: async (config) => {
|
|
94
|
-
saved = config;
|
|
95
|
-
},
|
|
96
|
-
clear: async () => {
|
|
97
|
-
saved = undefined;
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
91
|
navigation: {
|
|
101
92
|
openConsole() {
|
|
102
93
|
/* route to your console surface */
|
package/dist/chatbot.css
CHANGED
|
@@ -229,6 +229,9 @@
|
|
|
229
229
|
.relative {
|
|
230
230
|
position: relative;
|
|
231
231
|
}
|
|
232
|
+
.static {
|
|
233
|
+
position: static;
|
|
234
|
+
}
|
|
232
235
|
.inset-0 {
|
|
233
236
|
inset: 0px;
|
|
234
237
|
}
|
|
@@ -322,6 +325,9 @@
|
|
|
322
325
|
.my-0 {
|
|
323
326
|
margin-block: 0px;
|
|
324
327
|
}
|
|
328
|
+
.my-1 {
|
|
329
|
+
margin-block: var(--spacing);
|
|
330
|
+
}
|
|
325
331
|
.my-2 {
|
|
326
332
|
margin-block: calc(var(--spacing) * 2);
|
|
327
333
|
}
|
|
@@ -489,12 +495,18 @@
|
|
|
489
495
|
.w-2\.5 {
|
|
490
496
|
width: calc(var(--spacing) * 2.5);
|
|
491
497
|
}
|
|
498
|
+
.w-3\.5 {
|
|
499
|
+
width: calc(var(--spacing) * 3.5);
|
|
500
|
+
}
|
|
492
501
|
.w-5 {
|
|
493
502
|
width: calc(var(--spacing) * 5);
|
|
494
503
|
}
|
|
495
504
|
.w-9 {
|
|
496
505
|
width: calc(var(--spacing) * 9);
|
|
497
506
|
}
|
|
507
|
+
.w-40 {
|
|
508
|
+
width: calc(var(--spacing) * 40);
|
|
509
|
+
}
|
|
498
510
|
.w-72 {
|
|
499
511
|
width: calc(var(--spacing) * 72);
|
|
500
512
|
}
|
|
@@ -874,6 +886,12 @@
|
|
|
874
886
|
.bg-danger-soft {
|
|
875
887
|
background-color: var(--destructive-soft);
|
|
876
888
|
}
|
|
889
|
+
.bg-danger\/10 {
|
|
890
|
+
background-color: var(--destructive);
|
|
891
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
892
|
+
background-color: color-mix(in oklab, var(--destructive) 10%, transparent);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
877
895
|
.bg-destructive {
|
|
878
896
|
background-color: var(--destructive);
|
|
879
897
|
}
|
|
@@ -1036,6 +1054,9 @@
|
|
|
1036
1054
|
.ps-9 {
|
|
1037
1055
|
padding-inline-start: calc(var(--spacing) * 9);
|
|
1038
1056
|
}
|
|
1057
|
+
.pt-0\.5 {
|
|
1058
|
+
padding-top: calc(var(--spacing) * 0.5);
|
|
1059
|
+
}
|
|
1039
1060
|
.pt-2 {
|
|
1040
1061
|
padding-top: calc(var(--spacing) * 2);
|
|
1041
1062
|
}
|
|
@@ -1210,6 +1231,9 @@
|
|
|
1210
1231
|
--tw-numeric-spacing: tabular-nums;
|
|
1211
1232
|
font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
|
|
1212
1233
|
}
|
|
1234
|
+
.line-through {
|
|
1235
|
+
text-decoration-line: line-through;
|
|
1236
|
+
}
|
|
1213
1237
|
.underline {
|
|
1214
1238
|
text-decoration-line: underline;
|
|
1215
1239
|
}
|