@zero-library/chat-copilot 1.0.17 → 1.0.18

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 CHANGED
@@ -694,20 +694,20 @@ interface ChatHandle {
694
694
  */
695
695
  switchConversation: (id: ConversationType['id']) => Promise<void>;
696
696
  /**
697
- * 切换智能体会话
698
- * 切换到指定的智能体并创建或获取会话
699
- *
700
- * @param agentId - 目标智能体ID
701
- * @param strategy - 会话策略,1-使用最近会话,2-创建新会话
702
- *
703
- * @example
704
- * // 切换到指定智能体并创建新会话
705
- * chatRef.current?.switchAgentConversation('agent-001')
706
- *
707
- * @example
708
- * // 切换到指定智能体并使用最近会话
709
- * chatRef.current?.switchAgentConversation('agent-001', 1)
710
- */
697
+ * 切换智能体会话
698
+ * 切换到指定的智能体并创建或获取会话
699
+ *
700
+ * @param agentId - 目标智能体ID
701
+ * @param strategy - 会话策略,1-使用最近会话,2-创建新会话
702
+ *
703
+ * @example
704
+ * // 切换到指定智能体并创建新会话
705
+ * chatRef.current?.switchAgentConversation('agent-001')
706
+ *
707
+ * @example
708
+ * // 切换到指定智能体并使用最近会话
709
+ * chatRef.current?.switchAgentConversation('agent-001', 1)
710
+ */
711
711
  /**
712
712
  * 基于当前接收者创建新的会话
713
713
  *
@@ -851,6 +851,29 @@ interface ChatHandle {
851
851
  * chatRef.current?.senderFocus()
852
852
  */
853
853
  senderFocus: ChatSenderHandle['focus'];
854
+ /**
855
+ * 设置会话spec
856
+ *
857
+ * @example
858
+ * // 设置会话spec
859
+ * chatRef.current?.setConversationSpec({
860
+ * model: {
861
+ * providerName: 'openai',
862
+ * modelName: 'gpt-4o',
863
+ * reasoning: true
864
+ * },
865
+ * skills: [{
866
+ * mode:1,
867
+ * items: [
868
+ * {
869
+ * id: 'skill-001',
870
+ * name: '技能1',
871
+ * }
872
+ * ]
873
+ * }]
874
+ * })
875
+ */
876
+ setConversationSpec: (spec: AgentSpec) => void;
854
877
  }
855
878
 
856
879
  /**
package/dist/index.d.ts CHANGED
@@ -694,20 +694,20 @@ interface ChatHandle {
694
694
  */
695
695
  switchConversation: (id: ConversationType['id']) => Promise<void>;
696
696
  /**
697
- * 切换智能体会话
698
- * 切换到指定的智能体并创建或获取会话
699
- *
700
- * @param agentId - 目标智能体ID
701
- * @param strategy - 会话策略,1-使用最近会话,2-创建新会话
702
- *
703
- * @example
704
- * // 切换到指定智能体并创建新会话
705
- * chatRef.current?.switchAgentConversation('agent-001')
706
- *
707
- * @example
708
- * // 切换到指定智能体并使用最近会话
709
- * chatRef.current?.switchAgentConversation('agent-001', 1)
710
- */
697
+ * 切换智能体会话
698
+ * 切换到指定的智能体并创建或获取会话
699
+ *
700
+ * @param agentId - 目标智能体ID
701
+ * @param strategy - 会话策略,1-使用最近会话,2-创建新会话
702
+ *
703
+ * @example
704
+ * // 切换到指定智能体并创建新会话
705
+ * chatRef.current?.switchAgentConversation('agent-001')
706
+ *
707
+ * @example
708
+ * // 切换到指定智能体并使用最近会话
709
+ * chatRef.current?.switchAgentConversation('agent-001', 1)
710
+ */
711
711
  /**
712
712
  * 基于当前接收者创建新的会话
713
713
  *
@@ -851,6 +851,29 @@ interface ChatHandle {
851
851
  * chatRef.current?.senderFocus()
852
852
  */
853
853
  senderFocus: ChatSenderHandle['focus'];
854
+ /**
855
+ * 设置会话spec
856
+ *
857
+ * @example
858
+ * // 设置会话spec
859
+ * chatRef.current?.setConversationSpec({
860
+ * model: {
861
+ * providerName: 'openai',
862
+ * modelName: 'gpt-4o',
863
+ * reasoning: true
864
+ * },
865
+ * skills: [{
866
+ * mode:1,
867
+ * items: [
868
+ * {
869
+ * id: 'skill-001',
870
+ * name: '技能1',
871
+ * }
872
+ * ]
873
+ * }]
874
+ * })
875
+ */
876
+ setConversationSpec: (spec: AgentSpec) => void;
854
877
  }
855
878
 
856
879
  /**
package/dist/index.esm.js CHANGED
@@ -453,13 +453,6 @@ var defaultLayout = {
453
453
  chatHeader: true,
454
454
  messageList: true,
455
455
  senderHeader: false,
456
- sender: {
457
- props: {
458
- modelSelect: true,
459
- skillsBtn: true,
460
- reasoningBtn: true
461
- }
462
- },
463
456
  senderFooter: false,
464
457
  disclaimerNotice: true
465
458
  };
@@ -4727,7 +4720,7 @@ var ChatSender_default2 = forwardRef(
4727
4720
  reasonBtn = true,
4728
4721
  skillsBtn = false,
4729
4722
  knowledgeBtn = false,
4730
- modelSelect = true
4723
+ modelSelect = false
4731
4724
  }, ref) => {
4732
4725
  const chatStore = useChatStore();
4733
4726
  const configState = useSnapshot(chatStore.config);