@arbidocs/react 0.4.127 → 0.4.128
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/document-tools/index.cjs +3 -3
- package/dist/document-tools/index.js +3 -3
- package/dist/index.cjs +19 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/ui/index.cjs +9 -9
- package/dist/ui/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkL2PXZWJM_cjs = require('../chunk-L2PXZWJM.cjs');
|
|
4
|
+
var chunkSSOPIPEX_cjs = require('../chunk-SSOPIPEX.cjs');
|
|
3
5
|
var chunkNUFEZBA5_cjs = require('../chunk-NUFEZBA5.cjs');
|
|
4
6
|
require('../chunk-5DCRIWCA.cjs');
|
|
5
7
|
require('../chunk-VOFNX4P6.cjs');
|
|
6
|
-
var chunkL2PXZWJM_cjs = require('../chunk-L2PXZWJM.cjs');
|
|
7
|
-
var chunkSSOPIPEX_cjs = require('../chunk-SSOPIPEX.cjs');
|
|
8
|
-
require('../chunk-Z3LLUO32.cjs');
|
|
9
8
|
require('../chunk-WYZJLZ67.cjs');
|
|
9
|
+
require('../chunk-Z3LLUO32.cjs');
|
|
10
10
|
require('../chunk-HJDR5HEO.cjs');
|
|
11
11
|
require('../chunk-S6A6FSG7.cjs');
|
|
12
12
|
var chunkXIDDXD5Y_cjs = require('../chunk-XIDDXD5Y.cjs');
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { mergeLayers, AnnotationStoreOfflineError } from '../chunk-IHTBAY57.js';
|
|
2
|
+
import { parseLayer, emptyLayer, LAYER_SCHEMA_VERSION } from '../chunk-COWZGCL5.js';
|
|
1
3
|
import { parseVersionRef } from '../chunk-74UTKIWQ.js';
|
|
2
4
|
import '../chunk-G6FHNURH.js';
|
|
3
5
|
import '../chunk-WUTL62MC.js';
|
|
4
|
-
import { mergeLayers, AnnotationStoreOfflineError } from '../chunk-IHTBAY57.js';
|
|
5
|
-
import { parseLayer, emptyLayer, LAYER_SCHEMA_VERSION } from '../chunk-COWZGCL5.js';
|
|
6
|
-
import '../chunk-QRCMKEE6.js';
|
|
7
6
|
import '../chunk-YNNAJJ5Z.js';
|
|
7
|
+
import '../chunk-QRCMKEE6.js';
|
|
8
8
|
import '../chunk-47CCGUWR.js';
|
|
9
9
|
import '../chunk-SN5YV6FF.js';
|
|
10
10
|
import { useDeploymentDomain } from '../chunk-BUFDJCDS.js';
|
package/dist/index.cjs
CHANGED
|
@@ -5,8 +5,8 @@ var chunk5DCRIWCA_cjs = require('./chunk-5DCRIWCA.cjs');
|
|
|
5
5
|
var chunkF7KQVVD2_cjs = require('./chunk-F7KQVVD2.cjs');
|
|
6
6
|
var chunkGX75JCPR_cjs = require('./chunk-GX75JCPR.cjs');
|
|
7
7
|
var chunkTBELZWGV_cjs = require('./chunk-TBELZWGV.cjs');
|
|
8
|
-
var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
|
|
9
8
|
var chunkWYZJLZ67_cjs = require('./chunk-WYZJLZ67.cjs');
|
|
9
|
+
var chunkZ3LLUO32_cjs = require('./chunk-Z3LLUO32.cjs');
|
|
10
10
|
var chunkHUZB36QU_cjs = require('./chunk-HUZB36QU.cjs');
|
|
11
11
|
var chunkHJDR5HEO_cjs = require('./chunk-HJDR5HEO.cjs');
|
|
12
12
|
var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
|
|
@@ -468,6 +468,10 @@ var isAbort = (e) => e instanceof DOMException && e.name === "AbortError";
|
|
|
468
468
|
var TITLE_REFRESH_DELAYS_MS = [2500, 6e3, 12e3];
|
|
469
469
|
function useArbiChat(options = {}) {
|
|
470
470
|
const { workspaceId, agentId, model, titleLength = 48, streamRecovery } = options;
|
|
471
|
+
const activeArtifactRef = React.useRef(options.activeArtifact);
|
|
472
|
+
React.useEffect(() => {
|
|
473
|
+
activeArtifactRef.current = options.activeArtifact;
|
|
474
|
+
});
|
|
471
475
|
const recoveryIntervalMs = streamRecovery?.intervalMs ?? 3e3;
|
|
472
476
|
const recoveryTimeoutMs = streamRecovery?.timeoutMs ?? 12e4;
|
|
473
477
|
const arbi = chunkXIDDXD5Y_cjs.useArbi();
|
|
@@ -685,6 +689,7 @@ function useArbiChat(options = {}) {
|
|
|
685
689
|
title: t.title || titleFromQuestion(text, titleLength),
|
|
686
690
|
messages: [...t.messages, userMessage, answer]
|
|
687
691
|
}));
|
|
692
|
+
const activeArtifactExtId = activeArtifactRef.current?.() || void 0;
|
|
688
693
|
const controller = new AbortController();
|
|
689
694
|
abortRef.current = controller;
|
|
690
695
|
runIdRef.current = null;
|
|
@@ -715,6 +720,7 @@ function useArbiChat(options = {}) {
|
|
|
715
720
|
...thread.conversationId ? { conversationId: thread.conversationId } : {},
|
|
716
721
|
...!thread.conversationId && thread.assistantMode === "mentioned" ? { assistantMode: "mentioned" } : {},
|
|
717
722
|
...mentions?.length ? { mentions } : {},
|
|
723
|
+
...activeArtifactExtId ? { activeArtifactExtId } : {},
|
|
718
724
|
model,
|
|
719
725
|
signal: controller.signal,
|
|
720
726
|
onStreamStart: (data) => {
|
|
@@ -7829,18 +7835,6 @@ Object.defineProperty(exports, "splitMarkdownBlocks", {
|
|
|
7829
7835
|
enumerable: true,
|
|
7830
7836
|
get: function () { return chunkTBELZWGV_cjs.splitMarkdownBlocks; }
|
|
7831
7837
|
});
|
|
7832
|
-
Object.defineProperty(exports, "closeOpenEmphasis", {
|
|
7833
|
-
enumerable: true,
|
|
7834
|
-
get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
|
|
7835
|
-
});
|
|
7836
|
-
Object.defineProperty(exports, "normalizeCitationMarkup", {
|
|
7837
|
-
enumerable: true,
|
|
7838
|
-
get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
|
|
7839
|
-
});
|
|
7840
|
-
Object.defineProperty(exports, "trimOpenCitation", {
|
|
7841
|
-
enumerable: true,
|
|
7842
|
-
get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
|
|
7843
|
-
});
|
|
7844
7838
|
Object.defineProperty(exports, "Button", {
|
|
7845
7839
|
enumerable: true,
|
|
7846
7840
|
get: function () { return chunkWYZJLZ67_cjs.Button; }
|
|
@@ -7889,6 +7883,18 @@ Object.defineProperty(exports, "buttonVariants", {
|
|
|
7889
7883
|
enumerable: true,
|
|
7890
7884
|
get: function () { return chunkWYZJLZ67_cjs.buttonVariants; }
|
|
7891
7885
|
});
|
|
7886
|
+
Object.defineProperty(exports, "closeOpenEmphasis", {
|
|
7887
|
+
enumerable: true,
|
|
7888
|
+
get: function () { return chunkZ3LLUO32_cjs.closeOpenEmphasis; }
|
|
7889
|
+
});
|
|
7890
|
+
Object.defineProperty(exports, "normalizeCitationMarkup", {
|
|
7891
|
+
enumerable: true,
|
|
7892
|
+
get: function () { return chunkZ3LLUO32_cjs.normalizeCitationMarkup; }
|
|
7893
|
+
});
|
|
7894
|
+
Object.defineProperty(exports, "trimOpenCitation", {
|
|
7895
|
+
enumerable: true,
|
|
7896
|
+
get: function () { return chunkZ3LLUO32_cjs.trimOpenCitation; }
|
|
7897
|
+
});
|
|
7892
7898
|
Object.defineProperty(exports, "ScrollArea", {
|
|
7893
7899
|
enumerable: true,
|
|
7894
7900
|
get: function () { return chunkHUZB36QU_cjs.ScrollArea; }
|