@chat-lab/ui 0.1.0
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/assets/Bot.d.ts +3 -0
- package/dist/assets/Bot.d.ts.map +1 -0
- package/dist/assets/Code.d.ts +5 -0
- package/dist/assets/Code.d.ts.map +1 -0
- package/dist/assets/Copy.d.ts +5 -0
- package/dist/assets/Copy.d.ts.map +1 -0
- package/dist/assets/Edit.d.ts +5 -0
- package/dist/assets/Edit.d.ts.map +1 -0
- package/dist/assets/NewSessioin.d.ts +3 -0
- package/dist/assets/NewSessioin.d.ts.map +1 -0
- package/dist/assets/RefreshIcon.d.ts +5 -0
- package/dist/assets/RefreshIcon.d.ts.map +1 -0
- package/dist/assets/SpeakAiLineIcon.d.ts +3 -0
- package/dist/assets/SpeakAiLineIcon.d.ts.map +1 -0
- package/dist/assets/ThumbDownIcon.d.ts +6 -0
- package/dist/assets/ThumbDownIcon.d.ts.map +1 -0
- package/dist/assets/ThumbUpIcon.d.ts +6 -0
- package/dist/assets/ThumbUpIcon.d.ts.map +1 -0
- package/dist/assets/User.d.ts +3 -0
- package/dist/assets/User.d.ts.map +1 -0
- package/dist/components/CameraInput/index.d.ts +13 -0
- package/dist/components/CameraInput/index.d.ts.map +1 -0
- package/dist/components/Chatkit/index.d.ts +5 -0
- package/dist/components/Chatkit/index.d.ts.map +1 -0
- package/dist/components/Chatkit/ref.d.ts +5 -0
- package/dist/components/Chatkit/ref.d.ts.map +1 -0
- package/dist/components/Chatkit/types.d.ts +58 -0
- package/dist/components/Chatkit/types.d.ts.map +1 -0
- package/dist/components/SwitchAgentModal/index.d.ts +4 -0
- package/dist/components/SwitchAgentModal/index.d.ts.map +1 -0
- package/dist/components/ThreadOptionsMenu.d.ts +10 -0
- package/dist/components/ThreadOptionsMenu.d.ts.map +1 -0
- package/dist/components/TopicTabs/index.d.ts +8 -0
- package/dist/components/TopicTabs/index.d.ts.map +1 -0
- package/dist/components/VoiceInput/index.d.ts +5 -0
- package/dist/components/VoiceInput/index.d.ts.map +1 -0
- package/dist/components/assistant-ui/attachment.d.ts +5 -0
- package/dist/components/assistant-ui/attachment.d.ts.map +1 -0
- package/dist/components/assistant-ui/file/index.d.ts +3 -0
- package/dist/components/assistant-ui/file/index.d.ts.map +1 -0
- package/dist/components/assistant-ui/file/pdf.d.ts +3 -0
- package/dist/components/assistant-ui/file/pdf.d.ts.map +1 -0
- package/dist/components/assistant-ui/file/video.d.ts +3 -0
- package/dist/components/assistant-ui/file/video.d.ts.map +1 -0
- package/dist/components/assistant-ui/markdown-text.d.ts +3 -0
- package/dist/components/assistant-ui/markdown-text.d.ts.map +1 -0
- package/dist/components/assistant-ui/reasoning.d.ts +5 -0
- package/dist/components/assistant-ui/reasoning.d.ts.map +1 -0
- package/dist/components/assistant-ui/thread-header.d.ts +5 -0
- package/dist/components/assistant-ui/thread-header.d.ts.map +1 -0
- package/dist/components/assistant-ui/thread-list.d.ts +3 -0
- package/dist/components/assistant-ui/thread-list.d.ts.map +1 -0
- package/dist/components/assistant-ui/thread.d.ts +3 -0
- package/dist/components/assistant-ui/thread.d.ts.map +1 -0
- package/dist/components/assistant-ui/threadlist-sidebar.d.ts +4 -0
- package/dist/components/assistant-ui/threadlist-sidebar.d.ts.map +1 -0
- package/dist/components/assistant-ui/tool-fallback.d.ts +3 -0
- package/dist/components/assistant-ui/tool-fallback.d.ts.map +1 -0
- package/dist/components/assistant-ui/tool-group.d.ts +1 -0
- package/dist/components/assistant-ui/tool-group.d.ts.map +1 -0
- package/dist/components/assistant-ui/tooltip-icon-button.d.ts +8 -0
- package/dist/components/assistant-ui/tooltip-icon-button.d.ts.map +1 -0
- package/dist/components/assistant-ui-tools/execution-card.d.ts +3 -0
- package/dist/components/assistant-ui-tools/execution-card.d.ts.map +1 -0
- package/dist/components/assistant-ui-tools/tool-group.d.ts +1 -0
- package/dist/components/assistant-ui-tools/tool-group.d.ts.map +1 -0
- package/dist/components/assistant-ui-tools/web-search.d.ts +3 -0
- package/dist/components/assistant-ui-tools/web-search.d.ts.map +1 -0
- package/dist/components/thread-list.d.ts +4 -0
- package/dist/components/thread-list.d.ts.map +1 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +16 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/toast.d.ts +16 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toaster.d.ts +2 -0
- package/dist/components/ui/toaster.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/contexts/ChatkitContext.d.ts +5 -0
- package/dist/contexts/ChatkitContext.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-toast.d.ts +45 -0
- package/dist/hooks/use-toast.d.ts.map +1 -0
- package/dist/hooks/useChat.d.ts +2 -0
- package/dist/hooks/useChat.d.ts.map +1 -0
- package/dist/hooks/useSpace.d.ts +2 -0
- package/dist/hooks/useSpace.d.ts.map +1 -0
- package/dist/hooks/useThread.d.ts +158 -0
- package/dist/hooks/useThread.d.ts.map +1 -0
- package/dist/index.css +4 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +103737 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/plugins/BasePlugin.d.ts +7 -0
- package/dist/plugins/BasePlugin.d.ts.map +1 -0
- package/dist/plugins/getAdkConfig.d.ts +14 -0
- package/dist/plugins/getAdkConfig.d.ts.map +1 -0
- package/dist/stores/index.d.ts +5 -0
- package/dist/stores/index.d.ts.map +1 -0
- package/dist/stores/input.d.ts +45 -0
- package/dist/stores/input.d.ts.map +1 -0
- package/dist/stores/message.d.ts +38 -0
- package/dist/stores/message.d.ts.map +1 -0
- package/dist/stores/store.d.ts +11 -0
- package/dist/stores/store.d.ts.map +1 -0
- package/dist/stores/theme.d.ts +7 -0
- package/dist/stores/theme.d.ts.map +1 -0
- package/dist/stores/topic.d.ts +12 -0
- package/dist/stores/topic.d.ts.map +1 -0
- package/dist/types/Message.d.ts +40 -0
- package/dist/types/Message.d.ts.map +1 -0
- package/dist/types/agent.d.ts +12 -0
- package/dist/types/agent.d.ts.map +1 -0
- package/dist/types/completion.d.ts +19 -0
- package/dist/types/completion.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/mcp.d.ts +25 -0
- package/dist/types/mcp.d.ts.map +1 -0
- package/dist/types/multimodal.d.ts +34 -0
- package/dist/types/multimodal.d.ts.map +1 -0
- package/dist/types/topic.d.ts +13 -0
- package/dist/types/topic.d.ts.map +1 -0
- package/dist/utils/agentStorage.d.ts +10 -0
- package/dist/utils/agentStorage.d.ts.map +1 -0
- package/dist/utils/chatCompletion.d.ts +13 -0
- package/dist/utils/chatCompletion.d.ts.map +1 -0
- package/dist/utils/convertToAssistantMessage.d.ts +7 -0
- package/dist/utils/convertToAssistantMessage.d.ts.map +1 -0
- package/dist/utils/copy.d.ts +2 -0
- package/dist/utils/copy.d.ts.map +1 -0
- package/dist/utils/download.d.ts +22 -0
- package/dist/utils/download.d.ts.map +1 -0
- package/dist/utils/getImgBase64.d.ts +1 -0
- package/dist/utils/getImgBase64.d.ts.map +1 -0
- package/dist/utils/multimodal.d.ts +71 -0
- package/dist/utils/multimodal.d.ts.map +1 -0
- package/dist/utils/time.d.ts +12 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/package.json +97 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasePlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/BasePlugin.ts"],"names":[],"mappings":"AAAA,cAAM,YAAY;;IAEhB,QAAQ;IACR,UAAU;IACV,aAAa,CAAC,GAAG,EAAC,GAAG;CAGtB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChatkitProps } from "@/components/Chatkit/types";
|
|
2
|
+
/**
|
|
3
|
+
* 获取ADK协议配置 ,session 使用 threadID
|
|
4
|
+
* @param options
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
declare const getAdkConfig: (options: {
|
|
8
|
+
appName: string;
|
|
9
|
+
userId: string;
|
|
10
|
+
url: string;
|
|
11
|
+
token: string;
|
|
12
|
+
}) => ChatkitProps["config"];
|
|
13
|
+
export default getAdkConfig;
|
|
14
|
+
//# sourceMappingURL=getAdkConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAdkConfig.d.ts","sourceRoot":"","sources":["../../src/plugins/getAdkConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D;;;;GAIG;AACH,QAAA,MAAM,YAAY,GAAI,SAAS;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,KAAG,YAAY,CAAC,QAAQ,CAuExB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stores/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
interface State {
|
|
2
|
+
input: string;
|
|
3
|
+
attachments: {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
size: number;
|
|
8
|
+
file: File;
|
|
9
|
+
uploadProgress: number;
|
|
10
|
+
status: string;
|
|
11
|
+
url: string;
|
|
12
|
+
}[];
|
|
13
|
+
}
|
|
14
|
+
export declare const inputState: State;
|
|
15
|
+
export declare const useInput: () => {
|
|
16
|
+
input: string;
|
|
17
|
+
setInput: (input: string | (() => string)) => void;
|
|
18
|
+
attachments: readonly {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly type: string;
|
|
22
|
+
readonly size: number;
|
|
23
|
+
readonly file: {
|
|
24
|
+
readonly lastModified: number;
|
|
25
|
+
readonly name: string;
|
|
26
|
+
readonly webkitRelativePath: string;
|
|
27
|
+
readonly size: number;
|
|
28
|
+
readonly type: string;
|
|
29
|
+
readonly arrayBuffer: () => Promise<ArrayBuffer>;
|
|
30
|
+
readonly bytes: () => Promise<Uint8Array<ArrayBuffer>>;
|
|
31
|
+
readonly slice: (start?: number, end?: number, contentType?: string) => Blob;
|
|
32
|
+
readonly stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
|
|
33
|
+
readonly text: () => Promise<string>;
|
|
34
|
+
};
|
|
35
|
+
readonly uploadProgress: number;
|
|
36
|
+
readonly status: string;
|
|
37
|
+
readonly url: string;
|
|
38
|
+
}[];
|
|
39
|
+
setAttachments: (attachments: State["attachments"]) => void;
|
|
40
|
+
addAttachment: (attachment: State["attachments"][0]) => void;
|
|
41
|
+
removeAttachment: (id: string) => void;
|
|
42
|
+
clearAttachment: () => void;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/stores/input.ts"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE;QACX,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,IAAI,CAAC;QACX,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,GAAG,EAAE,MAAM,CAAC;KACb,EAAE,CAAC;CACL;AAMD,eAAO,MAAM,UAAU,EAAE,KAA2B,CAAC;AAErD,eAAO,MAAM,QAAQ;;sBAGM,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC;;qBApB1C,MAAM;uBACJ,MAAM;uBACN,MAAM;uBACN,MAAM;;;;;;;;;;;;;iCAEI,MAAM;yBACd,MAAM;sBACT,MAAM;;kCAqBwB,KAAK,CAAC,aAAa,CAAC;gCAJtB,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;2BAQ5B,MAAM;;CAkBrC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Message, Topic } from "@/types";
|
|
2
|
+
import type { MultimodalFile } from "@/types/multimodal";
|
|
3
|
+
import { CompletionsParams } from "@/types/completion";
|
|
4
|
+
export declare const messageActions: {
|
|
5
|
+
addMessage: (topicId: string, message: Message) => void;
|
|
6
|
+
updateMessage: (topicId: string, messageId: string, updates: Partial<Message>) => void;
|
|
7
|
+
updateMessages: (topicId: string, messages: Message[]) => void;
|
|
8
|
+
removeMessage: (topicId: string, messageId: string) => void;
|
|
9
|
+
clearTopicMessages: (topicId: string) => void;
|
|
10
|
+
setSending: (sending: boolean, topicId: string) => void;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 创建用户消息
|
|
14
|
+
*/
|
|
15
|
+
export declare function createUserMessage(content: string, topicId: string): Message;
|
|
16
|
+
/**
|
|
17
|
+
* 创建助手消息
|
|
18
|
+
*/
|
|
19
|
+
export declare function getAssistantMessage({ topic }: {
|
|
20
|
+
topic: Topic;
|
|
21
|
+
}): Message;
|
|
22
|
+
/**
|
|
23
|
+
* 过滤有用的消息
|
|
24
|
+
* 移除状态为发送中或错误的消息
|
|
25
|
+
*/
|
|
26
|
+
export declare function filterUsefulMessages(messages: Message[]): Message[];
|
|
27
|
+
/**
|
|
28
|
+
* 发送新消息
|
|
29
|
+
*/
|
|
30
|
+
export declare function sendMessage({ completions, content, topicId, allMessages, multimodalFiles, override, }: {
|
|
31
|
+
completions: (params: CompletionsParams) => Promise<void>;
|
|
32
|
+
content: string;
|
|
33
|
+
topicId: string;
|
|
34
|
+
allMessages?: Message[];
|
|
35
|
+
multimodalFiles?: MultimodalFile[];
|
|
36
|
+
override?: boolean;
|
|
37
|
+
}): Promise<void>;
|
|
38
|
+
//# sourceMappingURL=message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../src/stores/message.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAIvD,eAAO,MAAM,cAAc;0BAEH,MAAM,WAAW,OAAO;6BAUnC,MAAM,aACJ,MAAM,WACR,OAAO,CAAC,OAAO,CAAC;8BAmBD,MAAM,YAAY,OAAO,EAAE;6BAO5B,MAAM,aAAa,MAAM;kCASpB,MAAM;0BAOd,OAAO,WAAW,MAAM;CAsC/C,CAAC;AAEF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAa3E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,GAAG,OAAO,CAWxE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAInE;AA6DD;;GAEG;AACH,wBAAsB,WAAW,CAAC,EAChC,WAAW,EACX,OAAO,EACP,OAAO,EACP,WAAgB,EAChB,eAAe,EACf,QAAgB,GACjB,EAAE;IACD,WAAW,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDhB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Topic } from "@/types";
|
|
2
|
+
interface State {
|
|
3
|
+
currentTopicId?: string;
|
|
4
|
+
topicByTopicId: {
|
|
5
|
+
[key: string]: Topic;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export declare const state: State;
|
|
9
|
+
export declare function initStore(): Promise<void>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/stores/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,UAAU,KAAK;IAEb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAA;KAAE,CAAC;CAC1C;AAkBD,eAAO,MAAM,KAAK,EAAE,KAA2B,CAAC;AAChD,wBAAsB,SAAS,kBAa9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/stores/theme.ts"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAMD,eAAO,MAAM,KAAK,EAAE,KAA2B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Topic } from "@/types";
|
|
2
|
+
export declare const topicActions: {
|
|
3
|
+
createTopic: ({ topicId, topic, switchToNewTopic, }?: {
|
|
4
|
+
topicId?: string;
|
|
5
|
+
topic?: Partial<Topic>;
|
|
6
|
+
switchToNewTopic?: boolean;
|
|
7
|
+
}) => string;
|
|
8
|
+
updateTopic: (topicId: string, updates: Partial<Topic>) => void;
|
|
9
|
+
deleteTopic: (topicId: string) => import("@arco-design/web-react/es/Message").MessageType | undefined;
|
|
10
|
+
setCurrentTopic: (topicId: string) => void;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=topic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topic.d.ts","sourceRoot":"","sources":["../../src/stores/topic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAiBhC,eAAO,MAAM,YAAY;0DAMpB;QACD,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC5B;2BAgBsB,MAAM,WAAW,OAAO,CAAC,KAAK,CAAC;2BAW/B,MAAM;+BAeF,MAAM;CAKlC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { FunctionCall } from "./completion";
|
|
2
|
+
import { MultimodalFile } from "./multimodal";
|
|
3
|
+
export type Message = {
|
|
4
|
+
id: string;
|
|
5
|
+
assistantId?: string;
|
|
6
|
+
askId?: string;
|
|
7
|
+
role: "user" | "assistant" | "system";
|
|
8
|
+
status: "sending" | "pending" | "searching" | "success" | "paused" | "error" | "aborted";
|
|
9
|
+
content: string | (FunctionCall | string)[];
|
|
10
|
+
reasoningContent?: string;
|
|
11
|
+
translatedContent?: string;
|
|
12
|
+
topicId: string;
|
|
13
|
+
createdAt: number;
|
|
14
|
+
endedAt?: number;
|
|
15
|
+
modelId?: string;
|
|
16
|
+
multimodalFiles?: MultimodalFile[];
|
|
17
|
+
type: "text" | "@" | "clear";
|
|
18
|
+
isPreset?: boolean;
|
|
19
|
+
useful?: boolean;
|
|
20
|
+
error?: Record<string, any>;
|
|
21
|
+
metadata: {
|
|
22
|
+
citations?: string[];
|
|
23
|
+
functionCall?: FunctionCall[];
|
|
24
|
+
mcpToolSummaryContent?: string;
|
|
25
|
+
trail?: {
|
|
26
|
+
desc: string;
|
|
27
|
+
content: {
|
|
28
|
+
reference: {
|
|
29
|
+
title: string;
|
|
30
|
+
uri: string;
|
|
31
|
+
breadcrumbs: {
|
|
32
|
+
title: string;
|
|
33
|
+
uri: string;
|
|
34
|
+
}[];
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=Message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../src/types/Message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACtC,MAAM,EACF,SAAS,GACT,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,OAAO,GACP,SAAS,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,CAAC,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC;IAE5C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAEhB,SAAS,EAAE,MAAM,CAAC;IAElB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAGnC,IAAI,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,QAAQ,EAAE;QAIR,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QAMrB,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;QAE9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAgB/B,KAAK,CAAC,EAAE;YACN,IAAI,EAAE,MAAM,CAAC;YACb,OAAO,EAAE;gBACP,SAAS,EAAE;oBACT,KAAK,EAAE,MAAM,CAAC;oBACd,GAAG,EAAE,MAAM,CAAC;oBACZ,WAAW,EAAE;wBACX,KAAK,EAAE,MAAM,CAAC;wBACd,GAAG,EAAE,MAAM,CAAC;qBACb,EAAE,CAAC;iBACL,EAAE,CAAC;aACL,CAAC;SACH,CAAC;KACH,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/types/agent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface FunctionCall {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
startTime: number;
|
|
5
|
+
endTime: number;
|
|
6
|
+
args: string;
|
|
7
|
+
result: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ChunkCallbackData {
|
|
10
|
+
text?: string;
|
|
11
|
+
reasoningContent?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
functionCall?: FunctionCall[];
|
|
14
|
+
functionResponse?: FunctionCall[];
|
|
15
|
+
}
|
|
16
|
+
export interface CompletionsParams {
|
|
17
|
+
onChunk: (data: ChunkCallbackData) => void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=completion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/types/completion.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,iBAAiB;IAEhC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IAOf,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,YAAY,EAAE,CAAC;CAKnC;AAED,MAAM,WAAW,iBAAiB;IAEhC,OAAO,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAY5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface MCPTool {
|
|
2
|
+
name: string;
|
|
3
|
+
inputSchema: any;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface MCPToolCall {
|
|
7
|
+
id: string;
|
|
8
|
+
type: 'function';
|
|
9
|
+
function: {
|
|
10
|
+
name: string;
|
|
11
|
+
arguments: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface MCPToolResponse {
|
|
15
|
+
tool?: MCPTool;
|
|
16
|
+
status: 'start' | 'success' | 'error' | 'running';
|
|
17
|
+
result?: Array<{
|
|
18
|
+
text: string;
|
|
19
|
+
type: 'text' | 'image';
|
|
20
|
+
}>;
|
|
21
|
+
toolCall: MCPToolCall;
|
|
22
|
+
startTime?: number;
|
|
23
|
+
endTime?: number;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,GAAG,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AACD,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AACD,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAClD,MAAM,CAAC,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC,CAAC;IACH,QAAQ,EAAE,WAAW,CAAC;IAEtB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export type FileType = "image" | "video";
|
|
2
|
+
export interface MultimodalFile {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
originalName: string;
|
|
6
|
+
size: number;
|
|
7
|
+
type: FileType;
|
|
8
|
+
url: string;
|
|
9
|
+
mimeType: string;
|
|
10
|
+
uploadedAt: number;
|
|
11
|
+
uploadProgress: number;
|
|
12
|
+
}
|
|
13
|
+
export interface FileTypeConfig {
|
|
14
|
+
type: FileType;
|
|
15
|
+
mimeTypes: string[];
|
|
16
|
+
maxFiles: number;
|
|
17
|
+
maxFileSize: number;
|
|
18
|
+
acceptPattern: string;
|
|
19
|
+
displayName: string;
|
|
20
|
+
icon: string;
|
|
21
|
+
extensions: string[];
|
|
22
|
+
from?: "generated" | "upload" | "url";
|
|
23
|
+
}
|
|
24
|
+
export interface ModelFileTypeOverride {
|
|
25
|
+
type: FileType;
|
|
26
|
+
maxFiles?: number;
|
|
27
|
+
maxFileSize?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ModelMultimodalSupport {
|
|
30
|
+
modelId: (string | RegExp)[];
|
|
31
|
+
supportedFileTypes: FileType[];
|
|
32
|
+
fileTypeOverrides?: ModelFileTypeOverride[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=multimodal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multimodal.d.ts","sourceRoot":"","sources":["../../src/types/multimodal.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AACzC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IAEb,YAAY,EAAE,MAAM,CAAC;IAErB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,QAAQ,CAAC;IAEf,GAAG,EAAE,MAAM,CAAC;IAEZ,QAAQ,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,MAAM,CAAC;IAEnB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,KAAK,CAAC;CACvC;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC7B,kBAAkB,EAAE,QAAQ,EAAE,CAAC;IAC/B,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAC7C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Message } from "./Message";
|
|
2
|
+
export type Topic = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
messages: Message[];
|
|
8
|
+
pinned?: boolean;
|
|
9
|
+
prompt?: string;
|
|
10
|
+
isNameManuallyEdited?: boolean;
|
|
11
|
+
sending: boolean;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=topic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topic.d.ts","sourceRoot":"","sources":["../../src/types/topic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IAEX,IAAI,EAAE,MAAM,CAAC;IAEb,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,EAAE,MAAM,CAAC;IAElB,QAAQ,EAAE,OAAO,EAAE,CAAC;IAEpB,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAU/B,OAAO,EAAE,OAAO,CAAC;CAGlB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AgentConfig } from "../types/agent";
|
|
2
|
+
export declare class AgentStorageManager {
|
|
3
|
+
static getConfigs(): AgentConfig[];
|
|
4
|
+
static getCurrentConfig(): AgentConfig | null;
|
|
5
|
+
static saveConfig(config: Omit<AgentConfig, "id" | "createdAt">): AgentConfig;
|
|
6
|
+
static deleteConfig(id: string): void;
|
|
7
|
+
static setCurrentConfig(id: string): void;
|
|
8
|
+
private static saveConfigs;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=agentStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentStorage.d.ts","sourceRoot":"","sources":["../../src/utils/agentStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAIzD,qBAAa,mBAAmB;IAC9B,MAAM,CAAC,UAAU,IAAI,WAAW,EAAE;IAYlC,MAAM,CAAC,gBAAgB,IAAI,WAAW,GAAG,IAAI;IAgB7C,MAAM,CAAC,UAAU,CACf,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,WAAW,CAAC,GAC5C,WAAW;IAoBd,MAAM,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IASrC,MAAM,CAAC,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAQzC,OAAO,CAAC,MAAM,CAAC,WAAW;CAc3B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Message, Topic } from "@/types";
|
|
2
|
+
import { CompletionsParams } from "@/types/completion";
|
|
3
|
+
/**
|
|
4
|
+
* 聊天
|
|
5
|
+
*/
|
|
6
|
+
export declare function fetchChatCompletion({ message, messages, completions, onResponse, }: {
|
|
7
|
+
message: Message;
|
|
8
|
+
messages: Message[];
|
|
9
|
+
topic?: Topic;
|
|
10
|
+
onResponse: (message: Message) => void;
|
|
11
|
+
completions: (params: CompletionsParams) => Promise<void>;
|
|
12
|
+
}): Promise<Message>;
|
|
13
|
+
//# sourceMappingURL=chatCompletion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatCompletion.d.ts","sourceRoot":"","sources":["../../src/utils/chatCompletion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,OAAO,EACP,QAAQ,EACR,WAAW,EAEX,UAAU,GACX,EAAE;IAED,OAAO,EAAE,OAAO,CAAC;IAEjB,QAAQ,EAAE,OAAO,EAAE,CAAC;IAEpB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC,WAAW,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3D,oBA0GA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThreadMessageLike } from "@assistant-ui/react";
|
|
2
|
+
import { Message } from "@chatkit/core";
|
|
3
|
+
declare const convertToAssistantMessage: (messages: Readonly<Message>[], options?: {
|
|
4
|
+
tool?: "group" | "hide" | "step";
|
|
5
|
+
}) => ThreadMessageLike[];
|
|
6
|
+
export default convertToAssistantMessage;
|
|
7
|
+
//# sourceMappingURL=convertToAssistantMessage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertToAssistantMessage.d.ts","sourceRoot":"","sources":["../../src/utils/convertToAssistantMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,iBAAiB,EAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAqB,MAAM,eAAe,CAAC;AAK3D,QAAA,MAAM,yBAAyB,GAC7B,UAAU,QAAQ,CAAC,OAAO,CAAC,EAAE,EAC7B,UAAS;IAAE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAA;CAAO,wBAwGnD,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy.d.ts","sourceRoot":"","sources":["../../src/utils/copy.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,SAU3C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 保存字符串内容到 Markdown 文件
|
|
3
|
+
* @param content - 要保存的字符串内容
|
|
4
|
+
* @param filename - 文件名(不包含扩展名),默认为 'document'
|
|
5
|
+
* @param addTimestamp - 是否在文件名后添加时间戳,默认为 true
|
|
6
|
+
*/
|
|
7
|
+
export declare const saveStringToMarkdown: (content: string, filename?: string, addTimestamp?: boolean) => void;
|
|
8
|
+
/**
|
|
9
|
+
* 保存多个字符串内容到单个 Markdown 文件
|
|
10
|
+
* @param contents - 字符串内容数组
|
|
11
|
+
* @param filename - 文件名(不包含扩展名)
|
|
12
|
+
* @param separator - 内容之间的分隔符,默认为双换行
|
|
13
|
+
*/
|
|
14
|
+
export declare const saveMultipleStringsToMarkdown: (contents: string[], filename?: string, separator?: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* 保存对象为格式化的 Markdown 文件
|
|
17
|
+
* @param data - 要保存的数据对象
|
|
18
|
+
* @param filename - 文件名
|
|
19
|
+
* @param title - Markdown 文档标题
|
|
20
|
+
*/
|
|
21
|
+
export declare const saveObjectToMarkdown: (data: Record<string, any>, filename?: string, title?: string) => void;
|
|
22
|
+
//# sourceMappingURL=download.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/utils/download.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,SAAS,MAAM,EACf,WAAU,MAAmB,EAC7B,eAAc,OAAc,KAC3B,IAqCF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,UAAU,MAAM,EAAE,EAClB,WAAU,MAA4B,EACtC,YAAW,MAAsB,KAChC,IAqBF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,WAAU,MAAsB,EAChC,QAAO,MAAsB,KAC5B,IA4CF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=getImgBase64.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getImgBase64.d.ts","sourceRoot":"","sources":["../../src/utils/getImgBase64.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { FileType, FileTypeConfig, ModelMultimodalSupport } from "@/types/multimodal";
|
|
2
|
+
/**
|
|
3
|
+
* 文件类型基础配置定义
|
|
4
|
+
*/
|
|
5
|
+
export declare const FILE_TYPE_CONFIGS: Record<FileType, FileTypeConfig>;
|
|
6
|
+
/**
|
|
7
|
+
* 支持多模态的模型配置
|
|
8
|
+
*/
|
|
9
|
+
export declare const MULTIMODAL_MODELS: ModelMultimodalSupport[];
|
|
10
|
+
/**
|
|
11
|
+
* 检查模型是否支持多模态
|
|
12
|
+
*/
|
|
13
|
+
export declare function isModelMultimodalSupported(modelId: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 获取模型的多模态支持配置
|
|
16
|
+
*/
|
|
17
|
+
export declare function getModelMultimodalSupport(modelId: string): ModelMultimodalSupport | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* 获取所有匹配的模型配置
|
|
20
|
+
*/
|
|
21
|
+
export declare function getAllModelMultimodalSupport(modelId: string): ModelMultimodalSupport[];
|
|
22
|
+
/**
|
|
23
|
+
* 获取模型特定的文件类型配置(应用模型覆盖)
|
|
24
|
+
*/
|
|
25
|
+
export declare function getModelFileTypeConfig(modelId: string, fileType: FileType): FileTypeConfig | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* 根据MIME类型获取文件类型
|
|
28
|
+
*/
|
|
29
|
+
export declare function getFileTypeByMimeType(mimeType: string): FileType | null;
|
|
30
|
+
/**
|
|
31
|
+
* 检查文件类型是否被模型支持
|
|
32
|
+
*/
|
|
33
|
+
export declare function isFileTypeSupported(modelId: string, fileType: FileType): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 检查MIME类型是否被模型支持
|
|
36
|
+
*/
|
|
37
|
+
export declare function isMimeTypeSupported(modelId: string, mimeType: string): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 检查文件大小是否在限制内
|
|
40
|
+
*/
|
|
41
|
+
export declare function isFileSizeValid(modelId: string, fileSize: number, fileType: FileType): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* 获取基础文件类型配置
|
|
44
|
+
*/
|
|
45
|
+
export declare function getFileTypeConfig(fileType: FileType): FileTypeConfig | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* 获取模型支持的文件类型配置列表(应用模型覆盖)
|
|
48
|
+
*/
|
|
49
|
+
export declare function getSupportedFileTypeConfigs(modelId: string): FileTypeConfig[];
|
|
50
|
+
/**
|
|
51
|
+
* 获取所有支持多模态的模型模式列表
|
|
52
|
+
*/
|
|
53
|
+
export declare function getAllSupportedModelPatterns(): string[];
|
|
54
|
+
/**
|
|
55
|
+
* 获取模型支持的文件accept模式(用于input的accept属性)
|
|
56
|
+
*/
|
|
57
|
+
export declare function getModelAcceptPattern(modelId: string, currentFileType?: FileType): string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* 测试模型ID匹配情况(调试用)
|
|
60
|
+
*/
|
|
61
|
+
export declare function testModelIdMatch(modelId: string): ModelMultimodalSupport[];
|
|
62
|
+
export declare function getFileInfoFromUrl(url: string): {
|
|
63
|
+
fileType: FileType;
|
|
64
|
+
fileName: string;
|
|
65
|
+
mimeType: string;
|
|
66
|
+
};
|
|
67
|
+
export declare function getFileTypeByExtension(fileName: string, extensions: {
|
|
68
|
+
type: FileType;
|
|
69
|
+
extensions: string[];
|
|
70
|
+
}[]): FileType | null;
|
|
71
|
+
//# sourceMappingURL=multimodal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multimodal.d.ts","sourceRoot":"","sources":["../../src/utils/multimodal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,QAAQ,EAAE,cAAc,CAqC9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,sBAAsB,EAkCrD,CAAC;AA2BF;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAInE;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,MAAM,GACd,sBAAsB,GAAG,SAAS,CAIpC;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,GACd,sBAAsB,EAAE,CAI1B;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,QAAQ,GACjB,cAAc,GAAG,SAAS,CA0B5B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAOvE;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAIT;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,OAAO,CAIT;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,QAAQ,GACjB,OAAO,CAIT;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,QAAQ,GACjB,cAAc,GAAG,SAAS,CAE5B;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,EAAE,CAM7E;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,EAAE,CAcvD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,eAAe,CAAC,EAAE,QAAQ,GACzB,MAAM,GAAG,SAAS,CAWpB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB,EAAE,CAK1E;AAGD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG;IAC/C,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CA0FA;AAED,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,GACrD,QAAQ,GAAG,IAAI,CAUjB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function formatDurationMs(durationMs: number): string;
|
|
2
|
+
/**
|
|
3
|
+
* 时间相关的工具函数
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* 友好地显示耗时,根据时间长度自动选择合适的单位
|
|
7
|
+
* @param startTime 开始时间(Date 对象、时间戳或 ISO 字符串)
|
|
8
|
+
* @param endTime 结束时间(Date 对象、时间戳或 ISO 字符串)
|
|
9
|
+
* @returns 格式化后的耗时字符串
|
|
10
|
+
*/
|
|
11
|
+
export declare function formatDuration(startTime: Date | number | string, endTime: Date | number | string): string;
|
|
12
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/utils/time.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAmC3D;AAGD;;GAEG;AAEH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAMzG"}
|