super-agent-sdk 1.0.13 → 1.0.14
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/widget.cjs +14 -14
- package/dist/widget.d.ts +7 -1
- package/dist/widget.mjs +2019 -1972
- package/package.json +1 -1
package/dist/widget.d.ts
CHANGED
|
@@ -705,6 +705,10 @@ declare interface UseChatReturn {
|
|
|
705
705
|
stop: () => void;
|
|
706
706
|
regenerate: () => void;
|
|
707
707
|
setMessages: (messages: UIMessage[]) => void;
|
|
708
|
+
/** 会话定向展示:优先 live 缓存(in-flight 切回续看),传入 msgs 则作为缓存源(历史拉取路径) */
|
|
709
|
+
showSession: (sessionId: string, msgs?: UIMessage[]) => void;
|
|
710
|
+
/** 目标会话有 in-flight 流时返回 live 缓存(切换时免拉历史),否则 null */
|
|
711
|
+
getLiveMessages: (sessionId: string) => UIMessage[] | null;
|
|
708
712
|
respondToInterrupt: (interruptId: string, response: InterruptResponse) => void;
|
|
709
713
|
}
|
|
710
714
|
|
|
@@ -723,7 +727,9 @@ declare interface UseConversationsReturn {
|
|
|
723
727
|
hasMore: boolean;
|
|
724
728
|
loadConversations: () => Promise<void>;
|
|
725
729
|
loadMore: () => Promise<void>;
|
|
726
|
-
switchConversation: (sessionId: string
|
|
730
|
+
switchConversation: (sessionId: string, opts?: {
|
|
731
|
+
fetchHistory?: boolean;
|
|
732
|
+
}) => Promise<UIMessage[]>;
|
|
727
733
|
newConversation: () => Promise<void>;
|
|
728
734
|
deleteConversation: (sessionId: string) => Promise<void>;
|
|
729
735
|
renameConversation: (sessionId: string, title: string) => Promise<void>;
|