@qablehq/atto 0.0.38 → 0.0.40
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.
|
@@ -33158,7 +33158,7 @@ function isTransientReachError(message) {
|
|
|
33158
33158
|
message
|
|
33159
33159
|
);
|
|
33160
33160
|
}
|
|
33161
|
-
function TesboPanel() {
|
|
33161
|
+
function TesboPanel({ onConnectionChange } = {}) {
|
|
33162
33162
|
const [status, setStatus] = reactExports.useState(null);
|
|
33163
33163
|
const [code, setCode] = reactExports.useState("");
|
|
33164
33164
|
const [busy, setBusy] = reactExports.useState(false);
|
|
@@ -33167,6 +33167,8 @@ function TesboPanel() {
|
|
|
33167
33167
|
const [agents, setAgents] = reactExports.useState(null);
|
|
33168
33168
|
const statusRef = reactExports.useRef(null);
|
|
33169
33169
|
const refreshGeneration = reactExports.useRef(0);
|
|
33170
|
+
const onConnectionChangeRef = reactExports.useRef(onConnectionChange);
|
|
33171
|
+
onConnectionChangeRef.current = onConnectionChange;
|
|
33170
33172
|
reactExports.useEffect(() => {
|
|
33171
33173
|
let cancelled = false;
|
|
33172
33174
|
const apply = (next, stamp) => {
|
|
@@ -33174,6 +33176,7 @@ function TesboPanel() {
|
|
|
33174
33176
|
if (!next.connected && isTransientReachError(next.error) && statusRef.current?.connected) {
|
|
33175
33177
|
return;
|
|
33176
33178
|
}
|
|
33179
|
+
const wasConnected = Boolean(statusRef.current?.connected);
|
|
33177
33180
|
statusRef.current = next;
|
|
33178
33181
|
setStatus(next);
|
|
33179
33182
|
setProjectId(
|
|
@@ -33182,6 +33185,9 @@ function TesboPanel() {
|
|
|
33182
33185
|
if (!next.connected) setAgents(null);
|
|
33183
33186
|
if (next.error && !isTransientReachError(next.error)) setFormError(next.error);
|
|
33184
33187
|
else if (next.connected || !next.error) setFormError(null);
|
|
33188
|
+
if (wasConnected !== Boolean(next.connected)) {
|
|
33189
|
+
onConnectionChangeRef.current?.(Boolean(next.connected));
|
|
33190
|
+
}
|
|
33185
33191
|
};
|
|
33186
33192
|
const refresh = () => {
|
|
33187
33193
|
const stamp = refreshGeneration.current;
|
|
@@ -33228,6 +33234,7 @@ function TesboPanel() {
|
|
|
33228
33234
|
setCode("");
|
|
33229
33235
|
setProjectId(next.projects[0]?.id ?? "");
|
|
33230
33236
|
if (next.error) setFormError(next.error);
|
|
33237
|
+
onConnectionChangeRef.current?.(Boolean(next.connected));
|
|
33231
33238
|
} catch (error) {
|
|
33232
33239
|
setFormError(error instanceof Error ? error.message : "Could not connect.");
|
|
33233
33240
|
} finally {
|
|
@@ -33244,6 +33251,7 @@ function TesboPanel() {
|
|
|
33244
33251
|
setStatus(next);
|
|
33245
33252
|
setAgents(null);
|
|
33246
33253
|
setProjectId("");
|
|
33254
|
+
onConnectionChangeRef.current?.(false);
|
|
33247
33255
|
} finally {
|
|
33248
33256
|
setBusy(false);
|
|
33249
33257
|
}
|
|
@@ -33435,15 +33443,27 @@ function ProjectList() {
|
|
|
33435
33443
|
if (bindings[id]) setProjectAiBinding2(id, bindings[id]);
|
|
33436
33444
|
}
|
|
33437
33445
|
};
|
|
33446
|
+
const purgeTesboProjects = () => {
|
|
33447
|
+
const order2 = useAppStore.getState().projectOrder;
|
|
33448
|
+
for (const id of [...order2]) {
|
|
33449
|
+
if (id.startsWith("tesbo-")) deleteProject2(id);
|
|
33450
|
+
}
|
|
33451
|
+
setConnectedRemoteIds([]);
|
|
33452
|
+
setUnlockedRemoteIds([]);
|
|
33453
|
+
};
|
|
33438
33454
|
const refresh = async () => {
|
|
33439
33455
|
try {
|
|
33440
33456
|
const status = await window.taa.tesbo.status();
|
|
33441
33457
|
if (cancelled) return;
|
|
33442
|
-
|
|
33458
|
+
const connected = Boolean(status.connected);
|
|
33459
|
+
setTesboConnected(connected);
|
|
33443
33460
|
setUnlockedRemoteIds(status.unlockedProjectIds || []);
|
|
33444
|
-
const remoteIds =
|
|
33461
|
+
const remoteIds = connected ? status.projects.map((project) => project.id) : [];
|
|
33445
33462
|
setConnectedRemoteIds(remoteIds);
|
|
33446
|
-
if (!
|
|
33463
|
+
if (!connected) {
|
|
33464
|
+
purgeTesboProjects();
|
|
33465
|
+
return;
|
|
33466
|
+
}
|
|
33447
33467
|
for (const project of status.projects) {
|
|
33448
33468
|
ensureProject(tesboProjectId$1(project.id), {
|
|
33449
33469
|
name: project.name || project.userName || "Tesbo project"
|
|
@@ -33479,7 +33499,22 @@ function ProjectList() {
|
|
|
33479
33499
|
] })
|
|
33480
33500
|
] }),
|
|
33481
33501
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto px-6 py-5", children: [
|
|
33482
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33502
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33503
|
+
TesboPanel,
|
|
33504
|
+
{
|
|
33505
|
+
onConnectionChange: (connected) => {
|
|
33506
|
+
setTesboConnected(connected);
|
|
33507
|
+
if (!connected) {
|
|
33508
|
+
const order2 = useAppStore.getState().projectOrder;
|
|
33509
|
+
for (const id of [...order2]) {
|
|
33510
|
+
if (id.startsWith("tesbo-")) deleteProject2(id);
|
|
33511
|
+
}
|
|
33512
|
+
setConnectedRemoteIds([]);
|
|
33513
|
+
setUnlockedRemoteIds([]);
|
|
33514
|
+
}
|
|
33515
|
+
}
|
|
33516
|
+
}
|
|
33517
|
+
),
|
|
33483
33518
|
!tesboConnected && projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 rounded-lg border border-dashed border-border px-4 py-8 text-center", children: [
|
|
33484
33519
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "Connect to see your project" }),
|
|
33485
33520
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Paste the project code from the website. Only that project appears here until you disconnect." })
|
package/out/renderer/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
/>
|
|
9
9
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
10
10
|
<title>Tesbo Automate</title>
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-DevA0EpF.js"></script>
|
|
12
12
|
<link rel="stylesheet" crossorigin href="./assets/index-DyJdhPcb.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qablehq/atto",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Atto
|
|
3
|
+
"version": "0.0.40",
|
|
4
|
+
"description": "Atto — AI-assisted desktop test automation",
|
|
5
5
|
"homepage": "https://github.com/QAbleHQ/Atto",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "QAble",
|