@syncagent/react 0.1.6 → 0.1.8
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.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +199 -292
- package/dist/index.mjs +199 -292
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -10,13 +10,16 @@ declare function SyncAgentProvider({ config, children, }: {
|
|
|
10
10
|
declare function useSyncAgentClient(): SyncAgentClient;
|
|
11
11
|
|
|
12
12
|
interface UseSyncAgentOptions {
|
|
13
|
-
/** Pass a client directly instead of using the provider */
|
|
14
13
|
client?: SyncAgentClient;
|
|
15
14
|
}
|
|
16
15
|
declare function useSyncAgent(options?: UseSyncAgentOptions): {
|
|
17
16
|
messages: Message[];
|
|
18
17
|
isLoading: boolean;
|
|
19
18
|
error: Error | null;
|
|
19
|
+
status: {
|
|
20
|
+
step: string;
|
|
21
|
+
label: string;
|
|
22
|
+
} | null;
|
|
20
23
|
sendMessage: (content: string) => Promise<void>;
|
|
21
24
|
stop: () => void;
|
|
22
25
|
reset: () => void;
|
|
@@ -35,6 +38,10 @@ interface SyncAgentChatProps {
|
|
|
35
38
|
className?: string;
|
|
36
39
|
style?: CSSProperties;
|
|
37
40
|
suggestions?: string[];
|
|
41
|
+
/** Unique key for localStorage persistence — use project ID */
|
|
42
|
+
persistKey?: string;
|
|
43
|
+
/** Called when user reacts to a message */
|
|
44
|
+
onReaction?: (messageIndex: number, reaction: "up" | "down", content: string) => void;
|
|
38
45
|
}
|
|
39
46
|
declare function SyncAgentChat({ config, ...props }: SyncAgentChatProps): react_jsx_runtime.JSX.Element;
|
|
40
47
|
|
package/dist/index.d.ts
CHANGED
|
@@ -10,13 +10,16 @@ declare function SyncAgentProvider({ config, children, }: {
|
|
|
10
10
|
declare function useSyncAgentClient(): SyncAgentClient;
|
|
11
11
|
|
|
12
12
|
interface UseSyncAgentOptions {
|
|
13
|
-
/** Pass a client directly instead of using the provider */
|
|
14
13
|
client?: SyncAgentClient;
|
|
15
14
|
}
|
|
16
15
|
declare function useSyncAgent(options?: UseSyncAgentOptions): {
|
|
17
16
|
messages: Message[];
|
|
18
17
|
isLoading: boolean;
|
|
19
18
|
error: Error | null;
|
|
19
|
+
status: {
|
|
20
|
+
step: string;
|
|
21
|
+
label: string;
|
|
22
|
+
} | null;
|
|
20
23
|
sendMessage: (content: string) => Promise<void>;
|
|
21
24
|
stop: () => void;
|
|
22
25
|
reset: () => void;
|
|
@@ -35,6 +38,10 @@ interface SyncAgentChatProps {
|
|
|
35
38
|
className?: string;
|
|
36
39
|
style?: CSSProperties;
|
|
37
40
|
suggestions?: string[];
|
|
41
|
+
/** Unique key for localStorage persistence — use project ID */
|
|
42
|
+
persistKey?: string;
|
|
43
|
+
/** Called when user reacts to a message */
|
|
44
|
+
onReaction?: (messageIndex: number, reaction: "up" | "down", content: string) => void;
|
|
38
45
|
}
|
|
39
46
|
declare function SyncAgentChat({ config, ...props }: SyncAgentChatProps): react_jsx_runtime.JSX.Element;
|
|
40
47
|
|