@helpai/elements 0.59.2 → 0.59.4
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/configurator.mjs +17 -18
- package/elements-web-component.esm.js +28 -28
- package/elements-web-component.esm.js.map +3 -3
- package/elements.cjs.js +28 -28
- package/elements.cjs.js.map +3 -3
- package/elements.esm.js +28 -28
- package/elements.esm.js.map +3 -3
- package/elements.js +28 -28
- package/elements.js.map +3 -3
- package/index.d.ts +35 -21
- package/index.mjs +20 -38
- package/package.json +1 -1
- package/schema.d.ts +35 -36
- package/schema.json +40 -62
- package/schema.mjs +17 -18
- package/web-component.mjs +20 -38
package/schema.json
CHANGED
|
@@ -485,14 +485,9 @@
|
|
|
485
485
|
"description": "Show the citation sources behind an answer (web links + document/file references) in the transcript. `false` (default) hides them.",
|
|
486
486
|
"type": "boolean"
|
|
487
487
|
},
|
|
488
|
-
"
|
|
489
|
-
"default":
|
|
490
|
-
"description": "
|
|
491
|
-
"type": "boolean"
|
|
492
|
-
},
|
|
493
|
-
"enableMessageFeedback": {
|
|
494
|
-
"default": true,
|
|
495
|
-
"description": "Show 👍/👎 feedback controls under each assistant reply. `true` (default) shows them. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`.",
|
|
488
|
+
"disableMessageFeedback": {
|
|
489
|
+
"default": false,
|
|
490
|
+
"description": "Turn OFF the 👍/👎 feedback controls under each assistant reply. Unset/`false` = shown (default), `true` = hidden. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`.",
|
|
496
491
|
"type": "boolean"
|
|
497
492
|
}
|
|
498
493
|
},
|
|
@@ -502,8 +497,7 @@
|
|
|
502
497
|
"showReasoning",
|
|
503
498
|
"showToolCalls",
|
|
504
499
|
"showSources",
|
|
505
|
-
"
|
|
506
|
-
"enableMessageFeedback"
|
|
500
|
+
"disableMessageFeedback"
|
|
507
501
|
],
|
|
508
502
|
"additionalProperties": {},
|
|
509
503
|
"description": "Conversation behaviour — lifecycle, streaming, and the transcript surface (scroll, feedback).",
|
|
@@ -515,8 +509,7 @@
|
|
|
515
509
|
{
|
|
516
510
|
"startMinimized": false,
|
|
517
511
|
"responseMode": "buffered",
|
|
518
|
-
"
|
|
519
|
-
"enableMessageFeedback": false
|
|
512
|
+
"disableMessageFeedback": true
|
|
520
513
|
}
|
|
521
514
|
]
|
|
522
515
|
},
|
|
@@ -1259,9 +1252,9 @@
|
|
|
1259
1252
|
"features": {
|
|
1260
1253
|
"type": "object",
|
|
1261
1254
|
"properties": {
|
|
1262
|
-
"
|
|
1263
|
-
"default":
|
|
1264
|
-
"description": "
|
|
1255
|
+
"disableFileUpload": {
|
|
1256
|
+
"default": false,
|
|
1257
|
+
"description": "Turn OFF file uploads — hide the paperclip button + reject drag/drop/paste. Unset/`false` = enabled (default), `true` = disabled.",
|
|
1265
1258
|
"type": "boolean"
|
|
1266
1259
|
},
|
|
1267
1260
|
"voice": {
|
|
@@ -1309,30 +1302,28 @@
|
|
|
1309
1302
|
]
|
|
1310
1303
|
}
|
|
1311
1304
|
},
|
|
1312
|
-
"
|
|
1313
|
-
"default":
|
|
1314
|
-
"description": "
|
|
1305
|
+
"disableHumanInLoop": {
|
|
1306
|
+
"default": false,
|
|
1307
|
+
"description": "Turn OFF the human-in-the-loop tool UI — the inline ask-questions form + approve/reject controls for gated tools. Unset/`false` = shown (default), `true` = suppressed (the wire still carries the signals).",
|
|
1315
1308
|
"type": "boolean"
|
|
1316
1309
|
}
|
|
1317
1310
|
},
|
|
1318
1311
|
"required": [
|
|
1319
|
-
"
|
|
1312
|
+
"disableFileUpload",
|
|
1320
1313
|
"voice",
|
|
1321
|
-
"
|
|
1314
|
+
"disableHumanInLoop"
|
|
1322
1315
|
],
|
|
1323
1316
|
"additionalProperties": {},
|
|
1324
1317
|
"description": "Capability flags — file upload, voice mode, and the tools the assistant may invoke.",
|
|
1325
1318
|
"examples": [
|
|
1326
1319
|
{
|
|
1327
|
-
"files": true,
|
|
1328
1320
|
"voice": "local"
|
|
1329
1321
|
},
|
|
1330
1322
|
{
|
|
1331
|
-
"
|
|
1323
|
+
"disableFileUpload": true,
|
|
1332
1324
|
"voice": "disabled"
|
|
1333
1325
|
},
|
|
1334
1326
|
{
|
|
1335
|
-
"files": true,
|
|
1336
1327
|
"voice": "server",
|
|
1337
1328
|
"tools": [
|
|
1338
1329
|
"tool:send-money"
|
|
@@ -1841,8 +1832,8 @@
|
|
|
1841
1832
|
"type": "string",
|
|
1842
1833
|
"maxLength": 80
|
|
1843
1834
|
},
|
|
1844
|
-
"
|
|
1845
|
-
"description": "`home` —
|
|
1835
|
+
"hideGreeting": {
|
|
1836
|
+
"description": "`home` — hide the greeting hero. Unset/`false` = shown (default), `true` = hidden.",
|
|
1846
1837
|
"type": "boolean"
|
|
1847
1838
|
},
|
|
1848
1839
|
"greetingText": {
|
|
@@ -1878,12 +1869,12 @@
|
|
|
1878
1869
|
"additionalProperties": {}
|
|
1879
1870
|
}
|
|
1880
1871
|
},
|
|
1881
|
-
"
|
|
1882
|
-
"description": "`home` —
|
|
1872
|
+
"hideSearchBar": {
|
|
1873
|
+
"description": "`home` — hide the 'Search for help' bar. Unset/`false` = shown (default), `true` = hidden.",
|
|
1883
1874
|
"type": "boolean"
|
|
1884
1875
|
},
|
|
1885
|
-
"
|
|
1886
|
-
"description": "`home` —
|
|
1876
|
+
"hideRecentConversations": {
|
|
1877
|
+
"description": "`home` — hide the visitor's most recent conversation card. Unset/`false` = shown (default), `true` = hidden.",
|
|
1887
1878
|
"type": "boolean"
|
|
1888
1879
|
},
|
|
1889
1880
|
"status": {
|
|
@@ -1939,8 +1930,6 @@
|
|
|
1939
1930
|
"label": "tabHome",
|
|
1940
1931
|
"layout": "home",
|
|
1941
1932
|
"brandName": "Acme",
|
|
1942
|
-
"showSearchBar": true,
|
|
1943
|
-
"showRecentConversations": true,
|
|
1944
1933
|
"contentBlockTitle": "Popular articles",
|
|
1945
1934
|
"contentTags": [
|
|
1946
1935
|
"popular"
|
|
@@ -2357,14 +2346,9 @@
|
|
|
2357
2346
|
"description": "Show the citation sources behind an answer (web links + document/file references) in the transcript. `false` (default) hides them.",
|
|
2358
2347
|
"type": "boolean"
|
|
2359
2348
|
},
|
|
2360
|
-
"
|
|
2361
|
-
"default":
|
|
2362
|
-
"description": "
|
|
2363
|
-
"type": "boolean"
|
|
2364
|
-
},
|
|
2365
|
-
"enableMessageFeedback": {
|
|
2366
|
-
"default": true,
|
|
2367
|
-
"description": "Show 👍/👎 feedback controls under each assistant reply. `true` (default) shows them. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`.",
|
|
2349
|
+
"disableMessageFeedback": {
|
|
2350
|
+
"default": false,
|
|
2351
|
+
"description": "Turn OFF the 👍/👎 feedback controls under each assistant reply. Unset/`false` = shown (default), `true` = hidden. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`.",
|
|
2368
2352
|
"type": "boolean"
|
|
2369
2353
|
}
|
|
2370
2354
|
},
|
|
@@ -2374,8 +2358,7 @@
|
|
|
2374
2358
|
"showReasoning",
|
|
2375
2359
|
"showToolCalls",
|
|
2376
2360
|
"showSources",
|
|
2377
|
-
"
|
|
2378
|
-
"enableMessageFeedback"
|
|
2361
|
+
"disableMessageFeedback"
|
|
2379
2362
|
],
|
|
2380
2363
|
"additionalProperties": {},
|
|
2381
2364
|
"description": "Conversation behaviour — lifecycle, streaming, and the transcript surface (scroll, feedback).",
|
|
@@ -2387,8 +2370,7 @@
|
|
|
2387
2370
|
{
|
|
2388
2371
|
"startMinimized": false,
|
|
2389
2372
|
"responseMode": "buffered",
|
|
2390
|
-
"
|
|
2391
|
-
"enableMessageFeedback": false
|
|
2373
|
+
"disableMessageFeedback": true
|
|
2392
2374
|
}
|
|
2393
2375
|
]
|
|
2394
2376
|
},
|
|
@@ -3131,9 +3113,9 @@
|
|
|
3131
3113
|
"features": {
|
|
3132
3114
|
"type": "object",
|
|
3133
3115
|
"properties": {
|
|
3134
|
-
"
|
|
3135
|
-
"default":
|
|
3136
|
-
"description": "
|
|
3116
|
+
"disableFileUpload": {
|
|
3117
|
+
"default": false,
|
|
3118
|
+
"description": "Turn OFF file uploads — hide the paperclip button + reject drag/drop/paste. Unset/`false` = enabled (default), `true` = disabled.",
|
|
3137
3119
|
"type": "boolean"
|
|
3138
3120
|
},
|
|
3139
3121
|
"voice": {
|
|
@@ -3181,30 +3163,28 @@
|
|
|
3181
3163
|
]
|
|
3182
3164
|
}
|
|
3183
3165
|
},
|
|
3184
|
-
"
|
|
3185
|
-
"default":
|
|
3186
|
-
"description": "
|
|
3166
|
+
"disableHumanInLoop": {
|
|
3167
|
+
"default": false,
|
|
3168
|
+
"description": "Turn OFF the human-in-the-loop tool UI — the inline ask-questions form + approve/reject controls for gated tools. Unset/`false` = shown (default), `true` = suppressed (the wire still carries the signals).",
|
|
3187
3169
|
"type": "boolean"
|
|
3188
3170
|
}
|
|
3189
3171
|
},
|
|
3190
3172
|
"required": [
|
|
3191
|
-
"
|
|
3173
|
+
"disableFileUpload",
|
|
3192
3174
|
"voice",
|
|
3193
|
-
"
|
|
3175
|
+
"disableHumanInLoop"
|
|
3194
3176
|
],
|
|
3195
3177
|
"additionalProperties": {},
|
|
3196
3178
|
"description": "Capability flags — file upload, voice mode, and the tools the assistant may invoke.",
|
|
3197
3179
|
"examples": [
|
|
3198
3180
|
{
|
|
3199
|
-
"files": true,
|
|
3200
3181
|
"voice": "local"
|
|
3201
3182
|
},
|
|
3202
3183
|
{
|
|
3203
|
-
"
|
|
3184
|
+
"disableFileUpload": true,
|
|
3204
3185
|
"voice": "disabled"
|
|
3205
3186
|
},
|
|
3206
3187
|
{
|
|
3207
|
-
"files": true,
|
|
3208
3188
|
"voice": "server",
|
|
3209
3189
|
"tools": [
|
|
3210
3190
|
"tool:send-money"
|
|
@@ -3253,8 +3233,8 @@
|
|
|
3253
3233
|
"type": "string",
|
|
3254
3234
|
"maxLength": 80
|
|
3255
3235
|
},
|
|
3256
|
-
"
|
|
3257
|
-
"description": "`home` —
|
|
3236
|
+
"hideGreeting": {
|
|
3237
|
+
"description": "`home` — hide the greeting hero. Unset/`false` = shown (default), `true` = hidden.",
|
|
3258
3238
|
"type": "boolean"
|
|
3259
3239
|
},
|
|
3260
3240
|
"greetingText": {
|
|
@@ -3290,12 +3270,12 @@
|
|
|
3290
3270
|
"additionalProperties": {}
|
|
3291
3271
|
}
|
|
3292
3272
|
},
|
|
3293
|
-
"
|
|
3294
|
-
"description": "`home` —
|
|
3273
|
+
"hideSearchBar": {
|
|
3274
|
+
"description": "`home` — hide the 'Search for help' bar. Unset/`false` = shown (default), `true` = hidden.",
|
|
3295
3275
|
"type": "boolean"
|
|
3296
3276
|
},
|
|
3297
|
-
"
|
|
3298
|
-
"description": "`home` —
|
|
3277
|
+
"hideRecentConversations": {
|
|
3278
|
+
"description": "`home` — hide the visitor's most recent conversation card. Unset/`false` = shown (default), `true` = hidden.",
|
|
3299
3279
|
"type": "boolean"
|
|
3300
3280
|
},
|
|
3301
3281
|
"status": {
|
|
@@ -3351,8 +3331,6 @@
|
|
|
3351
3331
|
"label": "tabHome",
|
|
3352
3332
|
"layout": "home",
|
|
3353
3333
|
"brandName": "Acme",
|
|
3354
|
-
"showSearchBar": true,
|
|
3355
|
-
"showRecentConversations": true,
|
|
3356
3334
|
"contentBlockTitle": "Popular articles",
|
|
3357
3335
|
"contentTags": [
|
|
3358
3336
|
"popular"
|
package/schema.mjs
CHANGED
|
@@ -131,16 +131,13 @@ var behaviorSchema = z4.object({
|
|
|
131
131
|
showSources: z4.boolean().default(false).describe(
|
|
132
132
|
"Show the citation sources behind an answer (web links + document/file references) in the transcript. `false` (default) hides them."
|
|
133
133
|
),
|
|
134
|
-
|
|
135
|
-
"
|
|
136
|
-
),
|
|
137
|
-
enableMessageFeedback: z4.boolean().default(true).describe(
|
|
138
|
-
"Show \u{1F44D}/\u{1F44E} feedback controls under each assistant reply. `true` (default) shows them. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`."
|
|
134
|
+
disableMessageFeedback: z4.boolean().default(false).describe(
|
|
135
|
+
"Turn OFF the \u{1F44D}/\u{1F44E} feedback controls under each assistant reply. Unset/`false` = shown (default), `true` = hidden. A choice fires the `messageFeedback` event and is POSTed best-effort to `/pai/message-feedback`."
|
|
139
136
|
)
|
|
140
137
|
}).loose().describe("Conversation behaviour \u2014 lifecycle, streaming, and the transcript surface (scroll, feedback).").meta({
|
|
141
138
|
examples: [
|
|
142
139
|
{ startMinimized: true, responseMode: "streaming" },
|
|
143
|
-
{ startMinimized: false, responseMode: "buffered",
|
|
140
|
+
{ startMinimized: false, responseMode: "buffered", disableMessageFeedback: true }
|
|
144
141
|
]
|
|
145
142
|
});
|
|
146
143
|
|
|
@@ -224,21 +221,23 @@ var toolRefSchema = z7.union([
|
|
|
224
221
|
}).loose()
|
|
225
222
|
]);
|
|
226
223
|
var featureFlagsSchema = z7.object({
|
|
227
|
-
|
|
224
|
+
disableFileUpload: z7.boolean().default(false).describe(
|
|
225
|
+
"Turn OFF file uploads \u2014 hide the paperclip button + reject drag/drop/paste. Unset/`false` = enabled (default), `true` = disabled."
|
|
226
|
+
),
|
|
228
227
|
voice: voiceModeSchema.default("local").describe(
|
|
229
228
|
"Voice input mode. `local` \u2014 Web Speech API in the browser (free, runs on-device). `server` \u2014 record audio + upload to the transcribe endpoint. `disabled` \u2014 hide the mic button."
|
|
230
229
|
),
|
|
231
230
|
tools: z7.array(toolRefSchema).max(200).optional().describe(
|
|
232
231
|
"Backend tools the assistant may invoke. Bare codes (`'tool:send-money'`) or rich refs (`{ code, config }`)."
|
|
233
232
|
),
|
|
234
|
-
|
|
235
|
-
"
|
|
233
|
+
disableHumanInLoop: z7.boolean().default(false).describe(
|
|
234
|
+
"Turn OFF the human-in-the-loop tool UI \u2014 the inline ask-questions form + approve/reject controls for gated tools. Unset/`false` = shown (default), `true` = suppressed (the wire still carries the signals)."
|
|
236
235
|
)
|
|
237
236
|
}).loose().describe("Capability flags \u2014 file upload, voice mode, and the tools the assistant may invoke.").meta({
|
|
238
237
|
examples: [
|
|
239
|
-
{
|
|
240
|
-
{
|
|
241
|
-
{
|
|
238
|
+
{ voice: "local" },
|
|
239
|
+
{ disableFileUpload: true, voice: "disabled" },
|
|
240
|
+
{ voice: "server", tools: ["tool:send-money"] }
|
|
242
241
|
]
|
|
243
242
|
});
|
|
244
243
|
|
|
@@ -551,7 +550,7 @@ var moduleSchema = z14.object({
|
|
|
551
550
|
),
|
|
552
551
|
// ── `home` layout config (flat feature flags — no block authoring) ──────
|
|
553
552
|
brandName: z14.string().max(80).optional().describe("`home` \u2014 hero wordmark (e.g. your company name)."),
|
|
554
|
-
|
|
553
|
+
hideGreeting: z14.boolean().optional().describe("`home` \u2014 hide the greeting hero. Unset/`false` = shown (default), `true` = hidden."),
|
|
555
554
|
greetingText: z14.string().max(280).optional().describe("`home` \u2014 override the greeting headline (default 'How can we help?'); supports a `{name}` token."),
|
|
556
555
|
userAvatars: z14.array(
|
|
557
556
|
z14.object({
|
|
@@ -560,8 +559,10 @@ var moduleSchema = z14.object({
|
|
|
560
559
|
role: z14.string().max(80).optional()
|
|
561
560
|
}).loose()
|
|
562
561
|
).max(10).optional().describe("`home` \u2014 team/agent avatars shown in the hero."),
|
|
563
|
-
|
|
564
|
-
|
|
562
|
+
hideSearchBar: z14.boolean().optional().describe("`home` \u2014 hide the 'Search for help' bar. Unset/`false` = shown (default), `true` = hidden."),
|
|
563
|
+
hideRecentConversations: z14.boolean().optional().describe(
|
|
564
|
+
"`home` \u2014 hide the visitor's most recent conversation card. Unset/`false` = shown (default), `true` = hidden."
|
|
565
|
+
),
|
|
565
566
|
status: z14.object({
|
|
566
567
|
text: z14.string().min(1).max(120).optional().describe(
|
|
567
568
|
"`home` \u2014 status line; an i18n key or a literal (resolved via `localizeText`). Omit to use the built-in generic `homeStatus` string (localized, no custom key needed)."
|
|
@@ -583,8 +584,6 @@ var modulesSchema = z14.array(moduleSchema).max(4).describe(
|
|
|
583
584
|
label: "tabHome",
|
|
584
585
|
layout: "home",
|
|
585
586
|
brandName: "Acme",
|
|
586
|
-
showSearchBar: true,
|
|
587
|
-
showRecentConversations: true,
|
|
588
587
|
contentBlockTitle: "Popular articles",
|
|
589
588
|
contentTags: ["popular"]
|
|
590
589
|
},
|
|
@@ -730,7 +729,7 @@ var widgetSettingsSchema = z16.object({
|
|
|
730
729
|
{
|
|
731
730
|
presentation: { mode: "inline" },
|
|
732
731
|
behavior: { responseMode: "streaming" },
|
|
733
|
-
features: {
|
|
732
|
+
features: { voice: "local" }
|
|
734
733
|
}
|
|
735
734
|
]
|
|
736
735
|
});
|
package/web-component.mjs
CHANGED
|
@@ -1010,9 +1010,7 @@ var DEFAULT_ATTACHMENTS = {
|
|
|
1010
1010
|
accept: "*/*"
|
|
1011
1011
|
};
|
|
1012
1012
|
var DEFAULT_FEATURES = {
|
|
1013
|
-
|
|
1014
|
-
voice: "local",
|
|
1015
|
-
humanInLoop: true
|
|
1013
|
+
voice: "local"
|
|
1016
1014
|
};
|
|
1017
1015
|
var DEFAULT_FORMS = { list: [], byTrigger: {} };
|
|
1018
1016
|
var DEFAULT_TRACKING = {
|
|
@@ -1049,7 +1047,6 @@ var DEFAULT_HAPTICS = {
|
|
|
1049
1047
|
events: void 0
|
|
1050
1048
|
};
|
|
1051
1049
|
var DEFAULT_MODULES = [{ label: "tabConversations", layout: "chat" }];
|
|
1052
|
-
var DEFAULT_HOME_MODULE = { showSearchBar: true };
|
|
1053
1050
|
|
|
1054
1051
|
// src/core/config/resolve.ts
|
|
1055
1052
|
function resolveOptions(rawOpts) {
|
|
@@ -1088,12 +1085,11 @@ function resolveOptions(rawOpts) {
|
|
|
1088
1085
|
showReasoning: behavior.showReasoning ?? false,
|
|
1089
1086
|
showToolCalls: behavior.showToolCalls ?? false,
|
|
1090
1087
|
showSources: behavior.showSources ?? false,
|
|
1091
|
-
|
|
1092
|
-
enableMessageFeedback: behavior.enableMessageFeedback ?? true,
|
|
1088
|
+
enableMessageFeedback: !(behavior.disableMessageFeedback ?? false),
|
|
1093
1089
|
features: {
|
|
1094
|
-
files: opts.features?.files ?? DEFAULT_FEATURES.files,
|
|
1095
1090
|
voice: opts.features?.voice ?? DEFAULT_FEATURES.voice,
|
|
1096
|
-
|
|
1091
|
+
fileUpload: !(opts.features?.disableFileUpload ?? false),
|
|
1092
|
+
humanInLoop: !(opts.features?.disableHumanInLoop ?? false),
|
|
1097
1093
|
tools: opts.features?.tools
|
|
1098
1094
|
},
|
|
1099
1095
|
forms: resolveForms(opts.forms, locale),
|
|
@@ -1207,9 +1203,9 @@ function resolveModules(overrides) {
|
|
|
1207
1203
|
if (m.layout === "home") {
|
|
1208
1204
|
resolved.brandName = m.brandName;
|
|
1209
1205
|
resolved.greetingText = m.greetingText;
|
|
1210
|
-
resolved.showGreeting = m.
|
|
1211
|
-
resolved.showSearchBar = m.
|
|
1212
|
-
resolved.showRecentConversations = m.
|
|
1206
|
+
resolved.showGreeting = !(m.hideGreeting ?? false);
|
|
1207
|
+
resolved.showSearchBar = !(m.hideSearchBar ?? false);
|
|
1208
|
+
resolved.showRecentConversations = !(m.hideRecentConversations ?? false);
|
|
1213
1209
|
if (m.userAvatars && m.userAvatars.length > 0) resolved.userAvatars = m.userAvatars;
|
|
1214
1210
|
if (m.status) resolved.status = m.status;
|
|
1215
1211
|
resolved.contentBlockTitle = m.contentBlockTitle;
|
|
@@ -1418,8 +1414,7 @@ var BEHAVIOR_ATTRS = [
|
|
|
1418
1414
|
["show-reasoning", "showReasoning", boolAttr],
|
|
1419
1415
|
["show-tool-calls", "showToolCalls", boolAttr],
|
|
1420
1416
|
["show-sources", "showSources", boolAttr],
|
|
1421
|
-
["
|
|
1422
|
-
["enable-message-feedback", "enableMessageFeedback", boolAttr]
|
|
1417
|
+
["disable-message-feedback", "disableMessageFeedback", boolAttr]
|
|
1423
1418
|
];
|
|
1424
1419
|
var I18N_ATTRS = [["locale", "locale"]];
|
|
1425
1420
|
var ACTION_NAMES = new Set(ACTION_NAME_LITERALS);
|
|
@@ -1431,7 +1426,7 @@ var LAUNCHER_ATTRS = [
|
|
|
1431
1426
|
["launcher-hidden", "hidden", boolAttr]
|
|
1432
1427
|
];
|
|
1433
1428
|
var FEATURE_ATTRS = [
|
|
1434
|
-
["features-
|
|
1429
|
+
["features-disable-file-upload", "disableFileUpload", boolAttr],
|
|
1435
1430
|
["features-voice", "voice", (v) => v],
|
|
1436
1431
|
["features-tools", "tools", csv]
|
|
1437
1432
|
];
|
|
@@ -1934,7 +1929,7 @@ function createAuth(opts) {
|
|
|
1934
1929
|
}
|
|
1935
1930
|
|
|
1936
1931
|
// src/core/version.ts
|
|
1937
|
-
var ELEMENTS_VERSION = true ? "0.59.
|
|
1932
|
+
var ELEMENTS_VERSION = true ? "0.59.4" : "0.0.0-dev";
|
|
1938
1933
|
var ELEMENTS_VERSION_PARAM = "_ev";
|
|
1939
1934
|
|
|
1940
1935
|
// src/stream/types.ts
|
|
@@ -4460,7 +4455,7 @@ function Composer({ options, transport, feedback, bus, isStreaming, onSend, onSt
|
|
|
4460
4455
|
const [voiceOn, setVoiceOn] = useState2(false);
|
|
4461
4456
|
const taRef = useRef2(null);
|
|
4462
4457
|
const fileRef = useRef2(null);
|
|
4463
|
-
const
|
|
4458
|
+
const fileUploadEnabled = options.features.fileUpload;
|
|
4464
4459
|
const voiceMode = options.features.voice;
|
|
4465
4460
|
const [voice, setVoice] = useState2(
|
|
4466
4461
|
() => createVoice(voiceMode, options.locale, (blob, type) => transport.transcribe(blob, type))
|
|
@@ -4517,7 +4512,7 @@ function Composer({ options, transport, feedback, bus, isStreaming, onSend, onSt
|
|
|
4517
4512
|
"input, textarea, [contenteditable]:not([contenteditable='false'])"
|
|
4518
4513
|
);
|
|
4519
4514
|
if (editable && editable !== ta) return;
|
|
4520
|
-
if (
|
|
4515
|
+
if (fileUploadEnabled) {
|
|
4521
4516
|
const result = ingest(data.items, attsRef.current, options.attachments);
|
|
4522
4517
|
if (result.accepted.length > 0) {
|
|
4523
4518
|
e.preventDefault();
|
|
@@ -4536,7 +4531,7 @@ function Composer({ options, transport, feedback, bus, isStreaming, onSend, onSt
|
|
|
4536
4531
|
};
|
|
4537
4532
|
panel.addEventListener("paste", onPaste);
|
|
4538
4533
|
return () => panel.removeEventListener("paste", onPaste);
|
|
4539
|
-
}, [
|
|
4534
|
+
}, [fileUploadEnabled, options.attachments, p7]);
|
|
4540
4535
|
const send = () => {
|
|
4541
4536
|
const trimmed = text.trim();
|
|
4542
4537
|
if (!trimmed && atts.length === 0) return;
|
|
@@ -4606,7 +4601,7 @@ function Composer({ options, transport, feedback, bus, isStreaming, onSend, onSt
|
|
|
4606
4601
|
atts.length > 0 ? /* @__PURE__ */ jsx6("div", { class: `${p7}-attachments`, children: atts.map((a) => /* @__PURE__ */ jsx6(AttachmentChip, { attachment: a, onRemove: () => removeAtt(a.id) }, a.id)) }) : null,
|
|
4607
4602
|
/* @__PURE__ */ jsxs5("div", { class: `${p7}-composer-row`, children: [
|
|
4608
4603
|
/* @__PURE__ */ jsxs5("div", { class: `${p7}-composer-actions`, children: [
|
|
4609
|
-
|
|
4604
|
+
fileUploadEnabled ? /* @__PURE__ */ jsx6(
|
|
4610
4605
|
"button",
|
|
4611
4606
|
{
|
|
4612
4607
|
type: "button",
|
|
@@ -6363,7 +6358,6 @@ function MessageList({
|
|
|
6363
6358
|
showReasoning,
|
|
6364
6359
|
showToolCalls,
|
|
6365
6360
|
showSources,
|
|
6366
|
-
scrollFade,
|
|
6367
6361
|
enableMessageFeedback,
|
|
6368
6362
|
onFeedback,
|
|
6369
6363
|
loading,
|
|
@@ -6384,7 +6378,6 @@ function MessageList({
|
|
|
6384
6378
|
const inInteractionGrace = () => interactingRef.current || performance.now() - interactionEndedAtRef.current < INTERACTION_GRACE_MS;
|
|
6385
6379
|
const autoPinAtRef = useRef5(0);
|
|
6386
6380
|
const syncFade = (el) => {
|
|
6387
|
-
if (!scrollFade) return;
|
|
6388
6381
|
const overflowing = el.scrollHeight - el.clientHeight > 1;
|
|
6389
6382
|
el.dataset.fadeTop = overflowing && el.scrollTop > 1 ? "true" : "false";
|
|
6390
6383
|
el.dataset.fadeBottom = overflowing && el.scrollHeight - el.scrollTop - el.clientHeight > 1 ? "true" : "false";
|
|
@@ -6630,21 +6623,11 @@ function MessageList({
|
|
|
6630
6623
|
rows.push(markerRow(marker));
|
|
6631
6624
|
}
|
|
6632
6625
|
return /* @__PURE__ */ jsxs16("div", { class: `${p18}-list-wrap`, children: [
|
|
6633
|
-
/* @__PURE__ */ jsxs16(
|
|
6634
|
-
"div",
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
role: "log",
|
|
6639
|
-
"aria-live": "polite",
|
|
6640
|
-
"aria-relevant": "additions text",
|
|
6641
|
-
children: [
|
|
6642
|
-
loading && messages.value.length === 0 ? /* @__PURE__ */ jsx20("div", { class: `${p18}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
|
|
6643
|
-
rows,
|
|
6644
|
-
form && !inlineForm ? /* @__PURE__ */ jsx20(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null
|
|
6645
|
-
]
|
|
6646
|
-
}
|
|
6647
|
-
),
|
|
6626
|
+
/* @__PURE__ */ jsxs16("div", { ref, class: `${p18}-list ${p18}-list--fade`, role: "log", "aria-live": "polite", "aria-relevant": "additions text", children: [
|
|
6627
|
+
loading && messages.value.length === 0 ? /* @__PURE__ */ jsx20("div", { class: `${p18}-list-loading`, role: "status", children: strings.conversationLoading }) : null,
|
|
6628
|
+
rows,
|
|
6629
|
+
form && !inlineForm ? /* @__PURE__ */ jsx20(FormGate, { form: form.form, strings, onSubmit: form.onSubmit, onSkip: form.onSkip }) : null
|
|
6630
|
+
] }),
|
|
6648
6631
|
showJump ? /* @__PURE__ */ jsx20(
|
|
6649
6632
|
"button",
|
|
6650
6633
|
{
|
|
@@ -7013,7 +6996,6 @@ function PanelContent(props2) {
|
|
|
7013
6996
|
showReasoning: options.showReasoning,
|
|
7014
6997
|
showToolCalls: options.showToolCalls,
|
|
7015
6998
|
showSources: options.showSources,
|
|
7016
|
-
scrollFade: options.scrollFade,
|
|
7017
6999
|
enableMessageFeedback: options.enableMessageFeedback,
|
|
7018
7000
|
onFeedback: onMessageFeedback,
|
|
7019
7001
|
loading: loadingMessages,
|
|
@@ -7560,7 +7542,7 @@ function HomeRoot(props2) {
|
|
|
7560
7542
|
const [content, setContent] = useState12([]);
|
|
7561
7543
|
const tagsKey = config.contentTags?.join(",");
|
|
7562
7544
|
useEffect11(() => {
|
|
7563
|
-
if (
|
|
7545
|
+
if (config.showRecentConversations === false) return;
|
|
7564
7546
|
let cancelled = false;
|
|
7565
7547
|
transport.listConversations({ limit: 1 }).then((res) => !cancelled && setRecent(res.conversations?.[0] ?? null)).catch((err) => !cancelled && log13.warn("listConversations (home) failed", { err }));
|
|
7566
7548
|
return () => {
|