@blueking/ai-blueking 2.1.3 → 2.1.4-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.
- package/dist/ai-blueking.vue.d.ts +5 -0
- package/dist/ai-blueking.vue.d.ts.map +1 -1
- package/dist/components/chat-bot.vue.d.ts +9 -5
- package/dist/components/chat-bot.vue.d.ts.map +1 -1
- package/dist/composables/use-ai-blueking-init.d.ts +8 -0
- package/dist/composables/use-ai-blueking-init.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/parse-custom-blocks.d.ts +22 -0
- package/dist/utils/parse-custom-blocks.d.ts.map +1 -0
- package/dist/vue2/index.es.min.js +104 -96
- package/dist/vue2/index.iife.min.js +186 -186
- package/dist/vue2/index.umd.min.js +2 -2
- package/dist/vue2/style.css +1 -1
- package/dist/vue3/index.es.min.js +489 -440
- package/dist/vue3/index.iife.min.js +5 -5
- package/dist/vue3/index.umd.min.js +5 -5
- package/dist/vue3/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { AIBluekingExpose, AIBluekingProps } from './types';
|
|
2
|
+
import type { Message, MessageToolsStatus } from '@blueking/chat-x';
|
|
2
3
|
type __VLS_Slots = {
|
|
3
4
|
codeHeader?: (props: {
|
|
4
5
|
language: string;
|
|
5
6
|
token: unknown[];
|
|
6
7
|
}) => unknown;
|
|
7
8
|
headerLeft?: () => unknown;
|
|
9
|
+
message?: (props: {
|
|
10
|
+
message: Message;
|
|
11
|
+
messageToolsStatus?: MessageToolsStatus;
|
|
12
|
+
}) => unknown;
|
|
8
13
|
};
|
|
9
14
|
declare const __VLS_base: import("vue").DefineComponent<AIBluekingProps, AIBluekingExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
15
|
[x: string]: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-blueking.vue.d.ts","sourceRoot":"","sources":["../src/ai-blueking.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai-blueking.vue.d.ts","sourceRoot":"","sources":["../src/ai-blueking.vue"],"names":[],"mappings":"AAwWE,OAAO,KAAK,EAAmB,gBAAgB,EAAE,eAAe,EAAY,MAAM,SAAS,CAAC;AAC5F,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAMpE,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,EAAE,CAAA;KAAE,KAAK,OAAO,CAAC;IACxE,UAAU,CAAC,EAAE,MAAM,OAAO,CAAC;IAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;KAAE,KAAK,OAAO,CAAC;CAC7F,CAAC;AAkmBJ,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAKd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -2,12 +2,16 @@ import { RenderMode } from '@blueking/chat-x';
|
|
|
2
2
|
import type { IShortcut } from '../manager/business/types';
|
|
3
3
|
import type { IChatHelper } from '../types';
|
|
4
4
|
import type { ChatBotExpose, ChatBotProps } from './types';
|
|
5
|
-
import type { IAiSlashMenuItem } from '@blueking/chat-x';
|
|
5
|
+
import type { IAiSlashMenuItem, Message, MessageToolsStatus } from '@blueking/chat-x';
|
|
6
6
|
type __VLS_Slots = {
|
|
7
7
|
codeHeader?: (props: {
|
|
8
8
|
language: string;
|
|
9
9
|
token: unknown[];
|
|
10
10
|
}) => unknown;
|
|
11
|
+
message?: (props: {
|
|
12
|
+
message: Message;
|
|
13
|
+
messageToolsStatus?: MessageToolsStatus;
|
|
14
|
+
}) => unknown;
|
|
11
15
|
};
|
|
12
16
|
declare const __VLS_base: import("vue").DefineComponent<ChatBotProps, ChatBotExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
17
|
error: (error: Error) => any;
|
|
@@ -22,8 +26,8 @@ declare const __VLS_base: import("vue").DefineComponent<ChatBotProps, ChatBotExp
|
|
|
22
26
|
}) => any;
|
|
23
27
|
"session-switched": (session: import("@blueking/chat-helper").ISession<unknown, unknown> | null) => any;
|
|
24
28
|
"agent-info-loaded": (chatHelper: IChatHelper) => any;
|
|
25
|
-
"confirm-share": (messages:
|
|
26
|
-
feedback: (tool: import("@blueking/chat-x").IToolBtn, message:
|
|
29
|
+
"confirm-share": (messages: Message[]) => any;
|
|
30
|
+
feedback: (tool: import("@blueking/chat-x").IToolBtn, message: Message, reasonList: string[], otherReason: string) => any;
|
|
27
31
|
"cancel-share": () => any;
|
|
28
32
|
"execution-panel-change": (isCollapse: boolean) => any;
|
|
29
33
|
"request-share": () => any;
|
|
@@ -40,8 +44,8 @@ declare const __VLS_base: import("vue").DefineComponent<ChatBotProps, ChatBotExp
|
|
|
40
44
|
}) => any) | undefined;
|
|
41
45
|
"onSession-switched"?: ((session: import("@blueking/chat-helper").ISession<unknown, unknown> | null) => any) | undefined;
|
|
42
46
|
"onAgent-info-loaded"?: ((chatHelper: IChatHelper) => any) | undefined;
|
|
43
|
-
"onConfirm-share"?: ((messages:
|
|
44
|
-
onFeedback?: ((tool: import("@blueking/chat-x").IToolBtn, message:
|
|
47
|
+
"onConfirm-share"?: ((messages: Message[]) => any) | undefined;
|
|
48
|
+
onFeedback?: ((tool: import("@blueking/chat-x").IToolBtn, message: Message, reasonList: string[], otherReason: string) => any) | undefined;
|
|
45
49
|
"onCancel-share"?: (() => any) | undefined;
|
|
46
50
|
"onExecution-panel-change"?: ((isCollapse: boolean) => any) | undefined;
|
|
47
51
|
"onRequest-share"?: (() => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-bot.vue.d.ts","sourceRoot":"","sources":["../../src/components/chat-bot.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat-bot.vue.d.ts","sourceRoot":"","sources":["../../src/components/chat-bot.vue"],"names":[],"mappings":"AAydE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAW9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAgB,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEzE,OAAO,KAAK,EAAmB,gBAAgB,EAAE,OAAO,EAAE,kBAAkB,EAAY,MAAM,kBAAkB,CAAC;AAkBjH,KAAK,WAAW,GAAG;IACjB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,EAAE,CAAA;KAAE,KAAK,OAAO,CAAC;IACxE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;KAAE,KAAK,OAAO,CAAC;CAC7F,CAAC;AAoaJ,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAKd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -215,6 +215,10 @@ export declare function useAiBluekingInit(params: UseAiBluekingInitParams): {
|
|
|
215
215
|
language: string;
|
|
216
216
|
token: unknown[];
|
|
217
217
|
}) => unknown;
|
|
218
|
+
message?: (props: {
|
|
219
|
+
message: import("@blueking/chat-x").Message;
|
|
220
|
+
messageToolsStatus?: import("@blueking/chat-x").MessageToolsStatus;
|
|
221
|
+
}) => unknown;
|
|
218
222
|
};
|
|
219
223
|
}) | undefined, ({
|
|
220
224
|
$: import("vue").ComponentInternalInstance;
|
|
@@ -392,6 +396,10 @@ export declare function useAiBluekingInit(params: UseAiBluekingInitParams): {
|
|
|
392
396
|
language: string;
|
|
393
397
|
token: unknown[];
|
|
394
398
|
}) => unknown;
|
|
399
|
+
message?: (props: {
|
|
400
|
+
message: import("@blueking/chat-x").Message;
|
|
401
|
+
messageToolsStatus?: import("@blueking/chat-x").MessageToolsStatus;
|
|
402
|
+
}) => unknown;
|
|
395
403
|
};
|
|
396
404
|
}) | undefined>;
|
|
397
405
|
draggableContainerRef: import("vue").Ref<DraggableContainerExpose | undefined, DraggableContainerExpose | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-ai-blueking-init.d.ts","sourceRoot":"","sources":["../../src/composables/use-ai-blueking-init.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,OAAO,EAAE,qBAAqB,EAAkB,MAAM,oBAAoB,CAAC;AAG3E,OAAO,KAAK,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAsIsulB,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAhNx4lB,CAAC;;wDAWjB,CAAH;;;;;;;;;;;;kCAqMwtN,CAAC;;;;;;;;;;;;;;wBAjItsN,OAAO;;;;yBA9CG,KAAK;EA8KlC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export type { AIBluekingEmits, AIBluekingExpose, AIBluekingProps, DropdownMenuCo
|
|
|
10
10
|
export type { IAgentInfo, IMessage, ISession, MessageRole, MessageStatus } from '@blueking/chat-helper';
|
|
11
11
|
export { AGUIProtocol, useChatHelper } from '@blueking/chat-helper';
|
|
12
12
|
export { MessageContentType, RenderMode } from '@blueking/chat-x';
|
|
13
|
+
export { parseCustomBlocks, type ContentBlock, type CustomBlock, type TextBlock } from './utils';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAGvH,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGtH,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAE1F,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,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1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AASA,cAAc,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AASA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,WAQ3C,CAAC;AAWF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MAc1C,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA6BpE;AAED;;GAEG;AACH,wBAAgB,WAAW,4CAc1B;AAED;;GAEG;AACH,wBAAgB,sBAAsB,2BAErC;AAED;;GAEG;AACH,wBAAgB,KAAK,YAEpB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAMnE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface CustomBlock {
|
|
2
|
+
type: 'custom';
|
|
3
|
+
data: Record<string, unknown>;
|
|
4
|
+
raw: string;
|
|
5
|
+
}
|
|
6
|
+
export interface TextBlock {
|
|
7
|
+
type: 'text';
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
export type ContentBlock = CustomBlock | TextBlock;
|
|
11
|
+
/**
|
|
12
|
+
* 解析消息内容,将 ```custom-component 代码块识别为自定义组件,
|
|
13
|
+
* 其余部分作为普通 Markdown 文本。
|
|
14
|
+
*
|
|
15
|
+
* AI prompt 示例:
|
|
16
|
+
* 请使用以下格式输出自定义组件:
|
|
17
|
+
* ```custom-component
|
|
18
|
+
* {"type": "chart", "chartType": "bar", ...}
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseCustomBlocks(content: unknown): ContentBlock[];
|
|
22
|
+
//# sourceMappingURL=parse-custom-blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-custom-blocks.d.ts","sourceRoot":"","sources":["../../src/utils/parse-custom-blocks.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;AAEnD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,YAAY,EAAE,CA4ClE"}
|
|
@@ -53784,141 +53784,145 @@ var Iq = /* @__PURE__ */ b({
|
|
|
53784
53784
|
"stop"
|
|
53785
53785
|
],
|
|
53786
53786
|
setup(e, { expose: t, emit: n }) {
|
|
53787
|
-
let r = e, i = n,
|
|
53787
|
+
let r = e, i = n, o = se(), s = V(), c = V(), l = V(), d = W([]), f = V(null), h = u({
|
|
53788
53788
|
get: () => r.renderMode ?? IN.Chat,
|
|
53789
53789
|
set: () => {}
|
|
53790
|
-
}),
|
|
53791
|
-
await M(),
|
|
53792
|
-
},
|
|
53793
|
-
|
|
53794
|
-
}, { chatHelper:
|
|
53790
|
+
}), _ = async () => {
|
|
53791
|
+
await M(), s.value && (s.value.scrollTop = s.value.scrollHeight);
|
|
53792
|
+
}, y = () => {
|
|
53793
|
+
l.value?.focus?.();
|
|
53794
|
+
}, { chatHelper: b, isStandaloneMode: x, isInitialized: C, initError: w, chatBusinessManager: T, sessionBusinessManager: E, shortcutManager: O } = Aq({
|
|
53795
53795
|
props: r,
|
|
53796
53796
|
emit: i,
|
|
53797
|
-
scrollToBottom:
|
|
53798
|
-
}), { userInput:
|
|
53797
|
+
scrollToBottom: _
|
|
53798
|
+
}), { userInput: k, cite: A, handleUpdateModelValue: j, doSendMessage: I, handleSendMessage: L, handleUpload: R, handleStopSending: z, stopGeneration: ee } = Mq({
|
|
53799
53799
|
emit: i,
|
|
53800
|
-
chatHelper:
|
|
53801
|
-
chatBusinessManager:
|
|
53802
|
-
selectedShortcut:
|
|
53803
|
-
selectedResources:
|
|
53804
|
-
}), { handleSelectShortcut:
|
|
53800
|
+
chatHelper: b,
|
|
53801
|
+
chatBusinessManager: T,
|
|
53802
|
+
selectedShortcut: f,
|
|
53803
|
+
selectedResources: d
|
|
53804
|
+
}), { handleSelectShortcut: te, handleCloseShortcut: ne, handleShortcutSubmit: H, selectShortcutWithText: re, getShortcutFromMessage: G, buildShortcutProperty: ie, sendShortcutDirectly: ae } = Pq({
|
|
53805
53805
|
props: r,
|
|
53806
53806
|
emit: i,
|
|
53807
|
-
chatHelper:
|
|
53808
|
-
shortcutManager:
|
|
53809
|
-
doSendMessage:
|
|
53810
|
-
selectedShortcut:
|
|
53811
|
-
}), { messageStatus:
|
|
53807
|
+
chatHelper: b,
|
|
53808
|
+
shortcutManager: O,
|
|
53809
|
+
doSendMessage: I,
|
|
53810
|
+
selectedShortcut: f
|
|
53811
|
+
}), { messageStatus: q, messageToolsStatus: oe, messages: ce, isMessagesLoading: le, isGenerating: ue, currentSession: de, isWelcomeState: fe, openingRemark: pe, effectiveResources: me, effectivePrompts: he, effectiveSupportUpload: ge, chatbotStyle: _e, filteredShortcuts: ve } = jq({
|
|
53812
53812
|
props: r,
|
|
53813
|
-
chatHelper:
|
|
53814
|
-
chatBusinessManager:
|
|
53815
|
-
sessionBusinessManager:
|
|
53816
|
-
shortcutManager:
|
|
53817
|
-
isStandaloneMode:
|
|
53818
|
-
isInitialized:
|
|
53819
|
-
selectedShortcut:
|
|
53820
|
-
}), { handleAgentAction:
|
|
53813
|
+
chatHelper: b,
|
|
53814
|
+
chatBusinessManager: T,
|
|
53815
|
+
sessionBusinessManager: E,
|
|
53816
|
+
shortcutManager: O,
|
|
53817
|
+
isStandaloneMode: x,
|
|
53818
|
+
isInitialized: C,
|
|
53819
|
+
selectedShortcut: f
|
|
53820
|
+
}), { handleAgentAction: ye, handleAgentFeedback: be, handleUserAction: xe, handleUserInputConfirm: Se, handleUserShortcutConfirm: Ce, handleStopStreaming: we } = Fq({
|
|
53821
53821
|
emit: i,
|
|
53822
|
-
chatHelper:
|
|
53823
|
-
chatBusinessManager:
|
|
53824
|
-
cite:
|
|
53825
|
-
focusInput:
|
|
53826
|
-
scrollToBottom:
|
|
53827
|
-
getShortcutFromMessage:
|
|
53828
|
-
buildShortcutProperty:
|
|
53829
|
-
}),
|
|
53822
|
+
chatHelper: b,
|
|
53823
|
+
chatBusinessManager: T,
|
|
53824
|
+
cite: A,
|
|
53825
|
+
focusInput: y,
|
|
53826
|
+
scrollToBottom: _,
|
|
53827
|
+
getShortcutFromMessage: G,
|
|
53828
|
+
buildShortcutProperty: ie
|
|
53829
|
+
}), Te = u(() => !C.value || le.value), { handleConfirmShare: Ee } = Nq({
|
|
53830
53830
|
emit: i,
|
|
53831
|
-
chatHelper:
|
|
53832
|
-
isStandaloneMode:
|
|
53833
|
-
}),
|
|
53831
|
+
chatHelper: b,
|
|
53832
|
+
isStandaloneMode: x
|
|
53833
|
+
}), De = (e) => {
|
|
53834
53834
|
i("execution-panel-change", e);
|
|
53835
|
-
},
|
|
53835
|
+
}, Oe = async (e) => {
|
|
53836
53836
|
let t = e.data?.props;
|
|
53837
|
-
if (t?.task_id != null && t?.node_id) return
|
|
53837
|
+
if (t?.task_id != null && t?.node_id) return b.value?.message.getFlowAgentTaskNodeInfo(t.task_id, t.node_id);
|
|
53838
53838
|
};
|
|
53839
53839
|
return t({
|
|
53840
|
-
sendMessage: (e) =>
|
|
53841
|
-
stopGeneration:
|
|
53840
|
+
sendMessage: (e) => L(e, [[]]),
|
|
53841
|
+
stopGeneration: ee,
|
|
53842
53842
|
switchSession: async (e) => {
|
|
53843
|
-
if (!
|
|
53843
|
+
if (!E.value) {
|
|
53844
53844
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
53845
53845
|
return;
|
|
53846
53846
|
}
|
|
53847
53847
|
try {
|
|
53848
|
-
await
|
|
53848
|
+
await E.value.switchSession(e), i("session-switched", E.value.currentSession.value);
|
|
53849
53849
|
} catch (e) {
|
|
53850
53850
|
console.error("Failed to switch session:", e), i("error", e);
|
|
53851
53851
|
}
|
|
53852
53852
|
},
|
|
53853
|
-
messages:
|
|
53854
|
-
currentSession:
|
|
53855
|
-
isGenerating:
|
|
53856
|
-
getChatHelper: () =>
|
|
53853
|
+
messages: ce,
|
|
53854
|
+
currentSession: de,
|
|
53855
|
+
isGenerating: ue,
|
|
53856
|
+
getChatHelper: () => b.value,
|
|
53857
53857
|
setCiteText: (e) => {
|
|
53858
|
-
|
|
53858
|
+
A.value = e;
|
|
53859
53859
|
},
|
|
53860
|
-
focusInput:
|
|
53861
|
-
enterShareMode: () =>
|
|
53862
|
-
exitShareMode: () =>
|
|
53860
|
+
focusInput: y,
|
|
53861
|
+
enterShareMode: () => c.value?.enterShareMode(),
|
|
53862
|
+
exitShareMode: () => c.value?.exitShareMode(),
|
|
53863
53863
|
selectShortcut: (e, t) => {
|
|
53864
|
-
|
|
53864
|
+
re(e, t);
|
|
53865
53865
|
},
|
|
53866
|
-
sendShortcut: (e, t) =>
|
|
53866
|
+
sendShortcut: (e, t) => ae(e, t)
|
|
53867
53867
|
}), (t, n) => (B(), m("div", {
|
|
53868
53868
|
class: N([
|
|
53869
53869
|
"ai-chatbot",
|
|
53870
53870
|
r.extCls,
|
|
53871
|
-
{ "welcome-state": K(
|
|
53871
|
+
{ "welcome-state": K(fe) }
|
|
53872
53872
|
]),
|
|
53873
|
-
style: F(K(
|
|
53873
|
+
style: F(K(_e))
|
|
53874
53874
|
}, [v(K(TK), {
|
|
53875
53875
|
ref_key: "chatContainerRef",
|
|
53876
|
-
ref:
|
|
53877
|
-
cite: K(
|
|
53878
|
-
"onUpdate:cite": n[0] ||= (e) => D(
|
|
53879
|
-
"selected-shortcut":
|
|
53880
|
-
"onUpdate:selectedShortcut": n[1] ||= (e) =>
|
|
53881
|
-
"render-mode":
|
|
53882
|
-
"onUpdate:renderMode": n[2] ||= (e) =>
|
|
53883
|
-
"chat-loading":
|
|
53876
|
+
ref: c,
|
|
53877
|
+
cite: K(A),
|
|
53878
|
+
"onUpdate:cite": n[0] ||= (e) => D(A) ? A.value = e : null,
|
|
53879
|
+
"selected-shortcut": f.value,
|
|
53880
|
+
"onUpdate:selectedShortcut": n[1] ||= (e) => f.value = e,
|
|
53881
|
+
"render-mode": h.value,
|
|
53882
|
+
"onUpdate:renderMode": n[2] ||= (e) => h.value = e,
|
|
53883
|
+
"chat-loading": Te.value,
|
|
53884
53884
|
"common-tippy-options": e.messageToolsTippyOptions,
|
|
53885
|
-
"message-status": K(
|
|
53886
|
-
"message-tools-status": K(
|
|
53887
|
-
messages: K(
|
|
53888
|
-
"model-value": K(
|
|
53889
|
-
"on-agent-action": K(
|
|
53890
|
-
"on-agent-feedback": K(
|
|
53891
|
-
"on-custom-tab-change":
|
|
53892
|
-
"on-send-message": K(
|
|
53893
|
-
"on-stop-sending": K(
|
|
53894
|
-
"on-upload": K(
|
|
53895
|
-
"on-user-action": K(
|
|
53896
|
-
"on-user-input-confirm": K(
|
|
53897
|
-
"on-user-shortcut-confirm": K(
|
|
53898
|
-
"opening-remark": K(
|
|
53885
|
+
"message-status": K(q),
|
|
53886
|
+
"message-tools-status": K(oe),
|
|
53887
|
+
messages: K(ce),
|
|
53888
|
+
"model-value": K(k),
|
|
53889
|
+
"on-agent-action": K(ye),
|
|
53890
|
+
"on-agent-feedback": K(be),
|
|
53891
|
+
"on-custom-tab-change": Oe,
|
|
53892
|
+
"on-send-message": K(L),
|
|
53893
|
+
"on-stop-sending": K(z),
|
|
53894
|
+
"on-upload": K(R),
|
|
53895
|
+
"on-user-action": K(xe),
|
|
53896
|
+
"on-user-input-confirm": K(Se),
|
|
53897
|
+
"on-user-shortcut-confirm": K(Ce),
|
|
53898
|
+
"opening-remark": K(pe),
|
|
53899
53899
|
placeholder: r.placeholder,
|
|
53900
53900
|
placement: r.placement,
|
|
53901
|
-
prompts: K(
|
|
53901
|
+
prompts: K(he),
|
|
53902
53902
|
"resize-props": r.resizeProps,
|
|
53903
|
-
resources: K(
|
|
53904
|
-
"shortcut-id":
|
|
53905
|
-
shortcuts: K(
|
|
53906
|
-
"support-upload": K(
|
|
53907
|
-
onCollapseChange:
|
|
53908
|
-
onConfirmShare: K(
|
|
53909
|
-
onDeleteShortcut: K(
|
|
53910
|
-
onSelectShortcut: K(
|
|
53911
|
-
onShortcutClose: K(
|
|
53912
|
-
onShortcutSubmit: K(
|
|
53913
|
-
onStopStreaming: K(
|
|
53914
|
-
"onUpdate:modelValue": K(
|
|
53903
|
+
resources: K(me),
|
|
53904
|
+
"shortcut-id": f.value?.id,
|
|
53905
|
+
shortcuts: K(ve),
|
|
53906
|
+
"support-upload": K(ge),
|
|
53907
|
+
onCollapseChange: De,
|
|
53908
|
+
onConfirmShare: K(Ee),
|
|
53909
|
+
onDeleteShortcut: K(ne),
|
|
53910
|
+
onSelectShortcut: K(te),
|
|
53911
|
+
onShortcutClose: K(ne),
|
|
53912
|
+
onShortcutSubmit: K(H),
|
|
53913
|
+
onStopStreaming: K(we),
|
|
53914
|
+
"onUpdate:modelValue": K(j)
|
|
53915
53915
|
}, {
|
|
53916
|
-
message: J(({ message: n, messageToolsStatus: r }) => [
|
|
53916
|
+
message: J(({ message: n, messageToolsStatus: r }) => [p(" 消费方提供了 #message slot 时,优先使用消费方的渲染 "), K(o).message ? U(t.$slots, "message", {
|
|
53917
|
+
key: 0,
|
|
53918
|
+
message: n,
|
|
53919
|
+
messageToolsStatus: r
|
|
53920
|
+
}) : (B(), m(a, { key: 1 }, [p(" 否则使用默认的 MessageRender "), v(K(JG), {
|
|
53917
53921
|
message: n,
|
|
53918
53922
|
"message-tools-status": r,
|
|
53919
|
-
"on-action": (e) => K(
|
|
53920
|
-
"on-input-confirm": (e, t) => K(
|
|
53921
|
-
"on-shortcut-confirm": (e) => K(
|
|
53923
|
+
"on-action": (e) => K(xe)(e, n),
|
|
53924
|
+
"on-input-confirm": (e, t) => K(Se)(n, e, t),
|
|
53925
|
+
"on-shortcut-confirm": (e) => K(Ce)(n, e),
|
|
53922
53926
|
"tippy-options": e.messageToolsTippyOptions
|
|
53923
53927
|
}, g({ _: 2 }, [t.$slots.codeHeader ? {
|
|
53924
53928
|
name: "codeHeader",
|
|
@@ -53931,7 +53935,7 @@ var Iq = /* @__PURE__ */ b({
|
|
|
53931
53935
|
"on-input-confirm",
|
|
53932
53936
|
"on-shortcut-confirm",
|
|
53933
53937
|
"tippy-options"
|
|
53934
|
-
])]),
|
|
53938
|
+
])], 2112))]),
|
|
53935
53939
|
_: 3
|
|
53936
53940
|
}, 8, /* @__PURE__ */ "cite.selected-shortcut.render-mode.chat-loading.common-tippy-options.message-status.message-tools-status.messages.model-value.on-agent-action.on-agent-feedback.on-send-message.on-stop-sending.on-upload.on-user-action.on-user-input-confirm.on-user-shortcut-confirm.opening-remark.placeholder.placement.prompts.resize-props.resources.shortcut-id.shortcuts.support-upload.onConfirmShare.onDeleteShortcut.onSelectShortcut.onShortcutClose.onShortcutSubmit.onStopStreaming.onUpdate:modelValue".split("."))], 6));
|
|
53937
53941
|
}
|
|
@@ -55674,6 +55678,10 @@ var xJ = { class: "draggable-container-content" }, SJ = /* @__PURE__ */ be(/* @_
|
|
|
55674
55678
|
name: "codeHeader",
|
|
55675
55679
|
fn: J((t) => [U(e.$slots, "codeHeader", P(S(t)), void 0, !0)]),
|
|
55676
55680
|
key: "0"
|
|
55681
|
+
} : void 0, e.$slots.message ? {
|
|
55682
|
+
name: "message",
|
|
55683
|
+
fn: J((t) => [U(e.$slots, "message", P(S(t)), void 0, !0)]),
|
|
55684
|
+
key: "1"
|
|
55677
55685
|
} : void 0]), 1032, [
|
|
55678
55686
|
"always-create-new-session",
|
|
55679
55687
|
"auto-load",
|
|
@@ -55753,7 +55761,7 @@ var xJ = { class: "draggable-container-content" }, SJ = /* @__PURE__ */ be(/* @_
|
|
|
55753
55761
|
])) : p("v-if", !0)
|
|
55754
55762
|
], 2)], 8, ["to"]));
|
|
55755
55763
|
}
|
|
55756
|
-
}), [["__scopeId", "data-v-
|
|
55764
|
+
}), [["__scopeId", "data-v-9223bc8d"]]), DJ = [
|
|
55757
55765
|
"close",
|
|
55758
55766
|
"show",
|
|
55759
55767
|
"stop",
|