@qablehq/atto 0.0.24 → 0.0.26
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/out/main/index.js
CHANGED
|
@@ -54,6 +54,7 @@ const IPC_CHANNELS = {
|
|
|
54
54
|
tesboStatus: "taa:tesbo:status",
|
|
55
55
|
tesboLogin: "taa:tesbo:login",
|
|
56
56
|
tesboLogout: "taa:tesbo:logout",
|
|
57
|
+
tesboUnlockProject: "taa:tesbo:unlockProject",
|
|
57
58
|
tesboAgents: "taa:tesbo:agents",
|
|
58
59
|
tesboRemoteConfig: "taa:tesbo:remoteConfig",
|
|
59
60
|
/** Main → renderer: start a Chat-queued desktop session (New session equivalent). */
|
|
@@ -104,7 +105,8 @@ function readLink() {
|
|
|
104
105
|
try {
|
|
105
106
|
const parsed = JSON.parse(node_fs.readFileSync(sessionPath(), "utf8"));
|
|
106
107
|
if (typeof parsed.code !== "string" || !parsed.code.trim()) return null;
|
|
107
|
-
|
|
108
|
+
const unlocked = Array.isArray(parsed.unlockedProjectIds) ? parsed.unlockedProjectIds.filter((id) => typeof id === "string" && Boolean(id.trim())) : [];
|
|
109
|
+
return { baseUrl: DEFAULT_BASE_URL, code: parsed.code.trim(), unlockedProjectIds: unlocked };
|
|
108
110
|
} catch {
|
|
109
111
|
return null;
|
|
110
112
|
}
|
|
@@ -112,14 +114,30 @@ function readLink() {
|
|
|
112
114
|
function writeLink(link) {
|
|
113
115
|
const path = sessionPath();
|
|
114
116
|
node_fs.mkdirSync(electron.app.getPath("userData"), { recursive: true });
|
|
115
|
-
node_fs.writeFileSync(
|
|
117
|
+
node_fs.writeFileSync(
|
|
118
|
+
path,
|
|
119
|
+
JSON.stringify({
|
|
120
|
+
baseUrl: link.baseUrl,
|
|
121
|
+
code: link.code,
|
|
122
|
+
unlockedProjectIds: link.unlockedProjectIds
|
|
123
|
+
}),
|
|
124
|
+
{ mode: 384 }
|
|
125
|
+
);
|
|
116
126
|
node_fs.chmodSync(path, 384);
|
|
117
127
|
}
|
|
118
128
|
function clearLink() {
|
|
119
129
|
node_fs.rmSync(sessionPath(), { force: true });
|
|
120
130
|
}
|
|
121
131
|
function disconnected(error = null) {
|
|
122
|
-
return {
|
|
132
|
+
return {
|
|
133
|
+
connected: false,
|
|
134
|
+
baseUrl: DEFAULT_BASE_URL,
|
|
135
|
+
user: null,
|
|
136
|
+
workspaces: [],
|
|
137
|
+
projects: [],
|
|
138
|
+
unlockedProjectIds: [],
|
|
139
|
+
error
|
|
140
|
+
};
|
|
123
141
|
}
|
|
124
142
|
async function errorMessage(response) {
|
|
125
143
|
try {
|
|
@@ -186,14 +204,15 @@ async function loadAccount(link) {
|
|
|
186
204
|
user: signedInUser(projects),
|
|
187
205
|
workspaces: [],
|
|
188
206
|
projects,
|
|
207
|
+
unlockedProjectIds: link.unlockedProjectIds,
|
|
189
208
|
error: null
|
|
190
209
|
};
|
|
191
210
|
}
|
|
192
211
|
function signedInUser(projects) {
|
|
193
212
|
const project = projects.find((item) => item.userName || item.clientName);
|
|
194
213
|
if (!project) return null;
|
|
195
|
-
const name =
|
|
196
|
-
return { userId: project.userName || project.clientName || "", email: null, name
|
|
214
|
+
const name = (project.userName || project.clientName || "").trim() || null;
|
|
215
|
+
return { userId: project.userName || project.clientName || "", email: null, name };
|
|
197
216
|
}
|
|
198
217
|
async function tesboStatus() {
|
|
199
218
|
const link = readLink();
|
|
@@ -207,8 +226,13 @@ async function tesboStatus() {
|
|
|
207
226
|
}
|
|
208
227
|
async function tesboLogin(cmd) {
|
|
209
228
|
const code = cmd.code.trim();
|
|
210
|
-
if (!code) throw new Error("Paste the access code from Tesbo.");
|
|
211
|
-
const
|
|
229
|
+
if (!code) throw new Error("Paste the list access code from Tesbo (Agents → Atto).");
|
|
230
|
+
const previous = readLink();
|
|
231
|
+
const link = {
|
|
232
|
+
baseUrl: DEFAULT_BASE_URL,
|
|
233
|
+
code,
|
|
234
|
+
unlockedProjectIds: previous?.code === code ? previous.unlockedProjectIds : []
|
|
235
|
+
};
|
|
212
236
|
const connectOnce = () => fetch(`${link.baseUrl}/api/atto/connect`, {
|
|
213
237
|
method: "POST",
|
|
214
238
|
headers: { accept: "application/json", "content-type": "application/json" },
|
|
@@ -231,9 +255,32 @@ async function tesboLogin(cmd) {
|
|
|
231
255
|
user: signedInUser(projects),
|
|
232
256
|
workspaces: [],
|
|
233
257
|
projects,
|
|
258
|
+
unlockedProjectIds: link.unlockedProjectIds,
|
|
234
259
|
error: null
|
|
235
260
|
};
|
|
236
261
|
}
|
|
262
|
+
async function tesboUnlockProject(cmd) {
|
|
263
|
+
const link = readLink();
|
|
264
|
+
if (!link) throw new Error("Connect with your list access code first.");
|
|
265
|
+
const projectId = String(cmd.projectId || "").trim();
|
|
266
|
+
const projectCode = String(cmd.projectCode || "").trim();
|
|
267
|
+
if (!projectId) throw new Error("Pick a project to unlock.");
|
|
268
|
+
if (!projectCode) throw new Error("Paste the project code from Agents → Atto on the website.");
|
|
269
|
+
const response = await tesboFetch(link, `/api/atto/projects/${encodeURIComponent(projectId)}/unlock`, {
|
|
270
|
+
method: "POST",
|
|
271
|
+
body: JSON.stringify({ projectCode })
|
|
272
|
+
});
|
|
273
|
+
if (!response.ok) throw new Error(await errorMessage(response));
|
|
274
|
+
const unlocked = link.unlockedProjectIds.includes(projectId) ? link.unlockedProjectIds : [...link.unlockedProjectIds, projectId];
|
|
275
|
+
writeLink({ ...link, unlockedProjectIds: unlocked });
|
|
276
|
+
const body = await response.json().catch(() => ({}));
|
|
277
|
+
return {
|
|
278
|
+
ok: true,
|
|
279
|
+
projectId,
|
|
280
|
+
projectName: typeof body.projectName === "string" ? body.projectName : void 0,
|
|
281
|
+
unlockedProjectIds: unlocked
|
|
282
|
+
};
|
|
283
|
+
}
|
|
237
284
|
async function tesboLogout() {
|
|
238
285
|
clearLink();
|
|
239
286
|
return disconnected();
|
|
@@ -3695,6 +3742,10 @@ function registerTesboHandlers(adapter) {
|
|
|
3695
3742
|
electron.ipcMain.handle(IPC_CHANNELS.tesboStatus, () => tesboStatus());
|
|
3696
3743
|
electron.ipcMain.handle(IPC_CHANNELS.tesboLogin, (_event, cmd) => tesboLogin(cmd));
|
|
3697
3744
|
electron.ipcMain.handle(IPC_CHANNELS.tesboLogout, () => tesboLogout());
|
|
3745
|
+
electron.ipcMain.handle(
|
|
3746
|
+
IPC_CHANNELS.tesboUnlockProject,
|
|
3747
|
+
(_event, cmd) => tesboUnlockProject(cmd)
|
|
3748
|
+
);
|
|
3698
3749
|
electron.ipcMain.handle(IPC_CHANNELS.tesboAgents, (_event, projectId) => tesboAgents(projectId));
|
|
3699
3750
|
electron.ipcMain.handle(IPC_CHANNELS.tesboRemoteConfig, () => fetchAttoRemoteConfig());
|
|
3700
3751
|
electron.ipcMain.handle(
|
package/out/preload/index.js
CHANGED
|
@@ -42,6 +42,7 @@ const IPC_CHANNELS = {
|
|
|
42
42
|
tesboStatus: "taa:tesbo:status",
|
|
43
43
|
tesboLogin: "taa:tesbo:login",
|
|
44
44
|
tesboLogout: "taa:tesbo:logout",
|
|
45
|
+
tesboUnlockProject: "taa:tesbo:unlockProject",
|
|
45
46
|
tesboAgents: "taa:tesbo:agents",
|
|
46
47
|
tesboRemoteConfig: "taa:tesbo:remoteConfig",
|
|
47
48
|
/** Main → renderer: start a Chat-queued desktop session (New session equivalent). */
|
|
@@ -114,6 +115,7 @@ const api = {
|
|
|
114
115
|
status: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboStatus),
|
|
115
116
|
login: (cmd) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboLogin, cmd),
|
|
116
117
|
logout: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboLogout),
|
|
118
|
+
unlockProject: (cmd) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboUnlockProject, cmd),
|
|
117
119
|
agents: (projectId) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboAgents, projectId),
|
|
118
120
|
remoteConfig: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboRemoteConfig),
|
|
119
121
|
onRemoteSession: (cb) => {
|
|
@@ -33155,8 +33155,8 @@ function TesboPanel() {
|
|
|
33155
33155
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "mb-6 rounded-lg border border-border bg-card p-4", children: [
|
|
33156
33156
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
33157
33157
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
33158
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-sm font-semibold", children: status?.connected ? "Tesbo connection" : "Connect with
|
|
33159
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: status?.connected ? "
|
|
33158
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-sm font-semibold", children: status?.connected ? "Tesbo connection" : "Connect with list code" }),
|
|
33159
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: status?.connected ? "List code linked. Click a project below and paste its project code to open it." : "Paste the list access code from Agents → Atto. That shows all projects; each project still needs its own project code to open." }),
|
|
33160
33160
|
status?.connected && status.user?.name && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-foreground", children: status.user.name })
|
|
33161
33161
|
] }),
|
|
33162
33162
|
status?.connected && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "sm", variant: "outline", onClick: () => void disconnect(), disabled: busy, children: "Disconnect" })
|
|
@@ -33171,7 +33171,7 @@ function TesboPanel() {
|
|
|
33171
33171
|
},
|
|
33172
33172
|
children: [
|
|
33173
33173
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "grid gap-1 text-xs text-muted-foreground", children: [
|
|
33174
|
-
"
|
|
33174
|
+
"List access code",
|
|
33175
33175
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33176
33176
|
"input",
|
|
33177
33177
|
{
|
|
@@ -33216,6 +33216,9 @@ function TesboPanel() {
|
|
|
33216
33216
|
function tesboProjectId$1(remoteProjectId) {
|
|
33217
33217
|
return `tesbo-${remoteProjectId}`;
|
|
33218
33218
|
}
|
|
33219
|
+
function remoteIdFromLocal(localId) {
|
|
33220
|
+
return localId.startsWith("tesbo-") ? localId.slice("tesbo-".length) : null;
|
|
33221
|
+
}
|
|
33219
33222
|
function ProjectList() {
|
|
33220
33223
|
const projectsById = useAppStore((s2) => s2.projectsById);
|
|
33221
33224
|
const projectOrder = useAppStore((s2) => s2.projectOrder);
|
|
@@ -33227,12 +33230,69 @@ function ProjectList() {
|
|
|
33227
33230
|
const setMemories = useAppStore((s2) => s2.setProjectMemories);
|
|
33228
33231
|
const [dialogOpen, setDialogOpen] = reactExports.useState(false);
|
|
33229
33232
|
const [tesboConnected, setTesboConnected] = reactExports.useState(false);
|
|
33233
|
+
const [unlockedRemoteIds, setUnlockedRemoteIds] = reactExports.useState([]);
|
|
33234
|
+
const [unlockFor, setUnlockFor] = reactExports.useState(null);
|
|
33235
|
+
const [projectCode, setProjectCode] = reactExports.useState("");
|
|
33236
|
+
const [unlockBusy, setUnlockBusy] = reactExports.useState(false);
|
|
33237
|
+
const [unlockError, setUnlockError] = reactExports.useState(null);
|
|
33230
33238
|
const projects = projectOrder.map((id) => projectsById[id]);
|
|
33239
|
+
const isUnlocked = (localId) => {
|
|
33240
|
+
const remoteId = remoteIdFromLocal(localId);
|
|
33241
|
+
if (!remoteId) return true;
|
|
33242
|
+
return unlockedRemoteIds.includes(remoteId);
|
|
33243
|
+
};
|
|
33231
33244
|
const openProjectSettings = (id) => {
|
|
33245
|
+
if (!isUnlocked(id)) {
|
|
33246
|
+
requestUnlock(id);
|
|
33247
|
+
return;
|
|
33248
|
+
}
|
|
33232
33249
|
setActiveProject(id, { force: true });
|
|
33233
33250
|
setView("project-settings");
|
|
33234
33251
|
};
|
|
33235
|
-
const
|
|
33252
|
+
const requestUnlock = (localId) => {
|
|
33253
|
+
const remoteId = remoteIdFromLocal(localId);
|
|
33254
|
+
if (!remoteId) {
|
|
33255
|
+
setActiveProject(localId, { force: true });
|
|
33256
|
+
return;
|
|
33257
|
+
}
|
|
33258
|
+
if (unlockedRemoteIds.includes(remoteId)) {
|
|
33259
|
+
setActiveProject(localId, { force: true });
|
|
33260
|
+
return;
|
|
33261
|
+
}
|
|
33262
|
+
setUnlockFor({
|
|
33263
|
+
localId,
|
|
33264
|
+
remoteId,
|
|
33265
|
+
name: projectsById[localId]?.name || "Tesbo project"
|
|
33266
|
+
});
|
|
33267
|
+
setProjectCode("");
|
|
33268
|
+
setUnlockError(null);
|
|
33269
|
+
};
|
|
33270
|
+
const openProject = (id) => {
|
|
33271
|
+
if (!isUnlocked(id)) {
|
|
33272
|
+
requestUnlock(id);
|
|
33273
|
+
return;
|
|
33274
|
+
}
|
|
33275
|
+
setActiveProject(id, { force: true });
|
|
33276
|
+
};
|
|
33277
|
+
const submitUnlock = async () => {
|
|
33278
|
+
if (!unlockFor) return;
|
|
33279
|
+
setUnlockBusy(true);
|
|
33280
|
+
setUnlockError(null);
|
|
33281
|
+
try {
|
|
33282
|
+
const result = await window.taa.tesbo.unlockProject({
|
|
33283
|
+
projectId: unlockFor.remoteId,
|
|
33284
|
+
projectCode
|
|
33285
|
+
});
|
|
33286
|
+
setUnlockedRemoteIds(result.unlockedProjectIds);
|
|
33287
|
+
setUnlockFor(null);
|
|
33288
|
+
setProjectCode("");
|
|
33289
|
+
setActiveProject(unlockFor.localId, { force: true });
|
|
33290
|
+
} catch (error) {
|
|
33291
|
+
setUnlockError(error instanceof Error ? error.message : "Could not unlock project.");
|
|
33292
|
+
} finally {
|
|
33293
|
+
setUnlockBusy(false);
|
|
33294
|
+
}
|
|
33295
|
+
};
|
|
33236
33296
|
reactExports.useEffect(() => {
|
|
33237
33297
|
let cancelled = false;
|
|
33238
33298
|
const syncRemote = (remote) => {
|
|
@@ -33260,6 +33320,7 @@ function ProjectList() {
|
|
|
33260
33320
|
const status = await window.taa.tesbo.status();
|
|
33261
33321
|
if (cancelled) return;
|
|
33262
33322
|
setTesboConnected(Boolean(status.connected));
|
|
33323
|
+
setUnlockedRemoteIds(status.unlockedProjectIds || []);
|
|
33263
33324
|
if (!status.connected) return;
|
|
33264
33325
|
for (const project of status.projects) {
|
|
33265
33326
|
ensureProject(tesboProjectId$1(project.id), {
|
|
@@ -33283,7 +33344,7 @@ function ProjectList() {
|
|
|
33283
33344
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("header", { className: "flex items-center justify-between border-b border-border px-6 py-4", children: [
|
|
33284
33345
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
33285
33346
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-semibold", children: tesboConnected ? "Projects" : "Connect Atto" }),
|
|
33286
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: tesboConnected ? "
|
|
33347
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: tesboConnected ? "Projects appear after the list code. Click a project and paste its project code to open it." : "Paste your list access code from Agents → Atto to see projects." })
|
|
33287
33348
|
] }),
|
|
33288
33349
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { size: "sm", variant: "outline", className: "gap-2", onClick: () => setDialogOpen(true), children: [
|
|
33289
33350
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" }),
|
|
@@ -33294,54 +33355,102 @@ function ProjectList() {
|
|
|
33294
33355
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TesboPanel, {}),
|
|
33295
33356
|
!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: [
|
|
33296
33357
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "Connect to see your projects" }),
|
|
33297
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "After
|
|
33358
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "After the list code, shared projects show up here. Opening still needs each project code." })
|
|
33298
33359
|
] }) : tesboConnected && projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center gap-3 py-16 text-center", children: [
|
|
33299
33360
|
/* @__PURE__ */ jsxRuntimeExports.jsx(FolderKanban, { className: "size-8 text-muted-foreground" }),
|
|
33300
33361
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
33301
33362
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "Waiting for website settings" }),
|
|
33302
33363
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "On the website open Agents → Atto, set the project folder path, then keep Atto connected." })
|
|
33303
33364
|
] })
|
|
33304
|
-
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: projects.map((project) =>
|
|
33305
|
-
|
|
33306
|
-
|
|
33307
|
-
|
|
33308
|
-
|
|
33309
|
-
|
|
33310
|
-
|
|
33311
|
-
|
|
33312
|
-
|
|
33313
|
-
|
|
33314
|
-
|
|
33315
|
-
|
|
33316
|
-
|
|
33317
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
33318
|
-
"
|
|
33319
|
-
{
|
|
33320
|
-
|
|
33321
|
-
|
|
33322
|
-
|
|
33323
|
-
|
|
33324
|
-
|
|
33325
|
-
|
|
33326
|
-
|
|
33327
|
-
|
|
33328
|
-
|
|
33329
|
-
|
|
33330
|
-
|
|
33331
|
-
|
|
33332
|
-
|
|
33333
|
-
|
|
33334
|
-
" ",
|
|
33335
|
-
project.sessionIds.length === 1 ? "test" : "tests"
|
|
33365
|
+
] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: projects.map((project) => {
|
|
33366
|
+
const locked = !isUnlocked(project.id);
|
|
33367
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
33368
|
+
"div",
|
|
33369
|
+
{
|
|
33370
|
+
role: "button",
|
|
33371
|
+
tabIndex: 0,
|
|
33372
|
+
onClick: () => openProject(project.id),
|
|
33373
|
+
onKeyDown: (e) => {
|
|
33374
|
+
if (e.key === "Enter") openProject(project.id);
|
|
33375
|
+
},
|
|
33376
|
+
className: "group flex cursor-pointer flex-col gap-2 rounded-lg border border-border bg-card p-4 text-left transition-colors hover:border-primary/40 hover:bg-accent/40",
|
|
33377
|
+
children: [
|
|
33378
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
33379
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-sm font-medium", children: project.name }),
|
|
33380
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
33381
|
+
locked && /* @__PURE__ */ jsxRuntimeExports.jsx(Lock, { className: "size-3.5 text-muted-foreground", "aria-label": "Needs project code" }),
|
|
33382
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33383
|
+
"button",
|
|
33384
|
+
{
|
|
33385
|
+
onClick: (e) => {
|
|
33386
|
+
e.stopPropagation();
|
|
33387
|
+
openProjectSettings(project.id);
|
|
33388
|
+
},
|
|
33389
|
+
className: "rounded-md p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100",
|
|
33390
|
+
title: "Project settings",
|
|
33391
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings, { className: "size-3.5" })
|
|
33392
|
+
}
|
|
33393
|
+
)
|
|
33394
|
+
] })
|
|
33336
33395
|
] }),
|
|
33337
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("
|
|
33338
|
-
|
|
33339
|
-
|
|
33340
|
-
|
|
33341
|
-
|
|
33342
|
-
|
|
33343
|
-
|
|
33396
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "truncate text-xs text-muted-foreground", children: project.targetUrl ?? "No target URL set" }),
|
|
33397
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 flex items-center justify-between text-[11px] text-muted-foreground", children: [
|
|
33398
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
33399
|
+
project.sessionIds.length,
|
|
33400
|
+
" ",
|
|
33401
|
+
project.sessionIds.length === 1 ? "test" : "tests"
|
|
33402
|
+
] }),
|
|
33403
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: locked ? "Locked" : new Date(project.updatedAt).toLocaleDateString() })
|
|
33404
|
+
] }),
|
|
33405
|
+
locked ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-fit rounded-full bg-sky-500/10 px-2 py-0.5 text-[10px] font-medium text-sky-600 dark:text-sky-400", children: "Project code needed" }) : !isProjectReady(project) && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-fit rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-600 dark:text-amber-400", children: "Setup needed" })
|
|
33406
|
+
]
|
|
33407
|
+
},
|
|
33408
|
+
project.id
|
|
33409
|
+
);
|
|
33410
|
+
}) })
|
|
33344
33411
|
] }),
|
|
33412
|
+
unlockFor && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full max-w-md rounded-lg border border-border bg-card p-5 shadow-lg", children: [
|
|
33413
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "text-sm font-semibold", children: [
|
|
33414
|
+
"Open ",
|
|
33415
|
+
unlockFor.name
|
|
33416
|
+
] }),
|
|
33417
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Paste this project's code from Agents → Atto on the website. List code only shows projects; project code opens them." }),
|
|
33418
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "mt-4 grid gap-1 text-xs text-muted-foreground", children: [
|
|
33419
|
+
"Project code",
|
|
33420
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33421
|
+
"input",
|
|
33422
|
+
{
|
|
33423
|
+
value: projectCode,
|
|
33424
|
+
onChange: (event) => setProjectCode(event.target.value),
|
|
33425
|
+
className: "h-10 rounded-md border border-border bg-background px-3 text-sm text-foreground",
|
|
33426
|
+
placeholder: "atto_proj_…",
|
|
33427
|
+
autoComplete: "off",
|
|
33428
|
+
spellCheck: false,
|
|
33429
|
+
autoFocus: true,
|
|
33430
|
+
onKeyDown: (event) => {
|
|
33431
|
+
if (event.key === "Enter" && projectCode.trim()) void submitUnlock();
|
|
33432
|
+
}
|
|
33433
|
+
}
|
|
33434
|
+
)
|
|
33435
|
+
] }),
|
|
33436
|
+
unlockError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-sm text-destructive", children: unlockError }),
|
|
33437
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 flex justify-end gap-2", children: [
|
|
33438
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33439
|
+
Button,
|
|
33440
|
+
{
|
|
33441
|
+
size: "sm",
|
|
33442
|
+
variant: "outline",
|
|
33443
|
+
disabled: unlockBusy,
|
|
33444
|
+
onClick: () => {
|
|
33445
|
+
setUnlockFor(null);
|
|
33446
|
+
setUnlockError(null);
|
|
33447
|
+
},
|
|
33448
|
+
children: "Cancel"
|
|
33449
|
+
}
|
|
33450
|
+
),
|
|
33451
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "sm", disabled: unlockBusy || !projectCode.trim(), onClick: () => void submitUnlock(), children: unlockBusy ? "Unlocking…" : "Unlock & open" })
|
|
33452
|
+
] })
|
|
33453
|
+
] }) }),
|
|
33345
33454
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33346
33455
|
CreateProjectDialog,
|
|
33347
33456
|
{
|
|
@@ -72,6 +72,9 @@
|
|
|
72
72
|
--color-amber-600: oklch(66.6% .179 58.318);
|
|
73
73
|
--color-amber-700: oklch(55.5% .163 48.998);
|
|
74
74
|
--color-emerald-600: oklch(59.6% .145 163.225);
|
|
75
|
+
--color-sky-400: oklch(74.6% .16 232.661);
|
|
76
|
+
--color-sky-500: oklch(68.5% .169 237.323);
|
|
77
|
+
--color-sky-600: oklch(58.8% .158 241.966);
|
|
75
78
|
--color-black: #000;
|
|
76
79
|
--spacing: .25rem;
|
|
77
80
|
--container-xs: 20rem;
|
|
@@ -1226,6 +1229,16 @@
|
|
|
1226
1229
|
background-color: var(--sidebar-accent);
|
|
1227
1230
|
}
|
|
1228
1231
|
|
|
1232
|
+
.bg-sky-500\/10 {
|
|
1233
|
+
background-color: #00a5ef1a;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1237
|
+
.bg-sky-500\/10 {
|
|
1238
|
+
background-color: color-mix(in oklab, var(--color-sky-500) 10%, transparent);
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1229
1242
|
.bg-success, .bg-success\/10 {
|
|
1230
1243
|
background-color: var(--success);
|
|
1231
1244
|
}
|
|
@@ -1604,6 +1617,10 @@
|
|
|
1604
1617
|
}
|
|
1605
1618
|
}
|
|
1606
1619
|
|
|
1620
|
+
.text-sky-600 {
|
|
1621
|
+
color: var(--color-sky-600);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1607
1624
|
.text-success {
|
|
1608
1625
|
color: var(--success);
|
|
1609
1626
|
}
|
|
@@ -1916,6 +1933,10 @@
|
|
|
1916
1933
|
color: var(--color-amber-400);
|
|
1917
1934
|
}
|
|
1918
1935
|
|
|
1936
|
+
.dark\:text-sky-400:is(.dark *) {
|
|
1937
|
+
color: var(--color-sky-400);
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1919
1940
|
.\[\&_pre\]\:\!bg-transparent pre {
|
|
1920
1941
|
background-color: #0000 !important;
|
|
1921
1942
|
}
|
package/out/renderer/index.html
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
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-
|
|
12
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-D6IRitH-.js"></script>
|
|
12
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DyJdhPcb.css">
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
15
|
<div id="root"></div>
|