@aixnn/aixautots 0.6.3 → 0.6.5
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/{automation-queue-BxrSIkG3.d.ts → automation-queue-aYRO9JLj.d.ts} +2 -2
- package/dist/chunk-7CN37G3W.js +102 -0
- package/dist/{chunk-JTFZSFFA.js → chunk-7H4CYM42.js} +414 -5
- package/dist/{chunk-FW23FLAF.js → chunk-D7J4EQTA.js} +1 -1
- package/dist/{chunk-B2BOVLI6.js → chunk-F76N3GOA.js} +1077 -313
- package/dist/{chunk-P2Y655SL.js → chunk-FBWJUW4X.js} +578 -141
- package/dist/{chunk-T3QVYTOT.js → chunk-IFARWPMU.js} +364 -0
- package/dist/{chunk-LTZCKFAZ.js → chunk-LMSN6Z3N.js} +668 -103
- package/dist/{chunk-Q63FQ7B5.js → chunk-LWTL4AIC.js} +254 -13
- package/dist/{chunk-EVHTAXQG.js → chunk-SKTL6ACT.js} +5 -1
- package/dist/{chunk-6S3XLY5O.js → chunk-X5KVYWUK.js} +4 -5
- package/dist/chunk-YWA47ARA.js +1148 -0
- package/dist/{config-CLi5IhmO.d.ts → config-B7t1Ln3w.d.ts} +177 -8
- package/dist/core/index.d.ts +21 -16
- package/dist/core/index.js +2 -4
- package/dist/{device-normalize-BaThgnH7.d.ts → device-normalize-CuGflfZA.d.ts} +1 -1
- package/dist/device-session-OFGN4KUD.js +1 -0
- package/dist/i18n/index.js +1 -1
- package/dist/{mirror-session-BP7Rd3Jk.d.ts → mirror-session-DK0OQvA3.d.ts} +11 -3
- package/dist/react/index.d.ts +10 -8
- package/dist/react/index.js +3 -6
- package/dist/{script-debugger-DtUGxK9i.d.ts → script-debugger-6hoLEwEz.d.ts} +1 -1
- package/dist/{task-agent-runner-DzV_OUZ7.d.ts → task-agent-runner-BwRW88rl.d.ts} +5 -3
- package/dist/{types-C2WXVcam.d.ts → types-BbtVr3QM.d.ts} +34 -3
- package/dist/ui/billing.d.ts +1 -1
- package/dist/ui/billing.js +5 -8
- package/dist/ui/device-create.d.ts +4 -3
- package/dist/ui/device-create.js +7 -8
- package/dist/ui/device-mirror.d.ts +16 -2
- package/dist/ui/device-mirror.js +6 -7
- package/dist/ui/devices.d.ts +5 -5
- package/dist/ui/devices.js +10 -12
- package/dist/ui/editor.d.ts +2 -2
- package/dist/ui/editor.js +7 -10
- package/dist/ui/index.d.ts +4 -4
- package/dist/ui/index.js +9 -14
- package/dist/ui/inspector.js +5 -8
- package/dist/ui/market.js +4 -7
- package/dist/ui/mirror.d.ts +3 -3
- package/dist/ui/primitives/index.d.ts +1 -1
- package/dist/ui/primitives/index.js +1 -1
- package/dist/ui/script-studio.js +6 -9
- package/dist/ui/scripts.d.ts +1 -1
- package/dist/ui/scripts.js +5 -8
- package/dist/ui/tasks.js +10 -12
- package/package.json +1 -1
- package/dist/chunk-A5VNENHD.js +0 -229
- package/dist/chunk-BUW45GM2.js +0 -341
- package/dist/chunk-LAZ3RQ7X.js +0 -668
- package/dist/chunk-VVJ4TK6D.js +0 -583
- package/dist/device-session-CVT7OY4H.js +0 -2
|
@@ -1,9 +1,51 @@
|
|
|
1
|
-
import { MirrorSession, normalizeDevices, submitBatch } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { createContext, useState, useRef, useEffect, useCallback, useMemo, createElement, useContext } from 'react';
|
|
1
|
+
import { DeviceChannel, ScriptDebugger, FlowRun, MirrorSession, normalizeDevices, submitBatch } from './chunk-7H4CYM42.js';
|
|
2
|
+
import { resolveConfig, AixClient, isFleetRunTerminal, joinUrl, AixAuthError, AixError, EnvRun, detectEnvOs, summarizeEnv, ReconnectingSocket, executionWsTicketUrl } from './chunk-F76N3GOA.js';
|
|
3
|
+
import React, { createContext, useContext, useState, useRef, useEffect, useCallback, useMemo, createElement } from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
5
|
|
|
6
|
+
var Ctx = createContext(null);
|
|
7
|
+
function AixProvider({ config, children }) {
|
|
8
|
+
const resolved = React.useMemo(
|
|
9
|
+
() => resolveConfig(config),
|
|
10
|
+
// Spread individual stable primitives so an inline config object literal
|
|
11
|
+
// doesn't thrash the channel on every parent render.
|
|
12
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13
|
+
[config.baseUrl, config.getAuthToken, config.fetchFn, config.wsFactory]
|
|
14
|
+
);
|
|
15
|
+
return /* @__PURE__ */ jsx(Ctx.Provider, { value: resolved, children });
|
|
16
|
+
}
|
|
17
|
+
function useAixConfig() {
|
|
18
|
+
const c = useContext(Ctx);
|
|
19
|
+
if (!c) throw new Error("useAixConfig must be used within <AixProvider>");
|
|
20
|
+
return c;
|
|
21
|
+
}
|
|
22
|
+
function useDevice(deviceId) {
|
|
23
|
+
const cfg = useAixConfig();
|
|
24
|
+
const [channel, setChannel] = useState(null);
|
|
25
|
+
const [error, setError] = useState(null);
|
|
26
|
+
const ref = useRef(null);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
let cancelled = false;
|
|
29
|
+
setChannel(null);
|
|
30
|
+
setError(null);
|
|
31
|
+
DeviceChannel.open(cfg, deviceId).then((ch) => {
|
|
32
|
+
if (cancelled) {
|
|
33
|
+
ch.close();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
ref.current = ch;
|
|
37
|
+
setChannel(ch);
|
|
38
|
+
}).catch((e) => {
|
|
39
|
+
if (!cancelled) setError(e instanceof Error ? e : new Error(String(e)));
|
|
40
|
+
});
|
|
41
|
+
return () => {
|
|
42
|
+
cancelled = true;
|
|
43
|
+
ref.current?.close();
|
|
44
|
+
ref.current = null;
|
|
45
|
+
};
|
|
46
|
+
}, [cfg, deviceId]);
|
|
47
|
+
return { deviceId, channel, error };
|
|
48
|
+
}
|
|
7
49
|
function useCommands(deviceId) {
|
|
8
50
|
const { channel, error: openError } = useDevice(deviceId);
|
|
9
51
|
const [loading, setLoading] = useState(false);
|
|
@@ -62,6 +104,74 @@ function useCommands(deviceId) {
|
|
|
62
104
|
}, [channel]);
|
|
63
105
|
return { ready: channel !== null, loading, error: error ?? openError, lastResult, adb, wda };
|
|
64
106
|
}
|
|
107
|
+
function useScript(deviceId, opts) {
|
|
108
|
+
const { channel, error: openError } = useDevice(deviceId);
|
|
109
|
+
const [running, setRunning] = useState(false);
|
|
110
|
+
const [runId, setRunId] = useState(null);
|
|
111
|
+
const [events, setEvents] = useState([]);
|
|
112
|
+
const [error, setError] = useState(null);
|
|
113
|
+
const mountedRef = useRef(true);
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
mountedRef.current = true;
|
|
116
|
+
return () => {
|
|
117
|
+
mountedRef.current = false;
|
|
118
|
+
};
|
|
119
|
+
}, []);
|
|
120
|
+
const dbg = useMemo(
|
|
121
|
+
() => channel ? new ScriptDebugger({ engine: opts.engine, channel }) : null,
|
|
122
|
+
[channel, opts.engine]
|
|
123
|
+
);
|
|
124
|
+
useEffect(() => {
|
|
125
|
+
if (!dbg) return;
|
|
126
|
+
const unsub = dbg.on("event", (e) => {
|
|
127
|
+
if (mountedRef.current) setEvents((prev) => [...prev, e]);
|
|
128
|
+
});
|
|
129
|
+
return () => {
|
|
130
|
+
unsub();
|
|
131
|
+
void dbg.cancel().catch(() => {
|
|
132
|
+
});
|
|
133
|
+
if (mountedRef.current) {
|
|
134
|
+
setRunning(false);
|
|
135
|
+
setRunId(null);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}, [dbg]);
|
|
139
|
+
const run = useCallback(async (input) => {
|
|
140
|
+
if (!dbg) throw new Error("device channel not ready");
|
|
141
|
+
if (mountedRef.current) {
|
|
142
|
+
setError(null);
|
|
143
|
+
setEvents([]);
|
|
144
|
+
}
|
|
145
|
+
try {
|
|
146
|
+
const res = await dbg.run(input);
|
|
147
|
+
if (mountedRef.current) {
|
|
148
|
+
setRunId(res.runId);
|
|
149
|
+
setRunning(true);
|
|
150
|
+
}
|
|
151
|
+
return res;
|
|
152
|
+
} catch (e) {
|
|
153
|
+
const err = e instanceof Error ? e : new Error(String(e));
|
|
154
|
+
if (mountedRef.current) setError(err);
|
|
155
|
+
throw err;
|
|
156
|
+
}
|
|
157
|
+
}, [dbg]);
|
|
158
|
+
const call = useCallback(async (method, args) => {
|
|
159
|
+
if (!dbg) throw new Error("device channel not ready");
|
|
160
|
+
return dbg.call(method, args);
|
|
161
|
+
}, [dbg]);
|
|
162
|
+
const cancel = useCallback(async () => {
|
|
163
|
+
if (!dbg) return;
|
|
164
|
+
await dbg.cancel();
|
|
165
|
+
if (mountedRef.current) {
|
|
166
|
+
setRunning(false);
|
|
167
|
+
setRunId(null);
|
|
168
|
+
}
|
|
169
|
+
}, [dbg]);
|
|
170
|
+
const clearEvents = useCallback(() => {
|
|
171
|
+
if (mountedRef.current) setEvents([]);
|
|
172
|
+
}, []);
|
|
173
|
+
return { ready: channel !== null, running, runId, events, error: error ?? openError, run, call, cancel, clearEvents };
|
|
174
|
+
}
|
|
65
175
|
function useFlowRun() {
|
|
66
176
|
const cfg = useAixConfig();
|
|
67
177
|
const [taskId, setTaskId] = useState(null);
|
|
@@ -114,14 +224,19 @@ function useMirror(sessionId) {
|
|
|
114
224
|
const [session, setSession] = useState(null);
|
|
115
225
|
const [stream, setStream] = useState(null);
|
|
116
226
|
const [error, setError] = useState(null);
|
|
227
|
+
const [connectionState, setConnectionState] = useState("connecting");
|
|
228
|
+
const [controlReady, setControlReady] = useState(false);
|
|
117
229
|
const ref = useRef(null);
|
|
118
230
|
const mountedRef = useRef(true);
|
|
119
231
|
useEffect(() => {
|
|
120
232
|
mountedRef.current = true;
|
|
121
233
|
let cancelled = false;
|
|
234
|
+
let unsubscribe = [];
|
|
122
235
|
setSession(null);
|
|
123
236
|
setStream(null);
|
|
124
237
|
setError(null);
|
|
238
|
+
setConnectionState("connecting");
|
|
239
|
+
setControlReady(false);
|
|
125
240
|
if (!sessionId) return () => {
|
|
126
241
|
mountedRef.current = false;
|
|
127
242
|
};
|
|
@@ -132,18 +247,31 @@ function useMirror(sessionId) {
|
|
|
132
247
|
}
|
|
133
248
|
ref.current = ms;
|
|
134
249
|
setSession(ms);
|
|
135
|
-
ms.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
250
|
+
setStream(ms.stream);
|
|
251
|
+
setConnectionState(ms.connectionState);
|
|
252
|
+
setControlReady(ms.controlReady);
|
|
253
|
+
unsubscribe = [
|
|
254
|
+
ms.onStream((s) => {
|
|
255
|
+
if (!cancelled) setStream(s);
|
|
256
|
+
}),
|
|
257
|
+
ms.onConnectionStateChange((state) => {
|
|
258
|
+
if (!cancelled) {
|
|
259
|
+
setStream(ms.stream);
|
|
260
|
+
setConnectionState(state);
|
|
261
|
+
setControlReady(ms.controlReady);
|
|
262
|
+
}
|
|
263
|
+
}),
|
|
264
|
+
ms.onControlStateChange((ready) => {
|
|
265
|
+
if (!cancelled) setControlReady(ready);
|
|
266
|
+
})
|
|
267
|
+
];
|
|
141
268
|
}).catch((e) => {
|
|
142
269
|
if (!cancelled) setError(e instanceof Error ? e : new Error(String(e)));
|
|
143
270
|
});
|
|
144
271
|
return () => {
|
|
145
272
|
cancelled = true;
|
|
146
273
|
mountedRef.current = false;
|
|
274
|
+
unsubscribe.forEach((stop) => stop());
|
|
147
275
|
ref.current?.leave();
|
|
148
276
|
ref.current = null;
|
|
149
277
|
};
|
|
@@ -154,7 +282,7 @@ function useMirror(sessionId) {
|
|
|
154
282
|
const setQuality = useCallback((profile) => {
|
|
155
283
|
ref.current?.setQuality(profile);
|
|
156
284
|
}, []);
|
|
157
|
-
return { session, stream, error, sendInput, setQuality };
|
|
285
|
+
return { session, stream, error, connectionState, controlReady, sendInput, setQuality };
|
|
158
286
|
}
|
|
159
287
|
var GROUP_MIRROR_MAX = 9;
|
|
160
288
|
function useGroupMirror(ids) {
|
|
@@ -203,6 +331,47 @@ function useGroupMirror(ids) {
|
|
|
203
331
|
}, []);
|
|
204
332
|
return { streams, errors, connected, broadcastInput, setQualityAll };
|
|
205
333
|
}
|
|
334
|
+
function useClient() {
|
|
335
|
+
const cfg = useAixConfig();
|
|
336
|
+
return useMemo(() => new AixClient(cfg), [cfg]);
|
|
337
|
+
}
|
|
338
|
+
function useQuery(loader, deps) {
|
|
339
|
+
const [data, setData] = useState(null);
|
|
340
|
+
const [loading, setLoading] = useState(true);
|
|
341
|
+
const [error, setError] = useState(null);
|
|
342
|
+
const mounted = useRef(true);
|
|
343
|
+
const loaderRef = useRef(loader);
|
|
344
|
+
loaderRef.current = loader;
|
|
345
|
+
const run = useCallback(async () => {
|
|
346
|
+
if (mounted.current) {
|
|
347
|
+
setLoading(true);
|
|
348
|
+
setError(null);
|
|
349
|
+
}
|
|
350
|
+
try {
|
|
351
|
+
const r = await loaderRef.current();
|
|
352
|
+
if (mounted.current) {
|
|
353
|
+
setData(r);
|
|
354
|
+
setLoading(false);
|
|
355
|
+
}
|
|
356
|
+
} catch (e) {
|
|
357
|
+
if (mounted.current) {
|
|
358
|
+
setError(e instanceof Error ? e : new Error(String(e)));
|
|
359
|
+
setLoading(false);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}, deps);
|
|
363
|
+
useEffect(() => {
|
|
364
|
+
mounted.current = true;
|
|
365
|
+
void run();
|
|
366
|
+
return () => {
|
|
367
|
+
mounted.current = false;
|
|
368
|
+
};
|
|
369
|
+
}, [run]);
|
|
370
|
+
const patch = useCallback((updater) => {
|
|
371
|
+
if (mounted.current) setData((prev) => updater(prev));
|
|
372
|
+
}, []);
|
|
373
|
+
return { data, loading, error, refetch: run, setData: patch };
|
|
374
|
+
}
|
|
206
375
|
function useAuth() {
|
|
207
376
|
const c = useClient();
|
|
208
377
|
return {
|
|
@@ -260,6 +429,8 @@ function mapDevice(r) {
|
|
|
260
429
|
const booting = !online && provisioned && createdMs > 0 && Date.now() - createdMs < 12e4;
|
|
261
430
|
return {
|
|
262
431
|
id: r.device_id,
|
|
432
|
+
ownerUserId: r.owner_user_id,
|
|
433
|
+
projectId: r.project_id,
|
|
263
434
|
name: r.name || meta.name || r.external_id,
|
|
264
435
|
platform,
|
|
265
436
|
status: online ? "connected" : booting ? "connecting" : "disconnected",
|
|
@@ -1890,6 +2061,76 @@ function useNodes() {
|
|
|
1890
2061
|
}, [c, refetch]);
|
|
1891
2062
|
return { ...q, register };
|
|
1892
2063
|
}
|
|
2064
|
+
function useEnvRun(beforeSetup) {
|
|
2065
|
+
const cfg = useAixConfig();
|
|
2066
|
+
const [reqId, setReqId] = useState(null);
|
|
2067
|
+
const [events, setEvents] = useState([]);
|
|
2068
|
+
const [finished, setFinished] = useState(null);
|
|
2069
|
+
const [done, setDone] = useState(false);
|
|
2070
|
+
const [error, setError] = useState(null);
|
|
2071
|
+
const [preparing, setPreparing] = useState(false);
|
|
2072
|
+
const runRef = useRef(null);
|
|
2073
|
+
const mountedRef = useRef(true);
|
|
2074
|
+
useEffect(() => {
|
|
2075
|
+
mountedRef.current = true;
|
|
2076
|
+
return () => {
|
|
2077
|
+
mountedRef.current = false;
|
|
2078
|
+
runRef.current?.close();
|
|
2079
|
+
runRef.current = null;
|
|
2080
|
+
};
|
|
2081
|
+
}, []);
|
|
2082
|
+
const run = useCallback(
|
|
2083
|
+
async (start) => {
|
|
2084
|
+
runRef.current?.close();
|
|
2085
|
+
if (mountedRef.current) {
|
|
2086
|
+
setPreparing(true);
|
|
2087
|
+
setError(null);
|
|
2088
|
+
setEvents([]);
|
|
2089
|
+
setFinished(null);
|
|
2090
|
+
setDone(false);
|
|
2091
|
+
setReqId(null);
|
|
2092
|
+
}
|
|
2093
|
+
try {
|
|
2094
|
+
const r = await start();
|
|
2095
|
+
runRef.current = r;
|
|
2096
|
+
r.on("event", (e) => {
|
|
2097
|
+
if (!mountedRef.current) return;
|
|
2098
|
+
setEvents((prev) => [...prev, e]);
|
|
2099
|
+
if (e.kind === "finished") {
|
|
2100
|
+
setFinished(e);
|
|
2101
|
+
setDone(true);
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2104
|
+
r.on("done", (f) => {
|
|
2105
|
+
if (mountedRef.current) {
|
|
2106
|
+
setFinished(f);
|
|
2107
|
+
setDone(true);
|
|
2108
|
+
}
|
|
2109
|
+
});
|
|
2110
|
+
if (mountedRef.current) setReqId(r.reqId);
|
|
2111
|
+
return { reqId: r.reqId };
|
|
2112
|
+
} catch (e) {
|
|
2113
|
+
const err = e instanceof Error ? e : new Error(String(e));
|
|
2114
|
+
if (mountedRef.current) setError(err);
|
|
2115
|
+
throw err;
|
|
2116
|
+
} finally {
|
|
2117
|
+
if (mountedRef.current) setPreparing(false);
|
|
2118
|
+
}
|
|
2119
|
+
},
|
|
2120
|
+
[]
|
|
2121
|
+
);
|
|
2122
|
+
const setup = useCallback((nodeId, input) => run(async () => {
|
|
2123
|
+
await beforeSetup?.(nodeId);
|
|
2124
|
+
return EnvRun.start(cfg, nodeId, "setup", input);
|
|
2125
|
+
}), [cfg, run, beforeSetup]);
|
|
2126
|
+
const status = useCallback((nodeId, input) => run(() => EnvRun.start(cfg, nodeId, "status", input)), [cfg, run]);
|
|
2127
|
+
const teardown = useCallback((nodeId, input) => run(() => EnvRun.start(cfg, nodeId, "teardown", input)), [cfg, run]);
|
|
2128
|
+
const close = useCallback(() => {
|
|
2129
|
+
runRef.current?.close();
|
|
2130
|
+
runRef.current = null;
|
|
2131
|
+
}, []);
|
|
2132
|
+
return { reqId, events, finished, done, error, preparing, setup, status, teardown, close };
|
|
2133
|
+
}
|
|
1893
2134
|
function useEnvGate(nodeId, opts) {
|
|
1894
2135
|
const cfg = useAixConfig();
|
|
1895
2136
|
const os = opts?.os !== void 0 ? opts.os : detectEnvOs();
|
|
@@ -2039,4 +2280,4 @@ function useApiTokens() {
|
|
|
2039
2280
|
return { ...q, create, revoke, rotate };
|
|
2040
2281
|
}
|
|
2041
2282
|
|
|
2042
|
-
export { DevicesProvider, GROUP_MIRROR_MAX, InspectorProvider, NodesProvider, ShortcutsProvider, createAgentTaskRunner, mapDevice, preflightTaskAgentDevice, useAdmin, useApiTokens, useAuth, useAutomationQueue, useBilling, useClusters, useCommands, useDeviceActions, useDevices, useDevicesView, useEnvGate, useFleetRun, useFlowRun, useGroupMirror, useImages, useInspector, useInspectorView, useLlm, useLocators, useMirror, useNodes, useNodesView, useProjects, useScriptRun, useScripts, useShortcutsView, useTaskAgentRun, useTaskStatus, useTasks, useWebhooks };
|
|
2283
|
+
export { AixProvider, DevicesProvider, GROUP_MIRROR_MAX, InspectorProvider, NodesProvider, ShortcutsProvider, createAgentTaskRunner, mapDevice, preflightTaskAgentDevice, useAdmin, useAixConfig, useApiTokens, useAuth, useAutomationQueue, useBilling, useClient, useClusters, useCommands, useDevice, useDeviceActions, useDevices, useDevicesView, useEnvGate, useEnvRun, useFleetRun, useFlowRun, useGroupMirror, useImages, useInspector, useInspectorView, useLlm, useLocators, useMirror, useNodes, useNodesView, useProjects, useQuery, useScript, useScriptRun, useScripts, useShortcutsView, useTaskAgentRun, useTaskStatus, useTasks, useWebhooks };
|
|
@@ -249,7 +249,11 @@ function Popover({
|
|
|
249
249
|
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
250
250
|
};
|
|
251
251
|
const onKey = (e) => {
|
|
252
|
-
if (e.key === "Escape")
|
|
252
|
+
if (e.key === "Escape") {
|
|
253
|
+
e.preventDefault();
|
|
254
|
+
e.stopPropagation();
|
|
255
|
+
setOpen(false);
|
|
256
|
+
}
|
|
253
257
|
};
|
|
254
258
|
document.addEventListener("mousedown", onDown);
|
|
255
259
|
document.addEventListener("keydown", onKey);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { LogConsole } from './chunk-
|
|
2
|
-
import { cn, Button, Select } from './chunk-
|
|
3
|
-
import { useDevices, useScripts, useScriptRun } from './chunk-
|
|
4
|
-
import { variablesToSchema, normalizeDevices, schemaToVariables } from './chunk-
|
|
5
|
-
import { useClient } from './chunk-A5VNENHD.js';
|
|
1
|
+
import { LogConsole } from './chunk-D7J4EQTA.js';
|
|
2
|
+
import { cn, Button, Select } from './chunk-SKTL6ACT.js';
|
|
3
|
+
import { useDevices, useClient, useScripts, useScriptRun } from './chunk-LWTL4AIC.js';
|
|
4
|
+
import { variablesToSchema, normalizeDevices, schemaToVariables } from './chunk-7H4CYM42.js';
|
|
6
5
|
import { useMemo, useState, useEffect, useRef, useCallback } from 'react';
|
|
7
6
|
import { Trash2, Plus, Play, Pause, Square, ArrowDownToLine, WrapText, ChevronRight, Save, XCircle, CheckCircle2, Loader2, Circle } from 'lucide-react';
|
|
8
7
|
import CodeMirror, { EditorView } from '@uiw/react-codemirror';
|