@aleph-alpha/chat-kit 3.1.1 → 3.1.3
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/{CkInput.vue_vue_type_script_setup_true_lang-DKzc21Yp.js → CkInput.vue_vue_type_script_setup_true_lang-LPrW7CSQ.js} +1 -1
- package/dist/chat-kit.css +1 -0
- package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts +6 -0
- package/dist/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.d.ts.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/composables/fileUpload/useFileUploadWrapper.d.ts.map +1 -1
- package/dist/composables/index.js +1 -1
- package/dist/handlers/index.js +1 -1
- package/dist/handlers/useMarkdownParser.d.ts +1 -0
- package/dist/handlers/useMarkdownParser.d.ts.map +1 -1
- package/dist/{index-CnuiV5vd.js → index-DVxCNAs3.js} +20 -15
- package/dist/index.js +3 -3
- package/dist/useChatKitLabels-Ctz1dHpx.js +28608 -0
- package/package.json +7 -3
- package/src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.ts +50 -0
- package/src/composables/fileUpload/useFileUploadWrapper.spec.ts +10 -1
- package/src/composables/fileUpload/useFileUploadWrapper.ts +31 -15
- package/src/handlers/useMarkdownParser.spec.ts +31 -0
- package/src/handlers/useMarkdownParser.ts +70 -6
- package/dist/useChatKitLabels-CLsWWwgG.js +0 -12751
- /package/dist/{purify.es-md74IFlY.js → katex.min-md74IFlY.js} +0 -0
|
@@ -33,6 +33,12 @@ export declare const WithCustomClasses: Story;
|
|
|
33
33
|
* These are enabled by default because the renderer ships with `remark-gfm`.
|
|
34
34
|
*/
|
|
35
35
|
export declare const GfmFeatures: Story;
|
|
36
|
+
/**
|
|
37
|
+
* Renders inline and display math expressions using KaTeX.
|
|
38
|
+
* Inline math uses single dollar signs ($...$) and display math uses
|
|
39
|
+
* double dollar signs ($$...$$).
|
|
40
|
+
*/
|
|
41
|
+
export declare const MathExpressions: Story;
|
|
36
42
|
/**
|
|
37
43
|
* Supplies a custom remark/unified plugin through the `plugins` prop. Use to
|
|
38
44
|
* transform the AST before rendering (e.g. math, directive, custom nodes).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CkMarkdownRenderer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAkBzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqHnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAsB5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KA+BrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAwC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KA0C/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KA4BzB,CAAC;AAeF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAkB9B,CAAC"}
|
|
1
|
+
{"version":3,"file":"CkMarkdownRenderer.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/base/CkMarkdownRenderer/CkMarkdownRenderer.stories.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,kBAAkB,CAkBzC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAqHnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAsB5B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KA+BrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAwC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KA0C/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KA4BzB,CAAC;AAsBF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,KAuB7B,CAAC;AAeF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAkB9B,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _, a, b, C, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u } from "../CkInput.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _, a, b, C, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u } from "../CkInput.vue_vue_type_script_setup_true_lang-LPrW7CSQ.js";
|
|
2
2
|
export {
|
|
3
3
|
_ as CkAgentMessage,
|
|
4
4
|
a as CkConversation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileUploadWrapper.d.ts","sourceRoot":"","sources":["../../../src/composables/fileUpload/useFileUploadWrapper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAOV,oBAAoB,EACpB,sBAAsB,EAIvB,MAAM,SAAS,CAAC;AAiJjB,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oBAAoB,GAC3B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useFileUploadWrapper.d.ts","sourceRoot":"","sources":["../../../src/composables/fileUpload/useFileUploadWrapper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAOV,oBAAoB,EACpB,sBAAsB,EAIvB,MAAM,SAAS,CAAC;AAiJjB,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oBAAoB,GAC3B,sBAAsB,CAqQxB"}
|
package/dist/handlers/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type MaybeRefOrGetter } from 'vue';
|
|
2
2
|
import { type PluggableList } from 'unified';
|
|
3
|
+
import 'katex/dist/katex.min.css';
|
|
3
4
|
export declare function useMarkdownParser(source: MaybeRefOrGetter<string>, plugins: MaybeRefOrGetter<PluggableList | undefined>): {
|
|
4
5
|
html: import("vue").ComputedRef<string>;
|
|
5
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMarkdownParser.d.ts","sourceRoot":"","sources":["../../src/handlers/useMarkdownParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,gBAAgB,EAAW,MAAM,KAAK,CAAC;AAC/D,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"useMarkdownParser.d.ts","sourceRoot":"","sources":["../../src/handlers/useMarkdownParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,gBAAgB,EAAW,MAAM,KAAK,CAAC;AAC/D,OAAO,EAAW,KAAK,aAAa,EAAE,MAAM,SAAS,CAAC;AAQtD,OAAO,0BAA0B,CAAC;AAyElC,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAChC,OAAO,EAAE,gBAAgB,CAAC,aAAa,GAAG,SAAS,CAAC;;EA0BrD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { g as generateId } from "./generateId-BHf0W4Rq.js";
|
|
2
2
|
import { ref, shallowRef, computed, readonly, toRaw, toValue, watch } from "vue";
|
|
3
3
|
import { u as useMessageHandler } from "./useMessageHandler-CMdy-lm0.js";
|
|
4
|
-
import "./
|
|
4
|
+
import "./katex.min-md74IFlY.js";
|
|
5
5
|
function secondsToDate(seconds) {
|
|
6
6
|
return new Date(seconds * 1e3);
|
|
7
7
|
}
|
|
@@ -1354,23 +1354,28 @@ function createDocumentUploadProvider(config) {
|
|
|
1354
1354
|
);
|
|
1355
1355
|
return newStoreId;
|
|
1356
1356
|
}
|
|
1357
|
+
async function fetchOrCreateStore() {
|
|
1358
|
+
try {
|
|
1359
|
+
const response = await httpClient.get("search-stores");
|
|
1360
|
+
const expectedModel = searchStoreConfig.models[0]?.embedding_model;
|
|
1361
|
+
const match = response.items.find(
|
|
1362
|
+
(store) => store.models.some((m) => m.embedding_model === expectedModel)
|
|
1363
|
+
);
|
|
1364
|
+
if (match) {
|
|
1365
|
+
resolvedStoreId = match.id;
|
|
1366
|
+
return resolvedStoreId;
|
|
1367
|
+
}
|
|
1368
|
+
resolvedStoreId = await createSearchStoreWithWorkflow();
|
|
1369
|
+
return resolvedStoreId;
|
|
1370
|
+
} catch (err) {
|
|
1371
|
+
resolvePromise = null;
|
|
1372
|
+
throw err;
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1357
1375
|
async function resolveSearchStore() {
|
|
1358
1376
|
if (resolvedStoreId) return resolvedStoreId;
|
|
1359
1377
|
if (resolvePromise) return resolvePromise;
|
|
1360
|
-
resolvePromise = (
|
|
1361
|
-
try {
|
|
1362
|
-
const stores = await httpClient.get("search-stores");
|
|
1363
|
-
if (stores.length > 0 && stores[0]) {
|
|
1364
|
-
resolvedStoreId = stores[0].id;
|
|
1365
|
-
return resolvedStoreId;
|
|
1366
|
-
}
|
|
1367
|
-
resolvedStoreId = await createSearchStoreWithWorkflow();
|
|
1368
|
-
return resolvedStoreId;
|
|
1369
|
-
} catch (err) {
|
|
1370
|
-
resolvePromise = null;
|
|
1371
|
-
throw err;
|
|
1372
|
-
}
|
|
1373
|
-
})();
|
|
1378
|
+
resolvePromise = fetchOrCreateStore();
|
|
1374
1379
|
return resolvePromise;
|
|
1375
1380
|
}
|
|
1376
1381
|
let instance = null;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { u } from "./useMessageHandler-CMdy-lm0.js";
|
|
2
|
-
import { C, d, p, u as u2, a } from "./useChatKitLabels-
|
|
3
|
-
import { S, c, d as d2, a as a2, u as u3, b, e, f } from "./index-
|
|
4
|
-
import { _, a as a3, b as b2, C as C2, c as c2, d as d3, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p as p2, q, r, s, t, u as u4, v } from "./CkInput.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { C, d, p, u as u2, a } from "./useChatKitLabels-Ctz1dHpx.js";
|
|
3
|
+
import { S, c, d as d2, a as a2, u as u3, b, e, f } from "./index-DVxCNAs3.js";
|
|
4
|
+
import { _, a as a3, b as b2, C as C2, c as c2, d as d3, e as e2, f as f2, g, h, i, j, k, l, m, n, o, p as p2, q, r, s, t, u as u4, v } from "./CkInput.vue_vue_type_script_setup_true_lang-LPrW7CSQ.js";
|
|
5
5
|
export {
|
|
6
6
|
C as CHAT_KIT_LABELS,
|
|
7
7
|
_ as CkAgentMessage,
|