@blueking/ai-blueking 2.2.5-beta.1 → 2.2.5-beta.3
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/components/chat-bot.vue.d.ts.map +1 -1
- package/dist/components/composables/use-message-sender.d.ts +2 -1
- package/dist/components/composables/use-message-sender.d.ts.map +1 -1
- package/dist/composables/use-ai-blueking-init.d.ts.map +1 -1
- package/dist/standalone/index.es.min.js +112 -77
- package/dist/standalone/index.iife.min.js +4 -4
- package/dist/standalone/index.umd.min.js +4 -4
- package/dist/vue2/index.es.min.js +263 -228
- package/dist/vue2/index.iife.min.js +4 -4
- package/dist/vue2/index.umd.min.js +4 -4
- package/dist/vue3/index.es.min.js +110 -75
- package/dist/vue3/index.iife.min.js +4 -4
- package/dist/vue3/index.umd.min.js +4 -4
- package/package.json +3 -3
|
@@ -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":"AAsnBE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAa9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAgB,aAAa,EAAE,YAAY,EAA4B,MAAM,SAAS,CAAC;AACnG,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAEV,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,iBAAiB,EAElB,MAAM,kBAAkB,CAAC;AA8C1B,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;QAChB,OAAO,EAAE,OAAO,CAAC;QACjB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;QACxC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;KACvC,KAAK,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC;CACjF,CAAC;AAwkBJ,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"}
|
|
@@ -4,7 +4,7 @@ import type { IChatHelper, IRequestOptions } from '../../types';
|
|
|
4
4
|
import type { ChatBotEmitFn } from './use-chatbot-init';
|
|
5
5
|
import type { ReportChatBotError } from './use-error-reporter';
|
|
6
6
|
import type { IUploadFileResult, IUserMessage } from '@blueking/chat-helper';
|
|
7
|
-
import type { Interrupt, InterruptResume, OnArtifactClick, TagSchema, UserMessage } from '@blueking/chat-x';
|
|
7
|
+
import type { Interrupt, InterruptResume, OnArtifactClick, TagSchema, UploadFile, UserMessage } from '@blueking/chat-x';
|
|
8
8
|
import type { UseInterruptResumeReturn } from './use-interrupt-resume';
|
|
9
9
|
export interface UseMessageSenderParams {
|
|
10
10
|
chatBusinessManager: Ref<ChatBusinessManager | null>;
|
|
@@ -29,6 +29,7 @@ export interface UseMessageSenderReturn {
|
|
|
29
29
|
payload?: InterruptResume;
|
|
30
30
|
}) => Promise<void>;
|
|
31
31
|
handleArtifactClick: OnArtifactClick;
|
|
32
|
+
handleDeleteFile: (file: Partial<UploadFile>) => Promise<void>;
|
|
32
33
|
handleStopSending: () => Promise<void>;
|
|
33
34
|
handleUpdateModelValue: (value: string | TagSchema) => void;
|
|
34
35
|
handleUpload: (files: File[]) => Promise<IUploadFileResult[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-message-sender.d.ts","sourceRoot":"","sources":["../../../src/components/composables/use-message-sender.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAG3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-message-sender.d.ts","sourceRoot":"","sources":["../../../src/components/composables/use-message-sender.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAG3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA4Kg7d,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAxThhe,CAAC;;wDAanB,CAAC;;;;;;;;;;;;;;kCA2S8kR,CAAC;iCAA6C,CAAC;;;6BAA6E,CAAC;4BAAsB,CAAC;;;;;;;;;;;;;yBAnPltR,KAAK;8BAxDA,qBAAqB;8BA8JjB,OAAO,CAAC,IAAI,CAAC;2BAyChB,OAAO,mDAAwB;EAmGlE"}
|
|
@@ -3719,7 +3719,7 @@ var Ys = (e) => {
|
|
|
3719
3719
|
id: "delete",
|
|
3720
3720
|
name: Q("删除")
|
|
3721
3721
|
}
|
|
3722
|
-
], gc =
|
|
3722
|
+
], gc = 20 * 1024 * 1024, _c = "ai-is-keyword", vc = /* @__PURE__ */ function(e) {
|
|
3723
3723
|
return e.Chat = "chat", e.Share = "share", e.Test = "test", e;
|
|
3724
3724
|
}({}), yc = "__loading__", $ = {
|
|
3725
3725
|
class: "ai-common-icon",
|
|
@@ -53676,7 +53676,7 @@ var c1 = { class: "ai-input-attachment" }, l1 = { class: "ai-input-attachment-de
|
|
|
53676
53676
|
i += 1;
|
|
53677
53677
|
continue;
|
|
53678
53678
|
}
|
|
53679
|
-
if (o.size <= 0 || o.size >=
|
|
53679
|
+
if (o.size <= 0 || o.size >= 20971520) {
|
|
53680
53680
|
r += 1;
|
|
53681
53681
|
continue;
|
|
53682
53682
|
}
|
|
@@ -59064,6 +59064,7 @@ var Y8 = (e) => {
|
|
|
59064
59064
|
timeout: i?.timeout ?? o
|
|
59065
59065
|
});
|
|
59066
59066
|
},
|
|
59067
|
+
deletePvFile: (t, n, r) => e.delete(`session/${t}/pv_files/`, { path: n }, r),
|
|
59067
59068
|
isResumeSession: (t, n) => e.get(`session/${t}/is_resume/`, void 0, n)
|
|
59068
59069
|
}), s5 = (e) => ({
|
|
59069
59070
|
agent: X8(e),
|
|
@@ -59239,6 +59240,7 @@ var Y8 = (e) => {
|
|
|
59239
59240
|
return g5(r) ? (await e.http?.session.uploadPvFiles(t, n))?.results ?? [] : (await Promise.all(n.map((n) => e.http?.session.uploadFile(t, n)))).filter((e) => !!e);
|
|
59240
59241
|
},
|
|
59241
59242
|
getPvFileDownloadUrl: (t, n, r) => e.http?.session.getPvFileDownloadUrl(t, n, r),
|
|
59243
|
+
deletePvFile: (t, n) => e.http?.session.deletePvFile(t, n),
|
|
59242
59244
|
reset: () => {
|
|
59243
59245
|
t.value = [], n.value = null, r.value = 0, i.value = 0, a.value = 0, o.value = !1, s.value = !1, c.value = !1, l.value = !1, u.value = !1, d.value = !1, f.value = !1, p.value = !1;
|
|
59244
59246
|
}
|
|
@@ -61404,7 +61406,25 @@ function q7(e) {
|
|
|
61404
61406
|
});
|
|
61405
61407
|
let u = (e) => {
|
|
61406
61408
|
c.value = e;
|
|
61407
|
-
}, d =
|
|
61409
|
+
}, d = /* @__PURE__ */ new Set(), f = (e) => {
|
|
61410
|
+
if (e) {
|
|
61411
|
+
if ("path" in e && e.path) return e.path;
|
|
61412
|
+
if ("id" in e && e.id) return e.id;
|
|
61413
|
+
}
|
|
61414
|
+
}, p = async (e, t) => {
|
|
61415
|
+
try {
|
|
61416
|
+
await n.value.session.deletePvFile(e, t);
|
|
61417
|
+
} catch (e) {
|
|
61418
|
+
a(e, "Failed to delete uploaded file");
|
|
61419
|
+
}
|
|
61420
|
+
}, m = (e, t, n) => {
|
|
61421
|
+
t.forEach((t, r) => {
|
|
61422
|
+
if (!d.has(t)) return;
|
|
61423
|
+
d.delete(t);
|
|
61424
|
+
let i = f(n[r]);
|
|
61425
|
+
i && p(e, i);
|
|
61426
|
+
});
|
|
61427
|
+
}, h = async (e, a = {}) => {
|
|
61408
61428
|
if (!r.value || !n.value) throw Error("[ChatBot] Cannot send message: chatBusinessManager not initialized");
|
|
61409
61429
|
let o = n.value.session.current?.value?.sessionCode;
|
|
61410
61430
|
if (!o) throw Error("[ChatBot] Cannot send message: no active session");
|
|
@@ -61414,13 +61434,17 @@ function q7(e) {
|
|
|
61414
61434
|
...a,
|
|
61415
61435
|
...s ? { property: s } : {}
|
|
61416
61436
|
});
|
|
61417
|
-
},
|
|
61437
|
+
}, g = async (e) => {
|
|
61418
61438
|
let t = n.value?.session.current?.value?.sessionCode;
|
|
61419
61439
|
if (!t) throw Error("[ChatBot] Cannot upload: no active session");
|
|
61420
|
-
|
|
61421
|
-
|
|
61422
|
-
|
|
61423
|
-
|
|
61440
|
+
try {
|
|
61441
|
+
let r = await n.value.session.uploadFiles(t, e);
|
|
61442
|
+
if (!r?.length) throw Error("[ChatBot] Upload failed: empty response");
|
|
61443
|
+
return m(t, e, r), r;
|
|
61444
|
+
} catch (t) {
|
|
61445
|
+
throw e.forEach((e) => d.delete(e)), t;
|
|
61446
|
+
}
|
|
61447
|
+
}, _ = async (e) => {
|
|
61424
61448
|
let t = n.value?.session.current?.value?.sessionCode;
|
|
61425
61449
|
if (!t) throw Error("[ChatBot] Cannot resolve artifact URL: no active session");
|
|
61426
61450
|
let r = await n.value.session.getPvFileDownloadUrl(t, e.outputId);
|
|
@@ -61428,7 +61452,16 @@ function q7(e) {
|
|
|
61428
61452
|
download_url: r?.download_url,
|
|
61429
61453
|
preview_url: r?.preview_url
|
|
61430
61454
|
};
|
|
61431
|
-
},
|
|
61455
|
+
}, v = async (e) => {
|
|
61456
|
+
let t = e.outputId || e.id;
|
|
61457
|
+
if (e.file && !t) {
|
|
61458
|
+
d.add(e.file);
|
|
61459
|
+
return;
|
|
61460
|
+
}
|
|
61461
|
+
e.file && d.delete(e.file);
|
|
61462
|
+
let r = n.value?.session.current?.value?.sessionCode;
|
|
61463
|
+
!t || !r || await p(r, t);
|
|
61464
|
+
}, y = async (e, t, n) => {
|
|
61432
61465
|
try {
|
|
61433
61466
|
if (n?.payload && o) {
|
|
61434
61467
|
c.value = [[]], l.value = "", await o(e, n);
|
|
@@ -61440,13 +61473,13 @@ function q7(e) {
|
|
|
61440
61473
|
...Object.keys(r).length ? { extra: r } : {},
|
|
61441
61474
|
...i ? { docSchema: i } : {}
|
|
61442
61475
|
};
|
|
61443
|
-
await
|
|
61476
|
+
await h(e, Object.keys(a).length ? { property: a } : {});
|
|
61444
61477
|
} catch (e) {
|
|
61445
61478
|
a(e, "Failed to send message");
|
|
61446
61479
|
}
|
|
61447
|
-
},
|
|
61448
|
-
await
|
|
61449
|
-
},
|
|
61480
|
+
}, b = async () => {
|
|
61481
|
+
await x();
|
|
61482
|
+
}, x = async () => {
|
|
61450
61483
|
if (!r.value) {
|
|
61451
61484
|
console.error("[ChatBot] Cannot stop generation: chatBusinessManager not initialized");
|
|
61452
61485
|
return;
|
|
@@ -61461,12 +61494,13 @@ function q7(e) {
|
|
|
61461
61494
|
userInput: c,
|
|
61462
61495
|
cite: l,
|
|
61463
61496
|
handleUpdateModelValue: u,
|
|
61464
|
-
doSendMessage:
|
|
61465
|
-
handleSendMessage:
|
|
61466
|
-
handleArtifactClick:
|
|
61467
|
-
|
|
61468
|
-
|
|
61469
|
-
|
|
61497
|
+
doSendMessage: h,
|
|
61498
|
+
handleSendMessage: y,
|
|
61499
|
+
handleArtifactClick: _,
|
|
61500
|
+
handleDeleteFile: v,
|
|
61501
|
+
handleUpload: g,
|
|
61502
|
+
handleStopSending: b,
|
|
61503
|
+
stopGeneration: x
|
|
61470
61504
|
};
|
|
61471
61505
|
}
|
|
61472
61506
|
//#endregion
|
|
@@ -61870,7 +61904,7 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
61870
61904
|
}), { handleInterruptResume: k, resumeUserQuestionWithInput: A } = K7({
|
|
61871
61905
|
chatHelper: b,
|
|
61872
61906
|
reportError: v
|
|
61873
|
-
}), { userInput: j, cite: M, handleUpdateModelValue: N, doSendMessage: P, handleSendMessage: F, handleUpload: I,
|
|
61907
|
+
}), { userInput: j, cite: M, handleUpdateModelValue: N, doSendMessage: P, handleSendMessage: F, handleUpload: I, handleDeleteFile: ee, handleArtifactClick: te, handleStopSending: ne, stopGeneration: re } = q7({
|
|
61874
61908
|
emit: o,
|
|
61875
61909
|
chatHelper: b,
|
|
61876
61910
|
chatBusinessManager: E,
|
|
@@ -61878,7 +61912,7 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
61878
61912
|
reportError: v,
|
|
61879
61913
|
resumeUserQuestionWithInput: A,
|
|
61880
61914
|
selectedShortcut: m
|
|
61881
|
-
}), { handleSelectShortcut:
|
|
61915
|
+
}), { handleSelectShortcut: ie, handleCloseShortcut: ae, handleShortcutSubmit: oe, selectShortcutWithText: se, getShortcutFromMessage: le, buildShortcutProperty: ue, sendShortcutDirectly: de } = X7({
|
|
61882
61916
|
props: r,
|
|
61883
61917
|
emit: o,
|
|
61884
61918
|
chatHelper: b,
|
|
@@ -61886,7 +61920,7 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
61886
61920
|
doSendMessage: P,
|
|
61887
61921
|
reportError: v,
|
|
61888
61922
|
selectedShortcut: m
|
|
61889
|
-
}), { messageStatus:
|
|
61923
|
+
}), { messageStatus: fe, messageToolsStatus: me, effectiveMessageTools: he, effectiveUpdateTools: ge, effectiveUserMessageTools: _e, messages: ve, isMessagesLoading: ye, isGenerating: R, currentSession: be, isWelcomeState: xe, openingRemark: Se, effectiveMenuSources: Ce, effectiveSupportUpload: we, chatbotStyle: Te, filteredShortcuts: Ee } = L7({
|
|
61890
61924
|
props: r,
|
|
61891
61925
|
chatHelper: b,
|
|
61892
61926
|
chatBusinessManager: E,
|
|
@@ -61895,48 +61929,48 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
61895
61929
|
isStandaloneMode: x,
|
|
61896
61930
|
isInitialized: S,
|
|
61897
61931
|
selectedShortcut: m
|
|
61898
|
-
}), { handleAgentAction:
|
|
61932
|
+
}), { handleAgentAction: De, handleAgentFeedback: Oe, handleUserAction: ke, handleUserInputConfirm: Ae, handleUserShortcutConfirm: je, handleStopStreaming: Me } = Z7({
|
|
61899
61933
|
emit: o,
|
|
61900
61934
|
chatHelper: b,
|
|
61901
61935
|
chatBusinessManager: E,
|
|
61902
61936
|
cite: M,
|
|
61903
61937
|
focusInput: _,
|
|
61904
|
-
getShortcutFromMessage:
|
|
61905
|
-
buildShortcutProperty:
|
|
61938
|
+
getShortcutFromMessage: le,
|
|
61939
|
+
buildShortcutProperty: ue,
|
|
61906
61940
|
getRequestOptions: () => r.requestOptions,
|
|
61907
61941
|
reportError: v,
|
|
61908
|
-
stopGeneration:
|
|
61909
|
-
}),
|
|
61942
|
+
stopGeneration: re
|
|
61943
|
+
}), Ne = X(() => !S.value || ye.value), Pe = X(() => {
|
|
61910
61944
|
if (r.useAgentName) return b.value?.agent.info.value?.agentName || void 0;
|
|
61911
|
-
}),
|
|
61945
|
+
}), Fe = X(() => {
|
|
61912
61946
|
if (r.enableModelSelect === !1) return;
|
|
61913
61947
|
let e = E.value?.models.value ?? [];
|
|
61914
61948
|
return e.length > 0 ? e : void 0;
|
|
61915
|
-
}),
|
|
61949
|
+
}), Ie = X({
|
|
61916
61950
|
get: () => E.value?.selectedModelName.value ?? "",
|
|
61917
61951
|
set: (e) => {
|
|
61918
61952
|
E.value?.setSelectedModelByName(e);
|
|
61919
61953
|
}
|
|
61920
|
-
}),
|
|
61954
|
+
}), Le = (e) => {
|
|
61921
61955
|
E.value?.setSelectedModel(e);
|
|
61922
61956
|
};
|
|
61923
61957
|
Zn(() => r.models, (e) => {
|
|
61924
61958
|
r.enableModelSelect === !1 || !E.value || e?.length && E.value.setModels(e);
|
|
61925
61959
|
});
|
|
61926
|
-
let { handleConfirmShare:
|
|
61960
|
+
let { handleConfirmShare: Re } = Y7({
|
|
61927
61961
|
emit: o,
|
|
61928
61962
|
chatHelper: b,
|
|
61929
61963
|
isStandaloneMode: x
|
|
61930
|
-
}),
|
|
61964
|
+
}), ze = (e, t) => {
|
|
61931
61965
|
o("execution-panel-change", e, t);
|
|
61932
|
-
},
|
|
61966
|
+
}, Be = async (e) => {
|
|
61933
61967
|
if (r.onCustomTabChange) return r.onCustomTabChange(e);
|
|
61934
61968
|
let t = e.data?.props;
|
|
61935
61969
|
if (t?.task_id != null && t?.node_id) return b.value?.message.getFlowAgentTaskNodeInfo(t.task_id, t.node_id);
|
|
61936
61970
|
};
|
|
61937
61971
|
return t({
|
|
61938
61972
|
sendMessage: (e) => F(e, [[]]),
|
|
61939
|
-
stopGeneration:
|
|
61973
|
+
stopGeneration: re,
|
|
61940
61974
|
switchSession: async (e) => {
|
|
61941
61975
|
if (!D.value) {
|
|
61942
61976
|
console.error("[ChatBot] Cannot switch session: sessionBusinessManager not initialized");
|
|
@@ -61948,9 +61982,9 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
61948
61982
|
v(e, "Failed to switch session");
|
|
61949
61983
|
}
|
|
61950
61984
|
},
|
|
61951
|
-
messages:
|
|
61952
|
-
currentSession:
|
|
61953
|
-
isGenerating:
|
|
61985
|
+
messages: ve,
|
|
61986
|
+
currentSession: be,
|
|
61987
|
+
isGenerating: R,
|
|
61954
61988
|
get isReady() {
|
|
61955
61989
|
return C.value;
|
|
61956
61990
|
},
|
|
@@ -61963,9 +61997,9 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
61963
61997
|
enterShareMode: () => d.value?.enterShareMode(),
|
|
61964
61998
|
exitShareMode: () => d.value?.exitShareMode(),
|
|
61965
61999
|
selectShortcut: (e, t) => {
|
|
61966
|
-
|
|
62000
|
+
se(e, t);
|
|
61967
62001
|
},
|
|
61968
|
-
sendShortcut: (e, t) =>
|
|
62002
|
+
sendShortcut: (e, t) => de(e, t),
|
|
61969
62003
|
updateAgentInfo: async () => {
|
|
61970
62004
|
let e = b.value;
|
|
61971
62005
|
if (!e) return null;
|
|
@@ -61984,9 +62018,9 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
61984
62018
|
class: L([
|
|
61985
62019
|
"ai-chatbot",
|
|
61986
62020
|
r.extCls,
|
|
61987
|
-
{ "welcome-state": V(
|
|
62021
|
+
{ "welcome-state": V(xe) }
|
|
61988
62022
|
]),
|
|
61989
|
-
style: ce(V(
|
|
62023
|
+
style: ce(V(Te))
|
|
61990
62024
|
}, [J(V(U6), {
|
|
61991
62025
|
ref_key: "chatContainerRef",
|
|
61992
62026
|
ref: d,
|
|
@@ -61996,52 +62030,53 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
61996
62030
|
"onUpdate:cite": t[1] ||= (e) => /* @__PURE__ */ Xt(M) ? M.value = e : null,
|
|
61997
62031
|
"render-mode": h.value,
|
|
61998
62032
|
"onUpdate:renderMode": t[2] ||= (e) => h.value = e,
|
|
61999
|
-
"selected-model":
|
|
62000
|
-
"onUpdate:selectedModel": t[3] ||= (e) =>
|
|
62033
|
+
"selected-model": Ie.value,
|
|
62034
|
+
"onUpdate:selectedModel": t[3] ||= (e) => Ie.value = e,
|
|
62001
62035
|
"selected-shortcut": m.value,
|
|
62002
62036
|
"onUpdate:selectedShortcut": t[4] ||= (e) => m.value = e,
|
|
62003
|
-
"chat-loading":
|
|
62037
|
+
"chat-loading": Ne.value,
|
|
62004
62038
|
"common-tippy-options": p.value,
|
|
62005
62039
|
"execution-tab-visible": r.executionTabVisible,
|
|
62006
62040
|
"get-side-render-component": r.getSideRenderComponent,
|
|
62007
62041
|
"get-side-tab-render-component": r.getSideTabRenderComponent,
|
|
62008
|
-
"message-status": V(
|
|
62009
|
-
"message-tools": V(
|
|
62010
|
-
"message-tools-status": V(
|
|
62011
|
-
"menu-sources": V(
|
|
62012
|
-
messages: V(
|
|
62042
|
+
"message-status": V(fe),
|
|
62043
|
+
"message-tools": V(he),
|
|
62044
|
+
"message-tools-status": V(me),
|
|
62045
|
+
"menu-sources": V(Ce),
|
|
62046
|
+
messages: V(ve),
|
|
62013
62047
|
"model-value": V(j),
|
|
62014
|
-
models:
|
|
62015
|
-
"on-agent-action": V(
|
|
62016
|
-
"on-agent-feedback": V(
|
|
62017
|
-
"on-artifact-click": V(
|
|
62018
|
-
"on-custom-tab-change":
|
|
62048
|
+
models: Fe.value,
|
|
62049
|
+
"on-agent-action": V(De),
|
|
62050
|
+
"on-agent-feedback": V(Oe),
|
|
62051
|
+
"on-artifact-click": V(te),
|
|
62052
|
+
"on-custom-tab-change": Be,
|
|
62019
62053
|
"on-interrupt-resume": V(k),
|
|
62020
62054
|
"on-send-message": V(F),
|
|
62021
|
-
"on-stop-sending": V(
|
|
62055
|
+
"on-stop-sending": V(ne),
|
|
62022
62056
|
"on-upload": V(I),
|
|
62023
|
-
"on-user-action": V(
|
|
62024
|
-
"on-user-input-confirm": V(
|
|
62025
|
-
"on-user-shortcut-confirm": V(
|
|
62026
|
-
"opening-remark": V(
|
|
62057
|
+
"on-user-action": V(ke),
|
|
62058
|
+
"on-user-input-confirm": V(Ae),
|
|
62059
|
+
"on-user-shortcut-confirm": V(je),
|
|
62060
|
+
"opening-remark": V(Se),
|
|
62027
62061
|
placeholder: r.placeholder,
|
|
62028
62062
|
"resize-props": a.value,
|
|
62029
62063
|
"shortcut-id": m.value?.id,
|
|
62030
|
-
shortcuts: V(
|
|
62064
|
+
shortcuts: V(Ee),
|
|
62031
62065
|
size: r.size,
|
|
62032
62066
|
timezone: r.timezone,
|
|
62033
|
-
"support-upload": V(
|
|
62034
|
-
"update-tools": V(
|
|
62035
|
-
"user-message-tools": V(
|
|
62036
|
-
"welcome-title":
|
|
62037
|
-
onCollapseChange:
|
|
62038
|
-
onConfirmShare: V(
|
|
62039
|
-
|
|
62040
|
-
|
|
62041
|
-
|
|
62042
|
-
|
|
62043
|
-
|
|
62044
|
-
|
|
62067
|
+
"support-upload": V(we),
|
|
62068
|
+
"update-tools": V(ge),
|
|
62069
|
+
"user-message-tools": V(_e),
|
|
62070
|
+
"welcome-title": Pe.value,
|
|
62071
|
+
onCollapseChange: ze,
|
|
62072
|
+
onConfirmShare: V(Re),
|
|
62073
|
+
onDeleteFile: V(ee),
|
|
62074
|
+
onDeleteShortcut: V(ae),
|
|
62075
|
+
onModelChange: Le,
|
|
62076
|
+
onSelectShortcut: V(ie),
|
|
62077
|
+
onShortcutClose: V(ae),
|
|
62078
|
+
onShortcutSubmit: V(oe),
|
|
62079
|
+
onStopStreaming: V(Me),
|
|
62045
62080
|
"onUpdate:modelValue": V(N)
|
|
62046
62081
|
}, li({
|
|
62047
62082
|
message: Vn(({ message: t, messageToolsStatus: n, onInterruptResume: r }) => [Y(" 消费方提供了 #message slot 时,优先使用消费方的渲染 "), V(s).message ? ui(e.$slots, "message", {
|
|
@@ -62051,12 +62086,12 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
62051
62086
|
onInterruptResume: r
|
|
62052
62087
|
}) : (W(), G(U, { key: 1 }, [Y(" 否则使用默认的 MessageRender "), J(V(g6), {
|
|
62053
62088
|
message: t,
|
|
62054
|
-
"message-tools": V(
|
|
62089
|
+
"message-tools": V(_e),
|
|
62055
62090
|
"message-tools-status": n,
|
|
62056
|
-
"on-action": (e) => V(
|
|
62057
|
-
"on-input-confirm": (e, n) => V(
|
|
62091
|
+
"on-action": (e) => V(ke)(e, t),
|
|
62092
|
+
"on-input-confirm": (e, n) => V(Ae)(t, e, n),
|
|
62058
62093
|
"on-interrupt-resume": r,
|
|
62059
|
-
"on-shortcut-confirm": (e) => V(
|
|
62094
|
+
"on-shortcut-confirm": (e) => V(je)(t, e),
|
|
62060
62095
|
"tippy-options": p.value
|
|
62061
62096
|
}, li({ _: 2 }, [e.$slots.codeHeader ? {
|
|
62062
62097
|
name: "codeHeader",
|
|
@@ -62077,7 +62112,7 @@ var Q7 = /* @__PURE__ */ H({
|
|
|
62077
62112
|
name: "welcome",
|
|
62078
62113
|
fn: Vn((t) => [ui(e.$slots, "welcome", pe(Ga(t)))]),
|
|
62079
62114
|
key: "0"
|
|
62080
|
-
} : void 0]), 1032, /* @__PURE__ */ "aside-collapsed.cite.render-mode.selected-model.selected-shortcut.chat-loading.common-tippy-options.execution-tab-visible.get-side-render-component.get-side-tab-render-component.message-status.message-tools.message-tools-status.menu-sources.messages.model-value.models.on-agent-action.on-agent-feedback.on-artifact-click.on-interrupt-resume.on-send-message.on-stop-sending.on-upload.on-user-action.on-user-input-confirm.on-user-shortcut-confirm.opening-remark.placeholder.resize-props.shortcut-id.shortcuts.size.timezone.support-upload.update-tools.user-message-tools.welcome-title.onConfirmShare.onDeleteShortcut.onSelectShortcut.onShortcutClose.onShortcutSubmit.onStopStreaming.onUpdate:modelValue".split("."))], 6));
|
|
62115
|
+
} : void 0]), 1032, /* @__PURE__ */ "aside-collapsed.cite.render-mode.selected-model.selected-shortcut.chat-loading.common-tippy-options.execution-tab-visible.get-side-render-component.get-side-tab-render-component.message-status.message-tools.message-tools-status.menu-sources.messages.model-value.models.on-agent-action.on-agent-feedback.on-artifact-click.on-interrupt-resume.on-send-message.on-stop-sending.on-upload.on-user-action.on-user-input-confirm.on-user-shortcut-confirm.opening-remark.placeholder.resize-props.shortcut-id.shortcuts.size.timezone.support-upload.update-tools.user-message-tools.welcome-title.onConfirmShare.onDeleteFile.onDeleteShortcut.onSelectShortcut.onShortcutClose.onShortcutSubmit.onStopStreaming.onUpdate:modelValue".split("."))], 6));
|
|
62081
62116
|
}
|
|
62082
62117
|
}), $7 = /* @__PURE__ */ function(e) {
|
|
62083
62118
|
return e.ERROR = "error", e.IDLE = "idle", e.LOADING_AGENT = "loading_agent", e.READY = "ready", e;
|