@wallavi/widget 1.13.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +11 -4
- package/dist/index.mjs +11 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -871,7 +871,13 @@ function useChat({
|
|
|
871
871
|
);
|
|
872
872
|
const fetchAndStream = react.useCallback(
|
|
873
873
|
async (opts) => {
|
|
874
|
-
const {
|
|
874
|
+
const {
|
|
875
|
+
input: userInput,
|
|
876
|
+
msgId,
|
|
877
|
+
extraMetadata,
|
|
878
|
+
attachments,
|
|
879
|
+
pickerSelection
|
|
880
|
+
} = opts;
|
|
875
881
|
const isPrivate = Boolean(workspaceId);
|
|
876
882
|
const token = isPrivate ? await getFreshClerkToken() : null;
|
|
877
883
|
const hostHeaders = await resolveUserHeaders(userContext);
|
|
@@ -893,6 +899,9 @@ function useChat({
|
|
|
893
899
|
} : { threadId },
|
|
894
900
|
source,
|
|
895
901
|
...attachments?.length ? { attachments } : {},
|
|
902
|
+
// Its own field: userMetadata keys starting with __ belong to the
|
|
903
|
+
// engine and the API rejects them.
|
|
904
|
+
...pickerSelection ? { pickerSelection } : {},
|
|
896
905
|
...userContext?.userName ? { userName: userContext.userName } : {},
|
|
897
906
|
...userContext?.userEmail ? { userEmail: userContext.userEmail } : {},
|
|
898
907
|
userMetadata: {
|
|
@@ -1205,9 +1214,7 @@ function useChat({
|
|
|
1205
1214
|
await fetchAndStream({
|
|
1206
1215
|
input: label,
|
|
1207
1216
|
msgId: assistantMsgId,
|
|
1208
|
-
|
|
1209
|
-
__pickerSelection: { pickerId, paramName, value, label }
|
|
1210
|
-
}
|
|
1217
|
+
pickerSelection: { pickerId, paramName, value, label }
|
|
1211
1218
|
});
|
|
1212
1219
|
} catch {
|
|
1213
1220
|
setMessages((prev) => {
|
package/dist/index.mjs
CHANGED
|
@@ -845,7 +845,13 @@ function useChat({
|
|
|
845
845
|
);
|
|
846
846
|
const fetchAndStream = useCallback(
|
|
847
847
|
async (opts) => {
|
|
848
|
-
const {
|
|
848
|
+
const {
|
|
849
|
+
input: userInput,
|
|
850
|
+
msgId,
|
|
851
|
+
extraMetadata,
|
|
852
|
+
attachments,
|
|
853
|
+
pickerSelection
|
|
854
|
+
} = opts;
|
|
849
855
|
const isPrivate = Boolean(workspaceId);
|
|
850
856
|
const token = isPrivate ? await getFreshClerkToken() : null;
|
|
851
857
|
const hostHeaders = await resolveUserHeaders(userContext);
|
|
@@ -867,6 +873,9 @@ function useChat({
|
|
|
867
873
|
} : { threadId },
|
|
868
874
|
source,
|
|
869
875
|
...attachments?.length ? { attachments } : {},
|
|
876
|
+
// Its own field: userMetadata keys starting with __ belong to the
|
|
877
|
+
// engine and the API rejects them.
|
|
878
|
+
...pickerSelection ? { pickerSelection } : {},
|
|
870
879
|
...userContext?.userName ? { userName: userContext.userName } : {},
|
|
871
880
|
...userContext?.userEmail ? { userEmail: userContext.userEmail } : {},
|
|
872
881
|
userMetadata: {
|
|
@@ -1179,9 +1188,7 @@ function useChat({
|
|
|
1179
1188
|
await fetchAndStream({
|
|
1180
1189
|
input: label,
|
|
1181
1190
|
msgId: assistantMsgId,
|
|
1182
|
-
|
|
1183
|
-
__pickerSelection: { pickerId, paramName, value, label }
|
|
1184
|
-
}
|
|
1191
|
+
pickerSelection: { pickerId, paramName, value, label }
|
|
1185
1192
|
});
|
|
1186
1193
|
} catch {
|
|
1187
1194
|
setMessages((prev) => {
|
package/package.json
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"tsup": "^8.3.5",
|
|
23
23
|
"tsx": "^4.19.2",
|
|
24
24
|
"typescript": "^5.7.3",
|
|
25
|
-
"@wallavi/
|
|
26
|
-
"@wallavi/
|
|
25
|
+
"@wallavi/typescript-config": "0.0.1",
|
|
26
|
+
"@wallavi/protocol": "0.0.1"
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"private": false,
|
|
46
46
|
"types": "./dist/index.d.ts",
|
|
47
|
-
"version": "1.13.
|
|
47
|
+
"version": "1.13.1",
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsup && pnpm build:css",
|
|
50
50
|
"build:css": "tailwindcss -i ./src/styles.css -o ./dist/styles.css --config tailwind.config.cjs --minify",
|