goji-search 3.0.1 → 3.0.7
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/goji-search/components/elements/deep-analysis-card.d.ts +2 -2
- package/dist/goji-search/components/elements/deep-analysis-modal.d.ts +9 -0
- package/dist/goji-search/components/elements/message-list.d.ts +7 -1
- package/dist/goji-search/hooks/useChatStream.d.ts +4 -0
- package/dist/index.js +4598 -5030
- package/dist/widget.js +56 -47
- package/package.json +1 -1
|
@@ -11,6 +11,6 @@ export interface DeepAnalysisCardProps {
|
|
|
11
11
|
analysisType: AnalysisType;
|
|
12
12
|
data?: DeepAnalysisData;
|
|
13
13
|
isLoading?: boolean;
|
|
14
|
-
|
|
14
|
+
onClick?: () => void;
|
|
15
15
|
}
|
|
16
|
-
export declare function DeepAnalysisCard({ analysisType, data, isLoading,
|
|
16
|
+
export declare function DeepAnalysisCard({ analysisType, data, isLoading, onClick, }: DeepAnalysisCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DeepAnalysisData, AnalysisType } from "./deep-analysis-card";
|
|
2
|
+
interface DeepAnalysisModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
analysisType: AnalysisType;
|
|
5
|
+
data?: DeepAnalysisData;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function DeepAnalysisModal({ isOpen, analysisType, data, onClose }: DeepAnalysisModalProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DeepAnalysis, PendingAnalysis } from "../../lib/goji-client";
|
|
1
2
|
interface ChatSource {
|
|
2
3
|
index: number;
|
|
3
4
|
url: string;
|
|
@@ -16,6 +17,10 @@ interface Message {
|
|
|
16
17
|
choicesSelected?: boolean;
|
|
17
18
|
choicesVariant?: "default" | "faded" | "dark";
|
|
18
19
|
choiceMode?: "send" | "action";
|
|
20
|
+
deepAnalysis?: {
|
|
21
|
+
current?: DeepAnalysis;
|
|
22
|
+
pending?: PendingAnalysis;
|
|
23
|
+
};
|
|
19
24
|
}
|
|
20
25
|
interface MessageListProps {
|
|
21
26
|
messages: Message[];
|
|
@@ -24,8 +29,9 @@ interface MessageListProps {
|
|
|
24
29
|
size?: "m" | "l" | "xl" | "s" | "xs";
|
|
25
30
|
brandName?: string;
|
|
26
31
|
onChoiceClick?: (messageIndex: number, choice: string) => void;
|
|
32
|
+
onDeepAnalysisClick?: () => void;
|
|
27
33
|
userMessageBackgroundColor?: string;
|
|
28
34
|
aiColor?: string;
|
|
29
35
|
}
|
|
30
|
-
export declare function MessageList({ messages, isStreaming, aiAvatarSrc, size, brandName, onChoiceClick, userMessageBackgroundColor, aiColor }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function MessageList({ messages, isStreaming, aiAvatarSrc, size, brandName, onChoiceClick, onDeepAnalysisClick, userMessageBackgroundColor, aiColor }: MessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
31
37
|
export {};
|
|
@@ -12,6 +12,10 @@ export interface Message {
|
|
|
12
12
|
choicesVariant?: "default" | "faded" | "dark";
|
|
13
13
|
choiceMode?: "send" | "action";
|
|
14
14
|
emailToken?: string;
|
|
15
|
+
deepAnalysis?: {
|
|
16
|
+
current?: DeepAnalysis;
|
|
17
|
+
pending?: PendingAnalysis;
|
|
18
|
+
};
|
|
15
19
|
}
|
|
16
20
|
export interface UseChatStreamOptions {
|
|
17
21
|
client: GojiSearchClient;
|