@helpai/elements 0.54.2 → 0.55.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/configurator.mjs +12 -2
- package/elements-web-component.esm.js +27 -27
- package/elements-web-component.esm.js.map +4 -4
- package/elements.cjs.js +27 -27
- package/elements.cjs.js.map +4 -4
- package/elements.esm.js +27 -27
- package/elements.esm.js.map +4 -4
- package/elements.js +27 -27
- package/elements.js.map +4 -4
- package/index.d.ts +46 -3
- package/index.mjs +787 -485
- package/package.json +1 -1
- package/schema.d.ts +13 -2
- package/schema.json +54 -6
- package/schema.mjs +13 -2
- package/style.css +1 -1
- package/web-component.mjs +784 -485
package/configurator.mjs
CHANGED
|
@@ -118,6 +118,7 @@ var presentationSchema = z3.object({
|
|
|
118
118
|
// src/schema/widget/behavior.ts
|
|
119
119
|
import { z as z4 } from "zod";
|
|
120
120
|
var responseModeSchema = z4.enum(["streaming", "buffered"]);
|
|
121
|
+
var scrollAnchorSchema = z4.enum(["bottom", "turn"]);
|
|
121
122
|
var behaviorSchema = z4.object({
|
|
122
123
|
startMinimized: z4.boolean().default(true).describe(
|
|
123
124
|
"Don't auto-open the floating panel on first visit. `true` (default) shows the FAB collapsed; `false` opens the panel on mount."
|
|
@@ -133,11 +134,20 @@ var behaviorSchema = z4.object({
|
|
|
133
134
|
),
|
|
134
135
|
showSources: z4.boolean().default(false).describe(
|
|
135
136
|
"Show the citation sources behind an answer (web links + document/file references) in the transcript. `false` (default) hides them."
|
|
137
|
+
),
|
|
138
|
+
scrollFade: z4.boolean().default(true).describe(
|
|
139
|
+
"Fade the message list at its scroll edges with a soft gradient mask (the fade lifts at the very top/bottom). `true` (default) enables it; `false` shows hard edges."
|
|
140
|
+
),
|
|
141
|
+
scrollAnchor: scrollAnchorSchema.default("bottom").describe(
|
|
142
|
+
"How the list anchors a new turn. `bottom` (default) sticks to the newest content and follows the streamed reply; `turn` pins the visitor's question to the top of the viewport (ChatGPT-style) so the answer streams into the space below."
|
|
143
|
+
),
|
|
144
|
+
enableMessageFeedback: z4.boolean().default(true).describe(
|
|
145
|
+
"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`."
|
|
136
146
|
)
|
|
137
|
-
}).loose().describe("
|
|
147
|
+
}).loose().describe("Conversation behaviour \u2014 lifecycle, streaming, and the transcript surface (scroll, feedback).").meta({
|
|
138
148
|
examples: [
|
|
139
149
|
{ startMinimized: true, responseMode: "streaming" },
|
|
140
|
-
{ startMinimized: false, responseMode: "buffered" }
|
|
150
|
+
{ startMinimized: false, responseMode: "buffered", scrollAnchor: "turn", enableMessageFeedback: false }
|
|
141
151
|
]
|
|
142
152
|
});
|
|
143
153
|
|