@infinilabs/chat-message 0.0.17 → 0.0.19
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/ChatMessage.cjs +13 -13
- package/dist/ChatMessage.iife.js +13 -13
- package/dist/ChatMessage.js +1519 -1478
- package/dist/ChatMessage.umd.cjs +13 -13
- package/dist/components/CallTools.d.ts +3 -1
- package/dist/components/DeepRead.d.ts +3 -1
- package/dist/components/DeepResearch/DeepResearchDrawer.d.ts +3 -1
- package/dist/components/DeepResearch/ResearchReportContent.d.ts +4 -1
- package/dist/components/DeepResearch/ResearchStepsContent.d.ts +3 -1
- package/dist/components/DeepResearch/index.d.ts +7 -1
- package/dist/components/FetchSource.d.ts +3 -1
- package/dist/components/PickSource.d.ts +3 -1
- package/dist/components/QueryIntent.d.ts +3 -1
- package/dist/components/Think.d.ts +3 -1
- package/dist/components/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
import { IChunkData } from '../types/chat';
|
|
2
3
|
interface CallToolsProps {
|
|
3
4
|
Detail?: any;
|
|
4
5
|
ChunkData?: IChunkData;
|
|
5
6
|
loading?: boolean;
|
|
7
|
+
t?: TFunction;
|
|
6
8
|
}
|
|
7
|
-
export declare const CallTools: ({ Detail, ChunkData, loading }: CallToolsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export declare const CallTools: ({ Detail, ChunkData, loading, t: tProp }: CallToolsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
10
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
import { IChunkData } from '../types/chat';
|
|
2
3
|
interface DeepReadeProps {
|
|
3
4
|
Detail?: any;
|
|
4
5
|
ChunkData?: IChunkData;
|
|
5
6
|
loading?: boolean;
|
|
7
|
+
t?: TFunction;
|
|
6
8
|
}
|
|
7
|
-
export declare const DeepRead: ({ Detail, ChunkData, loading, }: DeepReadeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export declare const DeepRead: ({ Detail, ChunkData, loading, t: tProp, }: DeepReadeProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
10
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
import { StepItem, StepStatus, StepSearchHit } from './ResearchStepsContent';
|
|
2
3
|
import { ResearchReportData } from './ResearchReportContent';
|
|
3
4
|
interface DeepResearchDrawerProps {
|
|
@@ -14,6 +15,7 @@ interface DeepResearchDrawerProps {
|
|
|
14
15
|
formatUrl?: (data: any) => string;
|
|
15
16
|
theme?: "light" | "dark";
|
|
16
17
|
showReportOnly?: boolean;
|
|
18
|
+
t?: TFunction;
|
|
17
19
|
}
|
|
18
|
-
export declare const DeepResearchDrawer: ({ open, onClose, defaultActiveTab, steps, plannerStatus, executionStatus, reportStatus, reportData, reportContent, searchHits, formatUrl, theme, showReportOnly, }: DeepResearchDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const DeepResearchDrawer: ({ open, onClose, defaultActiveTab, steps, plannerStatus, executionStatus, reportStatus, reportData, reportContent, searchHits, formatUrl, theme, showReportOnly, t: tProp, }: DeepResearchDrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
21
|
export {};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
export interface ResearchReportData {
|
|
2
3
|
title?: string;
|
|
3
4
|
url?: string;
|
|
4
5
|
created?: string;
|
|
5
6
|
attachment?: string;
|
|
7
|
+
format?: string;
|
|
6
8
|
}
|
|
7
9
|
export interface ResearchReportContentProps {
|
|
8
10
|
content?: string;
|
|
9
11
|
data?: ResearchReportData;
|
|
10
12
|
formatUrl?: (data: any) => string;
|
|
13
|
+
t?: TFunction;
|
|
11
14
|
}
|
|
12
|
-
export declare const ResearchReportContent: ({ content, data, formatUrl, }: ResearchReportContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const ResearchReportContent: ({ content, data, formatUrl, t: tProp, }: ResearchReportContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
/**
|
|
2
3
|
* 步骤状态类型定义
|
|
3
4
|
* done: 已完成
|
|
@@ -48,10 +49,11 @@ interface ResearchStepsContentProps {
|
|
|
48
49
|
plannerStatus?: StepStatus;
|
|
49
50
|
executionStatus?: StepStatus;
|
|
50
51
|
reportStatus?: StepStatus;
|
|
52
|
+
t?: TFunction;
|
|
51
53
|
}
|
|
52
54
|
/**
|
|
53
55
|
* 深层研究步骤内容组件
|
|
54
56
|
* 展示研究计划、执行步骤和报告生成的全过程状态
|
|
55
57
|
*/
|
|
56
|
-
export declare const ResearchStepsContent: ({ steps, plannerStatus, executionStatus, reportStatus, }: ResearchStepsContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare const ResearchStepsContent: ({ steps, plannerStatus, executionStatus, reportStatus, t: tProp, }: ResearchStepsContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
59
|
export {};
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
import { IChunkData } from '../../types/chat';
|
|
2
3
|
interface DeepResearchProps {
|
|
4
|
+
Detail?: {
|
|
5
|
+
type: string;
|
|
6
|
+
payload?: IChunkData[];
|
|
7
|
+
};
|
|
3
8
|
ChunkData?: IChunkData[];
|
|
4
9
|
question?: string;
|
|
5
10
|
formatUrl?: (data: any) => string;
|
|
6
11
|
theme?: "light" | "dark";
|
|
12
|
+
t?: TFunction;
|
|
7
13
|
}
|
|
8
|
-
export declare const DeepResearch: ({ ChunkData, question, formatUrl, theme, }: DeepResearchProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export declare const DeepResearch: ({ Detail, ChunkData, question, formatUrl, theme, t: tProp, }: DeepResearchProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
15
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
import { IChunkData } from '../types/chat';
|
|
2
3
|
interface FetchSourceProps {
|
|
3
4
|
Detail?: any;
|
|
4
5
|
ChunkData?: IChunkData;
|
|
5
6
|
loading?: boolean;
|
|
6
7
|
formatUrl?: (data: ISourceData) => string;
|
|
8
|
+
t?: TFunction;
|
|
7
9
|
}
|
|
8
10
|
interface ISourceData {
|
|
9
11
|
category: string;
|
|
@@ -21,5 +23,5 @@ interface ISourceData {
|
|
|
21
23
|
updated: string | null;
|
|
22
24
|
url: string;
|
|
23
25
|
}
|
|
24
|
-
export declare const FetchSource: ({ Detail, ChunkData, loading, formatUrl, }: FetchSourceProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare const FetchSource: ({ Detail, ChunkData, loading, formatUrl, t: tProp, }: FetchSourceProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
25
27
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
import { IChunkData } from '../types/chat';
|
|
2
3
|
interface PickSourceProps {
|
|
3
4
|
Detail?: any;
|
|
4
5
|
ChunkData?: IChunkData;
|
|
5
6
|
loading?: boolean;
|
|
7
|
+
t?: TFunction;
|
|
6
8
|
}
|
|
7
|
-
export declare const PickSource: ({ Detail, ChunkData, loading, }: PickSourceProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export declare const PickSource: ({ Detail, ChunkData, loading, t: tProp, }: PickSourceProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
10
|
export {};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
import { IChunkData } from '../types/chat';
|
|
2
3
|
interface QueryIntentProps {
|
|
3
4
|
Detail?: any;
|
|
4
5
|
ChunkData?: IChunkData;
|
|
5
6
|
getSuggestion?: (suggestion: string[]) => void;
|
|
6
7
|
loading?: boolean;
|
|
8
|
+
t?: TFunction;
|
|
7
9
|
}
|
|
8
|
-
export declare const QueryIntent: ({ Detail, ChunkData, getSuggestion, loading, }: QueryIntentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export declare const QueryIntent: ({ Detail, ChunkData, getSuggestion, loading, t: tProp, }: QueryIntentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
11
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { TFunction } from 'i18next';
|
|
1
2
|
import { IChunkData } from '../types/chat';
|
|
2
3
|
interface ThinkProps {
|
|
3
4
|
Detail?: any;
|
|
4
5
|
ChunkData?: IChunkData;
|
|
5
6
|
loading?: boolean;
|
|
7
|
+
t?: TFunction;
|
|
6
8
|
}
|
|
7
|
-
export declare const Think: ({ Detail, ChunkData, loading }: ThinkProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export declare const Think: ({ Detail, ChunkData, loading, t: tProp }: ThinkProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
10
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IChatMessage, IChunkData } from '../types/chat';
|
|
2
2
|
import { AttachmentHit } from './UserMessage';
|
|
3
|
+
import { TFunction } from 'i18next';
|
|
3
4
|
export type { IChatMessage, IChunkData };
|
|
4
5
|
export interface ChatMessageProps {
|
|
5
6
|
message: IChatMessage;
|
|
@@ -18,6 +19,7 @@ export interface ChatMessageProps {
|
|
|
18
19
|
currentAssistant?: any;
|
|
19
20
|
/** Fetch attachment metadata by IDs for rendering in user messages. */
|
|
20
21
|
fetchAttachments?: (ids: string[]) => Promise<AttachmentHit[]>;
|
|
22
|
+
t?: TFunction;
|
|
21
23
|
}
|
|
22
24
|
export interface ChatMessageRef {
|
|
23
25
|
addChunk: (chunk: IChunkData) => void;
|