@deep-eye/core 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/README.md +16 -4
  2. package/dist/components/chat/AiConversation.vue.d.ts +21 -0
  3. package/dist/components/chat/AiConversation.vue.d.ts.map +1 -0
  4. package/dist/components/chat/__tests__/AiConversation.spec.d.ts +2 -0
  5. package/dist/components/chat/__tests__/AiConversation.spec.d.ts.map +1 -0
  6. package/dist/components/chat/__tests__/MessageBubble.spec.d.ts +2 -0
  7. package/dist/components/chat/__tests__/MessageBubble.spec.d.ts.map +1 -0
  8. package/dist/components/chat/__tests__/MindMapToolRenderer.spec.d.ts +2 -0
  9. package/dist/components/chat/__tests__/MindMapToolRenderer.spec.d.ts.map +1 -0
  10. package/dist/components/chat/__tests__/OpenGenUIToolRenderer.spec.d.ts +2 -0
  11. package/dist/components/chat/__tests__/OpenGenUIToolRenderer.spec.d.ts.map +1 -0
  12. package/dist/components/chat/__tests__/OpenGenerativeUiScheduleRenderer.spec.d.ts +2 -0
  13. package/dist/components/chat/__tests__/OpenGenerativeUiScheduleRenderer.spec.d.ts.map +1 -0
  14. package/dist/components/chat/__tests__/SearchToolRenderer.spec.d.ts +2 -0
  15. package/dist/components/chat/__tests__/SearchToolRenderer.spec.d.ts.map +1 -0
  16. package/dist/components/chat/__tests__/TextPartRenderer.spec.d.ts +2 -0
  17. package/dist/components/chat/__tests__/TextPartRenderer.spec.d.ts.map +1 -0
  18. package/dist/components/chat/__tests__/ToolCallPart.spec.d.ts +2 -0
  19. package/dist/components/chat/__tests__/ToolCallPart.spec.d.ts.map +1 -0
  20. package/dist/components/chat/__tests__/mdoc.spec.d.ts +2 -0
  21. package/dist/components/chat/__tests__/mdoc.spec.d.ts.map +1 -0
  22. package/dist/components/chat/__tests__/openGenerativeUi.spec.d.ts +2 -0
  23. package/dist/components/chat/__tests__/openGenerativeUi.spec.d.ts.map +1 -0
  24. package/dist/components/chat/__tests__/types.smoke.spec.d.ts +2 -0
  25. package/dist/components/chat/__tests__/types.smoke.spec.d.ts.map +1 -0
  26. package/dist/components/chat/__tests__/useConversation.spec.d.ts +2 -0
  27. package/dist/components/chat/__tests__/useConversation.spec.d.ts.map +1 -0
  28. package/dist/components/chat/builtInToolRenderers.d.ts +2 -0
  29. package/dist/components/chat/builtInToolRenderers.d.ts.map +1 -0
  30. package/dist/components/chat/components/ChartToolRenderer.vue.d.ts +6 -0
  31. package/dist/components/chat/components/ChartToolRenderer.vue.d.ts.map +1 -0
  32. package/dist/components/chat/components/CodeToolRenderer.vue.d.ts +8 -0
  33. package/dist/components/chat/components/CodeToolRenderer.vue.d.ts.map +1 -0
  34. package/dist/components/chat/components/EmptyState.vue.d.ts +10 -0
  35. package/dist/components/chat/components/EmptyState.vue.d.ts.map +1 -0
  36. package/dist/components/chat/components/MessageBubble.vue.d.ts +9 -0
  37. package/dist/components/chat/components/MessageBubble.vue.d.ts.map +1 -0
  38. package/dist/components/chat/components/MindMapToolRenderer.vue.d.ts +6 -0
  39. package/dist/components/chat/components/MindMapToolRenderer.vue.d.ts.map +1 -0
  40. package/dist/components/chat/components/OpenGenUIToolRenderer.vue.d.ts +6 -0
  41. package/dist/components/chat/components/OpenGenUIToolRenderer.vue.d.ts.map +1 -0
  42. package/dist/components/chat/components/OpenGenerativeUiChartRenderer.vue.d.ts +8 -0
  43. package/dist/components/chat/components/OpenGenerativeUiChartRenderer.vue.d.ts.map +1 -0
  44. package/dist/components/chat/components/OpenGenerativeUiPlanRenderer.vue.d.ts +8 -0
  45. package/dist/components/chat/components/OpenGenerativeUiPlanRenderer.vue.d.ts.map +1 -0
  46. package/dist/components/chat/components/OpenGenerativeUiScheduleRenderer.vue.d.ts +8 -0
  47. package/dist/components/chat/components/OpenGenerativeUiScheduleRenderer.vue.d.ts.map +1 -0
  48. package/dist/components/chat/components/OpenGenerativeUiThemeRenderer.vue.d.ts +6 -0
  49. package/dist/components/chat/components/OpenGenerativeUiThemeRenderer.vue.d.ts.map +1 -0
  50. package/dist/components/chat/components/SearchToolRenderer.vue.d.ts +6 -0
  51. package/dist/components/chat/components/SearchToolRenderer.vue.d.ts.map +1 -0
  52. package/dist/components/chat/components/TextPartRenderer.vue.d.ts +7 -0
  53. package/dist/components/chat/components/TextPartRenderer.vue.d.ts.map +1 -0
  54. package/dist/components/chat/components/ToolCallPart.vue.d.ts +10 -0
  55. package/dist/components/chat/components/ToolCallPart.vue.d.ts.map +1 -0
  56. package/dist/components/chat/components/index.d.ts +14 -0
  57. package/dist/components/chat/components/index.d.ts.map +1 -0
  58. package/dist/components/chat/composables/index.d.ts +2 -0
  59. package/dist/components/chat/composables/index.d.ts.map +1 -0
  60. package/dist/components/chat/composables/useConversation.d.ts +8 -0
  61. package/dist/components/chat/composables/useConversation.d.ts.map +1 -0
  62. package/dist/components/chat/index.d.ts +17 -0
  63. package/dist/components/chat/index.d.ts.map +1 -0
  64. package/dist/components/chat/mdoc/AskForm.vue.d.ts +21 -0
  65. package/dist/components/chat/mdoc/AskForm.vue.d.ts.map +1 -0
  66. package/dist/components/chat/mdoc/ContentNodes.vue.d.ts +7 -0
  67. package/dist/components/chat/mdoc/ContentNodes.vue.d.ts.map +1 -0
  68. package/dist/components/chat/mdoc/builtInRegistry.d.ts +4 -0
  69. package/dist/components/chat/mdoc/builtInRegistry.d.ts.map +1 -0
  70. package/dist/components/chat/mdoc/extractAskForms.d.ts +6 -0
  71. package/dist/components/chat/mdoc/extractAskForms.d.ts.map +1 -0
  72. package/dist/components/chat/mdoc/index.d.ts +8 -0
  73. package/dist/components/chat/mdoc/index.d.ts.map +1 -0
  74. package/dist/components/chat/mdoc/parser.d.ts +41 -0
  75. package/dist/components/chat/mdoc/parser.d.ts.map +1 -0
  76. package/dist/components/chat/mdoc/prompt.d.ts +6 -0
  77. package/dist/components/chat/mdoc/prompt.d.ts.map +1 -0
  78. package/dist/components/chat/mdoc/registry.d.ts +15 -0
  79. package/dist/components/chat/mdoc/registry.d.ts.map +1 -0
  80. package/dist/components/chat/mdoc/sanitize.d.ts +2 -0
  81. package/dist/components/chat/mdoc/sanitize.d.ts.map +1 -0
  82. package/dist/components/chat/mdoc/textContent.d.ts +30 -0
  83. package/dist/components/chat/mdoc/textContent.d.ts.map +1 -0
  84. package/dist/components/chat/openGenerativeUi.d.ts +25 -0
  85. package/dist/components/chat/openGenerativeUi.d.ts.map +1 -0
  86. package/dist/components/chat/toolRenderers.d.ts +8 -0
  87. package/dist/components/chat/toolRenderers.d.ts.map +1 -0
  88. package/dist/components/chat/types.d.ts +232 -0
  89. package/dist/components/chat/types.d.ts.map +1 -0
  90. package/dist/components/index.d.ts +1 -0
  91. package/dist/components/index.d.ts.map +1 -1
  92. package/dist/components/visualization/D3MindMap.vue.d.ts +7 -0
  93. package/dist/components/visualization/D3MindMap.vue.d.ts.map +1 -1
  94. package/dist/components/visualization/utils.d.ts +0 -4
  95. package/dist/components/visualization/utils.d.ts.map +1 -1
  96. package/dist/index.cjs +297 -1
  97. package/dist/index.d.ts +1 -0
  98. package/dist/index.d.ts.map +1 -1
  99. package/dist/index.js +22100 -804
  100. package/dist/md4x-C41yoHW7.js +4 -0
  101. package/dist/md4x-DWOZHZ3f.cjs +1 -0
  102. package/dist/style.css +1 -1
  103. package/package.json +9 -4
@@ -0,0 +1,30 @@
1
+ declare const sharedIsReady: import("vue").Ref<boolean, boolean>;
2
+ export declare function ensureMarkdownReady(): Promise<void>;
3
+ export declare function isMarkdownReady(): boolean;
4
+ export { sharedIsReady as markdownReady };
5
+ export type TextSegment = {
6
+ type: 'html';
7
+ id: string;
8
+ html: string;
9
+ } | {
10
+ type: 'image';
11
+ id: string;
12
+ url: string;
13
+ alt?: string;
14
+ } | {
15
+ type: 'video';
16
+ id: string;
17
+ url: string;
18
+ poster?: string;
19
+ } | {
20
+ type: 'audio';
21
+ id: string;
22
+ url: string;
23
+ title?: string;
24
+ };
25
+ /**
26
+ * Turn a markdown text blob into renderable segments (html + media).
27
+ * Code fences stay as plain &lt;pre&gt;&lt;code&gt; from md4x (no Shiki).
28
+ */
29
+ export declare function renderTextToSegments(markdown: string): TextSegment[];
30
+ //# sourceMappingURL=textContent.d.ts.map
@@ -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;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,CAuDpE"}
@@ -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,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,232 @@
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 ToolCallStatus = 'pending' | 'running' | 'success' | 'error';
5
+ export type AutoScrollMode = 'always' | 'smart' | 'off';
6
+ /** Status vocabulary used by OpenGenerativeUI's own render functions. */
7
+ export type OpenGenerativeUiRenderStatus = 'executing' | 'inProgress' | 'complete';
8
+ /**
9
+ * Complete activity payload emitted by OpenGenerativeUI's middleware.
10
+ *
11
+ * This mirrors the upstream `OpenGenUIContent` protocol without adopting its
12
+ * CopilotKit runtime or sandbox. AiConversation renders it as safe source
13
+ * progress; it never executes the generated HTML, CSS, or JavaScript.
14
+ */
15
+ export interface OpenGenUIContent {
16
+ initialHeight?: number;
17
+ generating?: boolean;
18
+ css?: string;
19
+ cssComplete?: boolean;
20
+ html?: string[];
21
+ htmlComplete?: boolean;
22
+ jsFunctions?: string;
23
+ jsFunctionsComplete?: boolean;
24
+ jsExpressions?: string[];
25
+ jsExpressionsComplete?: boolean;
26
+ }
27
+ /**
28
+ * The exportable subset of an OpenGenerativeUI activity payload.
29
+ * This exactly matches the upstream `StandaloneActivityContent` shape.
30
+ */
31
+ export interface StandaloneActivityContent {
32
+ css?: string;
33
+ html?: string[];
34
+ jsFunctions?: string;
35
+ jsExpressions?: string[];
36
+ }
37
+ /** The shared output shape used by OpenGenerativeUI's bar and pie examples. */
38
+ export interface GenerativeChartOutput {
39
+ title: string;
40
+ description: string;
41
+ data: Array<{
42
+ label: string;
43
+ value: number;
44
+ }>;
45
+ }
46
+ /** Exact data point shape shared by OpenGenerativeUI's `barChart` and `pieChart`. */
47
+ export interface OpenGenerativeUiChartDatum {
48
+ label: string;
49
+ value: number;
50
+ }
51
+ /** Parameters for the upstream `barChart` component output. */
52
+ export interface OpenGenerativeUiBarChartOutput {
53
+ title: string;
54
+ description: string;
55
+ data: OpenGenerativeUiChartDatum[];
56
+ }
57
+ /** Parameters for the upstream `pieChart` component output. */
58
+ export interface OpenGenerativeUiPieChartOutput {
59
+ title: string;
60
+ description: string;
61
+ data: OpenGenerativeUiChartDatum[];
62
+ }
63
+ /** Output shape used by OpenGenerativeUI's plan visualization example. */
64
+ export interface PlanVisualizationOutput {
65
+ approach: string;
66
+ technology: string;
67
+ key_elements: string[];
68
+ }
69
+ /** Render props accepted by OpenGenerativeUI's `PlanCard`. */
70
+ export interface OpenGenerativeUiPlanCardOutput {
71
+ status: OpenGenerativeUiRenderStatus;
72
+ approach?: string;
73
+ technology?: string;
74
+ keyElements?: string[];
75
+ }
76
+ /** Output shape used by OpenGenerativeUI's human-in-the-loop scheduling example. */
77
+ export interface ScheduleTimeOutput {
78
+ reasonForScheduling: string;
79
+ meetingDuration: number;
80
+ }
81
+ /** A meeting option rendered by OpenGenerativeUI's `MeetingTimePicker`. */
82
+ export interface OpenGenerativeUiTimeSlot {
83
+ date: string;
84
+ time: string;
85
+ duration?: string;
86
+ }
87
+ /**
88
+ * Full serializable input accepted by the upstream `MeetingTimePicker`.
89
+ * `respond` is intentionally omitted because AiConversation is render-only.
90
+ */
91
+ export interface OpenGenerativeUiMeetingTimePickerOutput {
92
+ status: OpenGenerativeUiRenderStatus;
93
+ reasonForScheduling?: string;
94
+ meetingDuration?: number;
95
+ title?: string;
96
+ timeSlots?: OpenGenerativeUiTimeSlot[];
97
+ }
98
+ /** Shape used by OpenGenerativeUI's catch-all `ToolReasoning` renderer. */
99
+ export interface OpenGenerativeUiToolReasoningOutput {
100
+ name: string;
101
+ args?: unknown;
102
+ status: OpenGenerativeUiRenderStatus;
103
+ }
104
+ /** The upstream `toggleTheme` frontend tool takes no parameters. */
105
+ export type OpenGenerativeUiToggleThemeInput = Record<string, never>;
106
+ /** Normalized discriminated form covering every OpenGenerativeUI app output. */
107
+ export type OpenGenerativeUiOutput = {
108
+ name: 'toggleTheme';
109
+ payload: OpenGenerativeUiToggleThemeInput;
110
+ } | {
111
+ name: 'pieChart';
112
+ payload: OpenGenerativeUiPieChartOutput;
113
+ } | {
114
+ name: 'barChart';
115
+ payload: OpenGenerativeUiBarChartOutput;
116
+ } | {
117
+ name: 'plan_visualization';
118
+ payload: PlanVisualizationOutput;
119
+ } | {
120
+ name: 'scheduleTime';
121
+ payload: ScheduleTimeOutput;
122
+ } | {
123
+ name: 'default-tool';
124
+ payload: OpenGenerativeUiToolReasoningOutput;
125
+ } | {
126
+ name: 'open-generative-ui';
127
+ payload: OpenGenUIContent;
128
+ };
129
+ export interface ConversationToolCall {
130
+ id: string;
131
+ type: 'function';
132
+ function: {
133
+ name: string;
134
+ /** A JSON string. Streaming deltas are concatenated without parsing it. */
135
+ arguments: string;
136
+ };
137
+ }
138
+ /**
139
+ * OpenAI-compatible message data accepted by AiConversation.
140
+ *
141
+ * `isStreaming` is an optional rendering hint maintained by useConversation;
142
+ * callers passing static OpenAI messages never need to set it.
143
+ */
144
+ export interface ConversationMessage {
145
+ id: string;
146
+ role: ConversationRole;
147
+ content?: string;
148
+ tool_calls?: ConversationToolCall[];
149
+ tool_call_id?: string;
150
+ toolStatus?: ToolCallStatus;
151
+ toolResult?: unknown;
152
+ toolError?: string;
153
+ isStreaming?: boolean;
154
+ }
155
+ export interface ConversationToolCallDelta {
156
+ /** Index into the assistant message's tool_calls array. */
157
+ index: number;
158
+ id?: string;
159
+ function?: {
160
+ name?: string;
161
+ argumentsDelta?: string;
162
+ };
163
+ /** Required for unambiguous lifecycle updates when several tools are active. */
164
+ toolStatus?: ToolCallStatus;
165
+ toolResult?: unknown;
166
+ toolError?: string;
167
+ }
168
+ /**
169
+ * A frontend-friendly form of `choices[0].delta`.
170
+ *
171
+ * `id` is the local ConversationMessage id. `toolCallId` is needed only when
172
+ * the delta itself creates or updates a role='tool' result message.
173
+ */
174
+ export interface ConversationDelta {
175
+ id: string;
176
+ role?: ConversationRole;
177
+ contentDelta?: string;
178
+ toolCallDelta?: ConversationToolCallDelta;
179
+ toolCallId?: string;
180
+ toolStatus?: ToolCallStatus;
181
+ toolResult?: unknown;
182
+ toolError?: string;
183
+ done?: boolean;
184
+ }
185
+ export interface ConversationTheme {
186
+ /** CSS custom-property references supplied by the consuming design system. */
187
+ userBubbleBg?: string;
188
+ userBubbleColor?: string;
189
+ userBubbleBorderColor?: string;
190
+ assistantBubbleBg?: string;
191
+ assistantBubbleColor?: string;
192
+ assistantBubbleBorderColor?: string;
193
+ toolCardBg?: string;
194
+ toolCardBorderColor?: string;
195
+ toolPendingColor?: string;
196
+ toolRunningColor?: string;
197
+ toolSuccessColor?: string;
198
+ toolErrorColor?: string;
199
+ borderRadius?: string;
200
+ spacing?: string;
201
+ }
202
+ /** Bubbled from interactive content tags such as ask-form. */
203
+ export interface ConversationUiAction {
204
+ type: 'submit';
205
+ value: string;
206
+ label?: string;
207
+ source?: string;
208
+ }
209
+ export interface AiConversationProps {
210
+ messages: readonly ConversationMessage[];
211
+ theme?: ConversationTheme;
212
+ autoScroll?: AutoScrollMode;
213
+ }
214
+ export interface AiConversationExpose {
215
+ scrollToBottom: () => void;
216
+ }
217
+ export interface UseConversationReturn {
218
+ messages: Ref<ConversationMessage[]>;
219
+ appendDelta: (delta: ConversationDelta) => void;
220
+ setMessages: (messages: ConversationMessage[]) => void;
221
+ reset: () => void;
222
+ }
223
+ export interface ToolRendererProps {
224
+ toolCall: ConversationToolCall;
225
+ status: ToolCallStatus;
226
+ result?: unknown;
227
+ error?: string;
228
+ message?: ConversationMessage;
229
+ isStreaming: boolean;
230
+ }
231
+ export type ToolRenderer = Component;
232
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/chat/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzC,8DAA8D;AAC9D,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAA;AAC5D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;AACxE,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;AAEvD,yEAAyE;AACzE,MAAM,MAAM,4BAA4B,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,CAAA;AAElF;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mBAA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iBAAiB,KAAK,IAAI,CAAA;IAC/C,WAAW,EAAE,CAAC,QAAQ,EAAE,mBAAmB,EAAE,KAAK,IAAI,CAAA;IACtD,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,oBAAoB,CAAA;IAC9B,MAAM,EAAE,cAAc,CAAA;IACtB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAC7B,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,CAAA"}
@@ -1,2 +1,3 @@
1
1
  export * from './visualization';
2
+ export * from './chat';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,QAAQ,CAAA"}
@@ -18,6 +18,8 @@ declare const __VLS_component: import("vue").DefineComponent<D3MindMapProps, {
18
18
  setData: (data: any) => void;
19
19
  toCenter: () => void;
20
20
  expandAll: (expand: boolean) => void;
21
+ expandNode: (nodeId: string) => void;
22
+ collapseNode: (nodeId: string) => void;
21
23
  zoomIn: () => void;
22
24
  zoomOut: () => void;
23
25
  setZoom: (scale: number) => void;
@@ -28,6 +30,11 @@ declare const __VLS_component: import("vue").DefineComponent<D3MindMapProps, {
28
30
  };
29
31
  fit: () => void;
30
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[];
31
38
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
32
39
  change: (data: MindMapData) => any;
33
40
  "node-click": (node: MindMapNode, event: MouseEvent) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"D3MindMap.vue.d.ts","sourceRoot":"","sources":["../../../src/components/visualization/D3MindMap.vue"],"names":[],"mappings":"AA6lFA,OAAO,KAAK,EACV,cAAc,EAEd,WAAW,EACX,WAAW,EAKX,aAAa,EACd,MAAM,SAAS,CAAA;AAozEhB,QAAA,IAAI,OAAO;;;;;;;2BAxeD,KAAK,GAAG,KAAK,YACX,aAAa,KACtB,OAAO,CAAC,IAAI,CAAC;;;CAseM,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA0C/C,QAAA,MAAM,eAAe;mBA5/BD,GAAG;oBA2BA,GAAG;;wBAsRC,OAAO;;;qBA0IV,MAAM;mBAgBV,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EA0jBxB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"D3MindMap.vue.d.ts","sourceRoot":"","sources":["../../../src/components/visualization/D3MindMap.vue"],"names":[],"mappings":"AA25EA,OAAO,KAAK,EACV,cAAc,EAEd,WAAW,EACX,WAAW,EAKX,aAAa,EACd,MAAM,SAAS,CAAA;AAszEhB,QAAA,IAAI,OAAO;;;;;;;2BA/jBD,KAAK,GAAG,KAAK,YACX,aAAa,KACtB,OAAO,CAAC,IAAI,CAAC;;;CA6jBM,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA0C/C,QAAA,MAAM,eAAe;mBAnlCD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAqc/B,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,10 +1,6 @@
1
1
  /**
2
2
  * 工具函数
3
3
  */
4
- /**
5
- * 生成唯一 ID
6
- */
7
- export declare function generateId(): string;
8
4
  /**
9
5
  * 获取文本宽度
10
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/visualization/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAO/D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAwBtC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,S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