@fencyai/react 0.1.97 → 0.1.99
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/chat/ChatResponse.d.ts +7 -1
- package/dist/chat/ChatResponseComplete.d.ts +5 -0
- package/dist/chat/ChatResponseLoading.d.ts +6 -0
- package/dist/chat/ChatResponseThinking.d.ts +6 -0
- package/dist/chat/Display.d.ts +2 -2
- package/dist/chat/EditableContent.d.ts +1 -1
- package/dist/chat/GhostWrapper.d.ts +1 -1
- package/dist/chat/MentionInput.d.ts +1 -1
- package/dist/chat/hooks/useContentEditable.d.ts +1 -1
- package/dist/chat/hooks/useMentionRenderer.d.ts +1 -1
- package/dist/hooks/usePaginatedQuery/index.d.ts +1 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3930 -3645
- package/dist/types/ListMemoriesPage.d.ts +1 -1
- package/dist/types/ListMemoryTypesPage.d.ts +1 -1
- package/dist/types/StreamData.d.ts +10 -5
- package/dist/types/StreamingAgentTask.d.ts +2 -4
- package/dist/types/UseAgentTasksProps.d.ts +5 -5
- package/dist/types/UseStreamProps.d.ts +10 -10
- package/package.json +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AgentTaskProgressItemType } from '@fencyai/js';
|
|
1
2
|
export type NewChatCompletionStreamChunk = {
|
|
2
3
|
type: 'NewChatCompletionStreamChunk';
|
|
3
4
|
streamId: string;
|
|
@@ -55,11 +56,15 @@ export type FileSearchIndexReady = {
|
|
|
55
56
|
fileId: string;
|
|
56
57
|
timestamp: string;
|
|
57
58
|
};
|
|
58
|
-
export type
|
|
59
|
-
type: '
|
|
59
|
+
export type AgentTaskProgressItemUpdated = {
|
|
60
|
+
type: 'AgentTaskProgressItemUpdated';
|
|
60
61
|
streamId: string;
|
|
61
62
|
agentTaskId: string;
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
progressItemId: string;
|
|
64
|
+
title: string;
|
|
65
|
+
startedAt: string;
|
|
66
|
+
completedAt?: string;
|
|
67
|
+
response: string;
|
|
68
|
+
progressItemType: AgentTaskProgressItemType;
|
|
64
69
|
};
|
|
65
|
-
export type StreamData = NewChatCompletionStreamChunk | ChatCompletionStreamCompleted | StreamTimeout | StreamNotFound | FileUploadCompleted | FileTextContentReady | WebsiteHtmlContentReady | WebsiteTextContentReady | FileSearchIndexReady |
|
|
70
|
+
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 {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
10
|
+
onAgentTaskProgressItemUpdated?: (streamData: AgentTaskProgressItemUpdated) => void;
|
|
11
11
|
onAgentTaskCompleted?: (streamId: string) => void;
|
|
12
|
-
onStreamError?: (
|
|
13
|
-
onStreamNotFound?: (
|
|
14
|
-
onStreamTimeout?: (
|
|
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,
|
|
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?: (
|
|
10
|
-
onStreamNotFound?: (
|
|
11
|
-
onFileUploadCompleted?: (
|
|
12
|
-
onFileTextContentReady?: (
|
|
13
|
-
onWebsiteHtmlContentReady?: (
|
|
14
|
-
onWebsiteTextContentReady?: (
|
|
15
|
-
onFileSearchIndexReady?: (
|
|
16
|
-
|
|
17
|
-
onStreamError?: (
|
|
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.
|
|
3
|
+
"version": "0.1.99",
|
|
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.
|
|
35
|
+
"@fencyai/js": "^0.1.99",
|
|
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.
|
|
49
|
+
"@fencyai/js": "^0.1.99",
|
|
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": "
|
|
63
|
+
"gitHead": "982cdf11451b24fd0b968fdc83e0f7df296d3989"
|
|
64
64
|
}
|