@semiont/react-ui 0.2.34-build.89 → 0.2.34-build.90
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.mjs +11 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -18443,11 +18443,12 @@ function useResourceEvents({
|
|
|
18443
18443
|
}
|
|
18444
18444
|
setStatus("connecting");
|
|
18445
18445
|
try {
|
|
18446
|
-
const
|
|
18446
|
+
const sseOptions = {
|
|
18447
18447
|
...token ? { auth: accessToken2(token) } : {},
|
|
18448
18448
|
eventBus
|
|
18449
18449
|
// ← Stream auto-emits to EventBus
|
|
18450
|
-
}
|
|
18450
|
+
};
|
|
18451
|
+
const stream = client.sse.resourceEvents(rUri, sseOptions);
|
|
18451
18452
|
streamRef.current = stream;
|
|
18452
18453
|
setStatus("connected");
|
|
18453
18454
|
reconnectAttemptsRef.current = 0;
|
|
@@ -56610,13 +56611,13 @@ function useDetectionFlow(rUri) {
|
|
|
56610
56611
|
}
|
|
56611
56612
|
setDetectingMotivation(event.motivation);
|
|
56612
56613
|
setDetectionProgress(null);
|
|
56613
|
-
const
|
|
56614
|
+
const sseOptions = { auth: toAccessToken3(tokenRef.current), eventBus };
|
|
56614
56615
|
if (event.motivation === "tagging") {
|
|
56615
56616
|
const { schemaId, categories } = event.options;
|
|
56616
56617
|
if (!schemaId || !categories || categories.length === 0) {
|
|
56617
56618
|
throw new Error("Tag detection requires schemaId and categories");
|
|
56618
56619
|
}
|
|
56619
|
-
currentClient.sse.detectTags(currentRUri, { schemaId, categories },
|
|
56620
|
+
currentClient.sse.detectTags(currentRUri, { schemaId, categories }, sseOptions);
|
|
56620
56621
|
} else if (event.motivation === "linking") {
|
|
56621
56622
|
const { entityTypes, includeDescriptiveReferences } = event.options;
|
|
56622
56623
|
if (!entityTypes || entityTypes.length === 0) {
|
|
@@ -56625,24 +56626,24 @@ function useDetectionFlow(rUri) {
|
|
|
56625
56626
|
currentClient.sse.detectReferences(currentRUri, {
|
|
56626
56627
|
entityTypes: entityTypes.map((et) => entityType2(et)),
|
|
56627
56628
|
includeDescriptiveReferences: includeDescriptiveReferences || false
|
|
56628
|
-
},
|
|
56629
|
+
}, sseOptions);
|
|
56629
56630
|
} else if (event.motivation === "highlighting") {
|
|
56630
56631
|
currentClient.sse.detectHighlights(currentRUri, {
|
|
56631
56632
|
instructions: event.options.instructions,
|
|
56632
56633
|
density: event.options.density
|
|
56633
|
-
},
|
|
56634
|
+
}, sseOptions);
|
|
56634
56635
|
} else if (event.motivation === "assessing") {
|
|
56635
56636
|
currentClient.sse.detectAssessments(currentRUri, {
|
|
56636
56637
|
instructions: event.options.instructions,
|
|
56637
56638
|
tone: event.options.tone,
|
|
56638
56639
|
density: event.options.density
|
|
56639
|
-
},
|
|
56640
|
+
}, sseOptions);
|
|
56640
56641
|
} else if (event.motivation === "commenting") {
|
|
56641
56642
|
currentClient.sse.detectComments(currentRUri, {
|
|
56642
56643
|
instructions: event.options.instructions,
|
|
56643
56644
|
tone: event.options.tone,
|
|
56644
56645
|
density: event.options.density
|
|
56645
|
-
},
|
|
56646
|
+
}, sseOptions);
|
|
56646
56647
|
}
|
|
56647
56648
|
} catch (error) {
|
|
56648
56649
|
if (error instanceof Error && error.name === "AbortError") {
|
|
@@ -56845,11 +56846,12 @@ function useGenerationFlow(locale, resourceId, showSuccess, showError, cacheMana
|
|
|
56845
56846
|
try {
|
|
56846
56847
|
generationStreamRef.current?.abort();
|
|
56847
56848
|
generationStreamRef.current = new AbortController();
|
|
56849
|
+
const sseOptions = { auth: toAccessToken4(tokenRef.current), eventBus };
|
|
56848
56850
|
clientRef.current.sse.generateResourceFromAnnotation(
|
|
56849
56851
|
event.resourceUri,
|
|
56850
56852
|
event.annotationUri,
|
|
56851
56853
|
event.options,
|
|
56852
|
-
|
|
56854
|
+
sseOptions
|
|
56853
56855
|
);
|
|
56854
56856
|
} catch (error) {
|
|
56855
56857
|
if (error.name === "AbortError") {
|