@melony/react 0.1.22 → 0.1.23
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.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2362,6 +2362,14 @@ function Thread({
|
|
|
2362
2362
|
});
|
|
2363
2363
|
const starterPrompts = localStarterPrompts ?? config?.starterPrompts;
|
|
2364
2364
|
const options = localOptions ?? config?.options;
|
|
2365
|
+
const allDefaultSelectedIds = React10.useMemo(() => {
|
|
2366
|
+
const defaultSelectedIdsFromOptions = options?.flatMap(
|
|
2367
|
+
(group) => group.defaultSelectedIds ?? []
|
|
2368
|
+
) ?? [];
|
|
2369
|
+
return [
|
|
2370
|
+
.../* @__PURE__ */ new Set([...defaultSelectedIdsFromOptions, ...defaultSelectedIds ?? []])
|
|
2371
|
+
];
|
|
2372
|
+
}, [options, defaultSelectedIds]);
|
|
2365
2373
|
const [input, setInput] = React10.useState("");
|
|
2366
2374
|
const messagesEndRef = React10.useRef(null);
|
|
2367
2375
|
React10.useEffect(() => {
|
|
@@ -2433,7 +2441,7 @@ function Thread({
|
|
|
2433
2441
|
isLoading,
|
|
2434
2442
|
options,
|
|
2435
2443
|
autoFocus,
|
|
2436
|
-
defaultSelectedIds
|
|
2444
|
+
defaultSelectedIds: allDefaultSelectedIds
|
|
2437
2445
|
}
|
|
2438
2446
|
) }) })
|
|
2439
2447
|
]
|