@fencyai/react 0.1.94 → 0.1.96

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.
@@ -8,5 +8,7 @@ export interface FencyContext {
8
8
  loading: boolean;
9
9
  error: Error | null;
10
10
  activeStream: StreamCache | null;
11
- getOrCreateStream: (maxAge?: number) => Promise<Stream>;
11
+ getOrCreateStream: (fetchClientSecret: () => Promise<{
12
+ clientSecret: string;
13
+ }>, maxAge?: number) => Promise<Stream>;
12
14
  }
@@ -9,6 +9,7 @@ export interface StreamingAgentTask {
9
9
  error: ApiError | null;
10
10
  prompt: CreateAgentTaskParams;
11
11
  response: string;
12
+ reasoning: string;
12
13
  chunks: NewAgentTaskReasoningChunk[];
13
14
  loading: boolean;
14
15
  doneStreaming: boolean;
@@ -1,6 +1,12 @@
1
1
  import { NewAgentTaskReasoningChunk, StreamNotFound, StreamTimeout } from './StreamData';
2
2
  import { StreamError } from './StreamError';
3
3
  export interface UseAgentTasksProps {
4
+ fetchCreateStreamClientSecret: () => Promise<{
5
+ clientSecret: string;
6
+ }>;
7
+ fetchCreateAgentTaskClientSecret: () => Promise<{
8
+ clientSecret: string;
9
+ }>;
4
10
  onAgentTaskReasoningChunk?: (streamData: NewAgentTaskReasoningChunk) => void;
5
11
  onAgentTaskCompleted?: (streamId: string) => void;
6
12
  onStreamError?: (error: StreamError) => void;
@@ -1,6 +1,9 @@
1
1
  import { ChatCompletionStreamCompleted, NewChatCompletionStreamChunk, StreamNotFound, StreamTimeout, FileUploadCompleted, FileTextContentReady, WebsiteHtmlContentReady, WebsiteTextContentReady, FileSearchIndexReady, NewAgentTaskReasoningChunk } from './StreamData';
2
2
  import { StreamError } from './StreamError';
3
3
  export interface UseStreamProps {
4
+ fetchClientSecret: () => Promise<{
5
+ clientSecret: string;
6
+ }>;
4
7
  onNewChatCompletionStreamChunk?: (streamData: NewChatCompletionStreamChunk) => void;
5
8
  onChatCompletionStreamCompleted?: (stream: ChatCompletionStreamCompleted) => void;
6
9
  onStreamTimeout?: (error: StreamTimeout) => void;
@@ -1,6 +1,9 @@
1
1
  import { ChatCompletionStreamCompleted, NewChatCompletionStreamChunk, StreamNotFound, StreamTimeout } from './StreamData';
2
2
  import { StreamError } from './StreamError';
3
3
  export interface UseStreamingChatCompletionsProps {
4
+ fetchCreateStreamClientSecret: () => Promise<{
5
+ clientSecret: string;
6
+ }>;
4
7
  onChatCompletionStreamCompleted?: (stream: ChatCompletionStreamCompleted) => void;
5
8
  onChatCompletionStreamChunk?: (chunk: NewChatCompletionStreamChunk) => void;
6
9
  onStreamNotFound?: (error: StreamNotFound) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fencyai/react",
3
- "version": "0.1.94",
3
+ "version": "0.1.96",
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.94",
35
+ "@fencyai/js": "^0.1.96",
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.94",
49
+ "@fencyai/js": "^0.1.96",
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": "51cd3642df31bd1fe84bfce6a7f1c128560cd83f"
63
+ "gitHead": "d85b55d756c2bfa83897b92370729d219fdd07c3"
64
64
  }