@fencyai/react 0.1.96 → 0.1.98

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.
@@ -55,11 +55,14 @@ export type FileSearchIndexReady = {
55
55
  fileId: string;
56
56
  timestamp: string;
57
57
  };
58
- export type NewAgentTaskReasoningChunk = {
59
- type: 'NewAgentTaskReasoningChunk';
58
+ export type AgentTaskProgressItemUpdated = {
59
+ type: 'AgentTaskProgressItemUpdated';
60
60
  streamId: string;
61
61
  agentTaskId: string;
62
- timestamp: string;
63
- content: string;
62
+ progressItemId: string;
63
+ description: string;
64
+ startedAt: string;
65
+ completedAt?: string;
66
+ response: string;
64
67
  };
65
- export type StreamData = NewChatCompletionStreamChunk | ChatCompletionStreamCompleted | StreamTimeout | StreamNotFound | FileUploadCompleted | FileTextContentReady | WebsiteHtmlContentReady | WebsiteTextContentReady | FileSearchIndexReady | NewAgentTaskReasoningChunk;
68
+ export type StreamData = NewChatCompletionStreamChunk | ChatCompletionStreamCompleted | StreamTimeout | StreamNotFound | FileUploadCompleted | FileTextContentReady | WebsiteHtmlContentReady | WebsiteTextContentReady | FileSearchIndexReady | AgentTaskProgressItemUpdated;
@@ -1,6 +1,6 @@
1
1
  import { ApiError } from '@fencyai/js';
2
2
  import { CreateAgentTaskParams } from './CreateAgentTaskParams';
3
- import { NewAgentTaskReasoningChunk } from './StreamData';
3
+ import { AgentTaskProgressItemUpdated } from './StreamData';
4
4
  import { StreamingAgentTaskData } from './StreamingAgentTaskData';
5
5
  export interface StreamingAgentTask {
6
6
  streamId: string;
@@ -8,9 +8,7 @@ export interface StreamingAgentTask {
8
8
  data: StreamingAgentTaskData | null;
9
9
  error: ApiError | null;
10
10
  prompt: CreateAgentTaskParams;
11
- response: string;
12
- reasoning: string;
13
- chunks: NewAgentTaskReasoningChunk[];
11
+ progressItems: AgentTaskProgressItemUpdated[];
14
12
  loading: boolean;
15
13
  doneStreaming: boolean;
16
14
  }
@@ -1,4 +1,4 @@
1
- import { NewAgentTaskReasoningChunk, StreamNotFound, StreamTimeout } from './StreamData';
1
+ import { AgentTaskProgressItemUpdated, StreamNotFound, StreamTimeout } from './StreamData';
2
2
  import { StreamError } from './StreamError';
3
3
  export interface UseAgentTasksProps {
4
4
  fetchCreateStreamClientSecret: () => Promise<{
@@ -7,9 +7,9 @@ export interface UseAgentTasksProps {
7
7
  fetchCreateAgentTaskClientSecret: () => Promise<{
8
8
  clientSecret: string;
9
9
  }>;
10
- onAgentTaskReasoningChunk?: (streamData: NewAgentTaskReasoningChunk) => void;
10
+ onAgentTaskProgressItemUpdated?: (streamData: AgentTaskProgressItemUpdated) => void;
11
11
  onAgentTaskCompleted?: (streamId: string) => void;
12
- onStreamError?: (error: StreamError) => void;
13
- onStreamNotFound?: (error: StreamNotFound) => void;
14
- onStreamTimeout?: (error: StreamTimeout) => void;
12
+ onStreamError?: (event: StreamError) => void;
13
+ onStreamNotFound?: (event: StreamNotFound) => void;
14
+ onStreamTimeout?: (event: StreamTimeout) => void;
15
15
  }
@@ -1,4 +1,4 @@
1
- import { ChatCompletionStreamCompleted, NewChatCompletionStreamChunk, StreamNotFound, StreamTimeout, FileUploadCompleted, FileTextContentReady, WebsiteHtmlContentReady, WebsiteTextContentReady, FileSearchIndexReady, NewAgentTaskReasoningChunk } from './StreamData';
1
+ import { ChatCompletionStreamCompleted, NewChatCompletionStreamChunk, StreamNotFound, StreamTimeout, FileUploadCompleted, FileTextContentReady, WebsiteHtmlContentReady, WebsiteTextContentReady, FileSearchIndexReady, AgentTaskProgressItemUpdated } from './StreamData';
2
2
  import { StreamError } from './StreamError';
3
3
  export interface UseStreamProps {
4
4
  fetchClientSecret: () => Promise<{
@@ -6,13 +6,13 @@ export interface UseStreamProps {
6
6
  }>;
7
7
  onNewChatCompletionStreamChunk?: (streamData: NewChatCompletionStreamChunk) => void;
8
8
  onChatCompletionStreamCompleted?: (stream: ChatCompletionStreamCompleted) => void;
9
- onStreamTimeout?: (error: StreamTimeout) => void;
10
- onStreamNotFound?: (error: StreamNotFound) => void;
11
- onFileUploadCompleted?: (error: FileUploadCompleted) => void;
12
- onFileTextContentReady?: (error: FileTextContentReady) => void;
13
- onWebsiteHtmlContentReady?: (error: WebsiteHtmlContentReady) => void;
14
- onWebsiteTextContentReady?: (error: WebsiteTextContentReady) => void;
15
- onFileSearchIndexReady?: (error: FileSearchIndexReady) => void;
16
- onNewAgentTaskReasoningChunk?: (error: NewAgentTaskReasoningChunk) => void;
17
- onStreamError?: (error: StreamError) => void;
9
+ onStreamTimeout?: (event: StreamTimeout) => void;
10
+ onStreamNotFound?: (event: StreamNotFound) => void;
11
+ onFileUploadCompleted?: (event: FileUploadCompleted) => void;
12
+ onFileTextContentReady?: (event: FileTextContentReady) => void;
13
+ onWebsiteHtmlContentReady?: (event: WebsiteHtmlContentReady) => void;
14
+ onWebsiteTextContentReady?: (event: WebsiteTextContentReady) => void;
15
+ onFileSearchIndexReady?: (event: FileSearchIndexReady) => void;
16
+ onAgentTaskProgressItemUpdated?: (event: AgentTaskProgressItemUpdated) => void;
17
+ onStreamError?: (event: StreamError) => void;
18
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fencyai/react",
3
- "version": "0.1.96",
3
+ "version": "0.1.98",
4
4
  "description": "> TODO: description",
5
5
  "author": "staklau <steinaageklaussen@gmail.com>",
6
6
  "homepage": "",
@@ -32,7 +32,7 @@
32
32
  "prepublishOnly": "npm run build"
33
33
  },
34
34
  "devDependencies": {
35
- "@fencyai/js": "^0.1.96",
35
+ "@fencyai/js": "^0.1.98",
36
36
  "@types/jest": "^29.5.11",
37
37
  "@types/node": "^20.10.5",
38
38
  "@types/react": "^18.2.45",
@@ -46,7 +46,7 @@
46
46
  "vite-plugin-lib-inject-css": "^2.1.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@fencyai/js": "^0.1.96",
49
+ "@fencyai/js": "^0.1.98",
50
50
  "@radix-ui/react-popover": "^1.1.15",
51
51
  "react": ">=16.8.0",
52
52
  "react-markdown": "^10.1.0",
@@ -60,5 +60,5 @@
60
60
  "optional": false
61
61
  }
62
62
  },
63
- "gitHead": "d85b55d756c2bfa83897b92370729d219fdd07c3"
63
+ "gitHead": "297000de93af1ea423e54d43da4af48135d77cbe"
64
64
  }