@midscene/visualizer 1.3.1 → 1.3.2
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PlaygroundSDK } from "@midscene/playground";
|
|
3
|
-
import { Button, Tooltip } from "antd";
|
|
3
|
+
import { Button, Tooltip, message } from "antd";
|
|
4
4
|
import { useEffect } from "react";
|
|
5
5
|
import { safeOverrideAIConfig } from "../../hooks/useSafeOverrideAIConfig.mjs";
|
|
6
6
|
import { useServerValid } from "../../hooks/useServerValid.mjs";
|
|
@@ -61,7 +61,10 @@ const ServiceModeControl = ({ serviceMode })=>{
|
|
|
61
61
|
const playgroundSDK = new PlaygroundSDK({
|
|
62
62
|
type: 'remote-execution'
|
|
63
63
|
});
|
|
64
|
-
playgroundSDK.overrideConfig(config)
|
|
64
|
+
playgroundSDK.overrideConfig(config).catch((error)=>{
|
|
65
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
66
|
+
message.error(`Failed to apply AI configuration: ${errorMsg}`);
|
|
67
|
+
});
|
|
65
68
|
}
|
|
66
69
|
}, [
|
|
67
70
|
config,
|
|
@@ -104,6 +104,8 @@ function UniversalPlayground({ playgroundSDK, storage, contextProvider, config:
|
|
|
104
104
|
useEffect(()=>{
|
|
105
105
|
if ((null == playgroundSDK ? void 0 : playgroundSDK.overrideConfig) && config) playgroundSDK.overrideConfig(config).catch((error)=>{
|
|
106
106
|
console.error('Failed to override SDK config:', error);
|
|
107
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
108
|
+
message.error(`Failed to apply AI configuration: ${errorMsg}`);
|
|
107
109
|
});
|
|
108
110
|
}, [
|
|
109
111
|
playgroundSDK,
|
|
@@ -89,7 +89,10 @@ const ServiceModeControl = ({ serviceMode })=>{
|
|
|
89
89
|
const playgroundSDK = new playground_namespaceObject.PlaygroundSDK({
|
|
90
90
|
type: 'remote-execution'
|
|
91
91
|
});
|
|
92
|
-
playgroundSDK.overrideConfig(config)
|
|
92
|
+
playgroundSDK.overrideConfig(config).catch((error)=>{
|
|
93
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
94
|
+
external_antd_namespaceObject.message.error(`Failed to apply AI configuration: ${errorMsg}`);
|
|
95
|
+
});
|
|
93
96
|
}
|
|
94
97
|
}, [
|
|
95
98
|
config,
|
|
@@ -145,6 +145,8 @@ function UniversalPlayground({ playgroundSDK, storage, contextProvider, config:
|
|
|
145
145
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
146
146
|
if ((null == playgroundSDK ? void 0 : playgroundSDK.overrideConfig) && config) playgroundSDK.overrideConfig(config).catch((error)=>{
|
|
147
147
|
console.error('Failed to override SDK config:', error);
|
|
148
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
149
|
+
external_antd_namespaceObject.message.error(`Failed to apply AI configuration: ${errorMsg}`);
|
|
148
150
|
});
|
|
149
151
|
}, [
|
|
150
152
|
playgroundSDK,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/visualizer",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
5
5
|
"homepage": "https://midscenejs.com/",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"antd": "^5.21.6",
|
|
61
61
|
"buffer": "6.0.3",
|
|
62
62
|
"dayjs": "^1.11.11",
|
|
63
|
-
"@midscene/core": "1.3.
|
|
64
|
-
"@midscene/
|
|
65
|
-
"@midscene/
|
|
66
|
-
"@midscene/
|
|
63
|
+
"@midscene/core": "1.3.2",
|
|
64
|
+
"@midscene/playground": "1.3.2",
|
|
65
|
+
"@midscene/shared": "1.3.2",
|
|
66
|
+
"@midscene/web": "1.3.2"
|
|
67
67
|
},
|
|
68
68
|
"license": "MIT",
|
|
69
69
|
"scripts": {
|