@blueking/ai-ui-sdk 0.0.7-beta.1 → 0.0.7-beta.2

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.
@@ -1,4 +1,4 @@
1
- import type { Document } from '../types/type';
1
+ import { Document } from '../types/type';
2
2
  type HandleStart = (sessionCode: string) => any;
3
3
  type HandleText = (sessionCode: string, message: string, cover?: boolean) => void;
4
4
  type HandleReferenceDoc = (sessionCode: string, documents: Document[], cover?: boolean) => void;
@@ -1,4 +1,4 @@
1
- import type { ISessionContent, ISessionPrompt } from '../types/type';
1
+ import { ISessionContent, ISessionPrompt } from '../types/type';
2
2
  /**
3
3
  * 将 sessionContent 转换为 sessionPrompt
4
4
  * @param sessionContent sessionContent
@@ -1,5 +1,6 @@
1
- import type { ISessionContent, ISession, ISessionPrompt, ChatCallbacks, BasicChatContent, ShortcutChatContent } from '../types/type.ts';
1
+ import { ISessionContent, ISession, ISessionPrompt, ChatCallbacks, BasicChatContent, ShortcutChatContent } from '../types/type.ts';
2
2
  import { SessionContentRole, SessionContentStatus } from '../types/enum';
3
+ import { Ref, ComputedRef } from 'vue';
3
4
  type SessionContentsMap = {
4
5
  [key: string]: ISessionContent[];
5
6
  };
@@ -7,8 +8,8 @@ type SessionLoadingMap = {
7
8
  [key: string]: boolean;
8
9
  };
9
10
  export declare const useChat: <T extends ISession = ISession>({ handleStart, handleText, handleReferenceDoc, handleThink, handleEnd, handleError, requestOptions, }?: ChatCallbacks) => {
10
- currentSession: import("vue").Ref<T | undefined, T | undefined>;
11
- sessionContents: import("vue").Ref<{
11
+ currentSession: Ref<T | undefined, T | undefined>;
12
+ sessionContents: Ref<{
12
13
  id?: number | undefined;
13
14
  createdAt?: string | undefined;
14
15
  createdBy?: string | undefined;
@@ -40,9 +41,9 @@ export declare const useChat: <T extends ISession = ISession>({ handleStart, han
40
41
  time?: string | undefined;
41
42
  }[]>;
42
43
  sessionContentsMap: SessionContentsMap;
43
- sessionLoadingMap: import("vue").Ref<SessionLoadingMap, SessionLoadingMap>;
44
- prompts: import("vue").ComputedRef<ISessionPrompt[]>;
45
- currentSessionLoading: import("vue").ComputedRef<boolean>;
44
+ sessionLoadingMap: Ref<SessionLoadingMap, SessionLoadingMap>;
45
+ prompts: ComputedRef<ISessionPrompt[]>;
46
+ currentSessionLoading: ComputedRef<boolean>;
46
47
  chat: ({ sessionCode, data, url, headers, }: {
47
48
  sessionCode: string;
48
49
  data?: Record<string, any>;
@@ -1,4 +1,4 @@
1
- import type { Document } from '../types/type';
1
+ import { Document } from '../types/type';
2
2
  /**
3
3
  * 获取引用资料的 HTML 内容
4
4
  * @param documents
@@ -1,4 +1,4 @@
1
- import type { SummaryCallbacks } from '../types/type.ts';
1
+ import { SummaryCallbacks } from '../types/type.ts';
2
2
  export declare const useSummary: ({ handleStart, handleEnd, handleError, }?: SummaryCallbacks) => {
3
3
  summary: ({ content, url, headers, model, }: {
4
4
  content: string;