@8wave/ai-elements 0.71.0 → 0.73.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.
- package/dist/_chunks/{PkToolShowSources-CK3lqqoU.js → PkToolShowSources-B2rf94fU.js} +12 -3
- package/dist/_chunks/PkToolShowSources-B2rf94fU.js.map +1 -0
- package/dist/ai-elements.es.js +125 -359
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-CkxgCXC4.js → PkChatbot-D5_ytfqS.js} +5 -5
- package/dist-vue/_chunks/{PkChatbot-CkxgCXC4.js.map → PkChatbot-D5_ytfqS.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotMessages-B5EK-qDo.js → PkChatbotMessages-CMLqkhmb.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotMessages-B5EK-qDo.js.map → PkChatbotMessages-CMLqkhmb.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewChat-C4haTRtG.js → PkChatbotViewChat-wLCypxNG.js} +4 -4
- package/dist-vue/_chunks/{PkChatbotViewChat-C4haTRtG.js.map → PkChatbotViewChat-wLCypxNG.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations--vd3MWYy.js → PkChatbotViewConversations-B5qBiqo4.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations--vd3MWYy.js.map → PkChatbotViewConversations-B5qBiqo4.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile-Cafl_Jf8.js → PkChatbotViewProfile-CXmmVXrD.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile-Cafl_Jf8.js.map → PkChatbotViewProfile-CXmmVXrD.js.map} +1 -1
- package/dist-vue/_chunks/{PkToolShowSources-BXeGRm4D.js → PkToolShowSources-D5cBZxwQ.js} +12 -3
- package/dist-vue/_chunks/PkToolShowSources-D5cBZxwQ.js.map +1 -0
- package/dist-vue/_chunks/{createChatbotApiClient-OA7JscBS.js → createChatbotApiClient-2ynLWELM.js} +2 -2
- package/dist-vue/_chunks/createChatbotApiClient-2ynLWELM.js.map +1 -0
- package/dist-vue/_chunks/{useChatbotStore-BNGyIqjI.js → useChatbotStore-Im8Xjwte.js} +269 -269
- package/dist-vue/_chunks/{useChatbotStore-BNGyIqjI.js.map → useChatbotStore-Im8Xjwte.js.map} +1 -1
- package/dist-vue/api.js +1 -1
- package/dist-vue/composables.js +2 -2
- package/dist-vue/index.js +2956 -2714
- package/dist-vue/index.js.map +1 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +2 -3553
- package/dist-vue/packages/models/src/schema/Agent.d.ts +5 -5
- package/dist-vue/packages/models/src/schema/AgentChatStatistics.d.ts +160 -0
- package/dist-vue/packages/models/src/schema/Document.d.ts +18 -0
- package/dist-vue/packages/models/src/schema/ReasoningChat.d.ts +1 -1
- package/dist-vue/packages/models/src/schema/SubAgent.d.ts +2 -2
- package/package.json +2 -2
- package/dist/_chunks/PkToolShowSources-CK3lqqoU.js.map +0 -1
- package/dist-vue/_chunks/PkToolShowSources-BXeGRm4D.js.map +0 -1
- package/dist-vue/_chunks/createChatbotApiClient-OA7JscBS.js.map +0 -1
|
@@ -219,7 +219,7 @@ export declare const AgentInterfaceSchema: z.ZodObject<{
|
|
|
219
219
|
left: "left";
|
|
220
220
|
right: "right";
|
|
221
221
|
}>>>;
|
|
222
|
-
maxMessageLength: z.
|
|
222
|
+
maxMessageLength: z.ZodOptional<z.ZodNumber>;
|
|
223
223
|
widgetUrl: z.ZodDefault<z.ZodURL>;
|
|
224
224
|
loadDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
225
225
|
loaderStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof AgentLoaderStrategy>>>;
|
|
@@ -383,7 +383,7 @@ export declare const AgentSettingsSchema: z.ZodObject<{
|
|
|
383
383
|
left: "left";
|
|
384
384
|
right: "right";
|
|
385
385
|
}>>>;
|
|
386
|
-
maxMessageLength: z.
|
|
386
|
+
maxMessageLength: z.ZodOptional<z.ZodNumber>;
|
|
387
387
|
widgetUrl: z.ZodDefault<z.ZodURL>;
|
|
388
388
|
loadDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
389
389
|
loaderStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof AgentLoaderStrategy>>>;
|
|
@@ -566,7 +566,7 @@ export declare const AgentDtoSchema: z.ZodObject<{
|
|
|
566
566
|
left: "left";
|
|
567
567
|
right: "right";
|
|
568
568
|
}>>>;
|
|
569
|
-
maxMessageLength: z.
|
|
569
|
+
maxMessageLength: z.ZodOptional<z.ZodNumber>;
|
|
570
570
|
widgetUrl: z.ZodDefault<z.ZodURL>;
|
|
571
571
|
loadDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
572
572
|
loaderStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof AgentLoaderStrategy>>>;
|
|
@@ -750,7 +750,7 @@ export declare const AgentSchema: z.ZodLazy<z.ZodObject<{
|
|
|
750
750
|
left: "left";
|
|
751
751
|
right: "right";
|
|
752
752
|
}>>>;
|
|
753
|
-
maxMessageLength: z.
|
|
753
|
+
maxMessageLength: z.ZodOptional<z.ZodNumber>;
|
|
754
754
|
widgetUrl: z.ZodDefault<z.ZodURL>;
|
|
755
755
|
loadDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
756
756
|
loaderStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof AgentLoaderStrategy>>>;
|
|
@@ -917,7 +917,7 @@ export declare const AgentPublicSchema: z.ZodObject<{
|
|
|
917
917
|
left: "left";
|
|
918
918
|
right: "right";
|
|
919
919
|
}>>>;
|
|
920
|
-
maxMessageLength: z.
|
|
920
|
+
maxMessageLength: z.ZodOptional<z.ZodNumber>;
|
|
921
921
|
widgetUrl: z.ZodDefault<z.ZodURL>;
|
|
922
922
|
loadDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
923
923
|
loaderStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof AgentLoaderStrategy>>>;
|
|
@@ -57,6 +57,86 @@ export declare const AgentChatStatisticsSummarySchema: z.ZodObject<{
|
|
|
57
57
|
agentId: z.ZodString;
|
|
58
58
|
agentName: z.ZodString;
|
|
59
59
|
}, z.core.$strip>>;
|
|
60
|
+
deviceTypes: z.ZodArray<z.ZodObject<{
|
|
61
|
+
label: z.ZodString;
|
|
62
|
+
count: z.ZodNumber;
|
|
63
|
+
pct: z.ZodNumber;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
operatingSystems: z.ZodArray<z.ZodObject<{
|
|
66
|
+
label: z.ZodString;
|
|
67
|
+
count: z.ZodNumber;
|
|
68
|
+
pct: z.ZodNumber;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
browsers: z.ZodArray<z.ZodObject<{
|
|
71
|
+
label: z.ZodString;
|
|
72
|
+
count: z.ZodNumber;
|
|
73
|
+
pct: z.ZodNumber;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
timezoneRegions: z.ZodArray<z.ZodObject<{
|
|
76
|
+
label: z.ZodString;
|
|
77
|
+
count: z.ZodNumber;
|
|
78
|
+
pct: z.ZodNumber;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
screenCategories: z.ZodArray<z.ZodObject<{
|
|
81
|
+
label: z.ZodString;
|
|
82
|
+
count: z.ZodNumber;
|
|
83
|
+
pct: z.ZodNumber;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
connectionTypes: z.ZodArray<z.ZodObject<{
|
|
86
|
+
label: z.ZodString;
|
|
87
|
+
count: z.ZodNumber;
|
|
88
|
+
pct: z.ZodNumber;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
darkModePreference: z.ZodArray<z.ZodObject<{
|
|
91
|
+
label: z.ZodString;
|
|
92
|
+
count: z.ZodNumber;
|
|
93
|
+
pct: z.ZodNumber;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
referrerDomains: z.ZodArray<z.ZodObject<{
|
|
96
|
+
label: z.ZodString;
|
|
97
|
+
count: z.ZodNumber;
|
|
98
|
+
pct: z.ZodNumber;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
topPages: z.ZodArray<z.ZodObject<{
|
|
101
|
+
label: z.ZodString;
|
|
102
|
+
count: z.ZodNumber;
|
|
103
|
+
pct: z.ZodNumber;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
sentimentTrends: z.ZodArray<z.ZodObject<{
|
|
106
|
+
label: z.ZodString;
|
|
107
|
+
count: z.ZodNumber;
|
|
108
|
+
pct: z.ZodNumber;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
userTones: z.ZodArray<z.ZodObject<{
|
|
111
|
+
label: z.ZodString;
|
|
112
|
+
count: z.ZodNumber;
|
|
113
|
+
pct: z.ZodNumber;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
riskScoreBands: z.ZodArray<z.ZodObject<{
|
|
116
|
+
label: z.ZodString;
|
|
117
|
+
count: z.ZodNumber;
|
|
118
|
+
pct: z.ZodNumber;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
llmIssues: z.ZodArray<z.ZodObject<{
|
|
121
|
+
label: z.ZodString;
|
|
122
|
+
count: z.ZodNumber;
|
|
123
|
+
pct: z.ZodNumber;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
conversationLengthBuckets: z.ZodArray<z.ZodObject<{
|
|
126
|
+
label: z.ZodString;
|
|
127
|
+
count: z.ZodNumber;
|
|
128
|
+
pct: z.ZodNumber;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
goalOutcome: z.ZodArray<z.ZodObject<{
|
|
131
|
+
label: z.ZodString;
|
|
132
|
+
count: z.ZodNumber;
|
|
133
|
+
pct: z.ZodNumber;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
blockedReasons: z.ZodArray<z.ZodObject<{
|
|
136
|
+
label: z.ZodString;
|
|
137
|
+
count: z.ZodNumber;
|
|
138
|
+
pct: z.ZodNumber;
|
|
139
|
+
}, z.core.$strip>>;
|
|
60
140
|
}, z.core.$strip>;
|
|
61
141
|
export type AgentChatStatisticsSummary = z.infer<typeof AgentChatStatisticsSummarySchema>;
|
|
62
142
|
export declare const AgentChatStatisticsTimeSeriesItemSchema: z.ZodObject<{
|
|
@@ -115,6 +195,86 @@ export declare const AgentChatStatisticsResponseSchema: z.ZodObject<{
|
|
|
115
195
|
agentId: z.ZodString;
|
|
116
196
|
agentName: z.ZodString;
|
|
117
197
|
}, z.core.$strip>>;
|
|
198
|
+
deviceTypes: z.ZodArray<z.ZodObject<{
|
|
199
|
+
label: z.ZodString;
|
|
200
|
+
count: z.ZodNumber;
|
|
201
|
+
pct: z.ZodNumber;
|
|
202
|
+
}, z.core.$strip>>;
|
|
203
|
+
operatingSystems: z.ZodArray<z.ZodObject<{
|
|
204
|
+
label: z.ZodString;
|
|
205
|
+
count: z.ZodNumber;
|
|
206
|
+
pct: z.ZodNumber;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
browsers: z.ZodArray<z.ZodObject<{
|
|
209
|
+
label: z.ZodString;
|
|
210
|
+
count: z.ZodNumber;
|
|
211
|
+
pct: z.ZodNumber;
|
|
212
|
+
}, z.core.$strip>>;
|
|
213
|
+
timezoneRegions: z.ZodArray<z.ZodObject<{
|
|
214
|
+
label: z.ZodString;
|
|
215
|
+
count: z.ZodNumber;
|
|
216
|
+
pct: z.ZodNumber;
|
|
217
|
+
}, z.core.$strip>>;
|
|
218
|
+
screenCategories: z.ZodArray<z.ZodObject<{
|
|
219
|
+
label: z.ZodString;
|
|
220
|
+
count: z.ZodNumber;
|
|
221
|
+
pct: z.ZodNumber;
|
|
222
|
+
}, z.core.$strip>>;
|
|
223
|
+
connectionTypes: z.ZodArray<z.ZodObject<{
|
|
224
|
+
label: z.ZodString;
|
|
225
|
+
count: z.ZodNumber;
|
|
226
|
+
pct: z.ZodNumber;
|
|
227
|
+
}, z.core.$strip>>;
|
|
228
|
+
darkModePreference: z.ZodArray<z.ZodObject<{
|
|
229
|
+
label: z.ZodString;
|
|
230
|
+
count: z.ZodNumber;
|
|
231
|
+
pct: z.ZodNumber;
|
|
232
|
+
}, z.core.$strip>>;
|
|
233
|
+
referrerDomains: z.ZodArray<z.ZodObject<{
|
|
234
|
+
label: z.ZodString;
|
|
235
|
+
count: z.ZodNumber;
|
|
236
|
+
pct: z.ZodNumber;
|
|
237
|
+
}, z.core.$strip>>;
|
|
238
|
+
topPages: z.ZodArray<z.ZodObject<{
|
|
239
|
+
label: z.ZodString;
|
|
240
|
+
count: z.ZodNumber;
|
|
241
|
+
pct: z.ZodNumber;
|
|
242
|
+
}, z.core.$strip>>;
|
|
243
|
+
sentimentTrends: z.ZodArray<z.ZodObject<{
|
|
244
|
+
label: z.ZodString;
|
|
245
|
+
count: z.ZodNumber;
|
|
246
|
+
pct: z.ZodNumber;
|
|
247
|
+
}, z.core.$strip>>;
|
|
248
|
+
userTones: z.ZodArray<z.ZodObject<{
|
|
249
|
+
label: z.ZodString;
|
|
250
|
+
count: z.ZodNumber;
|
|
251
|
+
pct: z.ZodNumber;
|
|
252
|
+
}, z.core.$strip>>;
|
|
253
|
+
riskScoreBands: z.ZodArray<z.ZodObject<{
|
|
254
|
+
label: z.ZodString;
|
|
255
|
+
count: z.ZodNumber;
|
|
256
|
+
pct: z.ZodNumber;
|
|
257
|
+
}, z.core.$strip>>;
|
|
258
|
+
llmIssues: z.ZodArray<z.ZodObject<{
|
|
259
|
+
label: z.ZodString;
|
|
260
|
+
count: z.ZodNumber;
|
|
261
|
+
pct: z.ZodNumber;
|
|
262
|
+
}, z.core.$strip>>;
|
|
263
|
+
conversationLengthBuckets: z.ZodArray<z.ZodObject<{
|
|
264
|
+
label: z.ZodString;
|
|
265
|
+
count: z.ZodNumber;
|
|
266
|
+
pct: z.ZodNumber;
|
|
267
|
+
}, z.core.$strip>>;
|
|
268
|
+
goalOutcome: z.ZodArray<z.ZodObject<{
|
|
269
|
+
label: z.ZodString;
|
|
270
|
+
count: z.ZodNumber;
|
|
271
|
+
pct: z.ZodNumber;
|
|
272
|
+
}, z.core.$strip>>;
|
|
273
|
+
blockedReasons: z.ZodArray<z.ZodObject<{
|
|
274
|
+
label: z.ZodString;
|
|
275
|
+
count: z.ZodNumber;
|
|
276
|
+
pct: z.ZodNumber;
|
|
277
|
+
}, z.core.$strip>>;
|
|
118
278
|
}, z.core.$strip>;
|
|
119
279
|
timeSeries: z.ZodArray<z.ZodObject<{
|
|
120
280
|
datetime: z.ZodString;
|
|
@@ -30,6 +30,8 @@ export declare const ConversionOptionsSchema: z.ZodObject<{
|
|
|
30
30
|
aiDescriptionModel: z.ZodOptional<z.ZodString>;
|
|
31
31
|
aiDescriptionPrompt: z.ZodOptional<z.ZodString>;
|
|
32
32
|
language: z.ZodOptional<z.ZodString>;
|
|
33
|
+
forceOcr: z.ZodDefault<z.ZodBoolean>;
|
|
34
|
+
pages: z.ZodOptional<z.ZodString>;
|
|
33
35
|
}, z.core.$strip>;
|
|
34
36
|
export type ConversionOptions = z.infer<typeof ConversionOptionsSchema>;
|
|
35
37
|
/**
|
|
@@ -159,6 +161,11 @@ export declare const DocumentMetadataSchema: z.ZodObject<{
|
|
|
159
161
|
wordCount: z.ZodOptional<z.ZodNumber>;
|
|
160
162
|
paragraphCount: z.ZodOptional<z.ZodNumber>;
|
|
161
163
|
readingTime: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
ocrUsed: z.ZodOptional<z.ZodBoolean>;
|
|
165
|
+
ocrProvider: z.ZodOptional<z.ZodString>;
|
|
166
|
+
ocrModel: z.ZodOptional<z.ZodString>;
|
|
167
|
+
ocrPages: z.ZodOptional<z.ZodString>;
|
|
168
|
+
ocrError: z.ZodOptional<z.ZodString>;
|
|
162
169
|
conversionOptions: z.ZodOptional<z.ZodObject<{
|
|
163
170
|
extractionStrategy: z.ZodOptional<z.ZodEnum<typeof ExtractionStrategy>>;
|
|
164
171
|
browserEngine: z.ZodOptional<z.ZodEnum<typeof BrowserEngine>>;
|
|
@@ -175,6 +182,8 @@ export declare const DocumentMetadataSchema: z.ZodObject<{
|
|
|
175
182
|
aiDescriptionModel: z.ZodOptional<z.ZodString>;
|
|
176
183
|
aiDescriptionPrompt: z.ZodOptional<z.ZodString>;
|
|
177
184
|
language: z.ZodOptional<z.ZodString>;
|
|
185
|
+
forceOcr: z.ZodDefault<z.ZodBoolean>;
|
|
186
|
+
pages: z.ZodOptional<z.ZodString>;
|
|
178
187
|
}, z.core.$strip>>;
|
|
179
188
|
}, z.core.$loose>;
|
|
180
189
|
export type DocumentMetadata = z.infer<typeof DocumentMetadataSchema>;
|
|
@@ -332,6 +341,11 @@ export declare const DocumentSchema: z.ZodObject<{
|
|
|
332
341
|
wordCount: z.ZodOptional<z.ZodNumber>;
|
|
333
342
|
paragraphCount: z.ZodOptional<z.ZodNumber>;
|
|
334
343
|
readingTime: z.ZodOptional<z.ZodNumber>;
|
|
344
|
+
ocrUsed: z.ZodOptional<z.ZodBoolean>;
|
|
345
|
+
ocrProvider: z.ZodOptional<z.ZodString>;
|
|
346
|
+
ocrModel: z.ZodOptional<z.ZodString>;
|
|
347
|
+
ocrPages: z.ZodOptional<z.ZodString>;
|
|
348
|
+
ocrError: z.ZodOptional<z.ZodString>;
|
|
335
349
|
conversionOptions: z.ZodOptional<z.ZodObject<{
|
|
336
350
|
extractionStrategy: z.ZodOptional<z.ZodEnum<typeof ExtractionStrategy>>;
|
|
337
351
|
browserEngine: z.ZodOptional<z.ZodEnum<typeof BrowserEngine>>;
|
|
@@ -348,6 +362,8 @@ export declare const DocumentSchema: z.ZodObject<{
|
|
|
348
362
|
aiDescriptionModel: z.ZodOptional<z.ZodString>;
|
|
349
363
|
aiDescriptionPrompt: z.ZodOptional<z.ZodString>;
|
|
350
364
|
language: z.ZodOptional<z.ZodString>;
|
|
365
|
+
forceOcr: z.ZodDefault<z.ZodBoolean>;
|
|
366
|
+
pages: z.ZodOptional<z.ZodString>;
|
|
351
367
|
}, z.core.$strip>>;
|
|
352
368
|
}, z.core.$loose>;
|
|
353
369
|
chunksCount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -499,6 +515,8 @@ export declare const DocumentCreateDtoSchema: z.ZodObject<{
|
|
|
499
515
|
}[]>>>>>;
|
|
500
516
|
aiDescriptionModel: z.ZodOptional<z.ZodString>;
|
|
501
517
|
aiDescriptionPrompt: z.ZodOptional<z.ZodString>;
|
|
518
|
+
forceOcr: z.ZodDefault<z.ZodBoolean>;
|
|
519
|
+
pages: z.ZodOptional<z.ZodString>;
|
|
502
520
|
}, z.core.$strip>;
|
|
503
521
|
/**
|
|
504
522
|
* Document update schema for PUT /documents/:id endpoint
|
|
@@ -209,7 +209,7 @@ export declare const ReasoningChatSchema: z.ZodObject<{
|
|
|
209
209
|
left: "left";
|
|
210
210
|
right: "right";
|
|
211
211
|
}>>>;
|
|
212
|
-
maxMessageLength: z.
|
|
212
|
+
maxMessageLength: z.ZodOptional<z.ZodNumber>;
|
|
213
213
|
widgetUrl: z.ZodDefault<z.ZodURL>;
|
|
214
214
|
loadDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
215
215
|
loaderStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum< AgentLoaderStrategy>>>;
|
|
@@ -167,7 +167,7 @@ export declare const SubAgentSchema: z.ZodObject<{
|
|
|
167
167
|
left: "left";
|
|
168
168
|
right: "right";
|
|
169
169
|
}>>>;
|
|
170
|
-
maxMessageLength: z.
|
|
170
|
+
maxMessageLength: z.ZodOptional<z.ZodNumber>;
|
|
171
171
|
widgetUrl: z.ZodDefault<z.ZodURL>;
|
|
172
172
|
loadDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
173
173
|
loaderStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum< AgentLoaderStrategy>>>;
|
|
@@ -360,7 +360,7 @@ export declare const SubAgentSchema: z.ZodObject<{
|
|
|
360
360
|
left: "left";
|
|
361
361
|
right: "right";
|
|
362
362
|
}>>>;
|
|
363
|
-
maxMessageLength: z.
|
|
363
|
+
maxMessageLength: z.ZodOptional<z.ZodNumber>;
|
|
364
364
|
widgetUrl: z.ZodDefault<z.ZodURL>;
|
|
365
365
|
loadDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
366
366
|
loaderStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum< AgentLoaderStrategy>>>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@8wave/ai-elements",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.73.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite --port 8082 --open --host",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"module": "./dist/ai-elements.es.js",
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@ai-sdk/provider": "^3.0.
|
|
47
|
+
"@ai-sdk/provider": "^3.0.9",
|
|
48
48
|
"@intlify/unplugin-vue-i18n": "^11.1.2",
|
|
49
49
|
"@microsoft/applicationinsights-web": "^3.4.1",
|
|
50
50
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PkToolShowSources-CK3lqqoU.js","names":["core._coercedDate","schemas.ZodDate","$t"],"sources":["../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/coerce.js","../../../../packages/models/src/utils.ts","../../../../packages/models/src/schema/constants.ts","../../../../packages/models/src/schema/Media.ts","../../../../packages/models/src/schema/Header.ts","../../../../packages/models/src/schema/Document.ts","../../../../packages/components/src/chat/PkChunkPreview.vue","../../../../packages/components/src/chat/PkChunkPreview.vue","../../../../packages/components/src/chat/PkDocumentHeader.vue","../../../../packages/components/src/chat/PkDocumentHeader.vue","../../../../packages/components/src/chat/PkToolShowSources.vue","../../../../packages/components/src/chat/PkToolShowSources.vue"],"sourcesContent":["import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\nexport function string(params) {\n return core._coercedString(schemas.ZodString, params);\n}\nexport function number(params) {\n return core._coercedNumber(schemas.ZodNumber, params);\n}\nexport function boolean(params) {\n return core._coercedBoolean(schemas.ZodBoolean, params);\n}\nexport function bigint(params) {\n return core._coercedBigint(schemas.ZodBigInt, params);\n}\nexport function date(params) {\n return core._coercedDate(schemas.ZodDate, params);\n}\n","import * as z from 'zod'\n\nexport type QueryStringFilter<T extends string = string> = `filter[${T}]`\nexport type Querystring = {\n 'page[number]'?: number | string\n 'page[size]'?: number | string\n sort?: string[] | string\n [filterKeys: QueryStringFilter]: unknown\n [otherKeys: string]: unknown\n}\n\nexport const makeSortEnum = <const T extends string>(input: T) => {\n return [`${input}`, `-${input}`] as [T, `-${T}`]\n}\n\nexport const makeSortEnums = <const T extends string>(input: readonly T[]) => {\n return input.flatMap((i) => makeSortEnum(i))\n}\n\nexport const zodQs = {\n pagination: (defaultNumber = 1, defaultSize = 10) => {\n return {\n 'page[number]': z\n .number()\n .or(z.string())\n .transform((v) => Number(v))\n .default(defaultNumber),\n 'page[size]': z\n .number()\n .or(z.string())\n .transform((v) => Number(v))\n .default(defaultSize),\n }\n },\n filter: <const T extends string>(input: T) => {\n return { [`filter[${input}]`]: z.string().optional() } as Record<\n `filter[${T}]`,\n z.ZodOptional<z.ZodString | z.ZodArray<z.ZodString>>\n >\n },\n include: <const T extends string>(input: T) => {\n return { [`include[${input}]`]: z.string().optional() } as Record<\n `include[${T}]`,\n z.ZodOptional<z.ZodArray<z.ZodString> | z.ZodString>\n >\n },\n range: <const T extends string>(input: T) => {\n return {\n [`from[${input}]`]: z.string().optional(),\n [`to[${input}]`]: z.string().optional(),\n } as Record<`from[${T}]` | `to[${T}]`, z.ZodOptional<z.ZodString>>\n },\n has: <const T extends string>(input: T) => {\n return { [`has[${input}]`]: z.boolean().optional() } as Record<\n `has[${T}]`,\n z.ZodOptional<z.ZodBoolean>\n >\n },\n fullText: () => {\n return { [`filter[fullText]`]: z.string().optional() }\n },\n ids: () => {\n return { ids: z.union([z.string(), z.array(z.string())]).optional() }\n },\n deleted: () => {\n return { 'filter[isDeleted]': z.boolean().default(false) }\n },\n filters: <const T extends string>(input: readonly T[]) => {\n return input\n .map((i) => zodQs.filter(i))\n .reduce((a, b) => ({ ...a, ...b }))\n },\n sort: <const S extends string>(sort: S[]) => {\n const sortEnums = makeSortEnums(sort) as [S, ...`-${S}`[]]\n return {\n // @ts-expect-error: zod does not support tuple types\n sort: z.enum(sortEnums).optional().default(sortEnums[0]),\n }\n },\n}\n","export enum LanguageModel {\n // OpenAI\n textEmbedding3Small = 'openai/text-embedding-3-small',\n gpt5Nano = 'openai/gpt-5-nano',\n gpt5Mini = 'openai/gpt-5-mini',\n gpt51Thinking = 'openai/gpt-5.1-thinking',\n gpt51Instant = 'openai/gpt-5.1-instant',\n gpt52 = 'openai/gpt-5.2',\n gpt52Chat = 'openai/gpt-5.2-chat',\n gpt54nano = 'openai/gpt-5.4-nano',\n gpt54mini = 'openai/gpt-5.4-mini',\n gpt54 = 'openai/gpt-5.4',\n gpt54Pro = 'openai/gpt-5.4-pro',\n gpt55 = 'openai/gpt-5.5',\n gpt55Pro = 'openai/gpt-5.5-pro',\n // Google Gemini\n gemini25Flash = 'google/gemini-2.5-flash',\n gemini25FlashLite = 'google/gemini-2.5-flash-lite',\n gemini25Pro = 'google/gemini-2.5-pro',\n gemini3Flash = 'google/gemini-3-flash',\n gemini3ProPreview = 'google/gemini-3-pro-preview',\n gemini31FlashLitePreview = 'google/gemini-3.1-flash-lite-preview',\n gemini31ProPreview = 'google/gemini-3.1-pro-preview',\n // Anthropic Claude\n claudeHaiku45 = 'anthropic/claude-haiku-4.5',\n claudeSonnet45 = 'anthropic/claude-sonnet-4.5',\n claudeSonnet46 = 'anthropic/claude-sonnet-4.6',\n claudeOpus46 = 'anthropic/claude-opus-4.6',\n // Deepseek\n deepseek32 = 'deepseek/deepseek-v3.2',\n deepseek32Thinking = 'deepseek/deepseek-v3.2-thinking',\n deepseek4pro = 'deepseek/deepseek-v4-pro',\n deepseek4Flash = 'deepseek/deepseek-v4-flash',\n // Alibaba\n alibabaQwen36Plus = 'alibaba/qwen3.6-plus',\n}\n\nexport const EMBED_MODEL = LanguageModel.textEmbedding3Small\n\nexport enum LanguageModelBrand {\n openai = 'openai',\n google = 'google',\n anthropic = 'anthropic',\n deepseek = 'deepseek',\n}\n\n/**\n * Supported languages for documents and revised answers\n */\nexport enum SupportedLanguage {\n it = 'it',\n en = 'en',\n es = 'es',\n fr = 'fr',\n de = 'de',\n}\n\n/**\n * Language display names (i18n keys)\n */\nexport const LANGUAGE_NAMES: Record<SupportedLanguage, string> = {\n [SupportedLanguage.it]: 'language.italian',\n [SupportedLanguage.en]: 'language.english',\n [SupportedLanguage.es]: 'language.spanish',\n [SupportedLanguage.fr]: 'language.french',\n [SupportedLanguage.de]: 'language.german',\n}\n\n/**\n * Content extraction strategies for URL scraping\n */\nexport enum ExtractionStrategy {\n /** Use Mozilla Readability for content extraction (fast, free, no API calls) */\n READABILITY = 'readability',\n /** Use AI-based extraction (better for complex layouts, requires API calls) */\n AI = 'ai',\n}\n\n/**\n * Browser engine options for URL scraping\n */\nexport enum BrowserEngine {\n /** Use simple HTTP fetch (fast, lightweight, no JavaScript support) */\n FETCH = 'fetch',\n /** Use Puppeteer with headless Chrome (full browser, JavaScript support) */\n PUPPETEER = 'puppeteer',\n}\n","import { z } from 'zod'\n\n// ===== Constants =====\n\nexport const MAX_FILE_SIZE = 100 * 1024 * 1024 // 100MB\n\nexport const MIME_TYPE_REGEX = /^[a-z]+\\/[a-z0-9\\-+.]+$/i\n\nexport const SUPPORTED_IMAGE_TYPES = [\n 'image/jpeg',\n 'image/png',\n 'image/gif',\n 'image/webp',\n 'image/svg+xml',\n] as const\n\nexport const SUPPORTED_DOCUMENT_TYPES = [\n 'application/pdf',\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'text/plain',\n 'text/markdown',\n] as const\n\nexport const SUPPORTED_VIDEO_TYPES = [\n 'video/mp4',\n 'video/webm',\n 'video/ogg',\n] as const\n\nexport const SUPPORTED_AUDIO_TYPES = [\n 'audio/mpeg',\n 'audio/wav',\n 'audio/ogg',\n] as const\n\n// ===== Enums =====\n\nexport enum StoragePolicy {\n DEFAULT = 'default',\n COLD = 'cold',\n HOT = 'hot',\n ARCHIVE = 'archive',\n}\n\nexport enum PreviewStatus {\n Pending = 'pending',\n Done = 'done',\n Failed = 'failed',\n}\n\n// ===== Storage Handle Schemas =====\n\nconst AzureBlobStorageHandleSchema = z.object({\n type: z.literal('azure-blob'),\n blobUri: z.url(),\n containerName: z.string().min(1),\n pathRelativeToContainer: z.string().min(1),\n})\n\nconst S3StorageHandleSchema = z.object({\n type: z.literal('s3'),\n bucket: z.string().min(1),\n key: z.string().min(1),\n region: z.string().min(1),\n})\n\nconst StorageHandleSchema = z.discriminatedUnion('type', [\n AzureBlobStorageHandleSchema,\n S3StorageHandleSchema,\n])\n\n// ===== Media Upload Schema =====\n\n/**\n * Media upload information for preparing a file upload\n */\nexport const MediaUploadSchema = z.object({\n /** Media type category (picture, video, audio, etc.) */\n type: z.string().min(1),\n /** Original filename */\n name: z.string().min(1),\n /** MIME type (e.g., 'image/jpeg') */\n mimeType: z.string().regex(MIME_TYPE_REGEX),\n /** File size in bytes (must be positive) */\n bytesCount: z.number().positive(),\n /** File extension with dot (e.g., '.jpg') */\n extension: z\n .string()\n .regex(/^\\.[a-zA-Z0-9]+$/)\n .transform((ext) => ext.toLowerCase()),\n /** Optional custom stored filename */\n storedFileName: z.string().optional(),\n /** Additional metadata key-value pairs */\n metadata: z.record(z.string(), z.string()).default({}),\n /** Storage tags for categorization */\n tags: z.record(z.string(), z.string()).default({}),\n})\nexport type MediaUpload = z.infer<typeof MediaUploadSchema>\n\n// ===== Media Source Schema =====\n\n/**\n * Complete media source information including storage details\n */\nexport const MediaSourceSchema = MediaUploadSchema.extend({\n /** Storage backend configuration */\n storageHandle: StorageHandleSchema,\n /** Storage tier/policy */\n storagePolicy: z.enum(StoragePolicy),\n /** Optional signature data for verification */\n signData: z.string().optional(),\n /** Actual stored filename (required) */\n storedFileName: z.string().min(1),\n})\nexport type MediaSource = z.infer<typeof MediaSourceSchema>\n\n// ===== Media Schema =====\n\n/**\n * Complete media object with source and optional variants\n */\nexport const MediaSchema = z.object({\n /** Display name for the media */\n name: z.string().min(1),\n /** Primary media source */\n src: MediaSourceSchema,\n /** Optional additional sources (e.g., different resolutions) */\n srcSet: z.array(MediaSourceSchema).default([]),\n /** Type-specific metadata (dimensions, duration, etc.) */\n rawOptions: z.custom<RawOptions>().optional(),\n})\nexport type Media = z.infer<typeof MediaSchema>\n\n// ===== Upload Handle Schema =====\n\n/**\n * Upload handle containing SAS URI and metadata for client-side upload\n */\nexport const MediaUploadHandleSchema = z.object({\n /** Media source information */\n src: MediaSourceSchema,\n /** Upload credentials and metadata */\n uploadHandle: z.object({\n /** Shared Access Signature URI for upload */\n uploadSasuri: z.string().url(),\n /** Metadata to attach to the blob */\n metadata: z.record(z.string(), z.string()).default({}),\n /** Tags to attach to the blob */\n tags: z.record(z.string(), z.string()).default({}),\n }),\n})\nexport type MediaUploadHandle = z.infer<typeof MediaUploadHandleSchema>\n\n// ===== Download Handle Schema =====\n\n/**\n * Download handle containing SAS URIs for different access patterns\n */\nexport const MediaDownloadHandleSchema = z.object({\n /** Media source information */\n src: MediaSourceSchema,\n /** Download credentials and URIs */\n downloadHandle: z.object({\n /** SAS URI for file download */\n downloadSasuri: z.string().url(),\n /** SAS URI for inline viewing */\n viewSasuri: z.string().url(),\n /** Optional SAS URI for preview thumbnail */\n previewSasuri: z.string().url().optional(),\n /** Expiration timestamp for the SAS URIs */\n expiresOn: z.string().datetime(),\n /** Storage backend type */\n type: z.string(),\n }),\n})\nexport type MediaDownloadHandle = z.infer<typeof MediaDownloadHandleSchema>\n\n// ===== Media Types =====\n\nexport enum MediaType {\n picture = 'picture',\n video = 'video',\n audio = 'audio',\n office = 'office',\n archive = 'archive',\n binary = 'binary',\n executable = 'executable',\n}\n\n// ===== Raw Options Schemas =====\n\nconst PictureRawOptionsSchema = z.object({\n type: z.literal(MediaType.picture),\n width: z.number().positive(),\n height: z.number().positive(),\n blurhash: z.string().optional(),\n})\n\nconst VideoRawOptionsSchema = z.object({\n type: z.literal(MediaType.video),\n width: z.number().positive(),\n height: z.number().positive(),\n duration: z.number().nonnegative(),\n})\n\nconst AudioRawOptionsSchema = z.object({\n type: z.literal(MediaType.audio),\n duration: z.number().nonnegative(),\n})\n\nconst OfficeRawOptionsSchema = z.object({\n type: z.literal(MediaType.office),\n})\n\nconst ArchiveRawOptionsSchema = z.object({\n type: z.literal(MediaType.archive),\n})\n\nconst BinaryRawOptionsSchema = z.object({\n type: z.literal(MediaType.binary),\n})\n\nconst ExecutableRawOptionsSchema = z.object({\n type: z.literal(MediaType.executable),\n})\n\nexport const RawOptionsSchema = z.discriminatedUnion('type', [\n PictureRawOptionsSchema,\n VideoRawOptionsSchema,\n AudioRawOptionsSchema,\n OfficeRawOptionsSchema,\n ArchiveRawOptionsSchema,\n BinaryRawOptionsSchema,\n ExecutableRawOptionsSchema,\n])\n\n// ===== Raw Options Types =====\n\n// ===== Raw Options Types =====\n\nexport type PictureRawOptions = z.infer<typeof PictureRawOptionsSchema>\nexport type VideoRawOptions = z.infer<typeof VideoRawOptionsSchema>\nexport type AudioRawOptions = z.infer<typeof AudioRawOptionsSchema>\nexport type OfficeRawOptions = z.infer<typeof OfficeRawOptionsSchema>\nexport type ArchiveRawOptions = z.infer<typeof ArchiveRawOptionsSchema>\nexport type BinaryRawOptions = z.infer<typeof BinaryRawOptionsSchema>\nexport type ExecutableRawOptions = z.infer<typeof ExecutableRawOptionsSchema>\n\nexport type RawOptions = z.infer<typeof RawOptionsSchema>\n\n// ===== Uploaded File Type =====\n\nexport type UploadedFile<Source = undefined> = Source extends undefined\n ? {\n name: string\n size: number\n type: string\n url: string\n lastModified?: number\n }\n : {\n name: string\n size: number\n type: string\n url: string\n lastModified?: number\n source: Source\n }\n\n// ===== Helper Functions =====\n\n/**\n * Check if a MIME type is a supported image format\n */\nexport const isSupportedImageType = (mimeType: string): boolean => {\n return mimeType.startsWith('image/')\n}\n\n/**\n * Check if a MIME type supports preview generation\n */\nexport const isSupportedPreviewType = (mimeType: string): boolean => {\n return mimeType.startsWith('image/') || mimeType === 'application/pdf'\n}\n\n/**\n * Determine MediaType from MIME type\n */\nexport const getMediaTypeFromMime = (mimeType: string): MediaType => {\n if (mimeType.startsWith('image/')) return MediaType.picture\n if (mimeType.startsWith('video/')) return MediaType.video\n if (mimeType.startsWith('audio/')) return MediaType.audio\n if (\n mimeType.startsWith('application/pdf') ||\n mimeType.startsWith('application/msword') ||\n mimeType.startsWith('application/vnd.openxmlformats') ||\n mimeType.startsWith('application/vnd.ms-')\n ) {\n return MediaType.office\n }\n if (\n mimeType === 'application/zip' ||\n mimeType === 'application/x-rar-compressed' ||\n mimeType === 'application/x-7z-compressed'\n ) {\n return MediaType.archive\n }\n if (\n mimeType.startsWith('application/x-') &&\n mimeType.includes('executable')\n ) {\n return MediaType.executable\n }\n return MediaType.binary\n}\n\n/**\n * Extract file extension from filename\n */\nexport const getExtensionFromFilename = (filename: string): string => {\n const lastDot = filename.lastIndexOf('.')\n return lastDot === -1 ? '' : filename.slice(lastDot).toLowerCase()\n}\n\n/**\n * Format bytes to human-readable string\n */\nexport const formatBytes = (bytes: number, decimals = 2): string => {\n if (bytes === 0) return '0 Bytes'\n const k = 1024\n const dm = decimals < 0 ? 0 : decimals\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']\n const i = Math.floor(Math.log(bytes) / Math.log(k))\n return `${parseFloat((bytes / Math.pow(k, i)).toFixed(dm))} ${sizes[i]}`\n}\n\n// ===== Type Guards =====\n\nexport const isPictureOptions = (\n options: RawOptions,\n): options is PictureRawOptions => {\n return options.type === MediaType.picture\n}\n\nexport const isVideoOptions = (\n options: RawOptions,\n): options is VideoRawOptions => {\n return options.type === MediaType.video\n}\n\nexport const isAudioOptions = (\n options: RawOptions,\n): options is AudioRawOptions => {\n return options.type === MediaType.audio\n}\n\nexport const isOfficeOptions = (\n options: RawOptions,\n): options is OfficeRawOptions => {\n return options.type === MediaType.office\n}\n\nexport const isArchiveOptions = (\n options: RawOptions,\n): options is ArchiveRawOptions => {\n return options.type === MediaType.archive\n}\n\nexport const isBinaryOptions = (\n options: RawOptions,\n): options is BinaryRawOptions => {\n return options.type === MediaType.binary\n}\n\nexport const isExecutableOptions = (\n options: RawOptions,\n): options is ExecutableRawOptions => {\n return options.type === MediaType.executable\n}\n","import * as z from 'zod'\n\nexport const HeaderSchema = z.object({\n key: z.string().optional(),\n value: z.string().optional(),\n})\n\nexport const HeadesSchema = z.array(HeaderSchema).transform((headers) => {\n return headers?.filter(\n (header) => header.key?.trim() && header.value?.trim(),\n ) as Array<{ key: string; value: string }>\n})\n\nexport type Header = z.infer<typeof HeaderSchema>\nexport type Headers = z.infer<typeof HeadesSchema>\n","import * as z from 'zod'\nimport { zodQs } from '../utils'\nimport {\n SupportedLanguage,\n ExtractionStrategy,\n BrowserEngine,\n} from './constants'\nimport { MediaSchema } from './Media'\nimport { HeadesSchema } from './Header'\n\n/**\n * Processing status for document indexing and embedding generation\n */\nexport enum IndexStatus {\n Pending = 'pending',\n Processing = 'processing',\n Success = 'success',\n Failed = 'failed',\n}\n\n// ===== Document Source Types =====\n\n/**\n * Conversion options for document processing\n * Used when creating or reprocessing documents\n */\nexport const ConversionOptionsSchema = z.object({\n extractionStrategy: z.enum(ExtractionStrategy).optional(),\n browserEngine: z.enum(BrowserEngine).optional(),\n headers: HeadesSchema.nullish(),\n aiDescriptionModel: z.string().optional(),\n aiDescriptionPrompt: z.string().max(5000).optional(),\n language: z.string().optional(),\n})\n\nexport type ConversionOptions = z.infer<typeof ConversionOptionsSchema>\n\n/**\n * Metadata structure for document.metadata column\n * Consolidates all metadata from converters and source info\n */\nexport const DocumentMetadataSchema = z\n .object({\n // === Source Info (URL documents only) ===\n source: z\n .object({\n url: z.string(),\n lastScrapedAt: z.string(),\n })\n .optional(),\n\n // === Media Info (File documents only) ===\n media: MediaSchema.optional(),\n\n // === Common Fields (all document types) ===\n title: z.string().optional(),\n author: z.string().optional(),\n description: z.string().optional(),\n summary: z.string().optional(),\n keywords: z.array(z.string()).optional(),\n\n // === PDF Specific ===\n subject: z.string().optional(),\n creator: z.string().optional(), // Original application\n producer: z.string().optional(), // PDF generator software\n creationDate: z.string().optional(),\n modificationDate: z.string().optional(),\n pageCount: z\n .union([z.number(), z.array(z.unknown())])\n .transform((val) => (Array.isArray(val) ? val.length : val))\n .optional(),\n encrypted: z.boolean().optional(),\n\n // === DOCX Specific ===\n characterCount: z.number().optional(),\n lineCount: z.number().optional(),\n\n // === URL Specific ===\n siteName: z.string().optional(),\n canonicalUrl: z.url().optional(),\n imageUrl: z.url().optional(),\n favicon: z.url().optional(),\n type: z.string().optional(), // og:type (article, website, etc.)\n locale: z.string().optional(),\n tags: z.array(z.string()).optional(),\n publishedTime: z.string().optional(),\n modifiedTime: z.string().optional(),\n\n // === Metrics (all document types) ===\n wordCount: z.number().optional(),\n paragraphCount: z.number().optional(),\n readingTime: z.number().optional(), // in minutes\n\n // === Conversion Options (for reprocessing) ===\n conversionOptions: ConversionOptionsSchema.optional(),\n })\n .loose() // Allow additional custom fields\n\nexport type DocumentMetadata = z.infer<typeof DocumentMetadataSchema>\n\n/**\n * Document type enum\n *\n * - 'file': Document created from uploaded file (PDF, DOCX)\n * - 'url': Document created from web scraping\n * - 'revised-answer': Document created from revised AI answer\n * - 'plain-text': Document created from plain text input\n */\nexport enum DocumentType {\n File = 'file',\n Url = 'url',\n RevisedAnswer = 'revised-answer',\n PlainText = 'plain-text',\n}\n\n// ===== Schemas =====\n\n/**\n * Full document schema from database\n * Extended with computed field chunksCount\n */\nconst BaseDocumentSchema = z.object({\n id: z.string(),\n externalId: z.string().nullable(),\n name: z.string(),\n content: z.string(),\n type: z.string(),\n language: z.string(),\n metadata: z.record(z.string(), z.unknown()),\n indexStatus: z.string(),\n processedAt: z.coerce.date().nullable(),\n createdAt: z.coerce.date(),\n createdBy: z.string(),\n updatedAt: z.coerce.date(),\n updatedBy: z.string(),\n deleted: z.boolean(),\n deletedAt: z.coerce.date().nullable(),\n deletedBy: z.string().nullable(),\n organizationId: z.string(),\n})\n\nexport const DocumentSchema = BaseDocumentSchema.extend({\n type: z.enum(DocumentType),\n indexStatus: z.enum(IndexStatus),\n metadata: DocumentMetadataSchema,\n // Add computed field for chunks count (populated by service layer)\n chunksCount: z.number().optional(),\n})\n\n/**\n * Query parameters for listing documents with pagination, sorting, and filters\n */\nexport const DocumentQuerystringSchema = z.object({\n ...zodQs.pagination(),\n ...zodQs.sort(['id', 'updatedAt', 'createdAt', 'name']),\n ...zodQs.filters(['type', 'language', 'agentId', 'indexStatus']),\n ...zodQs.fullText(),\n ...zodQs.ids(),\n 'filter[similarity]': z.string().optional(),\n})\n\n/**\n * Document creation schema for POST /documents endpoint\n *\n * Supports three types:\n * - 'file': Requires media object with uploaded file info\n * - 'url': Requires url string for web scraping\n * - 'revised-answer': Requires content (created from revisedAnswer service)\n */\nexport const DocumentCreateDtoSchema = z\n .object({\n type: z.enum(DocumentType).default(DocumentType.File),\n name: z.string().min(1).max(255).optional(),\n language: z.enum(SupportedLanguage).optional(),\n organizationId: z.string(),\n agentIds: z.array(z.string()).min(1, 'At least one agent is required'),\n media: MediaSchema.optional(),\n url: z.url().optional(),\n content: z.string().optional(),\n metadata: z.record(z.string(), z.unknown()).optional(),\n extractionStrategy: z.enum(ExtractionStrategy).optional(),\n browserEngine: z.enum(BrowserEngine).optional(),\n headers: HeadesSchema.nullish().default([]),\n aiDescriptionModel: z.string().optional(),\n aiDescriptionPrompt: z.string().max(5000).optional(),\n })\n .superRefine((data, ctx) => {\n if (data.type === DocumentType.File && !data.media) {\n ctx.addIssue({\n code: 'custom',\n params: {\n i18n: 'errors.required',\n },\n path: ['media'],\n })\n return\n }\n if (data.type === DocumentType.Url && !data.url) {\n ctx.addIssue({\n code: 'custom',\n params: {\n i18n: 'errors.required',\n },\n path: ['url'],\n })\n }\n if (\n data.type === DocumentType.PlainText &&\n !(data.name || data.language)\n ) {\n if (!data.name) {\n ctx.addIssue({\n code: 'custom',\n params: {\n i18n: 'errors.required',\n },\n path: ['name'],\n })\n }\n if (!data.language) {\n ctx.addIssue({\n code: 'custom',\n params: {\n i18n: 'errors.required',\n },\n path: ['language'],\n })\n }\n }\n })\n\n/**\n * Document update schema for PUT /documents/:id endpoint\n *\n * All fields are optional, but at least one must be provided\n */\nexport const DocumentUpdateDtoSchema = z.object({\n id: z.string(),\n organizationId: z.string(),\n content: z.string().optional(),\n name: z.string().min(1).max(255).optional(),\n language: z.enum(SupportedLanguage).optional(),\n agentIds: z.array(z.string()).min(1).optional(),\n metadata: z.record(z.string(), z.unknown()).optional(),\n})\n\n// ===== Type Exports =====\n\nexport type Document = z.infer<typeof DocumentSchema>\nexport type DocumentQuerystring = z.infer<typeof DocumentQuerystringSchema>\nexport type DocumentCreateDto = z.infer<typeof DocumentCreateDtoSchema>\nexport type DocumentUpdateDto = z.infer<typeof DocumentUpdateDtoSchema>\n\n// ===== Helper Functions =====\n\nexport const getStatusColor = (status: IndexStatus) => {\n switch (status) {\n case IndexStatus.Success:\n return 'success'\n case IndexStatus.Failed:\n return 'danger'\n case IndexStatus.Processing:\n return 'warning'\n default:\n return 'info'\n }\n}\n\nexport const getStatusIcon = (status: IndexStatus) => {\n switch (status) {\n case IndexStatus.Success:\n return 'ri:check-line'\n case IndexStatus.Failed:\n return 'ri:error-warning-line'\n case IndexStatus.Processing:\n return 'ri:hourglass-line'\n default:\n return 'ri:time-line'\n }\n}\n\nexport const getTypeIcon = (type: DocumentType) => {\n switch (type) {\n case DocumentType.File:\n return 'ri:file-line'\n case DocumentType.Url:\n return 'ri:link'\n case DocumentType.RevisedAnswer:\n return 'ri:feedback-line'\n default:\n return 'ri:input-method-line'\n }\n}\n\nexport const getFileIcon = (extension: string) => {\n const ext = (\n extension.startsWith('.') ? extension.slice(1) : extension\n ).toLowerCase()\n switch (ext) {\n case 'pdf':\n return 'ri:file-pdf-2-line'\n case 'doc':\n case 'docx':\n return 'ri:file-word-line'\n case 'xls':\n case 'xlsx':\n return 'ri:file-excel-line'\n case 'ppt':\n case 'pptx':\n return 'ri:file-ppt-line'\n case 'txt':\n return 'ri:file-text-line'\n case 'mp3':\n case 'wav':\n case 'ogg':\n return 'ri:file-music-line'\n case 'mp4':\n case 'avi':\n case 'mkv':\n return 'ri:file-video-line'\n case 'jpg':\n case 'jpeg':\n case 'png':\n case 'gif':\n case 'bmp':\n case 'svg':\n return 'ri:file-image-line'\n case 'zip':\n case 'rar':\n case '7z':\n return 'ri:file-zip-line'\n default:\n return 'ri:file-line'\n }\n}\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { stripMarkdown } from 'utils'\n\n const props = defineProps<{\n content: string\n similarity?: number\n maxSimilarity?: number\n expanded: boolean\n }>()\n\n const similarityPercent = computed(() => {\n if (props.similarity == null) {\n return null\n }\n const max =\n props.maxSimilarity && props.maxSimilarity > 0\n ? props.maxSimilarity\n : 1\n return Math.round((props.similarity / max) * 100)\n })\n</script>\n\n<template>\n <VvIcon name=\"ri:text-snippet\" class=\"shrink-0 text-12 text-word-4\" />\n <span class=\"text-10 text-word-2 truncate flex-1\" :title=\"content\">\n {{ stripMarkdown(content) }}\n </span>\n <span v-if=\"similarityPercent != null\" class=\"text-10 text-word-4 shrink-0\">\n {{ similarityPercent }}%\n </span>\n <VvIcon\n :name=\"expanded ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\"\n class=\"text-14 text-word-4 shrink-0\" />\n</template>\n","<script setup lang=\"ts\">\n import { computed } from 'vue'\n import { stripMarkdown } from 'utils'\n\n const props = defineProps<{\n content: string\n similarity?: number\n maxSimilarity?: number\n expanded: boolean\n }>()\n\n const similarityPercent = computed(() => {\n if (props.similarity == null) {\n return null\n }\n const max =\n props.maxSimilarity && props.maxSimilarity > 0\n ? props.maxSimilarity\n : 1\n return Math.round((props.similarity / max) * 100)\n })\n</script>\n\n<template>\n <VvIcon name=\"ri:text-snippet\" class=\"shrink-0 text-12 text-word-4\" />\n <span class=\"text-10 text-word-2 truncate flex-1\" :title=\"content\">\n {{ stripMarkdown(content) }}\n </span>\n <span v-if=\"similarityPercent != null\" class=\"text-10 text-word-4 shrink-0\">\n {{ similarityPercent }}%\n </span>\n <VvIcon\n :name=\"expanded ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\"\n class=\"text-14 text-word-4 shrink-0\" />\n</template>\n","<script setup lang=\"ts\">\n import type { DocumentType } from 'models'\n import { getTypeIcon } from 'models'\n import PkUrl from '../PkUrl.vue'\n\n defineProps<{\n type: string\n name: string\n url?: string\n filename?: string\n }>()\n</script>\n\n<template>\n <VvIcon\n :name=\"getTypeIcon(type as DocumentType)\"\n class=\"shrink-0 text-14 text-word-3\" />\n <div class=\"flex flex-col gap-2 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate block\">\n {{ name }}\n </strong>\n <span v-if=\"filename\" class=\"text-10 text-word-4 truncate\">\n {{ filename }}\n </span>\n <span\n v-if=\"url\"\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-10\" />\n <PkUrl :url=\"url\" />\n </span>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import type { DocumentType } from 'models'\n import { getTypeIcon } from 'models'\n import PkUrl from '../PkUrl.vue'\n\n defineProps<{\n type: string\n name: string\n url?: string\n filename?: string\n }>()\n</script>\n\n<template>\n <VvIcon\n :name=\"getTypeIcon(type as DocumentType)\"\n class=\"shrink-0 text-14 text-word-3\" />\n <div class=\"flex flex-col gap-2 min-w-0 flex-1\">\n <strong class=\"font-bold text-12 text-word-1 truncate block\">\n {{ name }}\n </strong>\n <span v-if=\"filename\" class=\"text-10 text-word-4 truncate\">\n {{ filename }}\n </span>\n <span\n v-if=\"url\"\n class=\"text-10 text-word-4 truncate flex items-center gap-4\">\n <VvIcon name=\"ri:link\" class=\"shrink-0 text-10\" />\n <PkUrl :url=\"url\" />\n </span>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, reactive } from 'vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import PkChunkPreview from './PkChunkPreview.vue'\n import PkDocumentHeader from './PkDocumentHeader.vue'\n\n interface SourceItem {\n chunkId: string\n documentId: string\n documentName: string\n documentType: string\n language: string\n content: string\n chunkIndex?: number | null\n similarity?: number\n sourceUrl?: string\n sourceFilename?: string\n sourceDescription?: string\n sourceImageUrl?: string\n }\n\n const props = defineProps<{\n part: unknown\n onExpandContext?: (payload: {\n documentId: string\n chunkIndex: number\n }) => Promise<string>\n onDownload?: (documentId: string) => void\n }>()\n\n const toolPart = computed(() => {\n return props.part as {\n input?: {\n sources: SourceItem[]\n }\n }\n })\n\n const sources = computed(() => toolPart.value.input?.sources || [])\n\n const groupedSources = computed(() => {\n const groups = new Map<\n string,\n { document: SourceItem; chunks: SourceItem[] }\n >()\n for (const source of sources.value) {\n const existing = groups.get(source.documentId)\n if (existing) {\n existing.chunks.push(source)\n } else {\n groups.set(source.documentId, {\n document: source,\n chunks: [source],\n })\n }\n }\n return [...groups.values()]\n })\n\n const maxSimilarity = computed(() => {\n return Math.max(...sources.value.map((s) => s.similarity ?? 0), 0)\n })\n\n const expandedDocuments = reactive(new Set<string>())\n const expandedChunks = reactive(new Set<string>())\n const contextData = reactive(new Map<string, string>())\n const loadingContext = reactive(new Set<string>())\n\n const toggleDocument = (documentId: string) => {\n if (expandedDocuments.has(documentId)) {\n expandedDocuments.delete(documentId)\n } else {\n expandedDocuments.add(documentId)\n }\n }\n\n const toggleChunk = (chunkId: string) => {\n if (expandedChunks.has(chunkId)) {\n expandedChunks.delete(chunkId)\n } else {\n expandedChunks.add(chunkId)\n }\n }\n\n const handleExpandContext = async (source: SourceItem) => {\n if (source.chunkIndex == null || !props.onExpandContext) {\n return\n }\n loadingContext.add(source.chunkId)\n try {\n const content = await props.onExpandContext({\n documentId: source.documentId,\n chunkIndex: source.chunkIndex,\n })\n contextData.set(source.chunkId, content)\n } finally {\n loadingContext.delete(source.chunkId)\n }\n }\n\n const clearContext = (chunkId: string) => {\n contextData.delete(chunkId)\n }\n\n const showMore = ref(false)\n const visibleGroups = computed(() => {\n if (showMore.value) {\n return groupedSources.value\n }\n return groupedSources.value.slice(0, 3)\n })\n const hasMore = computed(() => groupedSources.value.length > 3)\n</script>\n\n<template>\n <div v-if=\"sources.length\" class=\"flex flex-col gap-xs w-full\">\n <div class=\"flex items-center gap-4 text-12 text-word-3 font-semibold\">\n <VvIcon name=\"ri:article-line\" class=\"text-14\" />\n {{ $t('label.sources') }}\n <span class=\"text-word-4 font-normal\">\n ({{ groupedSources.length }})\n </span>\n </div>\n\n <ul class=\"flex flex-col gap-xs\">\n <li\n v-for=\"group in visibleGroups\"\n :key=\"group.document.documentId\"\n class=\"border border-surface-3 rounded-lg overflow-hidden\">\n <!-- Document header -->\n <button\n class=\"flex items-center gap-8 p-8 w-full text-left hover:bg-surface-1 transition-colors cursor-pointer\"\n @click=\"toggleDocument(group.document.documentId)\">\n <PkDocumentHeader\n :type=\"group.document.documentType\"\n :name=\"group.document.documentName\"\n :url=\"group.document.sourceUrl\"\n :filename=\"group.document.sourceFilename\" />\n <div class=\"flex items-center gap-4 shrink-0\">\n <span\n v-if=\"group.chunks.length > 1\"\n class=\"text-10 text-word-4 bg-surface-2 rounded px-4 py-2\">\n {{ group.chunks.length }}\n </span>\n <span\n class=\"text-10 text-word-4 bg-surface-2 rounded px-4 py-2 uppercase\">\n {{ group.document.language }}\n </span>\n <VvIcon\n :name=\"\n expandedDocuments.has(group.document.documentId)\n ? 'ri:arrow-up-s-line'\n : 'ri:arrow-down-s-line'\n \"\n class=\"text-16 text-word-3\" />\n </div>\n </button>\n\n <!-- Expanded content -->\n <div\n v-if=\"expandedDocuments.has(group.document.documentId)\"\n class=\"border-t border-surface-3\">\n <PkStreamingMarkdown\n v-if=\"group.document.sourceDescription\"\n :markdown=\"group.document.sourceDescription\"\n class=\"px-8 py-4 text-10 text-word-3 bg-surface-1 border-b border-surface-3\" />\n\n <!-- Chunk excerpts -->\n <div\n v-for=\"chunk in group.chunks\"\n :key=\"chunk.chunkId\"\n class=\"border-b border-surface-3 last:border-b-0\">\n <button\n class=\"flex items-center gap-8 px-8 py-6 w-full text-left hover:bg-surface-1 transition-colors cursor-pointer\"\n @click=\"toggleChunk(chunk.chunkId)\">\n <PkChunkPreview\n :content=\"chunk.content\"\n :similarity=\"chunk.similarity\"\n :max-similarity=\"maxSimilarity\"\n :expanded=\"expandedChunks.has(chunk.chunkId)\" />\n </button>\n\n <!-- Expanded chunk content -->\n <div\n v-if=\"expandedChunks.has(chunk.chunkId)\"\n class=\"bg-surface-1 border-t border-surface-3\">\n <div class=\"p-8 text-10 text-word-3\">\n <transition mode=\"out-in\">\n <!-- Context expansion -->\n <PkStreamingMarkdown\n v-if=\"contextData.has(chunk.chunkId)\"\n :markdown=\"\n contextData.get(chunk.chunkId)!\n \"\n class=\"wysiwyg\" />\n\n <!-- Chunk content -->\n <PkStreamingMarkdown\n v-else\n :markdown=\"chunk.content\"\n class=\"wysiwyg\" />\n </transition>\n </div>\n\n <!-- Actions bar -->\n <div\n class=\"flex items-center gap-8 px-8 py-6 border-t border-surface-3 bg-surface\">\n <!-- Expand / collapse context -->\n <button\n v-if=\"\n onExpandContext &&\n chunk.chunkIndex != null &&\n !contextData.has(chunk.chunkId)\n \"\n class=\"text-10 text-word-3 hover:text-word flex items-center gap-4 cursor-pointer\"\n :disabled=\"\n loadingContext.has(chunk.chunkId)\n \"\n @click=\"handleExpandContext(chunk)\">\n <VvIcon\n :name=\"\n loadingContext.has(chunk.chunkId)\n ? 'line-md:loading-loop'\n : 'ri:expand-up-down-line'\n \"\n class=\"text-12\" />\n {{ $t('label.expandContext') }}\n </button>\n <button\n v-else-if=\"contextData.has(chunk.chunkId)\"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer\"\n @click=\"clearContext(chunk.chunkId)\">\n <VvIcon\n name=\"ri:collapse-vertical-line\"\n class=\"text-12\" />\n {{ $t('label.collapseContext') }}\n </button>\n\n <!-- Open source URL -->\n <a\n v-if=\"chunk.sourceUrl\"\n :href=\"chunk.sourceUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 ml-auto\">\n <VvIcon\n name=\"ri:external-link-line\"\n class=\"text-12\" />\n {{ $t('label.openSource') }}\n </a>\n\n <!-- Download file -->\n <button\n v-if=\"\n onDownload &&\n chunk.documentType === 'file'\n \"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer\"\n :class=\"{\n 'ml-auto': !chunk.sourceUrl,\n }\"\n @click=\"onDownload(chunk.documentId)\">\n <VvIcon\n name=\"ri:download-line\"\n class=\"text-12\" />\n {{ $t('label.downloadFile') }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </li>\n </ul>\n\n <!-- Show more -->\n <button\n v-if=\"hasMore\"\n class=\"text-12 text-word-3 cursor-pointer hover:underline flex items-center gap-4 mx-auto\"\n @click=\"showMore = !showMore\">\n <VvIcon\n :name=\"showMore ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\"\n class=\"text-16\" />\n {{\n showMore\n ? $t('action.showLess')\n : $t('action.showMore', {\n count: groupedSources.length - 3,\n })\n }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n import { computed, ref, reactive } from 'vue'\n import PkStreamingMarkdown from './PkStreamingMarkdown.vue'\n import PkChunkPreview from './PkChunkPreview.vue'\n import PkDocumentHeader from './PkDocumentHeader.vue'\n\n interface SourceItem {\n chunkId: string\n documentId: string\n documentName: string\n documentType: string\n language: string\n content: string\n chunkIndex?: number | null\n similarity?: number\n sourceUrl?: string\n sourceFilename?: string\n sourceDescription?: string\n sourceImageUrl?: string\n }\n\n const props = defineProps<{\n part: unknown\n onExpandContext?: (payload: {\n documentId: string\n chunkIndex: number\n }) => Promise<string>\n onDownload?: (documentId: string) => void\n }>()\n\n const toolPart = computed(() => {\n return props.part as {\n input?: {\n sources: SourceItem[]\n }\n }\n })\n\n const sources = computed(() => toolPart.value.input?.sources || [])\n\n const groupedSources = computed(() => {\n const groups = new Map<\n string,\n { document: SourceItem; chunks: SourceItem[] }\n >()\n for (const source of sources.value) {\n const existing = groups.get(source.documentId)\n if (existing) {\n existing.chunks.push(source)\n } else {\n groups.set(source.documentId, {\n document: source,\n chunks: [source],\n })\n }\n }\n return [...groups.values()]\n })\n\n const maxSimilarity = computed(() => {\n return Math.max(...sources.value.map((s) => s.similarity ?? 0), 0)\n })\n\n const expandedDocuments = reactive(new Set<string>())\n const expandedChunks = reactive(new Set<string>())\n const contextData = reactive(new Map<string, string>())\n const loadingContext = reactive(new Set<string>())\n\n const toggleDocument = (documentId: string) => {\n if (expandedDocuments.has(documentId)) {\n expandedDocuments.delete(documentId)\n } else {\n expandedDocuments.add(documentId)\n }\n }\n\n const toggleChunk = (chunkId: string) => {\n if (expandedChunks.has(chunkId)) {\n expandedChunks.delete(chunkId)\n } else {\n expandedChunks.add(chunkId)\n }\n }\n\n const handleExpandContext = async (source: SourceItem) => {\n if (source.chunkIndex == null || !props.onExpandContext) {\n return\n }\n loadingContext.add(source.chunkId)\n try {\n const content = await props.onExpandContext({\n documentId: source.documentId,\n chunkIndex: source.chunkIndex,\n })\n contextData.set(source.chunkId, content)\n } finally {\n loadingContext.delete(source.chunkId)\n }\n }\n\n const clearContext = (chunkId: string) => {\n contextData.delete(chunkId)\n }\n\n const showMore = ref(false)\n const visibleGroups = computed(() => {\n if (showMore.value) {\n return groupedSources.value\n }\n return groupedSources.value.slice(0, 3)\n })\n const hasMore = computed(() => groupedSources.value.length > 3)\n</script>\n\n<template>\n <div v-if=\"sources.length\" class=\"flex flex-col gap-xs w-full\">\n <div class=\"flex items-center gap-4 text-12 text-word-3 font-semibold\">\n <VvIcon name=\"ri:article-line\" class=\"text-14\" />\n {{ $t('label.sources') }}\n <span class=\"text-word-4 font-normal\">\n ({{ groupedSources.length }})\n </span>\n </div>\n\n <ul class=\"flex flex-col gap-xs\">\n <li\n v-for=\"group in visibleGroups\"\n :key=\"group.document.documentId\"\n class=\"border border-surface-3 rounded-lg overflow-hidden\">\n <!-- Document header -->\n <button\n class=\"flex items-center gap-8 p-8 w-full text-left hover:bg-surface-1 transition-colors cursor-pointer\"\n @click=\"toggleDocument(group.document.documentId)\">\n <PkDocumentHeader\n :type=\"group.document.documentType\"\n :name=\"group.document.documentName\"\n :url=\"group.document.sourceUrl\"\n :filename=\"group.document.sourceFilename\" />\n <div class=\"flex items-center gap-4 shrink-0\">\n <span\n v-if=\"group.chunks.length > 1\"\n class=\"text-10 text-word-4 bg-surface-2 rounded px-4 py-2\">\n {{ group.chunks.length }}\n </span>\n <span\n class=\"text-10 text-word-4 bg-surface-2 rounded px-4 py-2 uppercase\">\n {{ group.document.language }}\n </span>\n <VvIcon\n :name=\"\n expandedDocuments.has(group.document.documentId)\n ? 'ri:arrow-up-s-line'\n : 'ri:arrow-down-s-line'\n \"\n class=\"text-16 text-word-3\" />\n </div>\n </button>\n\n <!-- Expanded content -->\n <div\n v-if=\"expandedDocuments.has(group.document.documentId)\"\n class=\"border-t border-surface-3\">\n <PkStreamingMarkdown\n v-if=\"group.document.sourceDescription\"\n :markdown=\"group.document.sourceDescription\"\n class=\"px-8 py-4 text-10 text-word-3 bg-surface-1 border-b border-surface-3\" />\n\n <!-- Chunk excerpts -->\n <div\n v-for=\"chunk in group.chunks\"\n :key=\"chunk.chunkId\"\n class=\"border-b border-surface-3 last:border-b-0\">\n <button\n class=\"flex items-center gap-8 px-8 py-6 w-full text-left hover:bg-surface-1 transition-colors cursor-pointer\"\n @click=\"toggleChunk(chunk.chunkId)\">\n <PkChunkPreview\n :content=\"chunk.content\"\n :similarity=\"chunk.similarity\"\n :max-similarity=\"maxSimilarity\"\n :expanded=\"expandedChunks.has(chunk.chunkId)\" />\n </button>\n\n <!-- Expanded chunk content -->\n <div\n v-if=\"expandedChunks.has(chunk.chunkId)\"\n class=\"bg-surface-1 border-t border-surface-3\">\n <div class=\"p-8 text-10 text-word-3\">\n <transition mode=\"out-in\">\n <!-- Context expansion -->\n <PkStreamingMarkdown\n v-if=\"contextData.has(chunk.chunkId)\"\n :markdown=\"\n contextData.get(chunk.chunkId)!\n \"\n class=\"wysiwyg\" />\n\n <!-- Chunk content -->\n <PkStreamingMarkdown\n v-else\n :markdown=\"chunk.content\"\n class=\"wysiwyg\" />\n </transition>\n </div>\n\n <!-- Actions bar -->\n <div\n class=\"flex items-center gap-8 px-8 py-6 border-t border-surface-3 bg-surface\">\n <!-- Expand / collapse context -->\n <button\n v-if=\"\n onExpandContext &&\n chunk.chunkIndex != null &&\n !contextData.has(chunk.chunkId)\n \"\n class=\"text-10 text-word-3 hover:text-word flex items-center gap-4 cursor-pointer\"\n :disabled=\"\n loadingContext.has(chunk.chunkId)\n \"\n @click=\"handleExpandContext(chunk)\">\n <VvIcon\n :name=\"\n loadingContext.has(chunk.chunkId)\n ? 'line-md:loading-loop'\n : 'ri:expand-up-down-line'\n \"\n class=\"text-12\" />\n {{ $t('label.expandContext') }}\n </button>\n <button\n v-else-if=\"contextData.has(chunk.chunkId)\"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer\"\n @click=\"clearContext(chunk.chunkId)\">\n <VvIcon\n name=\"ri:collapse-vertical-line\"\n class=\"text-12\" />\n {{ $t('label.collapseContext') }}\n </button>\n\n <!-- Open source URL -->\n <a\n v-if=\"chunk.sourceUrl\"\n :href=\"chunk.sourceUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 ml-auto\">\n <VvIcon\n name=\"ri:external-link-line\"\n class=\"text-12\" />\n {{ $t('label.openSource') }}\n </a>\n\n <!-- Download file -->\n <button\n v-if=\"\n onDownload &&\n chunk.documentType === 'file'\n \"\n class=\"text-10 text-word-3 hover:text-word-1 flex items-center gap-4 cursor-pointer\"\n :class=\"{\n 'ml-auto': !chunk.sourceUrl,\n }\"\n @click=\"onDownload(chunk.documentId)\">\n <VvIcon\n name=\"ri:download-line\"\n class=\"text-12\" />\n {{ $t('label.downloadFile') }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </li>\n </ul>\n\n <!-- Show more -->\n <button\n v-if=\"hasMore\"\n class=\"text-12 text-word-3 cursor-pointer hover:underline flex items-center gap-4 mx-auto\"\n @click=\"showMore = !showMore\">\n <VvIcon\n :name=\"showMore ? 'ri:arrow-up-s-line' : 'ri:arrow-down-s-line'\"\n class=\"text-16\" />\n {{\n showMore\n ? $t('action.showLess')\n : $t('action.showMore', {\n count: groupedSources.length - 3,\n })\n }}\n </button>\n </div>\n</template>\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;AAcA,SAAgB,EAAK,GAAQ;AACzB,QAAOA,EAAkBC,GAAiB,EAAO;;;;ACJrD,IAAa,KAAwC,MAC1C,CAAC,GAAG,KAAS,IAAI,IAAQ,EAGvB,KAAyC,MAC3C,EAAM,SAAS,MAAM,EAAa,EAAE,CAAC,EAGnC,IAAQ;CACjB,aAAa,IAAgB,GAAG,IAAc,QACnC;EACH,gBAAgB,GACH,CACR,GAAG,GAAU,CAA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