@huyooo/ai-chat-frontend-vue 0.2.13 → 0.2.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/README.md +85 -77
- package/dist/_baseUniq-Berj5otS.js +477 -0
- package/dist/arc-D4b-De5i.js +83 -0
- package/dist/architecture-U656AL7Q-B1R4o7wt.js +5 -0
- package/dist/architectureDiagram-VXUJARFQ-0H1LzSrf.js +4668 -0
- package/dist/blockDiagram-VD42YOAC-Dd6DMjLf.js +2265 -0
- package/dist/c4Diagram-YG6GDRKO-c6mpIonb.js +1581 -0
- package/dist/channel-CQSBI1fo.js +5 -0
- package/dist/chunk-4BX2VUAB-CfWC7lTG.js +9 -0
- package/dist/chunk-55IACEB6-joM8m2Zv.js +8 -0
- package/dist/chunk-B4BG7PRW-DN94Y3mS.js +1376 -0
- package/dist/chunk-DI55MBZ5-CPRGoFPG.js +1382 -0
- package/dist/chunk-FMBD7UC4-dUKl2TcN.js +19 -0
- package/dist/chunk-QN33PNHL-o3WmqquO.js +20 -0
- package/dist/chunk-QZHKN3VN-Btf62lRF.js +15 -0
- package/dist/chunk-TZMSLE5B-QCPpnm8Y.js +64 -0
- package/dist/classDiagram-2ON5EDUG-ERF9RE9K.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-ERF9RE9K.js +16 -0
- package/dist/clone-B_B1yyxj.js +8 -0
- package/dist/components/ChatPanel.vue.d.ts +11 -7
- package/dist/components/ChatPanel.vue.d.ts.map +1 -1
- package/dist/components/common/SettingsPanel.vue.d.ts +10 -1
- package/dist/components/common/SettingsPanel.vue.d.ts.map +1 -1
- package/dist/components/common/ToggleSwitch.vue.d.ts.map +1 -1
- package/dist/components/input/ChatInput.vue.d.ts +4 -1
- package/dist/components/input/ChatInput.vue.d.ts.map +1 -1
- package/dist/components/input/DropdownSelector.vue.d.ts +10 -0
- package/dist/components/input/DropdownSelector.vue.d.ts.map +1 -1
- package/dist/components/message/MessageBubble.vue.d.ts +2 -2
- package/dist/components/message/MessageBubble.vue.d.ts.map +1 -1
- package/dist/components/message/PartsRenderer.vue.d.ts +6 -0
- package/dist/components/message/PartsRenderer.vue.d.ts.map +1 -1
- package/dist/components/message/parts/CollapsibleCard.vue.d.ts.map +1 -1
- package/dist/components/message/parts/ImagePart.vue.d.ts.map +1 -1
- package/dist/components/message/parts/SearchPart.vue.d.ts.map +1 -1
- package/dist/components/message/parts/TextPart.vue.d.ts +3 -1
- package/dist/components/message/parts/TextPart.vue.d.ts.map +1 -1
- package/dist/components/message/parts/ToolCallPart.vue.d.ts +9 -4
- package/dist/components/message/parts/ToolCallPart.vue.d.ts.map +1 -1
- package/dist/components/message/parts/index.d.ts +5 -1
- package/dist/components/message/parts/index.d.ts.map +1 -1
- package/dist/components/message/parts/visual-predicate.d.ts +7 -0
- package/dist/components/message/parts/visual-predicate.d.ts.map +1 -0
- package/dist/components/message/parts/visual-render.d.ts +2 -0
- package/dist/components/message/parts/visual-render.d.ts.map +1 -0
- package/dist/components/message/parts/visual.d.ts +3 -0
- package/dist/components/message/parts/visual.d.ts.map +1 -0
- package/dist/composables/useChat.d.ts +34 -10
- package/dist/composables/useChat.d.ts.map +1 -1
- package/dist/composables/useImageUpload.d.ts +7 -0
- package/dist/composables/useImageUpload.d.ts.map +1 -1
- package/dist/cose-bilkent-S5V4N54A-C-CkEnIH.js +2608 -0
- package/dist/cytoscape.esm-CjI2IsL8.js +18735 -0
- package/dist/dagre-6UL2VRFP-BbmZysl9.js +446 -0
- package/dist/defaultLocale-D7EN2tov.js +171 -0
- package/dist/diagram-PSM6KHXK-CMnope5e.js +533 -0
- package/dist/diagram-QEK2KX5R-Bc87skpo.js +221 -0
- package/dist/diagram-S2PKOQOG-BtkzC5-o.js +143 -0
- package/dist/erDiagram-Q2GNP2WA-CwQLdjh9.js +842 -0
- package/dist/flowDiagram-NV44I4VS-8ehMD0M4.js +1627 -0
- package/dist/ganttDiagram-JELNMOA3-dLX8Pbvy.js +2670 -0
- package/dist/gitGraph-F6HP7TQM-BBk5qfnx.js +5 -0
- package/dist/gitGraphDiagram-NY62KEGX-DG_fvWrq.js +712 -0
- package/dist/graph-B7BnGhuR.js +381 -0
- package/dist/index-Cr3tTH72.js +83883 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -56433
- package/dist/info-NVLQJR56-eZr6nVr1.js +5 -0
- package/dist/infoDiagram-WHAUD3N6-BcVYTft_.js +24 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q-D4C72gYB.js +834 -0
- package/dist/kanban-definition-3W4ZIXB7-BuSjAlm6.js +721 -0
- package/dist/layout-LjYblgUu.js +1441 -0
- package/dist/linear-DtPqj295.js +259 -0
- package/dist/mermaid-parser.core-DdOZxjrw.js +15189 -0
- package/dist/min-DYbgfxu0.js +38 -0
- package/dist/mindmap-definition-VGOIOE7T-BZxsr4M_.js +787 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/packet-BFZMPI3H-XfNBjRzf.js +5 -0
- package/dist/pie-7BOR55EZ-pJDdOv19.js +5 -0
- package/dist/pieDiagram-ADFJNKIX-DDwfWBNn.js +161 -0
- package/dist/quadrantDiagram-AYHSOK5B-Ddpxuto0.js +1024 -0
- package/dist/radar-NHE76QYJ-jE07d-4Z.js +5 -0
- package/dist/requirementDiagram-UZGBJVZJ-B_TLWQ-N.js +852 -0
- package/dist/sankeyDiagram-TZEHDZUN-C1TWrUpG.js +810 -0
- package/dist/sequenceDiagram-WL72ISMW-B8pqb5YX.js +2518 -0
- package/dist/stateDiagram-FKZM4ZOC-DwNT1ej6.js +263 -0
- package/dist/stateDiagram-v2-4FDKWEC3-CZQUitzd.js +16 -0
- package/dist/style.css +1 -1
- package/dist/timeline-definition-IT6M3QCI-BGdS1wvf.js +799 -0
- package/dist/treemap-KMMF4GRG-B_eEU0Q4.js +5 -0
- package/dist/types/index.d.ts +36 -37
- package/dist/types/index.d.ts.map +1 -1
- package/dist/xychartDiagram-PRI3JC2R-DtwXQqN4.js +1340 -0
- package/package.json +3 -3
- package/src/components/ChatPanel.vue +75 -13
- package/src/components/common/SettingsPanel.vue +169 -0
- package/src/components/input/ChatInput.vue +49 -34
- package/src/components/input/DropdownSelector.vue +175 -18
- package/src/components/message/MessageBubble.vue +61 -40
- package/src/components/message/PartsRenderer.vue +106 -27
- package/src/components/message/parts/CollapsibleCard.vue +8 -3
- package/src/components/message/parts/ImagePart.vue +0 -1
- package/src/components/message/parts/SearchPart.vue +2 -0
- package/src/components/message/parts/TextPart.vue +753 -11
- package/src/components/message/parts/ToolCallPart.vue +315 -246
- package/src/components/message/parts/index.ts +5 -1
- package/src/components/message/parts/visual-predicate.ts +43 -0
- package/src/components/message/parts/visual-render.ts +19 -0
- package/src/components/message/parts/visual.ts +12 -0
- package/src/composables/useChat.ts +560 -92
- package/src/composables/useImageUpload.ts +115 -11
- package/src/index.ts +6 -8
- package/src/styles.css +124 -0
- package/src/types/index.ts +52 -44
- package/dist/components/message/blocks/CodeBlock.vue.d.ts +0 -11
- package/dist/components/message/blocks/CodeBlock.vue.d.ts.map +0 -1
- package/dist/components/message/blocks/TextBlock.vue.d.ts +0 -7
- package/dist/components/message/blocks/TextBlock.vue.d.ts.map +0 -1
- package/dist/components/message/blocks/index.d.ts +0 -6
- package/dist/components/message/blocks/index.d.ts.map +0 -1
- package/dist/components/message/parts/ToolResultPart.vue.d.ts +0 -14
- package/dist/components/message/parts/ToolResultPart.vue.d.ts.map +0 -1
- package/dist/components/message/tool-results/DefaultToolResult.vue.d.ts +0 -4
- package/dist/components/message/tool-results/DefaultToolResult.vue.d.ts.map +0 -1
- package/dist/components/message/tool-results/SearchResults.vue.d.ts +0 -4
- package/dist/components/message/tool-results/SearchResults.vue.d.ts.map +0 -1
- package/dist/components/message/tool-results/WeatherCard.vue.d.ts +0 -4
- package/dist/components/message/tool-results/WeatherCard.vue.d.ts.map +0 -1
- package/dist/components/message/tool-results/index.d.ts +0 -7
- package/dist/components/message/tool-results/index.d.ts.map +0 -1
- package/src/components/message/ContentRenderer.vue +0 -61
- package/src/components/message/ToolResultRenderer.vue +0 -27
- package/src/components/message/blocks/CodeBlock.vue +0 -113
- package/src/components/message/blocks/TextBlock.vue +0 -21
- package/src/components/message/blocks/index.ts +0 -6
- package/src/components/message/parts/ToolResultPart.vue +0 -78
- package/src/components/message/tool-results/DefaultToolResult.vue +0 -45
- package/src/components/message/tool-results/SearchResults.vue +0 -133
- package/src/components/message/tool-results/WeatherCard.vue +0 -139
- package/src/components/message/tool-results/index.ts +0 -7
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { _ as e } from "./index-Cr3tTH72.js";
|
|
2
|
+
var l = /* @__PURE__ */ e(() => `
|
|
3
|
+
/* Font Awesome icon styling - consolidated */
|
|
4
|
+
.label-icon {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
height: 1em;
|
|
7
|
+
overflow: visible;
|
|
8
|
+
vertical-align: -0.125em;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.node .label-icon path {
|
|
12
|
+
fill: currentColor;
|
|
13
|
+
stroke: revert;
|
|
14
|
+
stroke-width: revert;
|
|
15
|
+
}
|
|
16
|
+
`, "getIconStyles");
|
|
17
|
+
export {
|
|
18
|
+
l as g
|
|
19
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _ as a, e as w, l as x } from "./index-Cr3tTH72.js";
|
|
2
|
+
var d = /* @__PURE__ */ a((e, t, i, o) => {
|
|
3
|
+
e.attr("class", i);
|
|
4
|
+
const { width: r, height: h, x: n, y: c } = u(e, t);
|
|
5
|
+
w(e, h, r, o);
|
|
6
|
+
const s = l(n, c, r, h, t);
|
|
7
|
+
e.attr("viewBox", s), x.debug(`viewBox configured: ${s} with padding: ${t}`);
|
|
8
|
+
}, "setupViewPortForSVG"), u = /* @__PURE__ */ a((e, t) => {
|
|
9
|
+
var o;
|
|
10
|
+
const i = ((o = e.node()) == null ? void 0 : o.getBBox()) || { width: 0, height: 0, x: 0, y: 0 };
|
|
11
|
+
return {
|
|
12
|
+
width: i.width + t * 2,
|
|
13
|
+
height: i.height + t * 2,
|
|
14
|
+
x: i.x,
|
|
15
|
+
y: i.y
|
|
16
|
+
};
|
|
17
|
+
}, "calculateDimensionsWithPadding"), l = /* @__PURE__ */ a((e, t, i, o, r) => `${e - r} ${t - r} ${i} ${o}`, "createViewBox");
|
|
18
|
+
export {
|
|
19
|
+
d as s
|
|
20
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { _ as s } from "./index-Cr3tTH72.js";
|
|
2
|
+
var t, e = (t = class {
|
|
3
|
+
/**
|
|
4
|
+
* @param init - Function that creates the default state.
|
|
5
|
+
*/
|
|
6
|
+
constructor(i) {
|
|
7
|
+
this.init = i, this.records = this.init();
|
|
8
|
+
}
|
|
9
|
+
reset() {
|
|
10
|
+
this.records = this.init();
|
|
11
|
+
}
|
|
12
|
+
}, s(t, "ImperativeState"), t);
|
|
13
|
+
export {
|
|
14
|
+
e as I
|
|
15
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { _ as n, U as o, j as l } from "./index-Cr3tTH72.js";
|
|
2
|
+
var x = /* @__PURE__ */ n((s, t) => {
|
|
3
|
+
const e = s.append("rect");
|
|
4
|
+
if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx && e.attr("rx", t.rx), t.ry && e.attr("ry", t.ry), t.attrs !== void 0)
|
|
5
|
+
for (const r in t.attrs)
|
|
6
|
+
e.attr(r, t.attrs[r]);
|
|
7
|
+
return t.class && e.attr("class", t.class), e;
|
|
8
|
+
}, "drawRect"), d = /* @__PURE__ */ n((s, t) => {
|
|
9
|
+
const e = {
|
|
10
|
+
x: t.startx,
|
|
11
|
+
y: t.starty,
|
|
12
|
+
width: t.stopx - t.startx,
|
|
13
|
+
height: t.stopy - t.starty,
|
|
14
|
+
fill: t.fill,
|
|
15
|
+
stroke: t.stroke,
|
|
16
|
+
class: "rect"
|
|
17
|
+
};
|
|
18
|
+
x(s, e).lower();
|
|
19
|
+
}, "drawBackgroundRect"), g = /* @__PURE__ */ n((s, t) => {
|
|
20
|
+
const e = t.text.replace(o, " "), r = s.append("text");
|
|
21
|
+
r.attr("x", t.x), r.attr("y", t.y), r.attr("class", "legend"), r.style("text-anchor", t.anchor), t.class && r.attr("class", t.class);
|
|
22
|
+
const a = r.append("tspan");
|
|
23
|
+
return a.attr("x", t.x + t.textMargin * 2), a.text(e), r;
|
|
24
|
+
}, "drawText"), h = /* @__PURE__ */ n((s, t, e, r) => {
|
|
25
|
+
const a = s.append("image");
|
|
26
|
+
a.attr("x", t), a.attr("y", e);
|
|
27
|
+
const i = l.sanitizeUrl(r);
|
|
28
|
+
a.attr("xlink:href", i);
|
|
29
|
+
}, "drawImage"), m = /* @__PURE__ */ n((s, t, e, r) => {
|
|
30
|
+
const a = s.append("use");
|
|
31
|
+
a.attr("x", t), a.attr("y", e);
|
|
32
|
+
const i = l.sanitizeUrl(r);
|
|
33
|
+
a.attr("xlink:href", `#${i}`);
|
|
34
|
+
}, "drawEmbeddedImage"), y = /* @__PURE__ */ n(() => ({
|
|
35
|
+
x: 0,
|
|
36
|
+
y: 0,
|
|
37
|
+
width: 100,
|
|
38
|
+
height: 100,
|
|
39
|
+
fill: "#EDF2AE",
|
|
40
|
+
stroke: "#666",
|
|
41
|
+
anchor: "start",
|
|
42
|
+
rx: 0,
|
|
43
|
+
ry: 0
|
|
44
|
+
}), "getNoteRect"), p = /* @__PURE__ */ n(() => ({
|
|
45
|
+
x: 0,
|
|
46
|
+
y: 0,
|
|
47
|
+
width: 100,
|
|
48
|
+
height: 100,
|
|
49
|
+
"text-anchor": "start",
|
|
50
|
+
style: "#666",
|
|
51
|
+
textMargin: 0,
|
|
52
|
+
rx: 0,
|
|
53
|
+
ry: 0,
|
|
54
|
+
tspan: !0
|
|
55
|
+
}), "getTextObj");
|
|
56
|
+
export {
|
|
57
|
+
d as a,
|
|
58
|
+
p as b,
|
|
59
|
+
m as c,
|
|
60
|
+
x as d,
|
|
61
|
+
h as e,
|
|
62
|
+
g as f,
|
|
63
|
+
y as g
|
|
64
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-DN94Y3mS.js";
|
|
2
|
+
import { _ as l } from "./index-Cr3tTH72.js";
|
|
3
|
+
var d = {
|
|
4
|
+
parser: e,
|
|
5
|
+
get db() {
|
|
6
|
+
return new t();
|
|
7
|
+
},
|
|
8
|
+
renderer: s,
|
|
9
|
+
styles: r,
|
|
10
|
+
init: /* @__PURE__ */ l((a) => {
|
|
11
|
+
a.class || (a.class = {}), a.class.arrowMarkerAbsolute = a.arrowMarkerAbsolute;
|
|
12
|
+
}, "init")
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
d as diagram
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { s as r, c as s, a as e, C as t } from "./chunk-B4BG7PRW-DN94Y3mS.js";
|
|
2
|
+
import { _ as l } from "./index-Cr3tTH72.js";
|
|
3
|
+
var d = {
|
|
4
|
+
parser: e,
|
|
5
|
+
get db() {
|
|
6
|
+
return new t();
|
|
7
|
+
},
|
|
8
|
+
renderer: s,
|
|
9
|
+
styles: r,
|
|
10
|
+
init: /* @__PURE__ */ l((a) => {
|
|
11
|
+
a.class || (a.class = {}), a.class.arrowMarkerAbsolute = a.arrowMarkerAbsolute;
|
|
12
|
+
}, "init")
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
d as diagram
|
|
16
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
|
-
import { ChatAdapter } from '../adapter';
|
|
2
|
+
import { ChatAdapter, ImageData } from '../adapter';
|
|
3
3
|
import { ModelOption, ChatMode } from '../types';
|
|
4
4
|
import { ToolCompleteEvent } from '../composables/useChat';
|
|
5
5
|
import { WelcomeConfig } from './message/welcome-types';
|
|
@@ -20,8 +20,8 @@ interface Props {
|
|
|
20
20
|
className?: string;
|
|
21
21
|
/** 欢迎页配置 */
|
|
22
22
|
welcomeConfig?: Partial<WelcomeConfig>;
|
|
23
|
-
/**
|
|
24
|
-
|
|
23
|
+
/** 自定义 Part 渲染器 - 根据 part.type 选择渲染组件(如 weather, stock 等) */
|
|
24
|
+
partRenderers?: Record<string, Component>;
|
|
25
25
|
/**
|
|
26
26
|
* 执行步骤折叠模式
|
|
27
27
|
* - 'open': 始终展开
|
|
@@ -52,7 +52,7 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
52
52
|
defaultMode: ChatMode;
|
|
53
53
|
onClose: () => void;
|
|
54
54
|
models: ModelOption[];
|
|
55
|
-
|
|
55
|
+
partRenderers: Record<string, Component>;
|
|
56
56
|
stepsExpandedType: "open" | "close" | "auto";
|
|
57
57
|
hideHeader: boolean;
|
|
58
58
|
className: string;
|
|
@@ -62,6 +62,7 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
62
62
|
chatInputRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
|
|
63
63
|
variant?: "input" | "message";
|
|
64
64
|
value?: string;
|
|
65
|
+
images?: string[];
|
|
65
66
|
isLoading?: boolean;
|
|
66
67
|
adapter?: ChatAdapter;
|
|
67
68
|
mode?: ChatMode;
|
|
@@ -71,7 +72,7 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
71
72
|
thinkingEnabled?: boolean;
|
|
72
73
|
}> & Readonly<{
|
|
73
74
|
onCancel?: (() => any) | undefined;
|
|
74
|
-
onSend?: ((text: string, images?:
|
|
75
|
+
onSend?: ((text: string, images?: ImageData[] | undefined) => any) | undefined;
|
|
75
76
|
"onAt-context"?: (() => any) | undefined;
|
|
76
77
|
"onUpdate:mode"?: ((mode: import('@huyooo/ai-chat-bridge-electron/renderer').ChatMode) => any) | undefined;
|
|
77
78
|
"onUpdate:model"?: ((model: string) => any) | undefined;
|
|
@@ -85,7 +86,7 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
85
86
|
addImages: (files: File[]) => void;
|
|
86
87
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
87
88
|
cancel: () => any;
|
|
88
|
-
send: (text: string, images?:
|
|
89
|
+
send: (text: string, images?: ImageData[] | undefined) => any;
|
|
89
90
|
"at-context": () => any;
|
|
90
91
|
"update:mode": (mode: import('@huyooo/ai-chat-bridge-electron/renderer').ChatMode) => any;
|
|
91
92
|
"update:model": (model: string) => any;
|
|
@@ -98,6 +99,7 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
98
99
|
mode: ChatMode;
|
|
99
100
|
webSearchEnabled: boolean;
|
|
100
101
|
thinkingEnabled: boolean;
|
|
102
|
+
images: string[];
|
|
101
103
|
value: string;
|
|
102
104
|
variant: "input" | "message";
|
|
103
105
|
models: ModelOption[];
|
|
@@ -116,6 +118,7 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
116
118
|
}, Readonly<{
|
|
117
119
|
variant?: "input" | "message";
|
|
118
120
|
value?: string;
|
|
121
|
+
images?: string[];
|
|
119
122
|
isLoading?: boolean;
|
|
120
123
|
adapter?: ChatAdapter;
|
|
121
124
|
mode?: ChatMode;
|
|
@@ -125,7 +128,7 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
125
128
|
thinkingEnabled?: boolean;
|
|
126
129
|
}> & Readonly<{
|
|
127
130
|
onCancel?: (() => any) | undefined;
|
|
128
|
-
onSend?: ((text: string, images?:
|
|
131
|
+
onSend?: ((text: string, images?: ImageData[] | undefined) => any) | undefined;
|
|
129
132
|
"onAt-context"?: (() => any) | undefined;
|
|
130
133
|
"onUpdate:mode"?: ((mode: import('@huyooo/ai-chat-bridge-electron/renderer').ChatMode) => any) | undefined;
|
|
131
134
|
"onUpdate:model"?: ((model: string) => any) | undefined;
|
|
@@ -144,6 +147,7 @@ declare const _default: import('vue').DefineComponent<Props, {
|
|
|
144
147
|
mode: ChatMode;
|
|
145
148
|
webSearchEnabled: boolean;
|
|
146
149
|
thinkingEnabled: boolean;
|
|
150
|
+
images: string[];
|
|
147
151
|
value: string;
|
|
148
152
|
variant: "input" | "message";
|
|
149
153
|
models: ModelOption[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatPanel.vue.d.ts","sourceRoot":"","sources":["../../src/components/ChatPanel.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatPanel.vue.d.ts","sourceRoot":"","sources":["../../src/components/ChatPanel.vue"],"names":[],"mappings":"AA2GA;AAilBA,OAAO,EAA6D,KAAK,SAAS,EAAE,MAAM,KAAK,CAAC;AAEhG,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAWtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,UAAU,KAAK;IACb,iBAAiB;IACjB,OAAO,EAAE,WAAW,CAAC;IACrB,WAAW;IACX,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW;IACX,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,aAAa;IACb,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,YAAY;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY;IACZ,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC,6DAA6D;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC1C;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CAC/C;;IAiWC,cAAc;yBACO,MAAM;IAG3B,0BAA0B;4BACF,MAAM;IAG9B,YAAY;;IAIZ,WAAW;wBACS,MAAM;IAG1B,aAAa;;;;;;;;;kBAvYE,MAAM;iBAEP,QAAQ;aAMZ,MAAM,IAAI;YAJX,WAAW,EAAE;mBAUN,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;uBAOrB,MAAM,GAAG,OAAO,GAAG,MAAM;gBAfhC,OAAO;eAIR,MAAM;mBAEF,OAAO,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4zBxC,wBAWG"}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { AutoRunConfig } from '@huyooo/ai-chat-bridge-electron/renderer';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
allTools?: Array<{
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}>;
|
|
7
|
+
enabledTools?: string[] | undefined;
|
|
8
|
+
};
|
|
2
9
|
type __VLS_PublicProps = {
|
|
3
10
|
'visible': boolean;
|
|
4
11
|
'config': AutoRunConfig;
|
|
5
|
-
};
|
|
12
|
+
} & __VLS_Props;
|
|
6
13
|
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
14
|
"update:visible": (value: boolean) => any;
|
|
8
15
|
save: (config: AutoRunConfig) => any;
|
|
16
|
+
"update:enabledTools": (tools: string[] | undefined) => any;
|
|
9
17
|
"update:config": (value: AutoRunConfig) => any;
|
|
10
18
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
19
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
12
20
|
onSave?: ((config: AutoRunConfig) => any) | undefined;
|
|
21
|
+
"onUpdate:enabledTools"?: ((tools: string[] | undefined) => any) | undefined;
|
|
13
22
|
"onUpdate:config"?: ((value: AutoRunConfig) => any) | undefined;
|
|
14
23
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
24
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/common/SettingsPanel.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SettingsPanel.vue.d.ts","sourceRoot":"","sources":["../../../src/components/common/SettingsPanel.vue"],"names":[],"mappings":"AAmGA;AAkdA,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,0CAA0C,CAAA;AAU1F,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACvD,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;CACpC,CAAC;AAwFF,KAAK,iBAAiB,GAAG;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,aAAa,CAAC;CACvB,GAAG,WAAW,CAAC;;;;;;;;;;;;AAiShB,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleSwitch.vue.d.ts","sourceRoot":"","sources":["../../../src/components/common/ToggleSwitch.vue"],"names":[],"mappings":"AA6EA,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AA8DF,wBAQG"}
|
|
1
|
+
{"version":3,"file":"ToggleSwitch.vue.d.ts","sourceRoot":"","sources":["../../../src/components/common/ToggleSwitch.vue"],"names":[],"mappings":"AAUA;AA6EA,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAC;;;;;;AA8DF,wBAQG"}
|
|
@@ -5,12 +5,14 @@ type __VLS_Props = {
|
|
|
5
5
|
variant?: 'input' | 'message';
|
|
6
6
|
/** 受控值(用于历史消息编辑) */
|
|
7
7
|
value?: string;
|
|
8
|
+
/** 图片数据(用于历史消息编辑) */
|
|
9
|
+
images?: string[];
|
|
8
10
|
isLoading?: boolean;
|
|
9
11
|
/** 由宿主显式传入(@ 面板需要) */
|
|
10
12
|
adapter?: ChatAdapter;
|
|
11
13
|
mode?: ChatMode;
|
|
12
14
|
model?: string;
|
|
13
|
-
/**
|
|
15
|
+
/** 模型列表(tooltip 由后端下发,前端仅透传渲染) */
|
|
14
16
|
models?: ModelOption[];
|
|
15
17
|
webSearchEnabled?: boolean;
|
|
16
18
|
thinkingEnabled?: boolean;
|
|
@@ -46,6 +48,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
|
|
|
46
48
|
mode: ChatMode;
|
|
47
49
|
webSearchEnabled: boolean;
|
|
48
50
|
thinkingEnabled: boolean;
|
|
51
|
+
images: string[];
|
|
49
52
|
value: string;
|
|
50
53
|
variant: "input" | "message";
|
|
51
54
|
models: ModelOption[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/input/ChatInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/input/ChatInput.vue"],"names":[],"mappings":"AAyKA;AA2zBA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAIzD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI5D,KAAK,WAAW,GAAG;IACf,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sBAAsB;IACtB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;;;oBAsRc,MAAM;IAMtB,0BAA0B;uBACP,MAAM;;IAoCzB,WAAW;uBACQ,IAAI,EAAE;;;;;;;;;;;;;;;;;;aAzUb,WAAW;eAFT,OAAO;WAIX,MAAM;UADP,QAAQ;sBAII,OAAO;qBACR,OAAO;YAThB,MAAM,EAAE;WAFT,MAAM;aAFJ,OAAO,GAAG,SAAS;YAWpB,WAAW,EAAE;;;;;;;AAy1B1B,wBAWG"}
|
|
@@ -5,6 +5,15 @@ export interface DropdownOption {
|
|
|
5
5
|
icon?: string;
|
|
6
6
|
/** 分组名称(由后端决定,前端只负责渲染,必填) */
|
|
7
7
|
group?: string;
|
|
8
|
+
/** 模型特性信息(用于 hover 提示) */
|
|
9
|
+
tooltip?: {
|
|
10
|
+
/** 可用功能列表 */
|
|
11
|
+
features?: string[];
|
|
12
|
+
/** 开销信息(数组,分行显示) */
|
|
13
|
+
cost?: string[];
|
|
14
|
+
/** 其他描述信息 */
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
8
17
|
}
|
|
9
18
|
/** 分组后的选项(由后端提供) */
|
|
10
19
|
export interface GroupedOptions {
|
|
@@ -37,6 +46,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
37
46
|
align: "left" | "right";
|
|
38
47
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
39
48
|
selectorRef: HTMLDivElement;
|
|
49
|
+
tooltipRef: HTMLDivElement;
|
|
40
50
|
}, HTMLDivElement>;
|
|
41
51
|
export default _default;
|
|
42
52
|
//# sourceMappingURL=DropdownSelector.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/input/DropdownSelector.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DropdownSelector.vue.d.ts","sourceRoot":"","sources":["../../../src/components/input/DropdownSelector.vue"],"names":[],"mappings":"AA+FA;AA0eA,WAAW;AACX,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0BAA0B;IAC1B,OAAO,CAAC,EAAE;QACR,aAAa;QACb,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,oBAAoB;QACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,aAAa;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED,oBAAoB;AACpB,MAAM,WAAW,cAAc;IAC7B,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,EAAE,CAAC;CACvC;AAED,KAAK,WAAW,GAAG;IACf,aAAa;IACb,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,kCAAkC;IAClC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,YAAY;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,YAAY,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC,WAAW;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B,CAAC;;;;;;cAHW,OAAO;iBAJJ,MAAM;kBAEL,WAAW,GAAG,IAAI;WAIzB,MAAM,GAAG,OAAO;;;;;AAmd5B,wBAUG"}
|
|
@@ -23,6 +23,8 @@ type __VLS_Props = {
|
|
|
23
23
|
stepsExpandedType?: 'open' | 'close' | 'auto';
|
|
24
24
|
/** 工具调用相关 - 通过 props 传递 */
|
|
25
25
|
adapter?: ChatAdapter;
|
|
26
|
+
/** 取消工具调用(通常会中止当前请求/流式输出) */
|
|
27
|
+
onCancelToolCall?: (toolCallId: string) => void;
|
|
26
28
|
autoRunConfig?: AutoRunConfig;
|
|
27
29
|
onSaveConfig?: (config: AutoRunConfig) => Promise<void>;
|
|
28
30
|
};
|
|
@@ -30,12 +32,10 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
30
32
|
copy: () => any;
|
|
31
33
|
send: (text: string) => any;
|
|
32
34
|
regenerate: () => any;
|
|
33
|
-
"view-image": (url: string) => any;
|
|
34
35
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
35
36
|
onCopy?: (() => any) | undefined;
|
|
36
37
|
onSend?: ((text: string) => any) | undefined;
|
|
37
38
|
onRegenerate?: (() => any) | undefined;
|
|
38
|
-
"onView-image"?: ((url: string) => any) | undefined;
|
|
39
39
|
}>, {
|
|
40
40
|
loading: boolean;
|
|
41
41
|
copied: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBubble.vue.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageBubble.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MessageBubble.vue.d.ts","sourceRoot":"","sources":["../../../src/components/message/MessageBubble.vue"],"names":[],"mappings":"AAkFA;AAubA,OAAO,KAAK,EAAE,WAAW,EAA2E,MAAM,aAAa,CAAA;AACvH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAA;AAqB7E,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAA;IAC1B,0BAA0B;IAC1B,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc;IACd,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,aAAa;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,YAAY;IACZ,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;IAClC,sBAAsB;IACtB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,aAAa;IACb,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IAC7C,2BAA2B;IAC3B,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,6BAA6B;IAC7B,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACxD,CAAC;;;;;;;;;;aAfU,OAAO;YAER,OAAO;uBAMI,MAAM,GAAG,OAAO,GAAG,MAAM;;AA+X/C,wBASG"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
1
2
|
import { ContentPart, StepsExpandedType } from '../../types';
|
|
2
3
|
import { ChatAdapter } from '../../adapter';
|
|
3
4
|
import { AutoRunConfig } from '@huyooo/ai-chat-bridge-electron/renderer';
|
|
4
5
|
type __VLS_Props = {
|
|
5
6
|
parts: ContentPart[];
|
|
6
7
|
expandedType?: StepsExpandedType;
|
|
8
|
+
/** 自定义 Part 渲染器(key: part.type, value: 渲染组件) */
|
|
9
|
+
partRenderers?: Record<string, Component>;
|
|
7
10
|
adapter?: ChatAdapter;
|
|
11
|
+
/** 取消工具调用(透传给 ToolCallPart) */
|
|
12
|
+
onCancelToolCall?: (toolCallId: string) => void;
|
|
8
13
|
autoRunConfig?: AutoRunConfig;
|
|
9
14
|
onSaveConfig?: (config: AutoRunConfig) => Promise<void>;
|
|
10
15
|
};
|
|
11
16
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
17
|
expandedType: StepsExpandedType;
|
|
18
|
+
partRenderers: Record<string, Component>;
|
|
13
19
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
14
20
|
export default _default;
|
|
15
21
|
//# sourceMappingURL=PartsRenderer.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartsRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/message/PartsRenderer.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PartsRenderer.vue.d.ts","sourceRoot":"","sources":["../../../src/components/message/PartsRenderer.vue"],"names":[],"mappings":"AA2EA;AAuLA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AACpC,OAAO,KAAK,EACV,WAAW,EACX,iBAAiB,EAOlB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAA;AAU7E,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,YAAY,CAAC,EAAE,iBAAiB,CAAA;IAChC,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAEzC,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACxD,CAAC;;kBATe,iBAAiB;mBAEhB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC;;AA2O3C,wBAQG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/CollapsibleCard.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CollapsibleCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/CollapsibleCard.vue"],"names":[],"mappings":"AA8BA;AAgJA,KAAK,WAAW,GAAG;IACjB,WAAW;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS;IACT,KAAK,EAAE,MAAM,CAAA;IACb,WAAW;IACX,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU;IACV,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW;IACX,UAAU,EAAE,OAAO,CAAA;IACnB,mBAAmB;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,wBAAwB;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAC;AAmBF,iBAAS,cAAc;WAgIT,OAAO,IAA6B;;kCAXX,GAAG;yBACZ,GAAG;;;;EAehC;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;eAlLP,MAAM;cAUP,OAAO;iBAEJ,OAAO;wFA+KrB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImagePart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/ImagePart.vue"],"names":[],"mappings":"AAqBA;
|
|
1
|
+
{"version":3,"file":"ImagePart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/ImagePart.vue"],"names":[],"mappings":"AAqBA;AAsGA,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAC;;AAuHF,wBAOG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchPart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/SearchPart.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchPart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/SearchPart.vue"],"names":[],"mappings":"AAwBA;AA2GA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAErE,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,MAAM,EAAE,SAAS,GAAG,MAAM,CAAA;IAC1B,YAAY,CAAC,EAAE,iBAAiB,CAAA;CACjC,CAAC;;kBADe,iBAAiB;;AAoHlC,wBAQG"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
text: string;
|
|
3
3
|
};
|
|
4
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
4
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
5
|
+
containerRef: HTMLDivElement;
|
|
6
|
+
}, any>;
|
|
5
7
|
export default _default;
|
|
6
8
|
//# sourceMappingURL=TextPart.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextPart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/TextPart.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextPart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/TextPart.vue"],"names":[],"mappings":"AAiEA;AAyxBA,OAAO,0BAA0B,CAAA;AAKjC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAA;CACb,CAAC;;;;AA0VF,wBAOG"}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { ChatAdapter } from '../../../adapter';
|
|
2
2
|
import { AutoRunConfig } from '@huyooo/ai-chat-bridge-electron/renderer';
|
|
3
3
|
import { StepsExpandedType } from '../../../types';
|
|
4
|
-
|
|
4
|
+
type __VLS_Props = {
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
7
7
|
args?: Record<string, unknown>;
|
|
8
8
|
status: 'pending' | 'running' | 'done' | 'error' | 'cancelled' | 'skipped';
|
|
9
|
-
|
|
9
|
+
output?: {
|
|
10
|
+
stdout?: string;
|
|
11
|
+
stderr?: string;
|
|
12
|
+
};
|
|
10
13
|
expandedType?: StepsExpandedType;
|
|
11
14
|
adapter?: ChatAdapter;
|
|
15
|
+
/** 取消工具调用(优先使用上层传入,确保能同步更新 UI 状态) */
|
|
16
|
+
onCancelToolCall?: (toolCallId: string) => void;
|
|
12
17
|
autoRunConfig?: AutoRunConfig;
|
|
13
18
|
onSaveConfig?: (config: AutoRunConfig) => Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
declare const _default: import('vue').DefineComponent<
|
|
19
|
+
};
|
|
20
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
21
|
expandedType: StepsExpandedType;
|
|
17
22
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
18
23
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCallPart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/ToolCallPart.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToolCallPart.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/ToolCallPart.vue"],"names":[],"mappings":"AA0FA;AA2hBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,0CAA0C,CAAA;AAC1F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,CAAA;IAC1E,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;IACD,YAAY,CAAC,EAAE,iBAAiB,CAAA;IAChC,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACxD,CAAC;;kBANe,iBAAiB;;AAyelC,wBAQG"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Part 渲染组件导出
|
|
3
|
+
*
|
|
4
|
+
* 内置 Part 类型:text, thinking, search, tool_call, image, error
|
|
5
|
+
* 自定义 Part 类型(如 weather, stock)通过 partRenderers 注册
|
|
6
|
+
*
|
|
7
|
+
* 注意:代码块由 TextPart 内部处理(通过 parseContent 解析 markdown 中的代码块)
|
|
3
8
|
*/
|
|
4
9
|
export { default as TextPart } from './TextPart.vue';
|
|
5
10
|
export { default as ThinkingPart } from './ThinkingPart.vue';
|
|
6
11
|
export { default as SearchPart } from './SearchPart.vue';
|
|
7
12
|
export { default as ToolCallPart } from './ToolCallPart.vue';
|
|
8
|
-
export { default as ToolResultPart } from './ToolResultPart.vue';
|
|
9
13
|
export { default as ImagePart } from './ImagePart.vue';
|
|
10
14
|
export { default as ErrorPart } from './ErrorPart.vue';
|
|
11
15
|
export { default as CollapsibleCard } from './CollapsibleCard.vue';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function isMermaidLanguage(lang?: string): boolean;
|
|
2
|
+
export declare function isLatexLanguage(lang?: string): boolean;
|
|
3
|
+
export declare function isLatexDocument(code: string): boolean;
|
|
4
|
+
export declare function canVisualizeLatex(code: string): boolean;
|
|
5
|
+
export declare function hasLatexDelimiters(code: string): boolean;
|
|
6
|
+
export declare function shouldShowVisualToggle(lang?: string, code?: string): boolean;
|
|
7
|
+
//# sourceMappingURL=visual-predicate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-predicate.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/visual-predicate.ts"],"names":[],"mappings":"AAIA,wBAAgB,iBAAiB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAgB,eAAe,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAGtD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGrD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAKvD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CASxD;AAED,wBAAgB,sBAAsB,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAI5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual-render.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/visual-render.ts"],"names":[],"mappings":"AAGA,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAa5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visual.d.ts","sourceRoot":"","sources":["../../../../src/components/message/parts/visual.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -63,8 +63,24 @@ export declare function useChat(options: UseChatOptions): {
|
|
|
63
63
|
id: string;
|
|
64
64
|
role: "user" | "assistant";
|
|
65
65
|
parts: ({
|
|
66
|
+
type: "weather";
|
|
67
|
+
city: string;
|
|
68
|
+
temperature: number;
|
|
69
|
+
condition: string;
|
|
70
|
+
humidity: number;
|
|
71
|
+
wind: string;
|
|
72
|
+
reportTime?: string | undefined;
|
|
73
|
+
province?: string | undefined;
|
|
74
|
+
} | {
|
|
75
|
+
[x: string]: unknown;
|
|
76
|
+
type: string;
|
|
77
|
+
} | {
|
|
66
78
|
type: "text";
|
|
67
79
|
text: string;
|
|
80
|
+
} | {
|
|
81
|
+
type: "code";
|
|
82
|
+
content: string;
|
|
83
|
+
language?: string | undefined;
|
|
68
84
|
} | {
|
|
69
85
|
type: "thinking";
|
|
70
86
|
text: string;
|
|
@@ -85,14 +101,10 @@ export declare function useChat(options: UseChatOptions): {
|
|
|
85
101
|
name: string;
|
|
86
102
|
args?: Record<string, unknown> | undefined;
|
|
87
103
|
status: "pending" | "running" | "done" | "error" | "cancelled" | "skipped";
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
name: string;
|
|
93
|
-
args?: Record<string, unknown> | undefined;
|
|
94
|
-
result: unknown;
|
|
95
|
-
status: "done" | "error" | "cancelled" | "skipped";
|
|
104
|
+
output?: {
|
|
105
|
+
stdout?: string | undefined;
|
|
106
|
+
stderr?: string | undefined;
|
|
107
|
+
} | undefined;
|
|
96
108
|
} | {
|
|
97
109
|
type: "image";
|
|
98
110
|
url: string;
|
|
@@ -109,7 +121,7 @@ export declare function useChat(options: UseChatOptions): {
|
|
|
109
121
|
images?: string[] | undefined;
|
|
110
122
|
loading?: boolean | undefined;
|
|
111
123
|
copied?: boolean | undefined;
|
|
112
|
-
timestamp?:
|
|
124
|
+
timestamp?: number | undefined;
|
|
113
125
|
error?: {
|
|
114
126
|
category?: string | undefined;
|
|
115
127
|
message: string;
|
|
@@ -138,7 +150,7 @@ export declare function useChat(options: UseChatOptions): {
|
|
|
138
150
|
cancelRequest: () => void;
|
|
139
151
|
copyMessage: (messageId: string) => Promise<void>;
|
|
140
152
|
regenerateMessage: (messageIndex: number) => void;
|
|
141
|
-
resendFromIndex: (index: number, text: string) => void
|
|
153
|
+
resendFromIndex: (index: number, text: string) => Promise<void>;
|
|
142
154
|
setMode: (value: ChatMode) => void;
|
|
143
155
|
setModel: (value: string) => void;
|
|
144
156
|
setWebSearch: (value: boolean) => void;
|
|
@@ -151,5 +163,17 @@ export declare function useChat(options: UseChatOptions): {
|
|
|
151
163
|
}>;
|
|
152
164
|
loadAutoRunConfig: () => Promise<void>;
|
|
153
165
|
saveAutoRunConfig: (config: AutoRunConfig) => Promise<void>;
|
|
166
|
+
enabledTools: import('vue').Ref<string[] | undefined, string[] | undefined>;
|
|
167
|
+
allTools: import('vue').Ref<{
|
|
168
|
+
name: string;
|
|
169
|
+
description: string;
|
|
170
|
+
}[], {
|
|
171
|
+
name: string;
|
|
172
|
+
description: string;
|
|
173
|
+
}[] | {
|
|
174
|
+
name: string;
|
|
175
|
+
description: string;
|
|
176
|
+
}[]>;
|
|
177
|
+
saveEnabledTools: (tools: string[] | undefined) => Promise<void>;
|
|
154
178
|
};
|
|
155
179
|
//# sourceMappingURL=useChat.d.ts.map
|