@godscene/visualizer 1.7.11

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.
Files changed (221) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/dist/es/component/blackboard/highlights.mjs +47 -0
  4. package/dist/es/component/blackboard/index.css +118 -0
  5. package/dist/es/component/blackboard/index.mjs +122 -0
  6. package/dist/es/component/config-selector/index.mjs +251 -0
  7. package/dist/es/component/context-preview/index.mjs +37 -0
  8. package/dist/es/component/env-config/index.mjs +237 -0
  9. package/dist/es/component/env-config-reminder/index.css +30 -0
  10. package/dist/es/component/env-config-reminder/index.mjs +27 -0
  11. package/dist/es/component/form-field/index.mjs +158 -0
  12. package/dist/es/component/history-selector/index.css +237 -0
  13. package/dist/es/component/history-selector/index.mjs +197 -0
  14. package/dist/es/component/index.mjs +1 -0
  15. package/dist/es/component/logo/index.css +19 -0
  16. package/dist/es/component/logo/index.mjs +20 -0
  17. package/dist/es/component/logo/logo.mjs +2 -0
  18. package/dist/es/component/misc/index.mjs +96 -0
  19. package/dist/es/component/nav-actions/index.mjs +14 -0
  20. package/dist/es/component/nav-actions/style.css +35 -0
  21. package/dist/es/component/player/index.css +296 -0
  22. package/dist/es/component/player/index.mjs +702 -0
  23. package/dist/es/component/player/playback-controls.mjs +4 -0
  24. package/dist/es/component/player/report-download.mjs +61 -0
  25. package/dist/es/component/player/scenes/StepScene.mjs +194 -0
  26. package/dist/es/component/player/scenes/derive-frame-state.mjs +229 -0
  27. package/dist/es/component/player/scenes/export-branded-video.mjs +360 -0
  28. package/dist/es/component/player/scenes/frame-calculator.mjs +149 -0
  29. package/dist/es/component/player/scenes/playback-frame.mjs +6 -0
  30. package/dist/es/component/player/scenes/playback-layout.mjs +12 -0
  31. package/dist/es/component/player/scenes/pointer-layout.mjs +36 -0
  32. package/dist/es/component/player/use-frame-player.mjs +87 -0
  33. package/dist/es/component/playground/index.css +930 -0
  34. package/dist/es/component/playground/playground-demo-ui-context.json +290 -0
  35. package/dist/es/component/playground-result/index.css +92 -0
  36. package/dist/es/component/playground-result/index.mjs +232 -0
  37. package/dist/es/component/prompt-input/index.css +832 -0
  38. package/dist/es/component/prompt-input/index.mjs +959 -0
  39. package/dist/es/component/screenshot-viewer/index.css +237 -0
  40. package/dist/es/component/screenshot-viewer/index.mjs +319 -0
  41. package/dist/es/component/service-mode-control/index.mjs +107 -0
  42. package/dist/es/component/shiny-text/index.css +107 -0
  43. package/dist/es/component/shiny-text/index.mjs +15 -0
  44. package/dist/es/component/universal-playground/empty-state.mjs +5 -0
  45. package/dist/es/component/universal-playground/index.css +619 -0
  46. package/dist/es/component/universal-playground/index.mjs +558 -0
  47. package/dist/es/component/universal-playground/providers/context-provider.mjs +90 -0
  48. package/dist/es/component/universal-playground/providers/indexeddb-storage-provider.mjs +280 -0
  49. package/dist/es/component/universal-playground/providers/storage-provider.mjs +279 -0
  50. package/dist/es/component/universal-playground/universal-playground-electron.mjs +668 -0
  51. package/dist/es/hooks/useMinimalTypeGate.mjs +47 -0
  52. package/dist/es/hooks/usePlaygroundExecution.mjs +435 -0
  53. package/dist/es/hooks/usePlaygroundState.mjs +278 -0
  54. package/dist/es/hooks/useSafeOverrideAIConfig.mjs +20 -0
  55. package/dist/es/hooks/useServerValid.mjs +55 -0
  56. package/dist/es/hooks/useTheme.mjs +25 -0
  57. package/dist/es/icons/action-chevron.mjs +61 -0
  58. package/dist/es/icons/avatar.mjs +70 -0
  59. package/dist/es/icons/close.mjs +61 -0
  60. package/dist/es/icons/global-perspective.mjs +58 -0
  61. package/dist/es/icons/history.mjs +72 -0
  62. package/dist/es/icons/magnifying-glass.mjs +81 -0
  63. package/dist/es/icons/player-setting.mjs +68 -0
  64. package/dist/es/icons/prompt-history.mjs +70 -0
  65. package/dist/es/icons/setting.mjs +62 -0
  66. package/dist/es/icons/show-marker.mjs +58 -0
  67. package/dist/es/index.mjs +26 -0
  68. package/dist/es/static/image/logo.png +0 -0
  69. package/dist/es/store/history.mjs +128 -0
  70. package/dist/es/store/store.mjs +277 -0
  71. package/dist/es/types.mjs +73 -0
  72. package/dist/es/utils/action-label.mjs +15 -0
  73. package/dist/es/utils/color.mjs +35 -0
  74. package/dist/es/utils/constants.mjs +99 -0
  75. package/dist/es/utils/device-capabilities.mjs +13 -0
  76. package/dist/es/utils/empty-state-scroll.mjs +8 -0
  77. package/dist/es/utils/highlight-element.mjs +62 -0
  78. package/dist/es/utils/index.mjs +13 -0
  79. package/dist/es/utils/playground-utils.mjs +43 -0
  80. package/dist/es/utils/progress-action-icon.mjs +30 -0
  81. package/dist/es/utils/prompt-input-utils.mjs +49 -0
  82. package/dist/es/utils/prompt-placeholder.mjs +19 -0
  83. package/dist/es/utils/replay-scripts.mjs +428 -0
  84. package/dist/lib/component/blackboard/highlights.js +84 -0
  85. package/dist/lib/component/blackboard/index.css +118 -0
  86. package/dist/lib/component/blackboard/index.js +169 -0
  87. package/dist/lib/component/config-selector/index.js +295 -0
  88. package/dist/lib/component/context-preview/index.js +82 -0
  89. package/dist/lib/component/env-config/index.js +271 -0
  90. package/dist/lib/component/env-config-reminder/index.css +30 -0
  91. package/dist/lib/component/env-config-reminder/index.js +61 -0
  92. package/dist/lib/component/form-field/index.js +204 -0
  93. package/dist/lib/component/history-selector/index.css +237 -0
  94. package/dist/lib/component/history-selector/index.js +243 -0
  95. package/dist/lib/component/index.js +58 -0
  96. package/dist/lib/component/logo/index.css +19 -0
  97. package/dist/lib/component/logo/index.js +67 -0
  98. package/dist/lib/component/logo/logo.js +24 -0
  99. package/dist/lib/component/misc/index.js +152 -0
  100. package/dist/lib/component/nav-actions/index.js +48 -0
  101. package/dist/lib/component/nav-actions/style.css +35 -0
  102. package/dist/lib/component/player/index.css +296 -0
  103. package/dist/lib/component/player/index.js +747 -0
  104. package/dist/lib/component/player/playback-controls.js +38 -0
  105. package/dist/lib/component/player/report-download.js +98 -0
  106. package/dist/lib/component/player/scenes/StepScene.js +228 -0
  107. package/dist/lib/component/player/scenes/derive-frame-state.js +266 -0
  108. package/dist/lib/component/player/scenes/export-branded-video.js +403 -0
  109. package/dist/lib/component/player/scenes/frame-calculator.js +186 -0
  110. package/dist/lib/component/player/scenes/playback-frame.js +40 -0
  111. package/dist/lib/component/player/scenes/playback-layout.js +46 -0
  112. package/dist/lib/component/player/scenes/pointer-layout.js +88 -0
  113. package/dist/lib/component/player/use-frame-player.js +121 -0
  114. package/dist/lib/component/playground/index.css +930 -0
  115. package/dist/lib/component/playground/playground-demo-ui-context.json +290 -0
  116. package/dist/lib/component/playground-result/index.css +92 -0
  117. package/dist/lib/component/playground-result/index.js +276 -0
  118. package/dist/lib/component/prompt-input/index.css +832 -0
  119. package/dist/lib/component/prompt-input/index.js +1005 -0
  120. package/dist/lib/component/screenshot-viewer/index.css +237 -0
  121. package/dist/lib/component/screenshot-viewer/index.js +353 -0
  122. package/dist/lib/component/service-mode-control/index.js +141 -0
  123. package/dist/lib/component/shiny-text/index.css +107 -0
  124. package/dist/lib/component/shiny-text/index.js +49 -0
  125. package/dist/lib/component/universal-playground/empty-state.js +39 -0
  126. package/dist/lib/component/universal-playground/index.css +619 -0
  127. package/dist/lib/component/universal-playground/index.js +607 -0
  128. package/dist/lib/component/universal-playground/providers/context-provider.js +133 -0
  129. package/dist/lib/component/universal-playground/providers/indexeddb-storage-provider.js +320 -0
  130. package/dist/lib/component/universal-playground/providers/storage-provider.js +337 -0
  131. package/dist/lib/component/universal-playground/universal-playground-electron.js +717 -0
  132. package/dist/lib/hooks/useMinimalTypeGate.js +81 -0
  133. package/dist/lib/hooks/usePlaygroundExecution.js +478 -0
  134. package/dist/lib/hooks/usePlaygroundState.js +312 -0
  135. package/dist/lib/hooks/useSafeOverrideAIConfig.js +57 -0
  136. package/dist/lib/hooks/useServerValid.js +89 -0
  137. package/dist/lib/hooks/useTheme.js +59 -0
  138. package/dist/lib/icons/action-chevron.js +95 -0
  139. package/dist/lib/icons/avatar.js +104 -0
  140. package/dist/lib/icons/close.js +95 -0
  141. package/dist/lib/icons/global-perspective.js +92 -0
  142. package/dist/lib/icons/history.js +106 -0
  143. package/dist/lib/icons/magnifying-glass.js +115 -0
  144. package/dist/lib/icons/player-setting.js +102 -0
  145. package/dist/lib/icons/prompt-history.js +104 -0
  146. package/dist/lib/icons/setting.js +96 -0
  147. package/dist/lib/icons/show-marker.js +92 -0
  148. package/dist/lib/index.js +204 -0
  149. package/dist/lib/static/image/logo.png +0 -0
  150. package/dist/lib/store/history.js +135 -0
  151. package/dist/lib/store/store.js +287 -0
  152. package/dist/lib/types.js +119 -0
  153. package/dist/lib/utils/action-label.js +52 -0
  154. package/dist/lib/utils/color.js +75 -0
  155. package/dist/lib/utils/constants.js +172 -0
  156. package/dist/lib/utils/device-capabilities.js +50 -0
  157. package/dist/lib/utils/empty-state-scroll.js +42 -0
  158. package/dist/lib/utils/highlight-element.js +99 -0
  159. package/dist/lib/utils/index.js +69 -0
  160. package/dist/lib/utils/playground-utils.js +86 -0
  161. package/dist/lib/utils/progress-action-icon.js +67 -0
  162. package/dist/lib/utils/prompt-input-utils.js +89 -0
  163. package/dist/lib/utils/prompt-placeholder.js +53 -0
  164. package/dist/lib/utils/replay-scripts.js +474 -0
  165. package/dist/types/component/blackboard/highlights.d.ts +11 -0
  166. package/dist/types/component/blackboard/index.d.ts +10 -0
  167. package/dist/types/component/config-selector/index.d.ts +15 -0
  168. package/dist/types/component/context-preview/index.d.ts +9 -0
  169. package/dist/types/component/env-config/index.d.ts +8 -0
  170. package/dist/types/component/env-config-reminder/index.d.ts +6 -0
  171. package/dist/types/component/form-field/index.d.ts +17 -0
  172. package/dist/types/component/history-selector/index.d.ts +13 -0
  173. package/dist/types/component/index.d.ts +1 -0
  174. package/dist/types/component/logo/index.d.ts +5 -0
  175. package/dist/types/component/misc/index.d.ts +6 -0
  176. package/dist/types/component/nav-actions/index.d.ts +12 -0
  177. package/dist/types/component/player/index.d.ts +15 -0
  178. package/dist/types/component/player/playback-controls.d.ts +1 -0
  179. package/dist/types/component/player/report-download.d.ts +32 -0
  180. package/dist/types/component/player/scenes/StepScene.d.ts +9 -0
  181. package/dist/types/component/player/scenes/derive-frame-state.d.ts +40 -0
  182. package/dist/types/component/player/scenes/export-branded-video.d.ts +33 -0
  183. package/dist/types/component/player/scenes/frame-calculator.d.ts +40 -0
  184. package/dist/types/component/player/scenes/playback-frame.d.ts +3 -0
  185. package/dist/types/component/player/scenes/playback-layout.d.ts +7 -0
  186. package/dist/types/component/player/scenes/pointer-layout.d.ts +20 -0
  187. package/dist/types/component/player/use-frame-player.d.ts +17 -0
  188. package/dist/types/component/playground-result/index.d.ts +22 -0
  189. package/dist/types/component/prompt-input/index.d.ts +23 -0
  190. package/dist/types/component/screenshot-viewer/index.d.ts +23 -0
  191. package/dist/types/component/service-mode-control/index.d.ts +6 -0
  192. package/dist/types/component/shiny-text/index.d.ts +12 -0
  193. package/dist/types/component/universal-playground/empty-state.d.ts +3 -0
  194. package/dist/types/component/universal-playground/index.d.ts +4 -0
  195. package/dist/types/component/universal-playground/providers/context-provider.d.ts +37 -0
  196. package/dist/types/component/universal-playground/providers/indexeddb-storage-provider.d.ts +71 -0
  197. package/dist/types/component/universal-playground/providers/storage-provider.d.ts +58 -0
  198. package/dist/types/component/universal-playground/universal-playground-electron.d.ts +4 -0
  199. package/dist/types/hooks/useMinimalTypeGate.d.ts +72 -0
  200. package/dist/types/hooks/usePlaygroundExecution.d.ts +40 -0
  201. package/dist/types/hooks/usePlaygroundState.d.ts +26 -0
  202. package/dist/types/hooks/useSafeOverrideAIConfig.d.ts +16 -0
  203. package/dist/types/hooks/useServerValid.d.ts +1 -0
  204. package/dist/types/hooks/useTheme.d.ts +7 -0
  205. package/dist/types/index.d.ts +29 -0
  206. package/dist/types/store/history.d.ts +16 -0
  207. package/dist/types/store/store.d.ts +57 -0
  208. package/dist/types/types.d.ts +278 -0
  209. package/dist/types/utils/action-label.d.ts +11 -0
  210. package/dist/types/utils/color.d.ts +4 -0
  211. package/dist/types/utils/constants.d.ts +80 -0
  212. package/dist/types/utils/device-capabilities.d.ts +9 -0
  213. package/dist/types/utils/empty-state-scroll.d.ts +11 -0
  214. package/dist/types/utils/highlight-element.d.ts +3 -0
  215. package/dist/types/utils/index.d.ts +5 -0
  216. package/dist/types/utils/playground-utils.d.ts +11 -0
  217. package/dist/types/utils/progress-action-icon.d.ts +12 -0
  218. package/dist/types/utils/prompt-input-utils.d.ts +24 -0
  219. package/dist/types/utils/prompt-placeholder.d.ts +1 -0
  220. package/dist/types/utils/replay-scripts.d.ts +50 -0
  221. package/package.json +82 -0
@@ -0,0 +1,717 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.n = (module)=>{
5
+ var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
6
+ __webpack_require__.d(getter, {
7
+ a: getter
8
+ });
9
+ return getter;
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.d = (exports1, definition)=>{
14
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
15
+ enumerable: true,
16
+ get: definition[key]
17
+ });
18
+ };
19
+ })();
20
+ (()=>{
21
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
22
+ })();
23
+ (()=>{
24
+ __webpack_require__.r = (exports1)=>{
25
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
26
+ value: 'Module'
27
+ });
28
+ Object.defineProperty(exports1, '__esModule', {
29
+ value: true
30
+ });
31
+ };
32
+ })();
33
+ var __webpack_exports__ = {};
34
+ __webpack_require__.r(__webpack_exports__);
35
+ __webpack_require__.d(__webpack_exports__, {
36
+ UniversalPlaygroundElectron: ()=>UniversalPlaygroundElectron,
37
+ default: ()=>universal_playground_electron
38
+ });
39
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
40
+ const icons_namespaceObject = require("@ant-design/icons");
41
+ var icons_default = /*#__PURE__*/ __webpack_require__.n(icons_namespaceObject);
42
+ const external_antd_namespaceObject = require("antd");
43
+ const external_react_namespaceObject = require("react");
44
+ const usePlaygroundState_js_namespaceObject = require("../../hooks/usePlaygroundState.js");
45
+ const store_js_namespaceObject = require("../../store/store.js");
46
+ const index_js_namespaceObject = require("../context-preview/index.js");
47
+ const external_env_config_reminder_index_js_namespaceObject = require("../env-config-reminder/index.js");
48
+ const external_playground_result_index_js_namespaceObject = require("../playground-result/index.js");
49
+ const avatar_js_namespaceObject = require("../../icons/avatar.js");
50
+ var avatar_js_default = /*#__PURE__*/ __webpack_require__.n(avatar_js_namespaceObject);
51
+ const constants_js_namespaceObject = require("../../utils/constants.js");
52
+ const empty_state_scroll_js_namespaceObject = require("../../utils/empty-state-scroll.js");
53
+ const progress_action_icon_js_namespaceObject = require("../../utils/progress-action-icon.js");
54
+ const prompt_input_utils_js_namespaceObject = require("../../utils/prompt-input-utils.js");
55
+ const external_shiny_text_index_js_namespaceObject = require("../shiny-text/index.js");
56
+ var external_shiny_text_index_js_default = /*#__PURE__*/ __webpack_require__.n(external_shiny_text_index_js_namespaceObject);
57
+ const external_empty_state_js_namespaceObject = require("./empty-state.js");
58
+ const storage_provider_js_namespaceObject = require("./providers/storage-provider.js");
59
+ const constants_namespaceObject = require("@godscene/shared/constants");
60
+ const usePlaygroundExecution_js_namespaceObject = require("../../hooks/usePlaygroundExecution.js");
61
+ const replay_scripts_js_namespaceObject = require("../../utils/replay-scripts.js");
62
+ const agent_namespaceObject = require("@godscene/core/agent");
63
+ require("./index.css");
64
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
65
+ try {
66
+ var info = gen[key](arg);
67
+ var value = info.value;
68
+ } catch (error) {
69
+ reject(error);
70
+ return;
71
+ }
72
+ if (info.done) resolve(value);
73
+ else Promise.resolve(value).then(_next, _throw);
74
+ }
75
+ function _async_to_generator(fn) {
76
+ return function() {
77
+ var self = this, args = arguments;
78
+ return new Promise(function(resolve, reject) {
79
+ var gen = fn.apply(self, args);
80
+ function _next(value) {
81
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
82
+ }
83
+ function _throw(err) {
84
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
85
+ }
86
+ _next(void 0);
87
+ });
88
+ };
89
+ }
90
+ function _define_property(obj, key, value) {
91
+ if (key in obj) Object.defineProperty(obj, key, {
92
+ value: value,
93
+ enumerable: true,
94
+ configurable: true,
95
+ writable: true
96
+ });
97
+ else obj[key] = value;
98
+ return obj;
99
+ }
100
+ function _object_spread(target) {
101
+ for(var i = 1; i < arguments.length; i++){
102
+ var source = null != arguments[i] ? arguments[i] : {};
103
+ var ownKeys = Object.keys(source);
104
+ if ("function" == typeof Object.getOwnPropertySymbols) ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
105
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
106
+ }));
107
+ ownKeys.forEach(function(key) {
108
+ _define_property(target, key, source[key]);
109
+ });
110
+ }
111
+ return target;
112
+ }
113
+ function universal_playground_electron_ownKeys(object, enumerableOnly) {
114
+ var keys = Object.keys(object);
115
+ if (Object.getOwnPropertySymbols) {
116
+ var symbols = Object.getOwnPropertySymbols(object);
117
+ if (enumerableOnly) symbols = symbols.filter(function(sym) {
118
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
119
+ });
120
+ keys.push.apply(keys, symbols);
121
+ }
122
+ return keys;
123
+ }
124
+ function _object_spread_props(target, source) {
125
+ source = null != source ? source : {};
126
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
127
+ else universal_playground_electron_ownKeys(Object(source)).forEach(function(key) {
128
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
129
+ });
130
+ return target;
131
+ }
132
+ const { Text } = external_antd_namespaceObject.Typography;
133
+ function ErrorMessage({ error }) {
134
+ if (!error) return null;
135
+ const cleanError = error.replace(/^(Error:\s*)+/, 'Error: ');
136
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Alert, {
137
+ message: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
138
+ style: {
139
+ color: '#ff4d4f'
140
+ },
141
+ children: cleanError
142
+ }),
143
+ type: "error",
144
+ showIcon: true
145
+ });
146
+ }
147
+ function UniversalPlaygroundElectron({ storage, contextProvider, config: componentConfig = {}, branding = {}, className = '', dryMode = false, showContextPreview = true, showPromptInput = true, onHumanUse = ()=>{}, showHumanUse = false, defaultSelectedType }) {
148
+ var _componentConfig_executionFlow, _executionFlowConfig_label;
149
+ const [form] = external_antd_namespaceObject.Form.useForm();
150
+ const { config } = (0, store_js_namespaceObject.useEnvConfig)();
151
+ const [sdkReady, setSdkReady] = (0, external_react_namespaceObject.useState)(false);
152
+ (0, external_react_namespaceObject.useEffect)(()=>{
153
+ form.setFieldsValue({
154
+ type: constants_js_namespaceObject.defaultMainButtons["0"]
155
+ });
156
+ }, [
157
+ form
158
+ ]);
159
+ const effectiveStorage = (0, external_react_namespaceObject.useMemo)(()=>{
160
+ if (storage) return storage;
161
+ if (!sdkReady) return null;
162
+ const namespace = componentConfig.storageNamespace;
163
+ const bestStorageType = (0, storage_provider_js_namespaceObject.detectBestStorageType)();
164
+ console.log(`Using ${bestStorageType} storage for namespace: ${namespace}`);
165
+ return (0, storage_provider_js_namespaceObject.createStorageProvider)(bestStorageType, namespace);
166
+ }, [
167
+ storage,
168
+ sdkReady,
169
+ componentConfig.storageNamespace
170
+ ]);
171
+ const { loading, setLoading, infoList, setInfoList, actionSpace, actionSpaceLoading, uiContextPreview, setUiContextPreview, showScrollToBottomButton, verticalMode, replayCounter, setReplayCounter, infoListRef, currentRunningIdRef, interruptedFlagRef, clearInfoList, handleScrollToBottom } = (0, usePlaygroundState_js_namespaceObject.usePlaygroundState)(null, effectiveStorage, contextProvider, branding.targetName);
172
+ const handleFormRun = (0, external_react_namespaceObject.useCallback)(()=>_async_to_generator(function*() {})(), [
173
+ form
174
+ ]);
175
+ Object.keys(config || {}).length;
176
+ const selectedType = form.getFieldValue('type');
177
+ const serviceMode = 'In-Browser-Extension';
178
+ const finalShowContextPreview = showContextPreview && false !== componentConfig.showContextPreview;
179
+ const layout = componentConfig.layout || 'vertical';
180
+ const showVersionInfo = false !== componentConfig.showVersionInfo;
181
+ const deviceType = componentConfig.deviceType;
182
+ const executionFlowConfig = null != (_componentConfig_executionFlow = componentConfig.executionFlow) ? _componentConfig_executionFlow : {};
183
+ const collapsibleProgressGroup = true === executionFlowConfig.collapsible;
184
+ const progressGroupLabel = null != (_executionFlowConfig_label = executionFlowConfig.label) ? _executionFlowConfig_label : 'Execution Flow';
185
+ const [collapsedProgressGroups, setCollapsedProgressGroups] = (0, external_react_namespaceObject.useState)(()=>new Set());
186
+ const toggleProgressGroup = (0, external_react_namespaceObject.useCallback)((groupId)=>{
187
+ setCollapsedProgressGroups((prev)=>{
188
+ const next = new Set(prev);
189
+ if (next.has(groupId)) next.delete(groupId);
190
+ else next.add(groupId);
191
+ return next;
192
+ });
193
+ }, []);
194
+ const { firstInProgressGroup, visibleInfoList } = (0, external_react_namespaceObject.useMemo)(()=>{
195
+ const firstIds = new Set();
196
+ const visible = [];
197
+ let currentGroupFirstId = null;
198
+ const hideWelcome = infoList.length > 1;
199
+ for (const item of infoList)if (!hideWelcome || 'welcome' !== item.id) if ('progress' === item.type) {
200
+ if (null === currentGroupFirstId) {
201
+ currentGroupFirstId = item.id;
202
+ firstIds.add(item.id);
203
+ visible.push(item);
204
+ continue;
205
+ }
206
+ if (!collapsibleProgressGroup || !collapsedProgressGroups.has(currentGroupFirstId)) visible.push(item);
207
+ } else {
208
+ currentGroupFirstId = null;
209
+ visible.push(item);
210
+ }
211
+ return {
212
+ firstInProgressGroup: firstIds,
213
+ visibleInfoList: visible
214
+ };
215
+ }, [
216
+ collapsedProgressGroups,
217
+ collapsibleProgressGroup,
218
+ infoList
219
+ ]);
220
+ const latestProgressId = (0, external_react_namespaceObject.useMemo)(()=>{
221
+ for(let i = infoList.length - 1; i >= 0; i--)if ('progress' === infoList[i].type) return infoList[i].id;
222
+ return null;
223
+ }, [
224
+ infoList
225
+ ]);
226
+ const renderCustomEmptyState = (0, external_empty_state_js_namespaceObject.shouldRenderCustomEmptyState)(visibleInfoList, componentConfig.emptyState);
227
+ const shouldOffsetEmptyStateForPrompt = (0, external_react_namespaceObject.useMemo)(()=>renderCustomEmptyState && (0, prompt_input_utils_js_namespaceObject.shouldOffsetEmptyStateForPromptInput)(actionSpace, selectedType), [
228
+ actionSpace,
229
+ renderCustomEmptyState,
230
+ selectedType
231
+ ]);
232
+ (0, external_react_namespaceObject.useEffect)(()=>{
233
+ if (!shouldOffsetEmptyStateForPrompt) return;
234
+ const adjustEmptyStateScroll = ()=>{
235
+ const container = infoListRef.current;
236
+ if (!container) return;
237
+ const wrapper = container.querySelector('.playground-empty-state-wrapper');
238
+ const contentStart = null == wrapper ? void 0 : wrapper.querySelector('[data-playground-empty-state-content-start]');
239
+ const contentEnd = null == wrapper ? void 0 : wrapper.querySelector('[data-playground-empty-state-content-end]');
240
+ if (!(contentStart instanceof HTMLElement) || !(contentEnd instanceof HTMLElement)) return;
241
+ const containerRect = container.getBoundingClientRect();
242
+ const startRect = contentStart.getBoundingClientRect();
243
+ const endRect = contentEnd.getBoundingClientRect();
244
+ const top = (0, empty_state_scroll_js_namespaceObject.calculateEmptyStatePromptScrollTop)({
245
+ currentScrollTop: container.scrollTop,
246
+ maxScrollTop: Math.max(0, container.scrollHeight - container.clientHeight),
247
+ containerTop: containerRect.top,
248
+ containerBottom: containerRect.bottom,
249
+ contentStartTop: startRect.top,
250
+ contentEndBottom: endRect.bottom
251
+ });
252
+ container.scrollTo({
253
+ top,
254
+ behavior: 'auto'
255
+ });
256
+ };
257
+ const animationFrameId = window.requestAnimationFrame(adjustEmptyStateScroll);
258
+ const timeoutId = window.setTimeout(adjustEmptyStateScroll, 160);
259
+ return ()=>{
260
+ window.cancelAnimationFrame(animationFrameId);
261
+ window.clearTimeout(timeoutId);
262
+ };
263
+ }, [
264
+ infoListRef,
265
+ selectedType,
266
+ shouldOffsetEmptyStateForPrompt
267
+ ]);
268
+ const emptyStateWrapperClassName = [
269
+ 'playground-empty-state-wrapper',
270
+ shouldOffsetEmptyStateForPrompt ? 'playground-empty-state-wrapper-offset-for-prompt' : ''
271
+ ].filter(Boolean).join(' ');
272
+ (0, external_react_namespaceObject.useEffect)(()=>{
273
+ var _window_electron, _window_electron1, _window_electron2, _window_electron3;
274
+ clearInfoList();
275
+ null == (_window_electron = window.electron) || _window_electron.ipcRenderer.on('rpascene-execute-start', (e, value, thisRunningId)=>{
276
+ const sub = value.prompt || value.params ? value.prompt || JSON.stringify(value.params) : '';
277
+ const displayContent = sub;
278
+ const userItem = {
279
+ id: `user-${Date.now()}`,
280
+ type: 'user',
281
+ content: displayContent,
282
+ timestamp: new Date()
283
+ };
284
+ setInfoList((prev)=>[
285
+ ...prev,
286
+ userItem
287
+ ]);
288
+ setLoading(true);
289
+ const systemItem = {
290
+ id: `system-${thisRunningId}`,
291
+ type: 'system',
292
+ content: '',
293
+ timestamp: new Date(),
294
+ loading: true,
295
+ loadingProgressText: ''
296
+ };
297
+ setInfoList((prev)=>[
298
+ ...prev,
299
+ systemItem
300
+ ]);
301
+ });
302
+ null == (_window_electron1 = window.electron) || _window_electron1.ipcRenderer.on('rpascene-execute-result', (e, value, thisRunningId)=>{
303
+ console.log('rpascene-execute-result', value, thisRunningId);
304
+ const result = _object_spread({}, constants_js_namespaceObject.BLANK_RESULT);
305
+ try {
306
+ currentRunningIdRef.current = thisRunningId;
307
+ interruptedFlagRef.current[thisRunningId] = false;
308
+ result.result = value;
309
+ if ('object' == typeof result.result && null !== result.result) {
310
+ const resultObj = result.result;
311
+ if (resultObj.dump) result.dump = resultObj.dump;
312
+ if (resultObj.reportHTML) result.reportHTML = resultObj.reportHTML;
313
+ if (resultObj.error) result.error = (0, usePlaygroundExecution_js_namespaceObject.formatError)(resultObj.error);
314
+ if ('result' in resultObj) result.result = resultObj.result;
315
+ }
316
+ } catch (e) {
317
+ result.error = (0, usePlaygroundExecution_js_namespaceObject.formatError)(e);
318
+ console.error('Playground execution error:', e);
319
+ if ('object' == typeof e && null !== e) {
320
+ if (e.dump) result.dump = e.dump;
321
+ if (e.reportHTML) result.reportHTML = e.reportHTML;
322
+ }
323
+ }
324
+ if (interruptedFlagRef.current[thisRunningId]) return;
325
+ setLoading(false);
326
+ currentRunningIdRef.current = null;
327
+ let replayInfo = null;
328
+ let counter = replayCounter;
329
+ if (null == result ? void 0 : result.dump) {
330
+ if (result.dump.tasks && Array.isArray(result.dump.tasks)) {
331
+ const groupedDump = (0, usePlaygroundExecution_js_namespaceObject.wrapExecutionDumpForReplay)(result.dump, deviceType);
332
+ const info = (0, replay_scripts_js_namespaceObject.allScriptsFromDump)(groupedDump);
333
+ setReplayCounter((c)=>c + 1);
334
+ replayInfo = info;
335
+ counter = replayCounter + 1;
336
+ }
337
+ }
338
+ setInfoList((prev)=>prev.map((item)=>item.id === `system-${thisRunningId}` ? _object_spread_props(_object_spread({}, item), {
339
+ content: '',
340
+ loading: false,
341
+ loadingProgressText: ''
342
+ }) : item));
343
+ const resultItem = {
344
+ id: `result-${thisRunningId}`,
345
+ type: 'result',
346
+ content: 'Execution result',
347
+ timestamp: new Date(),
348
+ result: result,
349
+ loading: false,
350
+ replayScriptsInfo: replayInfo,
351
+ replayCounter: counter,
352
+ loadingProgressText: '',
353
+ verticalMode: verticalMode,
354
+ actionType: 'aiAct'
355
+ };
356
+ setInfoList((prev)=>[
357
+ ...prev,
358
+ resultItem
359
+ ]);
360
+ });
361
+ null == (_window_electron2 = window.electron) || _window_electron2.ipcRenderer.on('rpascene-execute-prepare', (e, tip, thisRunningId)=>{
362
+ setLoading(true);
363
+ setInfoList((prev)=>{
364
+ const lastItem = prev[prev.length - 1];
365
+ if (lastItem && 'progress' === lastItem.type && lastItem.content === tip) return prev;
366
+ const progressItem = {
367
+ id: `progress-${thisRunningId}-${Date.now()}`,
368
+ type: 'progress',
369
+ content: tip,
370
+ loading: true,
371
+ timestamp: new Date()
372
+ };
373
+ return [
374
+ ...prev,
375
+ progressItem
376
+ ];
377
+ });
378
+ });
379
+ null == (_window_electron3 = window.electron) || _window_electron3.ipcRenderer.on('rpascene-execute-progress', (e, thisRunningId, executionDump)=>{
380
+ var _executionDump_tasks;
381
+ if (interruptedFlagRef.current[thisRunningId] || !(null == executionDump ? void 0 : null == (_executionDump_tasks = executionDump.tasks) ? void 0 : _executionDump_tasks.length)) return;
382
+ const progressItems = executionDump.tasks.map((task, index)=>{
383
+ var _task_timing;
384
+ return {
385
+ id: `progress-${thisRunningId}-task-${index}`,
386
+ type: 'progress',
387
+ content: (0, usePlaygroundExecution_js_namespaceObject.buildProgressContent)(task),
388
+ actionKind: (0, agent_namespaceObject.typeStr)(task),
389
+ timestamp: new Date((null == (_task_timing = task.timing) ? void 0 : _task_timing.start) || Date.now()),
390
+ result: task.error ? {
391
+ error: (0, usePlaygroundExecution_js_namespaceObject.formatError)(task.error),
392
+ result: null
393
+ } : void 0
394
+ };
395
+ });
396
+ setInfoList((prev)=>{
397
+ const systemItemIndex = prev.findIndex((item)=>item.id === `system-${thisRunningId}`);
398
+ if (-1 === systemItemIndex) return prev;
399
+ const listWithoutCurrentProgress = prev.filter((item)=>!('progress' === item.type && item.id.startsWith(`progress-${thisRunningId}-`)));
400
+ return [
401
+ ...listWithoutCurrentProgress.slice(0, systemItemIndex + 1),
402
+ ...progressItems,
403
+ ...listWithoutCurrentProgress.slice(systemItemIndex + 1)
404
+ ];
405
+ });
406
+ });
407
+ return ()=>{
408
+ var _window_electron, _window_electron1, _window_electron2, _window_electron3;
409
+ null == (_window_electron = window.electron) || _window_electron.ipcRenderer.removeAllListeners('rpascene-execute-prepare');
410
+ null == (_window_electron1 = window.electron) || _window_electron1.ipcRenderer.removeAllListeners('rpascene-execute-start');
411
+ null == (_window_electron2 = window.electron) || _window_electron2.ipcRenderer.removeAllListeners('rpascene-execute-result');
412
+ null == (_window_electron3 = window.electron) || _window_electron3.ipcRenderer.removeAllListeners('rpascene-execute-progress');
413
+ };
414
+ }, []);
415
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
416
+ className: `playground-container ${layout}-mode ${className}`.trim(),
417
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Form, {
418
+ form: form,
419
+ onFinish: handleFormRun,
420
+ className: "command-form",
421
+ children: [
422
+ finalShowContextPreview && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
423
+ className: "context-preview-section",
424
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.ContextPreview, {
425
+ uiContextPreview: uiContextPreview,
426
+ setUiContextPreview: setUiContextPreview,
427
+ showContextPreview: finalShowContextPreview
428
+ })
429
+ }),
430
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
431
+ className: "middle-dialog-area",
432
+ children: [
433
+ false !== componentConfig.showClearButton && infoList.length > 1 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
434
+ className: "clear-button-container",
435
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
436
+ size: "small",
437
+ icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ClearOutlined, {}),
438
+ onClick: clearInfoList,
439
+ type: "text",
440
+ className: "clear-button"
441
+ })
442
+ }),
443
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
444
+ ref: infoListRef,
445
+ className: "info-list-container",
446
+ children: renderCustomEmptyState ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
447
+ className: emptyStateWrapperClassName,
448
+ children: componentConfig.emptyState
449
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.List, {
450
+ itemLayout: "vertical",
451
+ dataSource: visibleInfoList,
452
+ renderItem: (item)=>{
453
+ const isFirstInProgressGroup = collapsibleProgressGroup && firstInProgressGroup.has(item.id);
454
+ const isCollapsedHeader = isFirstInProgressGroup && collapsedProgressGroups.has(item.id);
455
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.List.Item, {
456
+ className: "list-item",
457
+ children: [
458
+ isFirstInProgressGroup ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("button", {
459
+ type: "button",
460
+ className: `progress-group-toggle ${collapsedProgressGroups.has(item.id) ? 'is-collapsed' : 'is-expanded'}`,
461
+ "aria-expanded": !collapsedProgressGroups.has(item.id),
462
+ onClick: ()=>toggleProgressGroup(item.id),
463
+ children: [
464
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
465
+ className: "progress-group-toggle-label",
466
+ children: progressGroupLabel
467
+ }),
468
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.UpOutlined, {
469
+ className: "progress-group-toggle-chevron"
470
+ })
471
+ ]
472
+ }) : null,
473
+ isCollapsedHeader ? null : 'user' === item.type ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
474
+ className: "user-message-container",
475
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
476
+ className: "user-message-bubble",
477
+ children: item.content
478
+ })
479
+ }) : 'progress' === item.type ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
480
+ children: (()=>{
481
+ var _parts_, _item_result, _item_result1;
482
+ const parts = item.content.split(' - ');
483
+ const action = null == (_parts_ = parts[0]) ? void 0 : _parts_.trim();
484
+ const description = parts.slice(1).join(' - ').trim();
485
+ const isLatestProgress = item.id === latestProgressId;
486
+ const shouldShowLoading = loading && isLatestProgress;
487
+ const state = shouldShowLoading ? 'loading' : (null == (_item_result = item.result) ? void 0 : _item_result.error) ? 'error' : 'completed';
488
+ const domainIcon = 'completed' === state ? (0, progress_action_icon_js_namespaceObject.resolveProgressActionIcon)(item.actionKind, executionFlowConfig.resolveActionIcon) : null;
489
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
490
+ children: [
491
+ action && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
492
+ className: "progress-action-item",
493
+ children: [
494
+ action,
495
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
496
+ className: `progress-status-icon ${state}`,
497
+ children: 'loading' === state ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.LoadingOutlined, {
498
+ spin: true
499
+ }) : 'error' === state ? '✗' : null !== domainIcon ? domainIcon : '✓'
500
+ })
501
+ ]
502
+ }),
503
+ description && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
504
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_shiny_text_index_js_default(), {
505
+ text: description,
506
+ className: "progress-description",
507
+ disabled: !shouldShowLoading
508
+ })
509
+ }),
510
+ (null == (_item_result1 = item.result) ? void 0 : _item_result1.error) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ErrorMessage, {
511
+ error: item.result.error
512
+ })
513
+ ]
514
+ });
515
+ })()
516
+ }) : 'separator' === item.type ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
517
+ className: "new-conversation-separator",
518
+ children: [
519
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
520
+ className: "separator-line"
521
+ }),
522
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
523
+ className: "separator-text-container",
524
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Text, {
525
+ type: "secondary",
526
+ className: "separator-text",
527
+ children: item.content
528
+ })
529
+ })
530
+ ]
531
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
532
+ className: "system-message-container",
533
+ children: [
534
+ false !== componentConfig.showSystemMessageHeader && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
535
+ className: "system-message-header",
536
+ children: [
537
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_default(), {
538
+ component: branding.icon || avatar_js_default(),
539
+ style: {
540
+ fontSize: 20
541
+ }
542
+ }),
543
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
544
+ className: "system-message-title",
545
+ children: branding.title || 'Playground'
546
+ })
547
+ ]
548
+ }),
549
+ (item.content || item.result) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
550
+ className: "system-message-content",
551
+ children: 'result' === item.type ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_playground_result_index_js_namespaceObject.PlaygroundResultView, {
552
+ result: item.result || null,
553
+ loading: item.loading || false,
554
+ serverValid: true,
555
+ serviceMode: serviceMode,
556
+ replayScriptsInfo: item.replayScriptsInfo || null,
557
+ replayCounter: item.replayCounter || 0,
558
+ loadingProgressText: item.loadingProgressText || '',
559
+ verticalMode: item.verticalMode || false,
560
+ fitMode: "width",
561
+ actionType: item.actionType,
562
+ onDownloadReport: componentConfig.onDownloadReport,
563
+ canDownloadReport: false
564
+ }) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
565
+ children: [
566
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
567
+ className: "system-message-text",
568
+ children: item.content
569
+ }),
570
+ item.loading && item.loadingProgressText && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
571
+ className: "loading-progress-text",
572
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
573
+ children: item.loadingProgressText
574
+ })
575
+ })
576
+ ]
577
+ })
578
+ }),
579
+ (null == item ? void 0 : item.actionTasks) && (null == item ? void 0 : item.actionTasks.length) > 0 && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
580
+ className: "system-message-content",
581
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
582
+ children: [
583
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
584
+ className: "system-message-text",
585
+ children: [
586
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
587
+ className: "action-result-title",
588
+ children: "此次生成如下命令,点击采用可插入到设计器"
589
+ }),
590
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("ul", {
591
+ className: "action-result-list",
592
+ children: item.actionTasks.map((data, index)=>{
593
+ var _commandMap_data_subType, _data_param, _data_param1, _data_param2, _data_param3, _data_param4, _data_param_from, _data_param5, _data_param_to, _data_param6;
594
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("li", {
595
+ title: data.locate,
596
+ children: [
597
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
598
+ className: "action-result-command",
599
+ children: [
600
+ "命令:",
601
+ (null == (_commandMap_data_subType = constants_namespaceObject.commandMap[data.subType]) ? void 0 : _commandMap_data_subType.DisplayName) || data.subType
602
+ ]
603
+ }),
604
+ (null == data ? void 0 : null == (_data_param = data.param) ? void 0 : _data_param.timeMs) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
605
+ className: "action-result-command",
606
+ children: [
607
+ "暂停时间:",
608
+ data.param.timeMs
609
+ ]
610
+ }),
611
+ (null == data ? void 0 : null == (_data_param1 = data.param) ? void 0 : _data_param1.url) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
612
+ className: "action-result-command",
613
+ children: [
614
+ "网址:",
615
+ data.param.url
616
+ ]
617
+ }),
618
+ (null == data ? void 0 : null == (_data_param2 = data.param) ? void 0 : _data_param2.keyName) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
619
+ className: "action-result-command",
620
+ children: [
621
+ "按键:",
622
+ data.param.keyName
623
+ ]
624
+ }),
625
+ (null == data ? void 0 : null == (_data_param3 = data.param) ? void 0 : _data_param3.value) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
626
+ className: "action-result-command",
627
+ children: [
628
+ "值:",
629
+ null == data ? void 0 : null == (_data_param4 = data.param) ? void 0 : _data_param4.value
630
+ ]
631
+ }),
632
+ (null == (_data_param5 = data.param) ? void 0 : null == (_data_param_from = _data_param5.from) ? void 0 : _data_param_from.locateDescription) && (null == (_data_param6 = data.param) ? void 0 : null == (_data_param_to = _data_param6.to) ? void 0 : _data_param_to.locateDescription) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
633
+ className: "action-result-locate",
634
+ children: [
635
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
636
+ children: "拖拽元素:"
637
+ }),
638
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
639
+ children: data.param.from.locateDescription
640
+ }),
641
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
642
+ children: "目标元素:"
643
+ }),
644
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
645
+ children: data.param.to.locateDescription
646
+ })
647
+ ]
648
+ }),
649
+ data.locateDescription && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
650
+ className: "action-result-locate",
651
+ children: [
652
+ "元素:",
653
+ data.locateDescription
654
+ ]
655
+ })
656
+ ]
657
+ }, index);
658
+ })
659
+ })
660
+ ]
661
+ }),
662
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
663
+ className: "action-result-btns",
664
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
665
+ type: "primary",
666
+ onClick: ()=>onHumanUse(item.actionTasks),
667
+ children: "采用"
668
+ })
669
+ })
670
+ ]
671
+ })
672
+ })
673
+ ]
674
+ })
675
+ ]
676
+ }, item.id);
677
+ }
678
+ })
679
+ }),
680
+ showScrollToBottomButton && false !== componentConfig.enableScrollToBottom && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
681
+ className: "scroll-to-bottom-button",
682
+ type: "primary",
683
+ shape: "circle",
684
+ icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ArrowDownOutlined, {}),
685
+ onClick: handleScrollToBottom,
686
+ size: "large"
687
+ })
688
+ ]
689
+ }),
690
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
691
+ className: "bottom-input-section",
692
+ children: componentConfig.showEnvConfigReminder ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_env_config_reminder_index_js_namespaceObject.EnvConfigReminder, {}) : null
693
+ }),
694
+ showVersionInfo && branding.version && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
695
+ className: "version-info-section",
696
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("span", {
697
+ className: "version-text",
698
+ children: [
699
+ "version: ",
700
+ branding.version
701
+ ]
702
+ })
703
+ })
704
+ ]
705
+ })
706
+ });
707
+ }
708
+ const universal_playground_electron = UniversalPlaygroundElectron;
709
+ exports.UniversalPlaygroundElectron = __webpack_exports__.UniversalPlaygroundElectron;
710
+ exports["default"] = __webpack_exports__["default"];
711
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
712
+ "UniversalPlaygroundElectron",
713
+ "default"
714
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
715
+ Object.defineProperty(exports, '__esModule', {
716
+ value: true
717
+ });