@ibiz-template-plugin/ai-chat 0.0.85 → 0.0.86
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.es.js +499 -467
- package/dist/index.legacy.js +1 -1
- package/dist/types/components/chat-deep-research/chat-deep-research.d.ts +10 -0
- package/dist/types/components/chat-deep-research-report/chat-deep-research-report.d.ts +10 -0
- package/dist/types/components/chat-deep-research-step/chat-deep-research-step.d.ts +12 -0
- package/dist/types/components/deep-research-result/deep-research-result.d.ts +26 -0
- package/dist/types/constants/index.d.ts +21 -0
- package/dist/types/controller/ai-chat/ai-chat.controller.d.ts +10 -0
- package/dist/types/interface/deep-research/i-deep-research-item.d.ts +30 -0
- package/dist/types/interface/deep-research/i-deep-research-report.d.ts +41 -0
- package/dist/types/interface/deep-research/i-deep-research-resource.d.ts +21 -0
- package/dist/types/interface/deep-research/i-deep-research-source-web.d.ts +58 -0
- package/dist/types/interface/deep-research/i-deep-research-step.d.ts +55 -0
- package/dist/types/interface/deep-research/index.d.ts +5 -0
- package/dist/types/interface/i-chat-options/i-chat-options.d.ts +1 -1
- package/dist/types/interface/index.d.ts +1 -0
- package/dist/types/locale/en/index.d.ts +10 -0
- package/dist/types/locale/zh-CN/index.d.ts +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IDeepResearchItem } from '../../interface';
|
|
2
|
+
|
|
3
|
+
interface ChatDeepResearchProps {
|
|
4
|
+
items: IDeepResearchItem[];
|
|
5
|
+
title?: string;
|
|
6
|
+
onReportCopy?: (content: string) => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ChatDeepResearch: (props: ChatDeepResearchProps) => import("preact").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IDeepResearchReport } from '../../interface';
|
|
2
|
+
|
|
3
|
+
export interface ChatDeepResearchReportProps {
|
|
4
|
+
report: IDeepResearchReport;
|
|
5
|
+
index: number;
|
|
6
|
+
total: number;
|
|
7
|
+
defaultExpanded?: boolean;
|
|
8
|
+
onCopy?: (content: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const ChatDeepResearchReport: (props: ChatDeepResearchReportProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IDeepResearchStep, IDeepResearchResource, IDeepResearchResourceWeb } from '../../interface';
|
|
2
|
+
|
|
3
|
+
export interface ChatDeepResearchStepProps {
|
|
4
|
+
step: IDeepResearchStep;
|
|
5
|
+
resource?: IDeepResearchResource;
|
|
6
|
+
resourceWeb?: IDeepResearchResourceWeb;
|
|
7
|
+
index: number;
|
|
8
|
+
total: number;
|
|
9
|
+
isLast?: boolean;
|
|
10
|
+
defaultExpanded?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const ChatDeepResearchStep: (props: ChatDeepResearchStepProps) => import("preact").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IDeepResearchReport } from '../../interface';
|
|
2
|
+
|
|
3
|
+
export type DeepResearchResultTab = 'visualized' | 'text';
|
|
4
|
+
export interface DeepResearchResultProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description 深度研究报告数据
|
|
7
|
+
*/
|
|
8
|
+
report: IDeepResearchReport;
|
|
9
|
+
/**
|
|
10
|
+
* @description 默认激活页签
|
|
11
|
+
*/
|
|
12
|
+
defaultActiveTab?: DeepResearchResultTab;
|
|
13
|
+
/**
|
|
14
|
+
* @description 自定义类名
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* @description 页签切换回调
|
|
19
|
+
*/
|
|
20
|
+
onTabChange?: (tab: DeepResearchResultTab) => void;
|
|
21
|
+
/**
|
|
22
|
+
* @description 关闭回调,由外层决定是否销毁/隐藏组件
|
|
23
|
+
*/
|
|
24
|
+
onClose?: () => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const DeepResearchResult: (props: DeepResearchResultProps) => import("preact").JSX.Element;
|
|
@@ -20,3 +20,24 @@ export declare enum AIChatConst {
|
|
|
20
20
|
*/
|
|
21
21
|
DATA_TABLE_KEY_NAME = "id"
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* 深度研究类型
|
|
25
|
+
*/
|
|
26
|
+
export declare enum DeepResearchType {
|
|
27
|
+
/**
|
|
28
|
+
* 深度研究步骤
|
|
29
|
+
*/
|
|
30
|
+
DEEP_RESEARCH_STEP = "deep_research_step",
|
|
31
|
+
/**
|
|
32
|
+
* 深度研究步骤资源(承载研究步骤与网络资源的关系)
|
|
33
|
+
*/
|
|
34
|
+
DEEP_RESEARCH_SOURCE = "deep_research_source",
|
|
35
|
+
/**
|
|
36
|
+
* 深度研究网络资源
|
|
37
|
+
*/
|
|
38
|
+
DEEP_RESEARCH_SOURCE_WEB = "deep_research_source_web",
|
|
39
|
+
/**
|
|
40
|
+
* 深度研究报告
|
|
41
|
+
*/
|
|
42
|
+
DEEP_RESEARCH_REPORT = "deep_research_report"
|
|
43
|
+
}
|
|
@@ -233,6 +233,16 @@ export declare class AiChatController {
|
|
|
233
233
|
* 计算选中知识库
|
|
234
234
|
*/
|
|
235
235
|
private computeSelectedKnowledge;
|
|
236
|
+
/**
|
|
237
|
+
* @description 知识库远程搜索
|
|
238
|
+
* @param {string} query
|
|
239
|
+
* @returns {*} {Promise<{ value: string; label: string }[]>}
|
|
240
|
+
* @memberof AiChatController
|
|
241
|
+
*/
|
|
242
|
+
knowledgeRemoteSearch(query: string): Promise<{
|
|
243
|
+
value: string;
|
|
244
|
+
label: string;
|
|
245
|
+
}[]>;
|
|
236
246
|
/**
|
|
237
247
|
* 获取历史记录存储key(用于适配不同智能体存在不同的历史记录)
|
|
238
248
|
* @param topicId 话题标识
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { DeepResearchType } from '../../constants';
|
|
2
|
+
import { IDeepResearchStep } from './i-deep-research-step';
|
|
3
|
+
import { IDeepResearchResource } from './i-deep-research-resource';
|
|
4
|
+
import { IDeepResearchResourceWeb } from './i-deep-research-source-web';
|
|
5
|
+
import { IDeepResearchReport } from './i-deep-research-report';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @description 深度研究项数据
|
|
9
|
+
* @author tony001
|
|
10
|
+
* @date 2026-06-10 11:06:36
|
|
11
|
+
* @export
|
|
12
|
+
* @interface IDeepResearchItem
|
|
13
|
+
*/
|
|
14
|
+
export type IDeepResearchItem = {
|
|
15
|
+
source_seq: string;
|
|
16
|
+
type: typeof DeepResearchType.DEEP_RESEARCH_STEP;
|
|
17
|
+
content: IDeepResearchStep;
|
|
18
|
+
} | {
|
|
19
|
+
source_seq: string;
|
|
20
|
+
type: typeof DeepResearchType.DEEP_RESEARCH_SOURCE;
|
|
21
|
+
content: IDeepResearchResource;
|
|
22
|
+
} | {
|
|
23
|
+
source_seq: string;
|
|
24
|
+
type: typeof DeepResearchType.DEEP_RESEARCH_SOURCE_WEB;
|
|
25
|
+
content: IDeepResearchResourceWeb;
|
|
26
|
+
} | {
|
|
27
|
+
source_seq: string;
|
|
28
|
+
type: typeof DeepResearchType.DEEP_RESEARCH_REPORT;
|
|
29
|
+
content: IDeepResearchReport;
|
|
30
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 深度研究报告
|
|
3
|
+
* @author tony001
|
|
4
|
+
* @date 2026-06-10 11:06:10
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IDeepResearchReport
|
|
7
|
+
*/
|
|
8
|
+
export interface IDeepResearchReport {
|
|
9
|
+
/**
|
|
10
|
+
* 显示文本
|
|
11
|
+
*/
|
|
12
|
+
display_text: string;
|
|
13
|
+
/**
|
|
14
|
+
* 报告名称
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* 报告封面图链接地址
|
|
19
|
+
*/
|
|
20
|
+
report_cover: string;
|
|
21
|
+
/**
|
|
22
|
+
* 报告文本内容
|
|
23
|
+
*/
|
|
24
|
+
report_content: string;
|
|
25
|
+
/**
|
|
26
|
+
* 可视化报告文本内容(html)
|
|
27
|
+
*/
|
|
28
|
+
visualized_report_content: string;
|
|
29
|
+
/**
|
|
30
|
+
* 创建时间时间戳
|
|
31
|
+
*/
|
|
32
|
+
timestamp: number;
|
|
33
|
+
/**
|
|
34
|
+
* 文本数量
|
|
35
|
+
*/
|
|
36
|
+
word_count: number;
|
|
37
|
+
/**
|
|
38
|
+
* 状态,初始化 | 处理中 | 完成
|
|
39
|
+
*/
|
|
40
|
+
status: 'init' | 'processing' | 'complete';
|
|
41
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 深度研究资源
|
|
3
|
+
* @author tony001
|
|
4
|
+
* @date 2026-06-10 11:06:30
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IDeepResearchResource
|
|
7
|
+
*/
|
|
8
|
+
export interface IDeepResearchResource {
|
|
9
|
+
/**
|
|
10
|
+
* 查询问题
|
|
11
|
+
*/
|
|
12
|
+
query: string[];
|
|
13
|
+
/**
|
|
14
|
+
* web查询结果,映射IDeepResearchResourceWeb资源doc_index
|
|
15
|
+
*/
|
|
16
|
+
list: number[];
|
|
17
|
+
/**
|
|
18
|
+
* 是否展开
|
|
19
|
+
*/
|
|
20
|
+
expanded?: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 深度研究网络资源项
|
|
3
|
+
* @author tony001
|
|
4
|
+
* @date 2026-06-10 11:06:07
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IDeepResearchResourceWebItem
|
|
7
|
+
*/
|
|
8
|
+
export interface IDeepResearchResourceWebItem {
|
|
9
|
+
/**
|
|
10
|
+
* 来源名称
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* 文章链接
|
|
15
|
+
*/
|
|
16
|
+
url: string;
|
|
17
|
+
/**
|
|
18
|
+
* 文章标题
|
|
19
|
+
*/
|
|
20
|
+
title: string;
|
|
21
|
+
/**
|
|
22
|
+
* 内容摘要
|
|
23
|
+
*/
|
|
24
|
+
summary: string;
|
|
25
|
+
/**
|
|
26
|
+
* 发布时间
|
|
27
|
+
*/
|
|
28
|
+
publish_time: string;
|
|
29
|
+
/**
|
|
30
|
+
* 网站图标
|
|
31
|
+
*/
|
|
32
|
+
icon: string;
|
|
33
|
+
/**
|
|
34
|
+
* 文档索引,通常用于标识该文档在搜索结果或列表中的排序位置
|
|
35
|
+
*/
|
|
36
|
+
doc_index: number;
|
|
37
|
+
/**
|
|
38
|
+
* 属性标签,通常用于存储文章的分类标签(如“汽车”、“科技”等)
|
|
39
|
+
*/
|
|
40
|
+
attribute?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* 来源
|
|
43
|
+
*/
|
|
44
|
+
authority?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* @description 深度研究网络资源
|
|
48
|
+
* @author tony001
|
|
49
|
+
* @date 2026-06-10 11:06:58
|
|
50
|
+
* @export
|
|
51
|
+
* @interface IDeepResearchResourceWeb
|
|
52
|
+
*/
|
|
53
|
+
export interface IDeepResearchResourceWeb {
|
|
54
|
+
/**
|
|
55
|
+
* 网络资源列表
|
|
56
|
+
*/
|
|
57
|
+
list: IDeepResearchResourceWebItem[];
|
|
58
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description 深度研究步骤项
|
|
3
|
+
* @author tony001
|
|
4
|
+
* @date 2026-06-10 10:06:20
|
|
5
|
+
* @export
|
|
6
|
+
* @interface IDeepResearchStepItem
|
|
7
|
+
*/
|
|
8
|
+
export interface IDeepResearchStepItem {
|
|
9
|
+
/**
|
|
10
|
+
* 名称(简写)
|
|
11
|
+
*/
|
|
12
|
+
abbr_name: string;
|
|
13
|
+
/**
|
|
14
|
+
* 名称
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* 状态,初始化 | 处理中 | 完成
|
|
19
|
+
*/
|
|
20
|
+
status: 'init' | 'processing' | 'complete';
|
|
21
|
+
/**
|
|
22
|
+
* 思考内容,需动态链接[(xxxxxxx)]资源
|
|
23
|
+
*
|
|
24
|
+
* 格式如:通过研究,我已掌握2023-2026年新能源汽车市场关键数据,包括渗透率突破30%、41.83%、47.9%-53%及70%的关键节点。需进一步确认2025年渗透率数据差异及获取2026年上半年最新数据,以完善从增量到存量的市场转变分析。
|
|
25
|
+
* [(deep_research_source_1)]
|
|
26
|
+
* 经调研发现2026年5月新能源车零售渗透率已达62.9%,批发达61.1%,创历史新高。市场已进入存量竞争阶段,2025年突破50%是关键转折点。值得注意的是插混/增程在2024年增速反超纯电,但2026年纯电占比又回升。下步将分析技术路线分化趋势和出口支撑作用。
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
think_content: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @description 深度研究步骤
|
|
33
|
+
* @author tony001
|
|
34
|
+
* @date 2026-06-10 11:06:30
|
|
35
|
+
* @export
|
|
36
|
+
* @interface IDeepResearchStep
|
|
37
|
+
*/
|
|
38
|
+
export interface IDeepResearchStep {
|
|
39
|
+
/**
|
|
40
|
+
* 显示文本
|
|
41
|
+
*/
|
|
42
|
+
display_text: string;
|
|
43
|
+
/**
|
|
44
|
+
* 文档数量
|
|
45
|
+
*/
|
|
46
|
+
doc_count: number;
|
|
47
|
+
/**
|
|
48
|
+
* 状态,初始化 | 处理中 | 完成
|
|
49
|
+
*/
|
|
50
|
+
status: 'init' | 'processing' | 'complete';
|
|
51
|
+
/**
|
|
52
|
+
* 步骤项集合
|
|
53
|
+
*/
|
|
54
|
+
step: IDeepResearchStepItem[];
|
|
55
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { IDeepResearchStepItem, IDeepResearchStep, } from './i-deep-research-step';
|
|
2
|
+
export type { IDeepResearchResource } from './i-deep-research-resource';
|
|
3
|
+
export type { IDeepResearchResourceWebItem, IDeepResearchResourceWeb, } from './i-deep-research-source-web';
|
|
4
|
+
export type { IDeepResearchReport } from './i-deep-research-report';
|
|
5
|
+
export type { IDeepResearchItem } from './i-deep-research-item';
|
|
@@ -21,3 +21,4 @@ export type { IConfirmUtil, IConfirmParams, INotificationUtil, INotificationPara
|
|
|
21
21
|
export type { IChatMessageUsage } from './i-chat-message-usage/i-chat-message-usage';
|
|
22
22
|
export type { IChatController } from './i-chat-controller/i-chat-controller';
|
|
23
23
|
export type { IAIQuesitionItem, IAIQuesition, IAIQuesitionAnswer, } from './i-ai-quesition/i-ai-quesition';
|
|
24
|
+
export * from './deep-research';
|
|
@@ -113,4 +113,14 @@ export declare const EN: {
|
|
|
113
113
|
toolCallCount: string;
|
|
114
114
|
notCounted: string;
|
|
115
115
|
notCalled: string;
|
|
116
|
+
noResearchContent: string;
|
|
117
|
+
light: string;
|
|
118
|
+
dark: string;
|
|
119
|
+
generateVisualReport: string;
|
|
120
|
+
sourceMaterial: string;
|
|
121
|
+
searchKeyword: string;
|
|
122
|
+
deepResearch: string;
|
|
123
|
+
textReport: string;
|
|
124
|
+
deepResearchReport: string;
|
|
125
|
+
noTextReportContent: string;
|
|
116
126
|
};
|
|
@@ -113,4 +113,14 @@ export declare const ZH_CN: {
|
|
|
113
113
|
toolCallCount: string;
|
|
114
114
|
notCounted: string;
|
|
115
115
|
notCalled: string;
|
|
116
|
+
noResearchContent: string;
|
|
117
|
+
light: string;
|
|
118
|
+
dark: string;
|
|
119
|
+
generateVisualReport: string;
|
|
120
|
+
sourceMaterial: string;
|
|
121
|
+
searchKeyword: string;
|
|
122
|
+
deepResearch: string;
|
|
123
|
+
textReport: string;
|
|
124
|
+
deepResearchReport: string;
|
|
125
|
+
noTextReportContent: string;
|
|
116
126
|
};
|