@deep-eye/core 0.7.0 → 0.9.1
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/CHANGELOG.md +14 -0
- package/README.md +137 -22
- package/dist/components/chat/AiConversation.vue.d.ts +28 -0
- package/dist/components/chat/AiConversation.vue.d.ts.map +1 -0
- package/dist/components/chat/ChatBot.vue.d.ts +48 -0
- package/dist/components/chat/ChatBot.vue.d.ts.map +1 -0
- package/dist/components/chat/builtInToolRenderers.d.ts +2 -0
- package/dist/components/chat/builtInToolRenderers.d.ts.map +1 -0
- package/dist/components/chat/components/ArtifactPreview.vue.d.ts +15 -0
- package/dist/components/chat/components/ArtifactPreview.vue.d.ts.map +1 -0
- package/dist/components/chat/components/AssistantTrace.vue.d.ts +27 -0
- package/dist/components/chat/components/AssistantTrace.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChartToolRenderer.vue.d.ts +7 -0
- package/dist/components/chat/components/ChartToolRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatActionbar.vue.d.ts +26 -0
- package/dist/components/chat/components/ChatActionbar.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatMessage.vue.d.ts +64 -0
- package/dist/components/chat/components/ChatMessage.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ChatSender.vue.d.ts +58 -0
- package/dist/components/chat/components/ChatSender.vue.d.ts.map +1 -0
- package/dist/components/chat/components/CodeToolRenderer.vue.d.ts +9 -0
- package/dist/components/chat/components/CodeToolRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/EmptyState.vue.d.ts +11 -0
- package/dist/components/chat/components/EmptyState.vue.d.ts.map +1 -0
- package/dist/components/chat/components/MessageBubble.vue.d.ts +64 -0
- package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -0
- package/dist/components/chat/components/MindMapToolRenderer.vue.d.ts +7 -0
- package/dist/components/chat/components/MindMapToolRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/OpenGenUIToolRenderer.vue.d.ts +7 -0
- package/dist/components/chat/components/OpenGenUIToolRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/OpenGenerativeUiChartRenderer.vue.d.ts +9 -0
- package/dist/components/chat/components/OpenGenerativeUiChartRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/OpenGenerativeUiPlanRenderer.vue.d.ts +9 -0
- package/dist/components/chat/components/OpenGenerativeUiPlanRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/OpenGenerativeUiScheduleRenderer.vue.d.ts +9 -0
- package/dist/components/chat/components/OpenGenerativeUiScheduleRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/OpenGenerativeUiThemeRenderer.vue.d.ts +7 -0
- package/dist/components/chat/components/OpenGenerativeUiThemeRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/SearchToolRenderer.vue.d.ts +7 -0
- package/dist/components/chat/components/SearchToolRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/TextPartRenderer.vue.d.ts +19 -0
- package/dist/components/chat/components/TextPartRenderer.vue.d.ts.map +1 -0
- package/dist/components/chat/components/ToolCallPart.vue.d.ts +11 -0
- package/dist/components/chat/components/ToolCallPart.vue.d.ts.map +1 -0
- package/dist/components/chat/components/index.d.ts +17 -0
- package/dist/components/chat/components/index.d.ts.map +1 -0
- package/dist/components/chat/composables/index.d.ts +3 -0
- package/dist/components/chat/composables/index.d.ts.map +1 -0
- package/dist/components/chat/composables/useConversation.d.ts +7 -0
- package/dist/components/chat/composables/useConversation.d.ts.map +1 -0
- package/dist/components/chat/composables/useConversationStream.d.ts +3 -0
- package/dist/components/chat/composables/useConversationStream.d.ts.map +1 -0
- package/dist/components/chat/index.d.ts +9 -0
- package/dist/components/chat/index.d.ts.map +1 -0
- package/dist/components/chat/mdoc/ArtifactBlock.vue.d.ts +13 -0
- package/dist/components/chat/mdoc/ArtifactBlock.vue.d.ts.map +1 -0
- package/dist/components/chat/mdoc/AskUserForm.vue.d.ts +33 -0
- package/dist/components/chat/mdoc/AskUserForm.vue.d.ts.map +1 -0
- package/dist/components/chat/mdoc/ContentNodes.vue.d.ts +16 -0
- package/dist/components/chat/mdoc/ContentNodes.vue.d.ts.map +1 -0
- package/dist/components/chat/mdoc/MediaImageLightbox.vue.d.ts +20 -0
- package/dist/components/chat/mdoc/MediaImageLightbox.vue.d.ts.map +1 -0
- package/dist/components/chat/mdoc/MediaImageStack.vue.d.ts +12 -0
- package/dist/components/chat/mdoc/MediaImageStack.vue.d.ts.map +1 -0
- package/dist/components/chat/mdoc/artifactDownload.d.ts +31 -0
- package/dist/components/chat/mdoc/artifactDownload.d.ts.map +1 -0
- package/dist/components/chat/mdoc/builtInRegistry.d.ts +12 -0
- package/dist/components/chat/mdoc/builtInRegistry.d.ts.map +1 -0
- package/dist/components/chat/mdoc/extractAskForms.d.ts +6 -0
- package/dist/components/chat/mdoc/extractAskForms.d.ts.map +1 -0
- package/dist/components/chat/mdoc/index.d.ts +8 -0
- package/dist/components/chat/mdoc/index.d.ts.map +1 -0
- package/dist/components/chat/mdoc/parser.d.ts +41 -0
- package/dist/components/chat/mdoc/parser.d.ts.map +1 -0
- package/dist/components/chat/mdoc/prompt.d.ts +6 -0
- package/dist/components/chat/mdoc/prompt.d.ts.map +1 -0
- package/dist/components/chat/mdoc/registry.d.ts +15 -0
- package/dist/components/chat/mdoc/registry.d.ts.map +1 -0
- package/dist/components/chat/mdoc/sanitize.d.ts +2 -0
- package/dist/components/chat/mdoc/sanitize.d.ts.map +1 -0
- package/dist/components/chat/mdoc/textContent.d.ts +38 -0
- package/dist/components/chat/mdoc/textContent.d.ts.map +1 -0
- package/dist/components/chat/openGenerativeUi.d.ts +25 -0
- package/dist/components/chat/openGenerativeUi.d.ts.map +1 -0
- package/dist/components/chat/presentation.d.ts +27 -0
- package/dist/components/chat/presentation.d.ts.map +1 -0
- package/dist/components/chat/toolRenderers.d.ts +8 -0
- package/dist/components/chat/toolRenderers.d.ts.map +1 -0
- package/dist/components/chat/types.d.ts +230 -0
- package/dist/components/chat/types.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/visualization/D3MindMap.vue.d.ts +83 -0
- package/dist/components/visualization/D3MindMap.vue.d.ts.map +1 -0
- package/dist/components/visualization/index.d.ts +5 -0
- package/dist/components/visualization/index.d.ts.map +1 -0
- package/dist/components/visualization/themes.d.ts +40 -0
- package/dist/components/visualization/themes.d.ts.map +1 -0
- package/dist/components/visualization/types.d.ts +291 -0
- package/dist/components/visualization/types.d.ts.map +1 -0
- package/dist/components/visualization/utils.d.ts +44 -0
- package/dist/components/visualization/utils.d.ts.map +1 -0
- package/dist/composables/index.d.ts +3 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/useMindMapLayout.d.ts +16 -0
- package/dist/composables/useMindMapLayout.d.ts.map +1 -0
- package/dist/composables/useMindMapTheme.d.ts +43 -0
- package/dist/composables/useMindMapTheme.d.ts.map +1 -0
- package/dist/index.cjs +130 -26
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6161 -5415
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textContent.d.ts","sourceRoot":"","sources":["../../../../src/components/chat/mdoc/textContent.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,aAAa,qCAAa,CAAA;AAGhC,wBAAgB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAYnD;AAID,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,CAAA;AAEzC,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACxD;IACE,IAAI,EAAE,aAAa,CAAA;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACzD,GACD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AA8E9D;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CA0DpE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Matches OpenGenerativeUI's activity type without importing its runtime. */
|
|
2
|
+
export declare const OPEN_GENERATIVE_UI_ACTIVITY_TYPE: "open-generative-ui";
|
|
3
|
+
/** Tool and activity names registered by OpenGenerativeUI's `apps/app` demo. */
|
|
4
|
+
export declare const OPEN_GENERATIVE_UI_OUTPUT_NAMES: {
|
|
5
|
+
readonly toggleTheme: "toggleTheme";
|
|
6
|
+
readonly pieChart: "pieChart";
|
|
7
|
+
readonly barChart: "barChart";
|
|
8
|
+
readonly planVisualization: "plan_visualization";
|
|
9
|
+
readonly scheduleTime: "scheduleTime";
|
|
10
|
+
readonly defaultTool: "default-tool";
|
|
11
|
+
readonly activity: "open-generative-ui";
|
|
12
|
+
};
|
|
13
|
+
export type OpenGenerativeUiOutputName = (typeof OPEN_GENERATIVE_UI_OUTPUT_NAMES)[keyof typeof OPEN_GENERATIVE_UI_OUTPUT_NAMES];
|
|
14
|
+
export type OpenGenerativeUiOutputKind = 'frontend-tool' | 'component' | 'render-tool' | 'human-in-the-loop' | 'default-tool' | 'activity';
|
|
15
|
+
export interface OpenGenerativeUiOutputCatalogEntry {
|
|
16
|
+
name: OpenGenerativeUiOutputName;
|
|
17
|
+
kind: OpenGenerativeUiOutputKind;
|
|
18
|
+
renderer: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Complete output registry from OpenGenerativeUI's `useGenerativeUIExamples`
|
|
22
|
+
* plus its `renderActivityMessages` registration.
|
|
23
|
+
*/
|
|
24
|
+
export declare const OPEN_GENERATIVE_UI_OUTPUT_CATALOG: readonly OpenGenerativeUiOutputCatalogEntry[];
|
|
25
|
+
//# sourceMappingURL=openGenerativeUi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openGenerativeUi.d.ts","sourceRoot":"","sources":["../../../src/components/chat/openGenerativeUi.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,eAAO,MAAM,gCAAgC,EAAG,oBAA6B,CAAA;AAE7E,gFAAgF;AAChF,eAAO,MAAM,+BAA+B;;;;;;;;CAQlC,CAAA;AAEV,MAAM,MAAM,0BAA0B,GACpC,CAAC,OAAO,+BAA+B,CAAC,CAAC,MAAM,OAAO,+BAA+B,CAAC,CAAA;AAExF,MAAM,MAAM,0BAA0B,GAClC,eAAe,GACf,WAAW,GACX,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,UAAU,CAAA;AAEd,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,0BAA0B,CAAA;IAChC,IAAI,EAAE,0BAA0B,CAAA;IAChC,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,iCAAiC,EAAE,SAAS,kCAAkC,EA4B1F,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type AssistantTraceEntry = {
|
|
2
|
+
id: string;
|
|
3
|
+
type: 'turn';
|
|
4
|
+
turn: string;
|
|
5
|
+
} | {
|
|
6
|
+
id: string;
|
|
7
|
+
type: 'summary';
|
|
8
|
+
content: string;
|
|
9
|
+
complete: boolean;
|
|
10
|
+
} | {
|
|
11
|
+
id: string;
|
|
12
|
+
type: 'tool';
|
|
13
|
+
raw: string;
|
|
14
|
+
name: string;
|
|
15
|
+
argumentsText: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Produces the user-facing portion of mixed agent output without changing the
|
|
19
|
+
* OpenAI-compatible SSE payload or the stored message content.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getAssistantDisplayContent(content: string | undefined): string;
|
|
22
|
+
/**
|
|
23
|
+
* Extracts execution markers from mixed agent content for the optional trace
|
|
24
|
+
* view. It reads the original content and never changes the stored message.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getAssistantTraceEntries(content: string | undefined): AssistantTraceEntry[];
|
|
27
|
+
//# sourceMappingURL=presentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../src/components/chat/presentation.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,mBAAmB,GAC3B;IACE,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,GACD;IACE,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;CAClB,GACD;IACE,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAEL;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAQ9E;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,mBAAmB,EAAE,CAiD3F"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ToolRenderer } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Registers a renderer for one function name. The returned disposer restores
|
|
4
|
+
* the renderer that was present before this registration.
|
|
5
|
+
*/
|
|
6
|
+
export declare function registerToolRenderer(toolName: string, renderer: ToolRenderer): () => void;
|
|
7
|
+
export declare function resolveToolRenderer(toolName: string): ToolRenderer | undefined;
|
|
8
|
+
//# sourceMappingURL=toolRenderers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolRenderers.d.ts","sourceRoot":"","sources":["../../../src/components/chat/toolRenderers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAI3C;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,IAAI,CASzF;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAE9E"}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import type { Component, Ref } from 'vue';
|
|
2
|
+
/** The three OpenAI chat roles rendered by AiConversation. */
|
|
3
|
+
export type ConversationRole = 'user' | 'assistant' | 'tool';
|
|
4
|
+
export type AutoScrollMode = 'always' | 'smart' | 'off';
|
|
5
|
+
export type ConversationStreamStatus = 'idle' | 'streaming' | 'completed' | 'aborted' | 'error';
|
|
6
|
+
export type ToolCallStatus = 'pending' | 'running' | 'success' | 'error';
|
|
7
|
+
/**
|
|
8
|
+
* OpenAI-compatible message data accepted by AiConversation.
|
|
9
|
+
*
|
|
10
|
+
* `isStreaming` is an optional rendering hint maintained by useConversation;
|
|
11
|
+
* callers passing static OpenAI messages never need to set it.
|
|
12
|
+
*/
|
|
13
|
+
export interface ConversationMessage {
|
|
14
|
+
id: string;
|
|
15
|
+
role: ConversationRole;
|
|
16
|
+
content?: string;
|
|
17
|
+
/** Visible reasoning text, rendered separately from the final answer. */
|
|
18
|
+
reasoning?: string;
|
|
19
|
+
isStreaming?: boolean;
|
|
20
|
+
tool_calls?: ConversationToolCall[];
|
|
21
|
+
toolStatus?: ToolCallStatus;
|
|
22
|
+
toolResult?: unknown;
|
|
23
|
+
toolError?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ConversationToolCall {
|
|
26
|
+
id: string;
|
|
27
|
+
type: 'function';
|
|
28
|
+
function: {
|
|
29
|
+
name: string;
|
|
30
|
+
arguments: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface OpenGenUIContent {
|
|
34
|
+
type: string;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}
|
|
37
|
+
export type ToolRenderer = Component;
|
|
38
|
+
export interface ChatActionbarCopyPayload {
|
|
39
|
+
message: ConversationMessage;
|
|
40
|
+
text: string;
|
|
41
|
+
}
|
|
42
|
+
export interface ChatMessageProps {
|
|
43
|
+
message: ConversationMessage;
|
|
44
|
+
theme?: ConversationTheme;
|
|
45
|
+
userAvatar?: string;
|
|
46
|
+
assistantAvatar?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ConversationToolCallDelta {
|
|
49
|
+
/** Index into the assistant message's tool_calls array. */
|
|
50
|
+
index: number;
|
|
51
|
+
id?: string;
|
|
52
|
+
function?: {
|
|
53
|
+
name?: string;
|
|
54
|
+
argumentsDelta?: string;
|
|
55
|
+
};
|
|
56
|
+
/** Required for unambiguous lifecycle updates when several tools are active. */
|
|
57
|
+
toolStatus?: ToolCallStatus;
|
|
58
|
+
toolResult?: unknown;
|
|
59
|
+
toolError?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A frontend-friendly form of `choices[0].delta`.
|
|
63
|
+
*
|
|
64
|
+
* `id` is the local ConversationMessage id.
|
|
65
|
+
*/
|
|
66
|
+
export interface ConversationDelta {
|
|
67
|
+
id: string;
|
|
68
|
+
role?: ConversationRole;
|
|
69
|
+
contentDelta?: string;
|
|
70
|
+
/** Incremental visible reasoning text. */
|
|
71
|
+
reasoningDelta?: string;
|
|
72
|
+
done?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/** A function call delta in an OpenAI-compatible chat completion chunk. */
|
|
75
|
+
export interface OpenAiChatCompletionToolCallDelta {
|
|
76
|
+
index: number;
|
|
77
|
+
id?: string;
|
|
78
|
+
type?: 'function';
|
|
79
|
+
function?: {
|
|
80
|
+
name?: string;
|
|
81
|
+
arguments?: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/** The `choices[].delta` payload in an OpenAI-compatible SSE chunk. */
|
|
85
|
+
export interface OpenAiChatCompletionDelta {
|
|
86
|
+
role?: 'assistant';
|
|
87
|
+
content?: string | null;
|
|
88
|
+
/** Used by reasoning-capable OpenAI-compatible providers. */
|
|
89
|
+
reasoning_content?: string | null;
|
|
90
|
+
/** Alternate field used by some OpenAI-compatible providers. */
|
|
91
|
+
reasoning?: string | null;
|
|
92
|
+
tool_calls?: OpenAiChatCompletionToolCallDelta[];
|
|
93
|
+
}
|
|
94
|
+
/** One choice in an OpenAI-compatible `chat.completion.chunk` response. */
|
|
95
|
+
export interface OpenAiChatCompletionChoice {
|
|
96
|
+
index: number;
|
|
97
|
+
delta: OpenAiChatCompletionDelta;
|
|
98
|
+
/** `null`, `"null"`, and `""` mean that streaming continues. */
|
|
99
|
+
finish_reason: string | null;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* OpenAI-compatible SSE payload accepted by `useConversation().appendDelta`.
|
|
103
|
+
* `session_id` is included for compatible backends.
|
|
104
|
+
*/
|
|
105
|
+
export interface OpenAiChatCompletionChunk {
|
|
106
|
+
id: string;
|
|
107
|
+
object: 'chat.completion.chunk';
|
|
108
|
+
created: number;
|
|
109
|
+
model: string;
|
|
110
|
+
session_id?: string;
|
|
111
|
+
choices: OpenAiChatCompletionChoice[];
|
|
112
|
+
}
|
|
113
|
+
/** Input accepted by `useConversation().appendDelta`. */
|
|
114
|
+
export type ConversationStreamInput = ConversationDelta | OpenAiChatCompletionChunk | string;
|
|
115
|
+
export interface ConversationTheme {
|
|
116
|
+
/** CSS custom-property references supplied by the consuming design system. */
|
|
117
|
+
userBubbleBg?: string;
|
|
118
|
+
userBubbleColor?: string;
|
|
119
|
+
userBubbleBorderColor?: string;
|
|
120
|
+
assistantBubbleBg?: string;
|
|
121
|
+
assistantBubbleColor?: string;
|
|
122
|
+
assistantBubbleBorderColor?: string;
|
|
123
|
+
toolCardBg?: string;
|
|
124
|
+
toolCardBorderColor?: string;
|
|
125
|
+
toolPendingColor?: string;
|
|
126
|
+
toolRunningColor?: string;
|
|
127
|
+
toolSuccessColor?: string;
|
|
128
|
+
toolErrorColor?: string;
|
|
129
|
+
borderRadius?: string;
|
|
130
|
+
spacing?: string;
|
|
131
|
+
}
|
|
132
|
+
export interface ConversationAskFormAnswer {
|
|
133
|
+
formId: string;
|
|
134
|
+
question: string;
|
|
135
|
+
value: string;
|
|
136
|
+
label?: string;
|
|
137
|
+
/** True when an optional question was skipped. */
|
|
138
|
+
skipped?: boolean;
|
|
139
|
+
}
|
|
140
|
+
/** Bubbled from interactive content tags such as ask-form or artifact. */
|
|
141
|
+
export interface ConversationUiAction {
|
|
142
|
+
type: 'submit' | 'open-artifact';
|
|
143
|
+
value?: string;
|
|
144
|
+
label?: string;
|
|
145
|
+
source?: string;
|
|
146
|
+
/** Stable form identifier from `ask-form id`; falls back to the parsed node id. */
|
|
147
|
+
formId?: string;
|
|
148
|
+
/** The ask-form question associated with this submission. */
|
|
149
|
+
question?: string;
|
|
150
|
+
/** All answers from a multi-question ask-form submission, in display order. */
|
|
151
|
+
answers?: ConversationAskFormAnswer[];
|
|
152
|
+
/** `open-artifact` payload: stable id from `artifact id`, falls back to the parsed node id. */
|
|
153
|
+
artifactId?: string;
|
|
154
|
+
/** `open-artifact` payload: card title. */
|
|
155
|
+
title?: string;
|
|
156
|
+
/** `open-artifact` payload: html|code|markdown|text (text) or pdf|word|excel|ppt|zip|file (file). */
|
|
157
|
+
artifactType?: string;
|
|
158
|
+
/** `open-artifact` payload: language annotation when artifactType is `code`. */
|
|
159
|
+
language?: string;
|
|
160
|
+
/** `open-artifact` payload: inline content for text-type artifacts (from `slotText`). */
|
|
161
|
+
content?: string;
|
|
162
|
+
/** `open-artifact` payload: file URL for file-type artifacts. */
|
|
163
|
+
src?: string;
|
|
164
|
+
}
|
|
165
|
+
export interface AiConversationProps {
|
|
166
|
+
/** Accepts a static array or the messages Ref returned by conversation composables. */
|
|
167
|
+
messages: readonly ConversationMessage[] | Ref<readonly ConversationMessage[]>;
|
|
168
|
+
theme?: ConversationTheme;
|
|
169
|
+
autoScroll?: AutoScrollMode;
|
|
170
|
+
/** 用户头像 URL;未传且无 `#user-avatar` 插槽时不显示头像 */
|
|
171
|
+
userAvatar?: string;
|
|
172
|
+
/** 助手头像 URL;未传时使用内置标识 */
|
|
173
|
+
assistantAvatar?: string;
|
|
174
|
+
}
|
|
175
|
+
export interface AiConversationExpose {
|
|
176
|
+
scrollToBottom: () => void;
|
|
177
|
+
}
|
|
178
|
+
export interface UseConversationReturn {
|
|
179
|
+
messages: Ref<ConversationMessage[]>;
|
|
180
|
+
appendDelta: (delta: ConversationStreamInput) => void;
|
|
181
|
+
setMessages: (messages: ConversationMessage[]) => void;
|
|
182
|
+
reset: () => void;
|
|
183
|
+
}
|
|
184
|
+
export interface ConversationStreamConsumeOptions {
|
|
185
|
+
/** Continue the last assistant message and ignore already consumed event IDs. */
|
|
186
|
+
resume?: boolean;
|
|
187
|
+
signal?: AbortSignal;
|
|
188
|
+
}
|
|
189
|
+
export type ConversationStreamSource = Response | Promise<Response> | ReadableStream<Uint8Array>;
|
|
190
|
+
export interface UseConversationStreamReturn {
|
|
191
|
+
messages: Ref<ConversationMessage[]>;
|
|
192
|
+
status: Ref<ConversationStreamStatus>;
|
|
193
|
+
error: Ref<Error | null>;
|
|
194
|
+
/** `event: session` data used only by the runKeep resume request. */
|
|
195
|
+
runSessionId: Ref<string | null>;
|
|
196
|
+
/** Chunk `session_id` used by the next runKeep chat request. */
|
|
197
|
+
chatSessionId: Ref<string | null>;
|
|
198
|
+
/** Last successfully consumed numeric SSE id; `-1` before the first event. */
|
|
199
|
+
lastEventId: Ref<number>;
|
|
200
|
+
consume: (input: ConversationStreamSource, options?: ConversationStreamConsumeOptions) => Promise<void>;
|
|
201
|
+
abort: () => void;
|
|
202
|
+
reset: () => void;
|
|
203
|
+
}
|
|
204
|
+
export interface ChatSenderTheme {
|
|
205
|
+
inputBg?: string;
|
|
206
|
+
inputBorder?: string;
|
|
207
|
+
inputFocusBorder?: string;
|
|
208
|
+
buttonPrimaryBg?: string;
|
|
209
|
+
buttonPrimaryColor?: string;
|
|
210
|
+
buttonSecondaryBg?: string;
|
|
211
|
+
buttonSecondaryColor?: string;
|
|
212
|
+
}
|
|
213
|
+
export interface ChatSenderProps {
|
|
214
|
+
placeholder?: string;
|
|
215
|
+
disabled?: boolean;
|
|
216
|
+
showAttachment?: boolean;
|
|
217
|
+
showToolbar?: boolean;
|
|
218
|
+
maxRows?: number;
|
|
219
|
+
modelValue?: string;
|
|
220
|
+
theme?: ChatSenderTheme;
|
|
221
|
+
}
|
|
222
|
+
export interface ChatBotProps {
|
|
223
|
+
messages: readonly ConversationMessage[] | Ref<readonly ConversationMessage[]>;
|
|
224
|
+
showSidebar?: boolean;
|
|
225
|
+
sidebarWidth?: string | number;
|
|
226
|
+
senderConfig?: Partial<ChatSenderProps>;
|
|
227
|
+
conversationConfig?: Partial<AiConversationProps>;
|
|
228
|
+
theme?: ConversationTheme;
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0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,CAAC,EAAE,MAAM,CAAA;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,eAAe,CAAA;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,SAAS,mBAAmB,EAAE,GAAG,GAAG,CAAC,SAAS,mBAAmB,EAAE,CAAC,CAAA;IAC9E,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IACvC,kBAAkB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACjD,KAAK,CAAC,EAAE,iBAAiB,CAAA;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,QAAQ,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { D3MindMapProps, MindMapData, MindMapNode, ExportOptions } from './types';
|
|
2
|
+
declare var __VLS_1: {
|
|
3
|
+
zoomIn: () => void;
|
|
4
|
+
zoomOut: () => void;
|
|
5
|
+
fit: () => void;
|
|
6
|
+
toCenter: () => void;
|
|
7
|
+
expandAll: () => void;
|
|
8
|
+
collapseAll: () => void;
|
|
9
|
+
exportImage: (format?: "png" | "svg", options?: ExportOptions) => Promise<Blob>;
|
|
10
|
+
scale: number;
|
|
11
|
+
visibleNodeCount: number;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
toolbar?: (props: typeof __VLS_1) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<D3MindMapProps, {
|
|
17
|
+
getData: () => any;
|
|
18
|
+
setData: (data: any) => void;
|
|
19
|
+
toCenter: () => void;
|
|
20
|
+
expandAll: (expand: boolean) => void;
|
|
21
|
+
expandNode: (nodeId: string) => void;
|
|
22
|
+
collapseNode: (nodeId: string) => void;
|
|
23
|
+
zoomIn: () => void;
|
|
24
|
+
zoomOut: () => void;
|
|
25
|
+
setZoom: (scale: number) => void;
|
|
26
|
+
getZoom: () => number;
|
|
27
|
+
getInstance: () => {
|
|
28
|
+
treeData: any;
|
|
29
|
+
nodeData: any;
|
|
30
|
+
};
|
|
31
|
+
fit: () => void;
|
|
32
|
+
fitToWindow: () => void;
|
|
33
|
+
fitToNode: (nodeId: string) => void;
|
|
34
|
+
getNodeById: (nodeId: string) => any | null;
|
|
35
|
+
updateNode: (nodeId: string, data: Record<string, any>) => void;
|
|
36
|
+
exportImage: (format?: "png" | "svg", options?: ExportOptions) => Promise<Blob>;
|
|
37
|
+
getVisibleNodes: () => any[];
|
|
38
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
39
|
+
change: (data: MindMapData) => any;
|
|
40
|
+
"node-click": (node: MindMapNode, event: MouseEvent) => any;
|
|
41
|
+
"node-dblclick": (node: MindMapNode, event: MouseEvent) => any;
|
|
42
|
+
"node-contextmenu": (node: MindMapNode, event: MouseEvent) => any;
|
|
43
|
+
"node-mouseenter": (node: MindMapNode, event: MouseEvent) => any;
|
|
44
|
+
"node-mouseleave": (node: MindMapNode, event: MouseEvent) => any;
|
|
45
|
+
"node-expand": (node: MindMapNode) => any;
|
|
46
|
+
"node-collapse": (node: MindMapNode) => any;
|
|
47
|
+
zoom: (scale: number) => any;
|
|
48
|
+
pan: (transform: import("./types").TransformInfo) => any;
|
|
49
|
+
download: () => any;
|
|
50
|
+
ready: () => any;
|
|
51
|
+
}, string, import("vue").PublicProps, Readonly<D3MindMapProps> & Readonly<{
|
|
52
|
+
onChange?: ((data: MindMapData) => any) | undefined;
|
|
53
|
+
"onNode-click"?: ((node: MindMapNode, event: MouseEvent) => any) | undefined;
|
|
54
|
+
"onNode-dblclick"?: ((node: MindMapNode, event: MouseEvent) => any) | undefined;
|
|
55
|
+
"onNode-contextmenu"?: ((node: MindMapNode, event: MouseEvent) => any) | undefined;
|
|
56
|
+
"onNode-mouseenter"?: ((node: MindMapNode, event: MouseEvent) => any) | undefined;
|
|
57
|
+
"onNode-mouseleave"?: ((node: MindMapNode, event: MouseEvent) => any) | undefined;
|
|
58
|
+
"onNode-expand"?: ((node: MindMapNode) => any) | undefined;
|
|
59
|
+
"onNode-collapse"?: ((node: MindMapNode) => any) | undefined;
|
|
60
|
+
onZoom?: ((scale: number) => any) | undefined;
|
|
61
|
+
onPan?: ((transform: import("./types").TransformInfo) => any) | undefined;
|
|
62
|
+
onDownload?: (() => any) | undefined;
|
|
63
|
+
onReady?: (() => any) | undefined;
|
|
64
|
+
}>, {
|
|
65
|
+
width: string | number;
|
|
66
|
+
height: string | number;
|
|
67
|
+
data: MindMapData;
|
|
68
|
+
readonly: boolean;
|
|
69
|
+
showToolbar: boolean;
|
|
70
|
+
showDownload: boolean;
|
|
71
|
+
showCounts: boolean;
|
|
72
|
+
showScale: boolean;
|
|
73
|
+
toolbarPosition: "top" | "right" | "bottom" | "left";
|
|
74
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
75
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
76
|
+
declare const _default: typeof __VLS_export;
|
|
77
|
+
export default _default;
|
|
78
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
79
|
+
new (): {
|
|
80
|
+
$slots: S;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=D3MindMap.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"D3MindMap.vue.d.ts","sourceRoot":"","sources":["../../../src/components/visualization/D3MindMap.vue"],"names":[],"mappings":"AA45EA,OAAO,KAAK,EACV,cAAc,EAEd,WAAW,EACX,WAAW,EAKX,aAAa,EACd,MAAM,SAAS,CAAA;AA00EhB,QAAA,IAAI,OAAO;;;;;;;2BAnlBD,KAAK,GAAG,KAAK,YACX,aAAa,KACtB,OAAO,CAAC,IAAI,CAAC;;;CAilBM,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAS/C,QAAA,MAAM,UAAU;mBAtkCI,GAAG;oBA2BA,GAAG;;wBAsRC,OAAO;yBAyUN,MAAM;2BAQJ,MAAM;;;qBAvMZ,MAAM;mBAgBV,MAAM;;;;;;;wBAuKK,MAAM;0BANR,MAAM,KAAG,GAAG,GAAG,IAAI;yBA8BpB,MAAM,QAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;2BAlKnD,KAAK,GAAG,KAAK,YACX,aAAa,KACtB,OAAO,CAAC,IAAI,CAAC;2BA6KY,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAob/B,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/visualization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACtD,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Theme } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 默认主题(保持原有样式)
|
|
4
|
+
*/
|
|
5
|
+
export declare const defaultTheme: Theme;
|
|
6
|
+
/**
|
|
7
|
+
* 深色主题 - 参考 XMind Dark
|
|
8
|
+
*/
|
|
9
|
+
export declare const darkTheme: Theme;
|
|
10
|
+
/**
|
|
11
|
+
* 彩色主题 - 参考 MindNode Rainbow
|
|
12
|
+
*/
|
|
13
|
+
export declare const colorfulTheme: Theme;
|
|
14
|
+
/**
|
|
15
|
+
* 极简主题 - 参考 Coggle Clean
|
|
16
|
+
*/
|
|
17
|
+
export declare const minimalTheme: Theme;
|
|
18
|
+
/**
|
|
19
|
+
* 商务主题 - 参考 XMind Business
|
|
20
|
+
*/
|
|
21
|
+
export declare const professionalTheme: Theme;
|
|
22
|
+
/**
|
|
23
|
+
* 所有预设主题
|
|
24
|
+
*/
|
|
25
|
+
export declare const themes: {
|
|
26
|
+
default: Theme;
|
|
27
|
+
dark: Theme;
|
|
28
|
+
colorful: Theme;
|
|
29
|
+
minimal: Theme;
|
|
30
|
+
professional: Theme;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* 根据主题名称获取主题
|
|
34
|
+
*/
|
|
35
|
+
export declare function getTheme(name: keyof typeof themes): Theme;
|
|
36
|
+
/**
|
|
37
|
+
* 合并主题配置
|
|
38
|
+
*/
|
|
39
|
+
export declare function mergeTheme(base: Theme, override: Partial<Theme>): Theme;
|
|
40
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../../../src/components/visualization/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAwC1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAwCvB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAwC3B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAgC1B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAwC/B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAA;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,MAAM,GAAG,KAAK,CAEzD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAqBvE"}
|