@mastra/playground-ui 5.1.10-alpha.1 → 5.1.11-alpha.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/index.cjs.js
CHANGED
|
@@ -5252,13 +5252,20 @@ function useAgentModelSettingsState({ agentId }) {
|
|
|
5252
5252
|
console.error(e);
|
|
5253
5253
|
}
|
|
5254
5254
|
}, [LOCAL_STORAGE_KEY]);
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5260
|
-
|
|
5261
|
-
|
|
5255
|
+
const setModelSettings = (modelSettingsValue) => {
|
|
5256
|
+
setModelSettingsState((prev) => ({ ...prev, ...modelSettingsValue }));
|
|
5257
|
+
localStorage.setItem(
|
|
5258
|
+
LOCAL_STORAGE_KEY,
|
|
5259
|
+
JSON.stringify({ modelSettings: modelSettingsValue, chatWithGenerate, agentId })
|
|
5260
|
+
);
|
|
5261
|
+
};
|
|
5262
|
+
const setChatWithGenerate = (chatWithGenerateValue) => {
|
|
5263
|
+
setChatWithGenerateState(chatWithGenerateValue);
|
|
5264
|
+
localStorage.setItem(
|
|
5265
|
+
LOCAL_STORAGE_KEY,
|
|
5266
|
+
JSON.stringify({ modelSettings, chatWithGenerate: chatWithGenerateValue, agentId })
|
|
5267
|
+
);
|
|
5268
|
+
};
|
|
5262
5269
|
const resetAll = () => {
|
|
5263
5270
|
setModelSettingsState(defaultModelSettings$1);
|
|
5264
5271
|
setChatWithGenerate(false);
|