@arbidocs/react 0.3.134 → 0.3.136
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.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, ComponentType } from 'react';
|
|
3
|
-
import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData,
|
|
3
|
+
import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData, ResponseOutputItemDoneEvent, ArtifactEvent } from '@arbidocs/sdk/browser';
|
|
4
4
|
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, CreateMemoryRequest, CreateTaskRequest, MemoryResponse, MemorySearchRequest, MemorySearchResponse, MessageMetadataPayload, OutputTokensDetails, ProjectInvoicesResponse, ProjectUsageResponse, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, TaskResponse, UpdateTaskRequest, UserDailyUsageResponse, UserInputRequestEvent, UserMessageEvent, WorkspaceChronologyOut } from '@arbidocs/sdk/browser';
|
|
5
5
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
6
6
|
import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, components } from '@arbidocs/client';
|
|
@@ -523,7 +523,7 @@ declare function useAssistantQuery(): _tanstack_react_query.UseMutationResult<SS
|
|
|
523
523
|
model?: string;
|
|
524
524
|
onToken?: (content: string) => void;
|
|
525
525
|
onStreamStart?: (data: SSEStreamStartData) => void;
|
|
526
|
-
|
|
526
|
+
onOutputItemDone?: (data: ResponseOutputItemDoneEvent) => void;
|
|
527
527
|
onArtifact?: (data: ArtifactEvent) => void;
|
|
528
528
|
onError?: (message: string) => void;
|
|
529
529
|
onComplete?: () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ReactNode, ComponentType } from 'react';
|
|
3
|
-
import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData,
|
|
3
|
+
import { ArbiOptions, Arbi, SSEStreamResult, SSEStreamStartData, ResponseOutputItemDoneEvent, ArtifactEvent } from '@arbidocs/sdk/browser';
|
|
4
4
|
export { AgentStepEvent, Arbi, ArbiError, ArbiOptions, ArtifactEvent, CreateMemoryRequest, CreateTaskRequest, MemoryResponse, MemorySearchRequest, MemorySearchResponse, MessageMetadataPayload, OutputTokensDetails, ProjectInvoicesResponse, ProjectUsageResponse, QueryOptions, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseCreatedEvent, ResponseFailedEvent, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseUsage, SSEStreamCallbacks, SSEStreamResult, SSEStreamStartData, TaskResponse, UpdateTaskRequest, UserDailyUsageResponse, UserInputRequestEvent, UserMessageEvent, WorkspaceChronologyOut } from '@arbidocs/sdk/browser';
|
|
5
5
|
import * as _arbidocs_client from '@arbidocs/client';
|
|
6
6
|
import { WebSocketServerMessage, WsTaskUpdateMessage, WsPresenceUpdateMessage, components } from '@arbidocs/client';
|
|
@@ -523,7 +523,7 @@ declare function useAssistantQuery(): _tanstack_react_query.UseMutationResult<SS
|
|
|
523
523
|
model?: string;
|
|
524
524
|
onToken?: (content: string) => void;
|
|
525
525
|
onStreamStart?: (data: SSEStreamStartData) => void;
|
|
526
|
-
|
|
526
|
+
onOutputItemDone?: (data: ResponseOutputItemDoneEvent) => void;
|
|
527
527
|
onArtifact?: (data: ArtifactEvent) => void;
|
|
528
528
|
onError?: (message: string) => void;
|
|
529
529
|
onComplete?: () => void;
|
package/dist/index.js
CHANGED
|
@@ -1138,8 +1138,11 @@ function ChatView({ workspaceId, theme, labels }) {
|
|
|
1138
1138
|
docIds: selectedDocs,
|
|
1139
1139
|
previousResponseId,
|
|
1140
1140
|
onToken: (t) => setStreaming((prev) => prev + t),
|
|
1141
|
-
|
|
1142
|
-
|
|
1141
|
+
onOutputItemDone: (ev) => {
|
|
1142
|
+
const item = ev.item;
|
|
1143
|
+
if (item.type === "function_call" || item.type === "reasoning") {
|
|
1144
|
+
setAgentStatus(item.arbi?.focus || item.arbi?.label || "");
|
|
1145
|
+
}
|
|
1143
1146
|
}
|
|
1144
1147
|
},
|
|
1145
1148
|
{
|
|
@@ -1652,7 +1655,10 @@ function useAiTask() {
|
|
|
1652
1655
|
bufferRef.current += c;
|
|
1653
1656
|
setText(bufferRef.current);
|
|
1654
1657
|
},
|
|
1655
|
-
|
|
1658
|
+
onOutputItemDone: (ev) => {
|
|
1659
|
+
const t = ev.item.type;
|
|
1660
|
+
if (t === "function_call" || t === "reasoning") setStepCount((n) => n + 1);
|
|
1661
|
+
},
|
|
1656
1662
|
onArtifact: (a) => {
|
|
1657
1663
|
artifactsRef.current.set(a.doc_ext_id, a);
|
|
1658
1664
|
setArtifacts([...artifactsRef.current.values()]);
|