@mcp-b/react-components 0.68.0 → 0.70.0
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/{AgentComputer-BP9ixGGE.js → AgentComputer-CFJxjMFE.js} +32 -3
- package/dist/ComputerFileThumbnail-CXHy127c.js +393 -0
- package/dist/Context-DQDumCV8.js +918 -0
- package/dist/{ThinkSchedule-D4Ulsa0-.d.ts → ThinkSchedule-9nzxIoX1.d.ts} +1 -1
- package/dist/{Workspace-B9nuTfIi.d.ts → Workspace-mZddFyvP.d.ts} +7 -3
- package/dist/{WorkspaceAutomation-C0fghGLi.d.ts → WorkspaceAutomation-hwl6C1aX.d.ts} +2 -2
- package/dist/{WorkspaceBrowser-Dz48H-7X.d.ts → WorkspaceBrowser-CNVAKXXZ.d.ts} +4 -11
- package/dist/{WorkspaceBrowser-oBJv-Dac.js → WorkspaceBrowser-ojoZy0uO.js} +202 -210
- package/dist/{WorkspaceConcept-D46cYerS.d.ts → WorkspaceConcept-DqzfZWws.d.ts} +1 -1
- package/dist/{WorkspaceFileCommands-1s9Ol8CG.d.ts → WorkspaceFileCommands-CN2oVUzx.d.ts} +5 -2
- package/dist/{WorkspaceFileTransfer-BRD22nW-.d.ts → WorkspaceFileTransfer-D--dVla2.d.ts} +1 -1
- package/dist/components/agents-sdk/AgentComputer.d.ts +1 -1
- package/dist/components/agents-sdk/AgentComputer.js +1 -1
- package/dist/components/agents-sdk/ComputerAppIds.d.ts +15 -0
- package/dist/components/agents-sdk/ComputerAppIds.js +14 -0
- package/dist/components/agents-sdk/ComputerAutomations.d.ts +23 -14
- package/dist/components/agents-sdk/ComputerAutomations.js +437 -354
- package/dist/components/agents-sdk/ComputerCalendar.js +16 -15
- package/dist/components/agents-sdk/ComputerCustomWallpaper.js +186 -171
- package/dist/components/agents-sdk/ComputerFileThumbnail.d.ts +5 -3
- package/dist/components/agents-sdk/ComputerFileThumbnail.js +1 -132
- package/dist/components/agents-sdk/ComputerFiles.d.ts +4 -6
- package/dist/components/agents-sdk/ComputerFiles.js +337 -316
- package/dist/components/agents-sdk/ComputerHome.js +1 -1
- package/dist/components/agents-sdk/ComputerLayout.d.ts +9 -0
- package/dist/components/agents-sdk/ComputerLayout.js +66 -0
- package/dist/components/agents-sdk/ComputerNotifications.js +60 -83
- package/dist/components/agents-sdk/ComputerScreen.d.ts +12 -6
- package/dist/components/agents-sdk/ComputerScreen.js +49 -36
- package/dist/components/agents-sdk/ComputerSettings.d.ts +10 -4
- package/dist/components/agents-sdk/ComputerSettings.js +92 -72
- package/dist/components/agents-sdk/ComputerSpotlight.js +1 -1
- package/dist/components/agents-sdk/EmployeeChat.js +1 -1
- package/dist/components/agents-sdk/EmployeeSchedules.d.ts +2 -2
- package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkSchedule.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
- package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.d.ts +1 -1
- package/dist/components/agents-sdk/Workspace.js +197 -190
- package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
- package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +6 -6
- package/dist/components/agents-sdk/WorkspaceDesktop.js +126 -101
- package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +2 -10
- package/dist/components/agents-sdk/WorkspaceExplorer.js +67 -71
- package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceFileCommands.js +11 -6
- package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspaceLive.js +7 -5
- package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +1 -1
- package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
- package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
- package/dist/components/ai-sdk/Context.js +1 -842
- package/dist/components/ai-sdk/Plan.d.ts +33 -9
- package/dist/components/ai-sdk/Plan.js +336 -107
- package/dist/components/extension/FirstRunSetup.d.ts +2 -2
- package/dist/minute-clock-CXpRGCMF.js +35 -0
- package/dist/{parts-RXV6GGdB.js → parts-CPVz9l31.js} +1 -1
- package/dist/styles/plan.css +160 -23
- package/dist/{workspace-concept-panel-BDTBISNO.d.ts → workspace-concept-panel-D1czupvi.d.ts} +1 -1
- package/dist/{workspace-quick-look-9V-UFpjj.js → workspace-quick-look-DODjsfhH.js} +79 -251
- package/package.json +2 -2
- package/dist/progress-ring-BO649JA9.js +0 -79
|
@@ -5,8 +5,9 @@ import { IconButton } from "../foundations/IconButton.js";
|
|
|
5
5
|
import { AppIcon } from "../foundations/AppIcon.js";
|
|
6
6
|
import { Tabs } from "../foundations/Tabs.js";
|
|
7
7
|
import { AlertDialog } from "../foundations/AlertDialog.js";
|
|
8
|
-
import { n as useAgentComputerActions } from "../../AgentComputer-
|
|
8
|
+
import { n as useAgentComputerActions } from "../../AgentComputer-CFJxjMFE.js";
|
|
9
9
|
import { Menubar } from "../foundations/Menubar.js";
|
|
10
|
+
import { COMPUTER_APP_IDS } from "./ComputerAppIds.js";
|
|
10
11
|
import { getThinkExecutionRunId } from "./ThinkExecutionRun.js";
|
|
11
12
|
import { ThinkExecutionRunSummary } from "./ThinkExecutionStatus.js";
|
|
12
13
|
import { ThinkExecutionDetail } from "./ThinkExecutionDetail.js";
|
|
@@ -17,12 +18,13 @@ import { WorkspaceAutomationsPanel } from "./WorkspaceAutomation.js";
|
|
|
17
18
|
import { LinkButton } from "../foundations/LinkButton.js";
|
|
18
19
|
import { StatusScreen } from "../general-purpose/StatusScreen.js";
|
|
19
20
|
import { n as useComputerAutomationsContext, r as zonedFormat, t as ComputerAutomationsContext } from "../../automations-host-DPORjdc7.js";
|
|
20
|
-
import { n as computerAppTile, t as computerAppParts } from "../../parts-
|
|
21
|
+
import { n as computerAppTile, t as computerAppParts } from "../../parts-CPVz9l31.js";
|
|
21
22
|
import { ThinkScheduleActions, useThinkScheduleActions } from "./ThinkScheduleActions.js";
|
|
22
23
|
import { ThinkScheduleBrowser } from "./ThinkScheduleBrowser.js";
|
|
23
24
|
import { ThinkScheduleDetail } from "./ThinkScheduleDetail.js";
|
|
24
25
|
import { ThinkScheduleForm } from "./ThinkScheduleForm.js";
|
|
25
26
|
import { ScreenStack } from "../general-purpose/ScreenStack.js";
|
|
27
|
+
import { t as useMinuteClock } from "../../minute-clock-CXpRGCMF.js";
|
|
26
28
|
import { c } from "react/compiler-runtime";
|
|
27
29
|
import * as React from "react";
|
|
28
30
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -31,6 +33,7 @@ import { useQuery } from "@tanstack/react-query";
|
|
|
31
33
|
import { createPortal } from "react-dom";
|
|
32
34
|
//#region src/components/_internal/computer-apps/schedules.tsx
|
|
33
35
|
/** The schedule list, closing the compact drawer once a schedule is chosen. */
|
|
36
|
+
const NEW_EDITOR = { kind: "new" };
|
|
34
37
|
function ScheduleSidebar(props) {
|
|
35
38
|
const $ = c(3);
|
|
36
39
|
const { closeSidebarOnCompact } = useResponsiveSidebarShell();
|
|
@@ -84,7 +87,7 @@ function SelectedSchedule(t0) {
|
|
|
84
87
|
* the discard confirmation are the window's own.
|
|
85
88
|
*/
|
|
86
89
|
function useComputerSchedules(t0) {
|
|
87
|
-
const $ = c(
|
|
90
|
+
const $ = c(91);
|
|
88
91
|
const { host, automations, automationsError, automationsLoading } = t0;
|
|
89
92
|
const { schedules } = host;
|
|
90
93
|
const selectedId = host.selection.schedule;
|
|
@@ -98,9 +101,42 @@ function useComputerSchedules(t0) {
|
|
|
98
101
|
$[1] = t1;
|
|
99
102
|
} else t1 = $[1];
|
|
100
103
|
const setSelectedId = t1;
|
|
101
|
-
const
|
|
104
|
+
const creating = host.selection.newSchedule === true;
|
|
105
|
+
const [editingId, setEditingId] = useState(null);
|
|
106
|
+
let t2;
|
|
107
|
+
if ($[2] !== creating || $[3] !== editingId) {
|
|
108
|
+
t2 = creating ? NEW_EDITOR : editingId === null ? null : {
|
|
109
|
+
kind: "existing",
|
|
110
|
+
scheduleId: editingId
|
|
111
|
+
};
|
|
112
|
+
$[2] = creating;
|
|
113
|
+
$[3] = editingId;
|
|
114
|
+
$[4] = t2;
|
|
115
|
+
} else t2 = $[4];
|
|
116
|
+
const editing = t2;
|
|
102
117
|
const [automationDraft, setAutomationDraft] = useState();
|
|
103
118
|
const [dirty, setDirty] = useState(false);
|
|
119
|
+
const [wasCreating, setWasCreating] = useState(creating);
|
|
120
|
+
if (wasCreating !== creating) {
|
|
121
|
+
setWasCreating(creating);
|
|
122
|
+
if (!creating) {
|
|
123
|
+
setAutomationDraft(void 0);
|
|
124
|
+
setDirty(false);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
let t3;
|
|
128
|
+
if ($[5] !== host) {
|
|
129
|
+
t3 = () => {
|
|
130
|
+
setEditingId(null);
|
|
131
|
+
return host.onNavigate({
|
|
132
|
+
section: "schedules",
|
|
133
|
+
newSchedule: true
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
$[5] = host;
|
|
137
|
+
$[6] = t3;
|
|
138
|
+
} else t3 = $[6];
|
|
139
|
+
const startNew = t3;
|
|
104
140
|
const [confirming, setConfirming] = useState(false);
|
|
105
141
|
const confirmation = useRef(null);
|
|
106
142
|
const editorRef = useRef(null);
|
|
@@ -109,31 +145,31 @@ function useComputerSchedules(t0) {
|
|
|
109
145
|
const confirmingWindow = useRef(null);
|
|
110
146
|
const focusEditorAfterMenu = useRef(false);
|
|
111
147
|
const [requestKey, setRequestKey] = useState(_temp$1);
|
|
112
|
-
let t2;
|
|
113
|
-
if ($[2] !== schedules || $[3] !== selectedId) {
|
|
114
|
-
let t3;
|
|
115
|
-
if ($[5] !== selectedId) {
|
|
116
|
-
t3 = (schedule) => schedule.id === selectedId;
|
|
117
|
-
$[5] = selectedId;
|
|
118
|
-
$[6] = t3;
|
|
119
|
-
} else t3 = $[6];
|
|
120
|
-
t2 = schedules.find(t3);
|
|
121
|
-
$[2] = schedules;
|
|
122
|
-
$[3] = selectedId;
|
|
123
|
-
$[4] = t2;
|
|
124
|
-
} else t2 = $[4];
|
|
125
|
-
const selected = t2;
|
|
126
|
-
let t3;
|
|
127
|
-
if ($[7] !== editing || $[8] !== schedules) {
|
|
128
|
-
t3 = editing?.kind === "existing" ? schedules.find((schedule_0) => schedule_0.id === editing.scheduleId) : null;
|
|
129
|
-
$[7] = editing;
|
|
130
|
-
$[8] = schedules;
|
|
131
|
-
$[9] = t3;
|
|
132
|
-
} else t3 = $[9];
|
|
133
|
-
const editingSchedule = t3;
|
|
134
148
|
let t4;
|
|
135
|
-
if ($[
|
|
136
|
-
|
|
149
|
+
if ($[7] !== schedules || $[8] !== selectedId) {
|
|
150
|
+
let t5;
|
|
151
|
+
if ($[10] !== selectedId) {
|
|
152
|
+
t5 = (schedule) => schedule.id === selectedId;
|
|
153
|
+
$[10] = selectedId;
|
|
154
|
+
$[11] = t5;
|
|
155
|
+
} else t5 = $[11];
|
|
156
|
+
t4 = schedules.find(t5);
|
|
157
|
+
$[7] = schedules;
|
|
158
|
+
$[8] = selectedId;
|
|
159
|
+
$[9] = t4;
|
|
160
|
+
} else t4 = $[9];
|
|
161
|
+
const selected = t4;
|
|
162
|
+
let t5;
|
|
163
|
+
if ($[12] !== editing || $[13] !== schedules) {
|
|
164
|
+
t5 = editing?.kind === "existing" ? schedules.find((schedule_0) => schedule_0.id === editing.scheduleId) : null;
|
|
165
|
+
$[12] = editing;
|
|
166
|
+
$[13] = schedules;
|
|
167
|
+
$[14] = t5;
|
|
168
|
+
} else t5 = $[14];
|
|
169
|
+
const editingSchedule = t5;
|
|
170
|
+
let t6;
|
|
171
|
+
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
|
|
172
|
+
t6 = () => {
|
|
137
173
|
const editor = editorRef.current;
|
|
138
174
|
const appWindow = editor?.closest("[data-slot=\"computer-window\"]") ?? confirmingWindow.current;
|
|
139
175
|
if (!appWindow || appWindow.closest("[data-slot=\"agent-computer\"][data-phone]") || appWindow.closest("[inert]")) return;
|
|
@@ -141,36 +177,37 @@ function useComputerSchedules(t0) {
|
|
|
141
177
|
if (editor) editor.querySelector("[name=\"name\"]")?.focus({ preventScroll: true });
|
|
142
178
|
else if (document.activeElement === document.body || appWindow.contains(document.activeElement)) (editButtonRef.current ?? appWindow).focus({ preventScroll: true });
|
|
143
179
|
};
|
|
144
|
-
$[
|
|
145
|
-
} else
|
|
146
|
-
let t5;
|
|
147
|
-
if ($[11] !== editing) {
|
|
148
|
-
t5 = [editing];
|
|
149
|
-
$[11] = editing;
|
|
150
|
-
$[12] = t5;
|
|
151
|
-
} else t5 = $[12];
|
|
152
|
-
useLayoutEffect(t4, t5);
|
|
153
|
-
let t6;
|
|
180
|
+
$[15] = t6;
|
|
181
|
+
} else t6 = $[15];
|
|
154
182
|
let t7;
|
|
155
|
-
if ($[
|
|
156
|
-
|
|
183
|
+
if ($[16] !== creating || $[17] !== editingId) {
|
|
184
|
+
t7 = [creating, editingId];
|
|
185
|
+
$[16] = creating;
|
|
186
|
+
$[17] = editingId;
|
|
187
|
+
$[18] = t7;
|
|
188
|
+
} else t7 = $[18];
|
|
189
|
+
useLayoutEffect(t6, t7);
|
|
190
|
+
let t8;
|
|
191
|
+
let t9;
|
|
192
|
+
if ($[19] !== dirty) {
|
|
193
|
+
t8 = () => {
|
|
157
194
|
if (!dirty) return;
|
|
158
195
|
const protectDraft = _temp2$1;
|
|
159
196
|
window.addEventListener("beforeunload", protectDraft);
|
|
160
197
|
return () => window.removeEventListener("beforeunload", protectDraft);
|
|
161
198
|
};
|
|
162
|
-
|
|
163
|
-
$[
|
|
164
|
-
$[
|
|
165
|
-
$[
|
|
199
|
+
t9 = [dirty];
|
|
200
|
+
$[19] = dirty;
|
|
201
|
+
$[20] = t8;
|
|
202
|
+
$[21] = t9;
|
|
166
203
|
} else {
|
|
167
|
-
|
|
168
|
-
|
|
204
|
+
t8 = $[20];
|
|
205
|
+
t9 = $[21];
|
|
169
206
|
}
|
|
170
|
-
useEffect(
|
|
171
|
-
let
|
|
172
|
-
if ($[
|
|
173
|
-
|
|
207
|
+
useEffect(t8, t9);
|
|
208
|
+
let t10;
|
|
209
|
+
if ($[22] !== dirty) {
|
|
210
|
+
t10 = function confirmDiscard() {
|
|
174
211
|
if (!dirty) return Promise.resolve(true);
|
|
175
212
|
if (confirmation.current) return confirmation.current.promise;
|
|
176
213
|
let resolve;
|
|
@@ -185,86 +222,94 @@ function useComputerSchedules(t0) {
|
|
|
185
222
|
setConfirming(true);
|
|
186
223
|
return promise;
|
|
187
224
|
};
|
|
188
|
-
$[
|
|
189
|
-
$[
|
|
190
|
-
} else
|
|
191
|
-
const confirmDiscard =
|
|
192
|
-
let
|
|
193
|
-
if ($[
|
|
194
|
-
|
|
225
|
+
$[22] = dirty;
|
|
226
|
+
$[23] = t10;
|
|
227
|
+
} else t10 = $[23];
|
|
228
|
+
const confirmDiscard = t10;
|
|
229
|
+
let t11;
|
|
230
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel")) {
|
|
231
|
+
t11 = function answerDiscard(discard) {
|
|
195
232
|
const pending = confirmation.current;
|
|
196
233
|
confirmation.current = null;
|
|
197
234
|
setConfirming(false);
|
|
198
235
|
pending?.resolve(discard);
|
|
199
236
|
};
|
|
200
|
-
$[
|
|
201
|
-
} else
|
|
202
|
-
const answerDiscard =
|
|
203
|
-
let
|
|
204
|
-
if ($[
|
|
205
|
-
|
|
237
|
+
$[24] = t11;
|
|
238
|
+
} else t11 = $[24];
|
|
239
|
+
const answerDiscard = t11;
|
|
240
|
+
let t12;
|
|
241
|
+
if ($[25] !== confirmDiscard || $[26] !== creating || $[27] !== host) {
|
|
242
|
+
t12 = async function leaveEditor() {
|
|
206
243
|
if (!await confirmDiscard()) return false;
|
|
207
|
-
|
|
244
|
+
setEditingId(null);
|
|
208
245
|
setDirty(false);
|
|
209
246
|
setAutomationDraft(void 0);
|
|
247
|
+
if (creating) await host.onNavigate({
|
|
248
|
+
section: "schedules",
|
|
249
|
+
newSchedule: void 0
|
|
250
|
+
});
|
|
210
251
|
return true;
|
|
211
252
|
};
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
253
|
+
$[25] = confirmDiscard;
|
|
254
|
+
$[26] = creating;
|
|
255
|
+
$[27] = host;
|
|
256
|
+
$[28] = t12;
|
|
257
|
+
} else t12 = $[28];
|
|
258
|
+
const leaveEditor = t12;
|
|
259
|
+
let t13;
|
|
260
|
+
if ($[29] !== leaveEditor || $[30] !== schedules || $[31] !== setSelectedId) {
|
|
261
|
+
t13 = async function openSchedule(id) {
|
|
219
262
|
if (!schedules.some((schedule_1) => schedule_1.id === id) || !await leaveEditor()) return false;
|
|
220
263
|
setSelectedId(id);
|
|
221
264
|
return true;
|
|
222
265
|
};
|
|
223
|
-
$[
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
} else
|
|
228
|
-
const openSchedule =
|
|
229
|
-
let
|
|
230
|
-
if ($[
|
|
231
|
-
|
|
266
|
+
$[29] = leaveEditor;
|
|
267
|
+
$[30] = schedules;
|
|
268
|
+
$[31] = setSelectedId;
|
|
269
|
+
$[32] = t13;
|
|
270
|
+
} else t13 = $[32];
|
|
271
|
+
const openSchedule = t13;
|
|
272
|
+
let t14;
|
|
273
|
+
if ($[33] !== leaveEditor || $[34] !== startNew) {
|
|
274
|
+
t14 = async function createSchedule() {
|
|
232
275
|
if (!await leaveEditor()) return false;
|
|
233
|
-
|
|
276
|
+
await startNew();
|
|
234
277
|
return true;
|
|
235
278
|
};
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
279
|
+
$[33] = leaveEditor;
|
|
280
|
+
$[34] = startNew;
|
|
281
|
+
$[35] = t14;
|
|
282
|
+
} else t14 = $[35];
|
|
283
|
+
const createSchedule = t14;
|
|
284
|
+
let t15;
|
|
285
|
+
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
286
|
+
t15 = function save() {
|
|
243
287
|
editorRef.current?.querySelector("form")?.requestSubmit();
|
|
244
288
|
};
|
|
245
|
-
$[
|
|
246
|
-
} else
|
|
247
|
-
const save =
|
|
248
|
-
let
|
|
249
|
-
if ($[
|
|
250
|
-
|
|
289
|
+
$[36] = t15;
|
|
290
|
+
} else t15 = $[36];
|
|
291
|
+
const save = t15;
|
|
292
|
+
let t16;
|
|
293
|
+
if ($[37] !== automations || $[38] !== leaveEditor || $[39] !== startNew) {
|
|
294
|
+
t16 = async function openAutomationSchedule(invocation) {
|
|
251
295
|
if (!await leaveEditor()) return false;
|
|
252
|
-
const automation = automations.find((candidate) => candidate.path === path);
|
|
296
|
+
const automation = automations.find((candidate) => candidate.path === invocation.path);
|
|
253
297
|
setAutomationDraft({
|
|
254
|
-
|
|
255
|
-
args: automation ? Object.fromEntries(automation.parameters.flatMap(_temp3$1)) : void 0
|
|
298
|
+
...invocation,
|
|
299
|
+
args: invocation.args ?? (automation ? Object.fromEntries(automation.parameters.flatMap(_temp3$1)) : void 0)
|
|
256
300
|
});
|
|
257
|
-
|
|
301
|
+
await startNew();
|
|
258
302
|
return true;
|
|
259
303
|
};
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
304
|
+
$[37] = automations;
|
|
305
|
+
$[38] = leaveEditor;
|
|
306
|
+
$[39] = startNew;
|
|
307
|
+
$[40] = t16;
|
|
308
|
+
} else t16 = $[40];
|
|
309
|
+
const openAutomationSchedule = t16;
|
|
310
|
+
let t17;
|
|
311
|
+
if ($[41] !== editing?.kind || $[42] !== editingSchedule || $[43] !== host || $[44] !== requestKey || $[45] !== setSelectedId) {
|
|
312
|
+
t17 = async (value) => {
|
|
268
313
|
if (editing?.kind === "existing") {
|
|
269
314
|
if (!editingSchedule) throw new Error("The schedule being edited is no longer available.");
|
|
270
315
|
await host.onUpdateSchedule(editingSchedule, value);
|
|
@@ -272,49 +317,53 @@ function useComputerSchedules(t0) {
|
|
|
272
317
|
} else {
|
|
273
318
|
const { id: id_0 } = await host.onCreateSchedule(value, requestKey);
|
|
274
319
|
setRequestKey(crypto.randomUUID());
|
|
275
|
-
await
|
|
320
|
+
await host.onNavigate({
|
|
321
|
+
section: "schedules",
|
|
322
|
+
schedule: id_0,
|
|
323
|
+
newSchedule: void 0
|
|
324
|
+
});
|
|
276
325
|
}
|
|
277
326
|
setDirty(false);
|
|
278
327
|
setAutomationDraft(void 0);
|
|
279
|
-
|
|
328
|
+
setEditingId(null);
|
|
280
329
|
};
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
} else
|
|
288
|
-
const submit =
|
|
289
|
-
let
|
|
290
|
-
if ($[
|
|
291
|
-
|
|
330
|
+
$[41] = editing?.kind;
|
|
331
|
+
$[42] = editingSchedule;
|
|
332
|
+
$[43] = host;
|
|
333
|
+
$[44] = requestKey;
|
|
334
|
+
$[45] = setSelectedId;
|
|
335
|
+
$[46] = t17;
|
|
336
|
+
} else t17 = $[46];
|
|
337
|
+
const submit = t17;
|
|
338
|
+
let t18;
|
|
339
|
+
if ($[47] !== host || $[48] !== schedules || $[49] !== setSelectedId) {
|
|
340
|
+
t18 = async (schedule_2) => {
|
|
292
341
|
const index = schedules.findIndex((item) => item.id === schedule_2.id);
|
|
293
342
|
const remaining = schedules.filter((item_0) => item_0.id !== schedule_2.id);
|
|
294
343
|
await host.onDeleteSchedule(schedule_2);
|
|
295
344
|
setSelectedId((remaining[index] ?? remaining[index - 1])?.id ?? null);
|
|
296
|
-
|
|
345
|
+
setEditingId(null);
|
|
297
346
|
};
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
} else
|
|
303
|
-
const remove =
|
|
304
|
-
let
|
|
305
|
-
if ($[
|
|
306
|
-
|
|
347
|
+
$[47] = host;
|
|
348
|
+
$[48] = schedules;
|
|
349
|
+
$[49] = setSelectedId;
|
|
350
|
+
$[50] = t18;
|
|
351
|
+
} else t18 = $[50];
|
|
352
|
+
const remove = t18;
|
|
353
|
+
let t19;
|
|
354
|
+
if ($[51] !== editing) {
|
|
355
|
+
t19 = (event_0) => {
|
|
307
356
|
if (editing && (event_0.ctrlKey || event_0.metaKey) && !event_0.altKey && !event_0.shiftKey && event_0.key.toLowerCase() === "s") {
|
|
308
357
|
event_0.preventDefault();
|
|
309
358
|
save();
|
|
310
359
|
}
|
|
311
360
|
};
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
} else
|
|
315
|
-
let
|
|
316
|
-
if ($[
|
|
317
|
-
|
|
361
|
+
$[51] = editing;
|
|
362
|
+
$[52] = t19;
|
|
363
|
+
} else t19 = $[52];
|
|
364
|
+
let t20;
|
|
365
|
+
if ($[53] !== editing || $[54] !== leaveEditor || $[55] !== selected || $[56] !== startNew) {
|
|
366
|
+
t20 = () => /* @__PURE__ */ jsxs(Menubar.Menu, { children: [/* @__PURE__ */ jsx(Menubar.Trigger, { children: "File" }), /* @__PURE__ */ jsx(Menubar.Portal, { children: /* @__PURE__ */ jsx(Menubar.Positioner, {
|
|
318
367
|
align: "start",
|
|
319
368
|
sideOffset: 4,
|
|
320
369
|
children: /* @__PURE__ */ jsxs(Menubar.Popup, {
|
|
@@ -328,7 +377,7 @@ function useComputerSchedules(t0) {
|
|
|
328
377
|
disabled: editing !== null,
|
|
329
378
|
onClick: () => {
|
|
330
379
|
focusEditorAfterMenu.current = true;
|
|
331
|
-
|
|
380
|
+
startNew();
|
|
332
381
|
},
|
|
333
382
|
children: "New schedule"
|
|
334
383
|
}),
|
|
@@ -336,10 +385,7 @@ function useComputerSchedules(t0) {
|
|
|
336
385
|
disabled: editing !== null || !selected,
|
|
337
386
|
onClick: () => {
|
|
338
387
|
focusEditorAfterMenu.current = true;
|
|
339
|
-
|
|
340
|
-
kind: "existing",
|
|
341
|
-
scheduleId: selected.id
|
|
342
|
-
});
|
|
388
|
+
setEditingId(selected.id);
|
|
343
389
|
},
|
|
344
390
|
children: "Edit schedule"
|
|
345
391
|
}),
|
|
@@ -357,15 +403,16 @@ function useComputerSchedules(t0) {
|
|
|
357
403
|
]
|
|
358
404
|
})
|
|
359
405
|
}) })] });
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
$[
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
406
|
+
$[53] = editing;
|
|
407
|
+
$[54] = leaveEditor;
|
|
408
|
+
$[55] = selected;
|
|
409
|
+
$[56] = startNew;
|
|
410
|
+
$[57] = t20;
|
|
411
|
+
} else t20 = $[57];
|
|
412
|
+
let t21;
|
|
413
|
+
if ($[58] !== editing || $[59] !== leaveEditor) {
|
|
414
|
+
t21 = editing ? (t22) => {
|
|
415
|
+
const { phone } = t22;
|
|
369
416
|
return phone ? null : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
370
417
|
"data-nav-back": "",
|
|
371
418
|
label: "Schedules",
|
|
@@ -379,14 +426,14 @@ function useComputerSchedules(t0) {
|
|
|
379
426
|
children: editing?.kind === "existing" ? "Edit schedule" : "New schedule"
|
|
380
427
|
})] });
|
|
381
428
|
} : void 0;
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
} else
|
|
386
|
-
let
|
|
387
|
-
if ($[
|
|
388
|
-
|
|
389
|
-
const { phone: phone_0 } =
|
|
429
|
+
$[58] = editing;
|
|
430
|
+
$[59] = leaveEditor;
|
|
431
|
+
$[60] = t21;
|
|
432
|
+
} else t21 = $[60];
|
|
433
|
+
let t22;
|
|
434
|
+
if ($[61] !== automationDraft || $[62] !== automations || $[63] !== automationsError || $[64] !== automationsLoading || $[65] !== confirming || $[66] !== createSchedule || $[67] !== editing || $[68] !== editingSchedule || $[69] !== host || $[70] !== leaveEditor || $[71] !== remove || $[72] !== schedules || $[73] !== selected || $[74] !== selectedId || $[75] !== startNew || $[76] !== submit) {
|
|
435
|
+
t22 = (t23) => {
|
|
436
|
+
const { phone: phone_0 } = t23;
|
|
390
437
|
const selectedAutomationPath = selected && "automation" in selected.task ? selected.task.automation.path : void 0;
|
|
391
438
|
const editor_0 = /* @__PURE__ */ jsx(ThinkScheduleForm, {
|
|
392
439
|
ref: editorRef,
|
|
@@ -412,10 +459,7 @@ function useComputerSchedules(t0) {
|
|
|
412
459
|
/* @__PURE__ */ jsx(AppTopBar.Button, {
|
|
413
460
|
ref: editButtonRef,
|
|
414
461
|
label: "Edit schedule",
|
|
415
|
-
onClick: () =>
|
|
416
|
-
kind: "existing",
|
|
417
|
-
scheduleId: selected.id
|
|
418
|
-
}),
|
|
462
|
+
onClick: () => setEditingId(selected.id),
|
|
419
463
|
children: /* @__PURE__ */ jsx(PencilIcon, {})
|
|
420
464
|
}),
|
|
421
465
|
/* @__PURE__ */ jsx(ThinkScheduleActions.Delete, {})
|
|
@@ -448,7 +492,7 @@ function useComputerSchedules(t0) {
|
|
|
448
492
|
title: selectedId && schedules.length ? "Schedule not found" : "No schedules yet",
|
|
449
493
|
description: selectedId && schedules.length ? "This schedule is no longer available." : "Create a schedule to run work automatically.",
|
|
450
494
|
children: /* @__PURE__ */ jsx(Button, {
|
|
451
|
-
onClick: () =>
|
|
495
|
+
onClick: () => void startNew(),
|
|
452
496
|
children: "Create schedule"
|
|
453
497
|
})
|
|
454
498
|
})
|
|
@@ -457,8 +501,8 @@ function useComputerSchedules(t0) {
|
|
|
457
501
|
const composition = selected ? /* @__PURE__ */ jsx(ThinkScheduleActions.Root, {
|
|
458
502
|
schedule: selected,
|
|
459
503
|
sourceKey: host.sourceKey,
|
|
460
|
-
onRun: host.onRunSchedule,
|
|
461
|
-
onEnabledChange: host.onScheduleEnabledChange,
|
|
504
|
+
onRun: async (schedule_4) => void await host.onRunSchedule(schedule_4),
|
|
505
|
+
onEnabledChange: async (schedule_5, enabled) => void await host.onScheduleEnabledChange(schedule_5, enabled),
|
|
462
506
|
onDelete: remove,
|
|
463
507
|
children: browser
|
|
464
508
|
}) : browser;
|
|
@@ -508,60 +552,61 @@ function useComputerSchedules(t0) {
|
|
|
508
552
|
}) }, `editor:${editing.kind}:${editing.kind === "existing" ? editing.scheduleId : "new"}`) : null]
|
|
509
553
|
}), discardDialog] });
|
|
510
554
|
};
|
|
511
|
-
$[
|
|
512
|
-
$[
|
|
513
|
-
$[
|
|
514
|
-
$[
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
$[
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
525
|
-
$[
|
|
526
|
-
$[
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
if ($[66] !== leaveEditor || $[67] !== t17 || $[68] !== t18 || $[69] !== t19 || $[70] !== t20) {
|
|
530
|
-
t21 = {
|
|
531
|
-
beforeQuit: leaveEditor,
|
|
532
|
-
onKeyDown: t17,
|
|
533
|
-
renderMenus: t18,
|
|
534
|
-
renderTitle: t19,
|
|
535
|
-
render: t20
|
|
536
|
-
};
|
|
537
|
-
$[66] = leaveEditor;
|
|
538
|
-
$[67] = t17;
|
|
539
|
-
$[68] = t18;
|
|
540
|
-
$[69] = t19;
|
|
541
|
-
$[70] = t20;
|
|
542
|
-
$[71] = t21;
|
|
543
|
-
} else t21 = $[71];
|
|
544
|
-
const model = t21;
|
|
545
|
-
const t22 = editing !== null;
|
|
555
|
+
$[61] = automationDraft;
|
|
556
|
+
$[62] = automations;
|
|
557
|
+
$[63] = automationsError;
|
|
558
|
+
$[64] = automationsLoading;
|
|
559
|
+
$[65] = confirming;
|
|
560
|
+
$[66] = createSchedule;
|
|
561
|
+
$[67] = editing;
|
|
562
|
+
$[68] = editingSchedule;
|
|
563
|
+
$[69] = host;
|
|
564
|
+
$[70] = leaveEditor;
|
|
565
|
+
$[71] = remove;
|
|
566
|
+
$[72] = schedules;
|
|
567
|
+
$[73] = selected;
|
|
568
|
+
$[74] = selectedId;
|
|
569
|
+
$[75] = startNew;
|
|
570
|
+
$[76] = submit;
|
|
571
|
+
$[77] = t22;
|
|
572
|
+
} else t22 = $[77];
|
|
546
573
|
let t23;
|
|
547
|
-
if ($[
|
|
574
|
+
if ($[78] !== leaveEditor || $[79] !== t19 || $[80] !== t20 || $[81] !== t21 || $[82] !== t22) {
|
|
548
575
|
t23 = {
|
|
576
|
+
beforeQuit: leaveEditor,
|
|
577
|
+
onKeyDown: t19,
|
|
578
|
+
renderMenus: t20,
|
|
579
|
+
renderTitle: t21,
|
|
580
|
+
render: t22
|
|
581
|
+
};
|
|
582
|
+
$[78] = leaveEditor;
|
|
583
|
+
$[79] = t19;
|
|
584
|
+
$[80] = t20;
|
|
585
|
+
$[81] = t21;
|
|
586
|
+
$[82] = t22;
|
|
587
|
+
$[83] = t23;
|
|
588
|
+
} else t23 = $[83];
|
|
589
|
+
const model = t23;
|
|
590
|
+
const t24 = editing !== null;
|
|
591
|
+
let t25;
|
|
592
|
+
if ($[84] !== createSchedule || $[85] !== leaveEditor || $[86] !== model || $[87] !== openAutomationSchedule || $[88] !== openSchedule || $[89] !== t24) {
|
|
593
|
+
t25 = {
|
|
549
594
|
model,
|
|
550
|
-
editing:
|
|
595
|
+
editing: t24,
|
|
551
596
|
openAutomationSchedule,
|
|
552
597
|
openSchedule,
|
|
553
598
|
createSchedule,
|
|
554
599
|
leaveEditor
|
|
555
600
|
};
|
|
556
|
-
$[
|
|
557
|
-
$[
|
|
558
|
-
$[
|
|
559
|
-
$[
|
|
560
|
-
$[
|
|
561
|
-
$[
|
|
562
|
-
$[
|
|
563
|
-
} else
|
|
564
|
-
return
|
|
601
|
+
$[84] = createSchedule;
|
|
602
|
+
$[85] = leaveEditor;
|
|
603
|
+
$[86] = model;
|
|
604
|
+
$[87] = openAutomationSchedule;
|
|
605
|
+
$[88] = openSchedule;
|
|
606
|
+
$[89] = t24;
|
|
607
|
+
$[90] = t25;
|
|
608
|
+
} else t25 = $[90];
|
|
609
|
+
return t25;
|
|
565
610
|
}
|
|
566
611
|
function _temp3$1(parameter) {
|
|
567
612
|
return parameter.value === void 0 ? [] : [[parameter.name, parameter.value]];
|
|
@@ -574,6 +619,13 @@ function _temp$1() {
|
|
|
574
619
|
}
|
|
575
620
|
//#endregion
|
|
576
621
|
//#region src/components/agents-sdk/ComputerAutomations.tsx
|
|
622
|
+
/** Automations' sections, in tab order. */
|
|
623
|
+
const COMPUTER_AUTOMATIONS_SECTIONS = [
|
|
624
|
+
"workflows",
|
|
625
|
+
"schedules",
|
|
626
|
+
"runs"
|
|
627
|
+
];
|
|
628
|
+
const BROWSER_TIME_ZONE = () => new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
577
629
|
function UpcomingAgenda(t0) {
|
|
578
630
|
const $ = c(11);
|
|
579
631
|
const { schedules, timeZone } = t0;
|
|
@@ -990,8 +1042,8 @@ function AutomationsToolbar(t0) {
|
|
|
990
1042
|
* runs, as the side panel's Automations and Schedules show them.
|
|
991
1043
|
*/
|
|
992
1044
|
function useAutomationsModel() {
|
|
993
|
-
const $ = c(
|
|
994
|
-
const { host, schedules } = useComputerAutomationsContext();
|
|
1045
|
+
const $ = c(60);
|
|
1046
|
+
const { host, clock, schedules } = useComputerAutomationsContext();
|
|
995
1047
|
const { openApp } = useAgentComputerActions();
|
|
996
1048
|
const { section, workflow: selectedWorkflowPath, run: runId } = host.selection;
|
|
997
1049
|
const navigate = host.onNavigate;
|
|
@@ -1032,7 +1084,7 @@ function useAutomationsModel() {
|
|
|
1032
1084
|
if ($[7] !== host || $[8] !== openApp) {
|
|
1033
1085
|
t4 = (path_0) => {
|
|
1034
1086
|
host.onOpenFile(path_0);
|
|
1035
|
-
openApp(
|
|
1087
|
+
openApp(COMPUTER_APP_IDS.files);
|
|
1036
1088
|
};
|
|
1037
1089
|
$[7] = host;
|
|
1038
1090
|
$[8] = openApp;
|
|
@@ -1051,57 +1103,67 @@ function useAutomationsModel() {
|
|
|
1051
1103
|
$[13] = t5;
|
|
1052
1104
|
} else t5 = $[13];
|
|
1053
1105
|
let t6;
|
|
1106
|
+
let t7;
|
|
1054
1107
|
if ($[14] !== openAutomationSchedule || $[15] !== setSection) {
|
|
1055
1108
|
t6 = async (path_2) => {
|
|
1056
|
-
if (await openAutomationSchedule(path_2)) setSection("schedules");
|
|
1109
|
+
if (await openAutomationSchedule({ path: path_2 })) setSection("schedules");
|
|
1110
|
+
};
|
|
1111
|
+
t7 = async (invocation) => {
|
|
1112
|
+
if (await openAutomationSchedule(invocation)) setSection("schedules");
|
|
1057
1113
|
};
|
|
1058
1114
|
$[14] = openAutomationSchedule;
|
|
1059
1115
|
$[15] = setSection;
|
|
1060
1116
|
$[16] = t6;
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
t7 =
|
|
1065
|
-
|
|
1117
|
+
$[17] = t7;
|
|
1118
|
+
} else {
|
|
1119
|
+
t6 = $[16];
|
|
1120
|
+
t7 = $[17];
|
|
1121
|
+
}
|
|
1122
|
+
let t8;
|
|
1123
|
+
if ($[18] !== onRun) {
|
|
1124
|
+
t8 = onRun ? async (invocation_0) => {
|
|
1125
|
+
const outcome = await onRun(invocation_0);
|
|
1066
1126
|
const [output] = outcome.files;
|
|
1067
1127
|
if (output) setRecentWorkflowOutputs((current) => [{
|
|
1068
|
-
workflowPath:
|
|
1128
|
+
workflowPath: invocation_0.path,
|
|
1069
1129
|
run: output
|
|
1070
|
-
}, ...current.filter((candidate) => candidate.workflowPath !==
|
|
1130
|
+
}, ...current.filter((candidate) => candidate.workflowPath !== invocation_0.path || candidate.run.path !== output.path)]);
|
|
1071
1131
|
return outcome;
|
|
1072
1132
|
} : void 0;
|
|
1073
|
-
$[
|
|
1074
|
-
$[
|
|
1075
|
-
} else
|
|
1076
|
-
let
|
|
1077
|
-
if ($[
|
|
1078
|
-
|
|
1133
|
+
$[18] = onRun;
|
|
1134
|
+
$[19] = t8;
|
|
1135
|
+
} else t8 = $[19];
|
|
1136
|
+
let t9;
|
|
1137
|
+
if ($[20] !== host.automations || $[21] !== t5 || $[22] !== t6 || $[23] !== t7 || $[24] !== t8) {
|
|
1138
|
+
t9 = {
|
|
1079
1139
|
...host.automations,
|
|
1080
1140
|
onOpen: t5,
|
|
1081
1141
|
onSchedule: t6,
|
|
1082
|
-
|
|
1142
|
+
onScheduleTable: t7,
|
|
1143
|
+
onRun: t8
|
|
1083
1144
|
};
|
|
1084
|
-
$[
|
|
1085
|
-
$[
|
|
1086
|
-
$[
|
|
1087
|
-
$[
|
|
1088
|
-
$[
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
$[
|
|
1096
|
-
$[
|
|
1097
|
-
|
|
1098
|
-
|
|
1145
|
+
$[20] = host.automations;
|
|
1146
|
+
$[21] = t5;
|
|
1147
|
+
$[22] = t6;
|
|
1148
|
+
$[23] = t7;
|
|
1149
|
+
$[24] = t8;
|
|
1150
|
+
$[25] = t9;
|
|
1151
|
+
} else t9 = $[25];
|
|
1152
|
+
const source = t9;
|
|
1153
|
+
let t10;
|
|
1154
|
+
if ($[26] !== host.schedules || $[27] !== runId) {
|
|
1155
|
+
t10 = host.schedules.flatMap(_temp7).find((run_0) => getThinkExecutionRunId(run_0) === runId) ?? null;
|
|
1156
|
+
$[26] = host.schedules;
|
|
1157
|
+
$[27] = runId;
|
|
1158
|
+
$[28] = t10;
|
|
1159
|
+
} else t10 = $[28];
|
|
1160
|
+
const selectedRun = t10;
|
|
1099
1161
|
const scheduleApp = schedules.model;
|
|
1100
1162
|
const [outlet] = React.useState(createAppBarOutlet);
|
|
1101
1163
|
const [sections, setSections] = React.useState(null);
|
|
1102
|
-
let
|
|
1103
|
-
if ($[
|
|
1104
|
-
|
|
1164
|
+
let t11;
|
|
1165
|
+
if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1166
|
+
t11 = /* @__PURE__ */ jsxs(Tabs.Tab, {
|
|
1105
1167
|
unstyled: true,
|
|
1106
1168
|
value: "workflows",
|
|
1107
1169
|
render: /* @__PURE__ */ jsx(Button, {
|
|
@@ -1112,11 +1174,11 @@ function useAutomationsModel() {
|
|
|
1112
1174
|
}),
|
|
1113
1175
|
children: [/* @__PURE__ */ jsx(QueueIcon, { "aria-hidden": "true" }), "Automations"]
|
|
1114
1176
|
});
|
|
1115
|
-
$[
|
|
1116
|
-
} else
|
|
1117
|
-
let
|
|
1118
|
-
if ($[
|
|
1119
|
-
|
|
1177
|
+
$[29] = t11;
|
|
1178
|
+
} else t11 = $[29];
|
|
1179
|
+
let t12;
|
|
1180
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1181
|
+
t12 = /* @__PURE__ */ jsxs(Tabs.Tab, {
|
|
1120
1182
|
unstyled: true,
|
|
1121
1183
|
value: "schedules",
|
|
1122
1184
|
render: /* @__PURE__ */ jsx(Button, {
|
|
@@ -1127,17 +1189,17 @@ function useAutomationsModel() {
|
|
|
1127
1189
|
}),
|
|
1128
1190
|
children: [/* @__PURE__ */ jsx(CalendarIcon, { "aria-hidden": "true" }), "Schedules"]
|
|
1129
1191
|
});
|
|
1130
|
-
$[
|
|
1131
|
-
} else
|
|
1132
|
-
let
|
|
1133
|
-
if ($[
|
|
1134
|
-
|
|
1192
|
+
$[30] = t12;
|
|
1193
|
+
} else t12 = $[30];
|
|
1194
|
+
let t13;
|
|
1195
|
+
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1196
|
+
t13 = /* @__PURE__ */ jsxs(Tabs.List, {
|
|
1135
1197
|
unstyled: true,
|
|
1136
1198
|
className: "computer-automations__tabs",
|
|
1137
1199
|
"aria-label": "Automations",
|
|
1138
1200
|
children: [
|
|
1139
|
-
t10,
|
|
1140
1201
|
t11,
|
|
1202
|
+
t12,
|
|
1141
1203
|
/* @__PURE__ */ jsxs(Tabs.Tab, {
|
|
1142
1204
|
unstyled: true,
|
|
1143
1205
|
value: "runs",
|
|
@@ -1151,27 +1213,27 @@ function useAutomationsModel() {
|
|
|
1151
1213
|
})
|
|
1152
1214
|
]
|
|
1153
1215
|
});
|
|
1154
|
-
$[
|
|
1155
|
-
} else
|
|
1156
|
-
const sectionList =
|
|
1157
|
-
const
|
|
1158
|
-
let
|
|
1159
|
-
if ($[
|
|
1160
|
-
|
|
1161
|
-
const { phone } =
|
|
1216
|
+
$[31] = t13;
|
|
1217
|
+
} else t13 = $[31];
|
|
1218
|
+
const sectionList = t13;
|
|
1219
|
+
const t14 = section === "schedules" ? scheduleApp.renderMenus : void 0;
|
|
1220
|
+
let t15;
|
|
1221
|
+
if ($[32] !== outlet || $[33] !== scheduleApp.renderTitle || $[34] !== schedules.editing) {
|
|
1222
|
+
t15 = schedules.editing ? scheduleApp.renderTitle : (t16) => {
|
|
1223
|
+
const { phone } = t16;
|
|
1162
1224
|
return phone ? "Automations" : /* @__PURE__ */ jsx(AutomationsToolbar, {
|
|
1163
1225
|
outlet,
|
|
1164
1226
|
sections: setSections
|
|
1165
1227
|
});
|
|
1166
1228
|
};
|
|
1167
|
-
$[
|
|
1168
|
-
$[
|
|
1169
|
-
$[
|
|
1170
|
-
$[
|
|
1171
|
-
} else
|
|
1172
|
-
let
|
|
1173
|
-
if ($[
|
|
1174
|
-
|
|
1229
|
+
$[32] = outlet;
|
|
1230
|
+
$[33] = scheduleApp.renderTitle;
|
|
1231
|
+
$[34] = schedules.editing;
|
|
1232
|
+
$[35] = t15;
|
|
1233
|
+
} else t15 = $[35];
|
|
1234
|
+
let t16;
|
|
1235
|
+
if ($[36] !== clock || $[37] !== host || $[38] !== openWorkspaceFile || $[39] !== outlet || $[40] !== recentWorkflowOutputs || $[41] !== runId || $[42] !== scheduleApp || $[43] !== schedules.editing || $[44] !== section || $[45] !== sections || $[46] !== selectedRun || $[47] !== selectedWorkflowPath || $[48] !== setSection || $[49] !== setSelectedRun || $[50] !== setSelectedWorkflowPath || $[51] !== source || $[52] !== workflows) {
|
|
1236
|
+
t16 = (context) => {
|
|
1175
1237
|
const paneOutlet = (pane) => !context.phone && section === pane ? outlet : null;
|
|
1176
1238
|
return schedules.editing ? scheduleApp.render(context) : /* @__PURE__ */ jsxs(Tabs.Root, {
|
|
1177
1239
|
className: "computer-automations",
|
|
@@ -1205,7 +1267,7 @@ function useAutomationsModel() {
|
|
|
1205
1267
|
className: "computer-automations__schedule-view",
|
|
1206
1268
|
children: [/* @__PURE__ */ jsx(UpcomingAgenda, {
|
|
1207
1269
|
schedules: host.schedules,
|
|
1208
|
-
timeZone:
|
|
1270
|
+
timeZone: clock.timeZone
|
|
1209
1271
|
}), scheduleApp.render(context)]
|
|
1210
1272
|
})
|
|
1211
1273
|
}),
|
|
@@ -1237,41 +1299,42 @@ function useAutomationsModel() {
|
|
|
1237
1299
|
})]
|
|
1238
1300
|
});
|
|
1239
1301
|
};
|
|
1240
|
-
$[
|
|
1241
|
-
$[
|
|
1242
|
-
$[
|
|
1243
|
-
$[
|
|
1244
|
-
$[
|
|
1245
|
-
$[
|
|
1246
|
-
$[
|
|
1247
|
-
$[
|
|
1248
|
-
$[
|
|
1249
|
-
$[
|
|
1250
|
-
$[
|
|
1251
|
-
$[
|
|
1252
|
-
$[
|
|
1253
|
-
$[
|
|
1254
|
-
$[
|
|
1255
|
-
$[
|
|
1256
|
-
$[
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1302
|
+
$[36] = clock;
|
|
1303
|
+
$[37] = host;
|
|
1304
|
+
$[38] = openWorkspaceFile;
|
|
1305
|
+
$[39] = outlet;
|
|
1306
|
+
$[40] = recentWorkflowOutputs;
|
|
1307
|
+
$[41] = runId;
|
|
1308
|
+
$[42] = scheduleApp;
|
|
1309
|
+
$[43] = schedules.editing;
|
|
1310
|
+
$[44] = section;
|
|
1311
|
+
$[45] = sections;
|
|
1312
|
+
$[46] = selectedRun;
|
|
1313
|
+
$[47] = selectedWorkflowPath;
|
|
1314
|
+
$[48] = setSection;
|
|
1315
|
+
$[49] = setSelectedRun;
|
|
1316
|
+
$[50] = setSelectedWorkflowPath;
|
|
1317
|
+
$[51] = source;
|
|
1318
|
+
$[52] = workflows;
|
|
1319
|
+
$[53] = t16;
|
|
1320
|
+
} else t16 = $[53];
|
|
1321
|
+
let t17;
|
|
1322
|
+
if ($[54] !== scheduleApp.beforeQuit || $[55] !== scheduleApp.onKeyDown || $[56] !== t14 || $[57] !== t15 || $[58] !== t16) {
|
|
1323
|
+
t17 = {
|
|
1261
1324
|
beforeQuit: scheduleApp.beforeQuit,
|
|
1262
1325
|
onKeyDown: scheduleApp.onKeyDown,
|
|
1263
|
-
renderMenus:
|
|
1264
|
-
renderTitle:
|
|
1265
|
-
render:
|
|
1326
|
+
renderMenus: t14,
|
|
1327
|
+
renderTitle: t15,
|
|
1328
|
+
render: t16
|
|
1266
1329
|
};
|
|
1267
|
-
$[
|
|
1268
|
-
$[
|
|
1269
|
-
$[
|
|
1270
|
-
$[
|
|
1271
|
-
$[
|
|
1272
|
-
$[
|
|
1273
|
-
} else
|
|
1274
|
-
return
|
|
1330
|
+
$[54] = scheduleApp.beforeQuit;
|
|
1331
|
+
$[55] = scheduleApp.onKeyDown;
|
|
1332
|
+
$[56] = t14;
|
|
1333
|
+
$[57] = t15;
|
|
1334
|
+
$[58] = t16;
|
|
1335
|
+
$[59] = t17;
|
|
1336
|
+
} else t17 = $[59];
|
|
1337
|
+
return t17;
|
|
1275
1338
|
}
|
|
1276
1339
|
function _temp7(schedule) {
|
|
1277
1340
|
return schedule.runs;
|
|
@@ -1286,7 +1349,7 @@ const automationsParts = computerAppParts(useAutomationsModel, {
|
|
|
1286
1349
|
* once, so Calendar's New and Open land in the editor Automations shows.
|
|
1287
1350
|
*/
|
|
1288
1351
|
function Host(t0) {
|
|
1289
|
-
const $ = c(
|
|
1352
|
+
const $ = c(33);
|
|
1290
1353
|
const { value, children } = t0;
|
|
1291
1354
|
const host = value;
|
|
1292
1355
|
const workflows = useQuery(host.automations.queryOptions);
|
|
@@ -1319,30 +1382,48 @@ function Host(t0) {
|
|
|
1319
1382
|
$[8] = t4;
|
|
1320
1383
|
} else t4 = $[8];
|
|
1321
1384
|
const showSchedules = t4;
|
|
1385
|
+
const now = useMinuteClock(host.now ?? Date.now);
|
|
1322
1386
|
let t5;
|
|
1387
|
+
if ($[9] !== host.timeZone) {
|
|
1388
|
+
t5 = host.timeZone ?? BROWSER_TIME_ZONE();
|
|
1389
|
+
$[9] = host.timeZone;
|
|
1390
|
+
$[10] = t5;
|
|
1391
|
+
} else t5 = $[10];
|
|
1392
|
+
const timeZone = t5;
|
|
1323
1393
|
let t6;
|
|
1324
|
-
if ($[
|
|
1325
|
-
|
|
1394
|
+
if ($[11] !== now || $[12] !== timeZone) {
|
|
1395
|
+
t6 = {
|
|
1396
|
+
now,
|
|
1397
|
+
timeZone
|
|
1398
|
+
};
|
|
1399
|
+
$[11] = now;
|
|
1400
|
+
$[12] = timeZone;
|
|
1401
|
+
$[13] = t6;
|
|
1402
|
+
} else t6 = $[13];
|
|
1403
|
+
let t7;
|
|
1404
|
+
let t8;
|
|
1405
|
+
if ($[14] !== schedules || $[15] !== showSchedules) {
|
|
1406
|
+
t7 = async (id) => {
|
|
1326
1407
|
if (!await schedules.openSchedule(id)) return false;
|
|
1327
1408
|
showSchedules();
|
|
1328
1409
|
return true;
|
|
1329
1410
|
};
|
|
1330
|
-
|
|
1411
|
+
t8 = async () => {
|
|
1331
1412
|
if (!await schedules.createSchedule()) return false;
|
|
1332
1413
|
showSchedules();
|
|
1333
1414
|
return true;
|
|
1334
1415
|
};
|
|
1335
|
-
$[
|
|
1336
|
-
$[
|
|
1337
|
-
$[
|
|
1338
|
-
$[
|
|
1416
|
+
$[14] = schedules;
|
|
1417
|
+
$[15] = showSchedules;
|
|
1418
|
+
$[16] = t7;
|
|
1419
|
+
$[17] = t8;
|
|
1339
1420
|
} else {
|
|
1340
|
-
|
|
1341
|
-
|
|
1421
|
+
t7 = $[16];
|
|
1422
|
+
t8 = $[17];
|
|
1342
1423
|
}
|
|
1343
|
-
let
|
|
1344
|
-
if ($[
|
|
1345
|
-
|
|
1424
|
+
let t9;
|
|
1425
|
+
if ($[18] !== host || $[19] !== schedules) {
|
|
1426
|
+
t9 = async (run) => {
|
|
1346
1427
|
if (!await schedules.leaveEditor()) return false;
|
|
1347
1428
|
host.onNavigate({
|
|
1348
1429
|
section: "runs",
|
|
@@ -1350,52 +1431,54 @@ function Host(t0) {
|
|
|
1350
1431
|
});
|
|
1351
1432
|
return true;
|
|
1352
1433
|
};
|
|
1353
|
-
$[
|
|
1354
|
-
$[
|
|
1355
|
-
$[
|
|
1356
|
-
} else
|
|
1357
|
-
let
|
|
1358
|
-
if ($[
|
|
1359
|
-
|
|
1360
|
-
openSchedule:
|
|
1361
|
-
createSchedule:
|
|
1362
|
-
openRun:
|
|
1434
|
+
$[18] = host;
|
|
1435
|
+
$[19] = schedules;
|
|
1436
|
+
$[20] = t9;
|
|
1437
|
+
} else t9 = $[20];
|
|
1438
|
+
let t10;
|
|
1439
|
+
if ($[21] !== t7 || $[22] !== t8 || $[23] !== t9) {
|
|
1440
|
+
t10 = {
|
|
1441
|
+
openSchedule: t7,
|
|
1442
|
+
createSchedule: t8,
|
|
1443
|
+
openRun: t9
|
|
1363
1444
|
};
|
|
1364
|
-
$[
|
|
1365
|
-
$[
|
|
1366
|
-
$[
|
|
1367
|
-
$[
|
|
1368
|
-
} else
|
|
1369
|
-
let
|
|
1370
|
-
if ($[
|
|
1371
|
-
|
|
1445
|
+
$[21] = t7;
|
|
1446
|
+
$[22] = t8;
|
|
1447
|
+
$[23] = t9;
|
|
1448
|
+
$[24] = t10;
|
|
1449
|
+
} else t10 = $[24];
|
|
1450
|
+
let t11;
|
|
1451
|
+
if ($[25] !== host || $[26] !== schedules || $[27] !== t10 || $[28] !== t6) {
|
|
1452
|
+
t11 = {
|
|
1372
1453
|
host,
|
|
1454
|
+
clock: t6,
|
|
1373
1455
|
schedules,
|
|
1374
|
-
calendar:
|
|
1456
|
+
calendar: t10
|
|
1375
1457
|
};
|
|
1376
|
-
$[
|
|
1377
|
-
$[
|
|
1378
|
-
$[
|
|
1379
|
-
$[
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1458
|
+
$[25] = host;
|
|
1459
|
+
$[26] = schedules;
|
|
1460
|
+
$[27] = t10;
|
|
1461
|
+
$[28] = t6;
|
|
1462
|
+
$[29] = t11;
|
|
1463
|
+
} else t11 = $[29];
|
|
1464
|
+
const context = t11;
|
|
1465
|
+
let t12;
|
|
1466
|
+
if ($[30] !== children || $[31] !== context) {
|
|
1467
|
+
t12 = /* @__PURE__ */ jsx(ComputerAutomationsContext, {
|
|
1385
1468
|
value: context,
|
|
1386
1469
|
children
|
|
1387
1470
|
});
|
|
1388
|
-
$[
|
|
1389
|
-
$[
|
|
1390
|
-
$[
|
|
1391
|
-
} else
|
|
1392
|
-
return
|
|
1471
|
+
$[30] = children;
|
|
1472
|
+
$[31] = context;
|
|
1473
|
+
$[32] = t12;
|
|
1474
|
+
} else t12 = $[32];
|
|
1475
|
+
return t12;
|
|
1393
1476
|
}
|
|
1394
1477
|
/** Automations in the Dock, and the Host it shares with Calendar. */
|
|
1395
1478
|
const ComputerAutomations = {
|
|
1396
1479
|
Host,
|
|
1397
1480
|
app: {
|
|
1398
|
-
id:
|
|
1481
|
+
id: COMPUTER_APP_IDS.automations,
|
|
1399
1482
|
label: "Automations",
|
|
1400
1483
|
icon: computerAppTile(/* @__PURE__ */ jsx(AppIcon.Image, {
|
|
1401
1484
|
src: desktopArtwork.automations,
|
|
@@ -1407,4 +1490,4 @@ const ComputerAutomations = {
|
|
|
1407
1490
|
}
|
|
1408
1491
|
};
|
|
1409
1492
|
//#endregion
|
|
1410
|
-
export { ComputerAutomations };
|
|
1493
|
+
export { COMPUTER_AUTOMATIONS_SECTIONS, ComputerAutomations };
|