+ {nodes.value.map((item, index) => {
+ if (!item.description) {
+ return;
+ }
+ const collapsed = collapseIndex.value.includes(index);
+ return (
+
+
+ {item.icon || {index}}
+
+
+
onCollapse(index)}
+ >
+ {item.title}
+
+
+
{item.description}
+
+
+ );
+ })}
+
+ );
+};
diff --git a/src/interface/i-chat-thought-chain/i-chat-thought-chain.ts b/src/interface/i-chat-thought-chain/i-chat-thought-chain.ts
new file mode 100644
index 0000000..41a954b
--- /dev/null
+++ b/src/interface/i-chat-thought-chain/i-chat-thought-chain.ts
@@ -0,0 +1,38 @@
+/**
+ * @description AI聊天思维链
+ * @export
+ * @interface IChatThoughtChain
+ */
+export interface IChatThoughtChain {
+ /**
+ * 消息标识
+ *
+ * @author chitanda
+ * @date 2023-09-05 15:09:43
+ * @type {string}
+ */
+ title: string;
+
+ /**
+ * 消息名称
+ *
+ * @author chitanda
+ * @date 2023-09-05 15:09:49
+ * @type {string}
+ */
+ description: string;
+
+ /**
+ * @description 图标
+ * @type {React.ReactNode}
+ * @memberof IChatThoughtChain
+ */
+ icon?: React.ReactNode;
+
+ /**
+ * @description 是否完成
+ * @type {boolean}
+ * @memberof IChatThoughtChain
+ */
+ done?: boolean;
+}
diff --git a/src/interface/index.ts b/src/interface/index.ts
index 89a11d5..5db5457 100644
--- a/src/interface/index.ts
+++ b/src/interface/index.ts
@@ -5,3 +5,4 @@ export type { IPortalAsyncAction } from './i-portal-async-action/i-portal-async-
export type { IChatToolbarItem } from './i-chat-toolbar-item/i-chat-toolbar-item';
export type { ITopic, ITopicOptions } from './i-topic-options/i-topic-options';
export type { IContainerOptions } from './i-container-options/i-container-options';
+export type { IChatThoughtChain } from './i-chat-thought-chain/i-chat-thought-chain';
--
Gitee