@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.
Files changed (71) hide show
  1. package/dist/{AgentComputer-BP9ixGGE.js → AgentComputer-CFJxjMFE.js} +32 -3
  2. package/dist/ComputerFileThumbnail-CXHy127c.js +393 -0
  3. package/dist/Context-DQDumCV8.js +918 -0
  4. package/dist/{ThinkSchedule-D4Ulsa0-.d.ts → ThinkSchedule-9nzxIoX1.d.ts} +1 -1
  5. package/dist/{Workspace-B9nuTfIi.d.ts → Workspace-mZddFyvP.d.ts} +7 -3
  6. package/dist/{WorkspaceAutomation-C0fghGLi.d.ts → WorkspaceAutomation-hwl6C1aX.d.ts} +2 -2
  7. package/dist/{WorkspaceBrowser-Dz48H-7X.d.ts → WorkspaceBrowser-CNVAKXXZ.d.ts} +4 -11
  8. package/dist/{WorkspaceBrowser-oBJv-Dac.js → WorkspaceBrowser-ojoZy0uO.js} +202 -210
  9. package/dist/{WorkspaceConcept-D46cYerS.d.ts → WorkspaceConcept-DqzfZWws.d.ts} +1 -1
  10. package/dist/{WorkspaceFileCommands-1s9Ol8CG.d.ts → WorkspaceFileCommands-CN2oVUzx.d.ts} +5 -2
  11. package/dist/{WorkspaceFileTransfer-BRD22nW-.d.ts → WorkspaceFileTransfer-D--dVla2.d.ts} +1 -1
  12. package/dist/components/agents-sdk/AgentComputer.d.ts +1 -1
  13. package/dist/components/agents-sdk/AgentComputer.js +1 -1
  14. package/dist/components/agents-sdk/ComputerAppIds.d.ts +15 -0
  15. package/dist/components/agents-sdk/ComputerAppIds.js +14 -0
  16. package/dist/components/agents-sdk/ComputerAutomations.d.ts +23 -14
  17. package/dist/components/agents-sdk/ComputerAutomations.js +437 -354
  18. package/dist/components/agents-sdk/ComputerCalendar.js +16 -15
  19. package/dist/components/agents-sdk/ComputerCustomWallpaper.js +186 -171
  20. package/dist/components/agents-sdk/ComputerFileThumbnail.d.ts +5 -3
  21. package/dist/components/agents-sdk/ComputerFileThumbnail.js +1 -132
  22. package/dist/components/agents-sdk/ComputerFiles.d.ts +4 -6
  23. package/dist/components/agents-sdk/ComputerFiles.js +337 -316
  24. package/dist/components/agents-sdk/ComputerHome.js +1 -1
  25. package/dist/components/agents-sdk/ComputerLayout.d.ts +9 -0
  26. package/dist/components/agents-sdk/ComputerLayout.js +66 -0
  27. package/dist/components/agents-sdk/ComputerNotifications.js +60 -83
  28. package/dist/components/agents-sdk/ComputerScreen.d.ts +12 -6
  29. package/dist/components/agents-sdk/ComputerScreen.js +49 -36
  30. package/dist/components/agents-sdk/ComputerSettings.d.ts +10 -4
  31. package/dist/components/agents-sdk/ComputerSettings.js +92 -72
  32. package/dist/components/agents-sdk/ComputerSpotlight.js +1 -1
  33. package/dist/components/agents-sdk/EmployeeChat.js +1 -1
  34. package/dist/components/agents-sdk/EmployeeSchedules.d.ts +2 -2
  35. package/dist/components/agents-sdk/ManagerOffice.d.ts +1 -1
  36. package/dist/components/agents-sdk/ThinkSchedule.d.ts +1 -1
  37. package/dist/components/agents-sdk/ThinkScheduleActions.d.ts +1 -1
  38. package/dist/components/agents-sdk/ThinkScheduleBrowser.d.ts +1 -1
  39. package/dist/components/agents-sdk/ThinkScheduleDetail.d.ts +2 -2
  40. package/dist/components/agents-sdk/ThinkScheduleForm.d.ts +1 -1
  41. package/dist/components/agents-sdk/Workspace.d.ts +1 -1
  42. package/dist/components/agents-sdk/Workspace.js +197 -190
  43. package/dist/components/agents-sdk/WorkspaceAutomation.d.ts +1 -1
  44. package/dist/components/agents-sdk/WorkspaceAutomationTable.d.ts +1 -1
  45. package/dist/components/agents-sdk/WorkspaceBrowser.d.ts +1 -1
  46. package/dist/components/agents-sdk/WorkspaceBrowser.js +1 -1
  47. package/dist/components/agents-sdk/WorkspaceConcept.d.ts +1 -1
  48. package/dist/components/agents-sdk/WorkspaceCorrespondence.d.ts +1 -1
  49. package/dist/components/agents-sdk/WorkspaceDesktop.d.ts +6 -6
  50. package/dist/components/agents-sdk/WorkspaceDesktop.js +126 -101
  51. package/dist/components/agents-sdk/WorkspaceExplorer.d.ts +2 -10
  52. package/dist/components/agents-sdk/WorkspaceExplorer.js +67 -71
  53. package/dist/components/agents-sdk/WorkspaceFileCommands.d.ts +1 -1
  54. package/dist/components/agents-sdk/WorkspaceFileCommands.js +11 -6
  55. package/dist/components/agents-sdk/WorkspaceFileTransfer.d.ts +1 -1
  56. package/dist/components/agents-sdk/WorkspaceLive.d.ts +1 -1
  57. package/dist/components/agents-sdk/WorkspaceLive.js +7 -5
  58. package/dist/components/agents-sdk/WorkspaceLocalFolder.d.ts +1 -1
  59. package/dist/components/agents-sdk/WorkspacePerson.d.ts +2 -2
  60. package/dist/components/agents-sdk/WorkspaceProject.d.ts +2 -2
  61. package/dist/components/ai-sdk/Context.js +1 -842
  62. package/dist/components/ai-sdk/Plan.d.ts +33 -9
  63. package/dist/components/ai-sdk/Plan.js +336 -107
  64. package/dist/components/extension/FirstRunSetup.d.ts +2 -2
  65. package/dist/minute-clock-CXpRGCMF.js +35 -0
  66. package/dist/{parts-RXV6GGdB.js → parts-CPVz9l31.js} +1 -1
  67. package/dist/styles/plan.css +160 -23
  68. package/dist/{workspace-concept-panel-BDTBISNO.d.ts → workspace-concept-panel-D1czupvi.d.ts} +1 -1
  69. package/dist/{workspace-quick-look-9V-UFpjj.js → workspace-quick-look-DODjsfhH.js} +79 -251
  70. package/package.json +2 -2
  71. 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-BP9ixGGE.js";
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-RXV6GGdB.js";
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(79);
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 [editing, setEditing] = useState(null);
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 ($[10] === Symbol.for("react.memo_cache_sentinel")) {
136
- t4 = () => {
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
- $[10] = t4;
145
- } else t4 = $[10];
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 ($[13] !== dirty) {
156
- t6 = () => {
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
- t7 = [dirty];
163
- $[13] = dirty;
164
- $[14] = t6;
165
- $[15] = t7;
199
+ t9 = [dirty];
200
+ $[19] = dirty;
201
+ $[20] = t8;
202
+ $[21] = t9;
166
203
  } else {
167
- t6 = $[14];
168
- t7 = $[15];
204
+ t8 = $[20];
205
+ t9 = $[21];
169
206
  }
170
- useEffect(t6, t7);
171
- let t8;
172
- if ($[16] !== dirty) {
173
- t8 = function confirmDiscard() {
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
- $[16] = dirty;
189
- $[17] = t8;
190
- } else t8 = $[17];
191
- const confirmDiscard = t8;
192
- let t9;
193
- if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
194
- t9 = function answerDiscard(discard) {
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
- $[18] = t9;
201
- } else t9 = $[18];
202
- const answerDiscard = t9;
203
- let t10;
204
- if ($[19] !== confirmDiscard) {
205
- t10 = async function leaveEditor() {
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
- setEditing(null);
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
- $[19] = confirmDiscard;
213
- $[20] = t10;
214
- } else t10 = $[20];
215
- const leaveEditor = t10;
216
- let t11;
217
- if ($[21] !== leaveEditor || $[22] !== schedules || $[23] !== setSelectedId) {
218
- t11 = async function openSchedule(id) {
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
- $[21] = leaveEditor;
224
- $[22] = schedules;
225
- $[23] = setSelectedId;
226
- $[24] = t11;
227
- } else t11 = $[24];
228
- const openSchedule = t11;
229
- let t12;
230
- if ($[25] !== leaveEditor) {
231
- t12 = async function createSchedule() {
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
- setEditing({ kind: "new" });
276
+ await startNew();
234
277
  return true;
235
278
  };
236
- $[25] = leaveEditor;
237
- $[26] = t12;
238
- } else t12 = $[26];
239
- const createSchedule = t12;
240
- let t13;
241
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
242
- t13 = function save() {
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
- $[27] = t13;
246
- } else t13 = $[27];
247
- const save = t13;
248
- let t14;
249
- if ($[28] !== automations || $[29] !== leaveEditor) {
250
- t14 = async function openAutomationSchedule(path) {
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
- path,
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
- setEditing({ kind: "new" });
301
+ await startNew();
258
302
  return true;
259
303
  };
260
- $[28] = automations;
261
- $[29] = leaveEditor;
262
- $[30] = t14;
263
- } else t14 = $[30];
264
- const openAutomationSchedule = t14;
265
- let t15;
266
- if ($[31] !== editing?.kind || $[32] !== editingSchedule || $[33] !== host || $[34] !== requestKey || $[35] !== setSelectedId) {
267
- t15 = async (value) => {
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 setSelectedId(id_0);
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
- setEditing(null);
328
+ setEditingId(null);
280
329
  };
281
- $[31] = editing?.kind;
282
- $[32] = editingSchedule;
283
- $[33] = host;
284
- $[34] = requestKey;
285
- $[35] = setSelectedId;
286
- $[36] = t15;
287
- } else t15 = $[36];
288
- const submit = t15;
289
- let t16;
290
- if ($[37] !== host || $[38] !== schedules || $[39] !== setSelectedId) {
291
- t16 = async (schedule_2) => {
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
- setEditing(null);
345
+ setEditingId(null);
297
346
  };
298
- $[37] = host;
299
- $[38] = schedules;
300
- $[39] = setSelectedId;
301
- $[40] = t16;
302
- } else t16 = $[40];
303
- const remove = t16;
304
- let t17;
305
- if ($[41] !== editing) {
306
- t17 = (event_0) => {
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
- $[41] = editing;
313
- $[42] = t17;
314
- } else t17 = $[42];
315
- let t18;
316
- if ($[43] !== editing || $[44] !== leaveEditor || $[45] !== selected) {
317
- t18 = () => /* @__PURE__ */ jsxs(Menubar.Menu, { children: [/* @__PURE__ */ jsx(Menubar.Trigger, { children: "File" }), /* @__PURE__ */ jsx(Menubar.Portal, { children: /* @__PURE__ */ jsx(Menubar.Positioner, {
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
- setEditing({ kind: "new" });
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
- setEditing({
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
- $[43] = editing;
361
- $[44] = leaveEditor;
362
- $[45] = selected;
363
- $[46] = t18;
364
- } else t18 = $[46];
365
- let t19;
366
- if ($[47] !== editing || $[48] !== leaveEditor) {
367
- t19 = editing ? (t20) => {
368
- const { phone } = t20;
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
- $[47] = editing;
383
- $[48] = leaveEditor;
384
- $[49] = t19;
385
- } else t19 = $[49];
386
- let t20;
387
- if ($[50] !== automationDraft || $[51] !== automations || $[52] !== automationsError || $[53] !== automationsLoading || $[54] !== confirming || $[55] !== createSchedule || $[56] !== editing || $[57] !== editingSchedule || $[58] !== host || $[59] !== leaveEditor || $[60] !== remove || $[61] !== schedules || $[62] !== selected || $[63] !== selectedId || $[64] !== submit) {
388
- t20 = (t21) => {
389
- const { phone: phone_0 } = t21;
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: () => setEditing({
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: () => setEditing({ kind: "new" }),
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
- $[50] = automationDraft;
512
- $[51] = automations;
513
- $[52] = automationsError;
514
- $[53] = automationsLoading;
515
- $[54] = confirming;
516
- $[55] = createSchedule;
517
- $[56] = editing;
518
- $[57] = editingSchedule;
519
- $[58] = host;
520
- $[59] = leaveEditor;
521
- $[60] = remove;
522
- $[61] = schedules;
523
- $[62] = selected;
524
- $[63] = selectedId;
525
- $[64] = submit;
526
- $[65] = t20;
527
- } else t20 = $[65];
528
- let t21;
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 ($[72] !== createSchedule || $[73] !== leaveEditor || $[74] !== model || $[75] !== openAutomationSchedule || $[76] !== openSchedule || $[77] !== t22) {
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: t22,
595
+ editing: t24,
551
596
  openAutomationSchedule,
552
597
  openSchedule,
553
598
  createSchedule,
554
599
  leaveEditor
555
600
  };
556
- $[72] = createSchedule;
557
- $[73] = leaveEditor;
558
- $[74] = model;
559
- $[75] = openAutomationSchedule;
560
- $[76] = openSchedule;
561
- $[77] = t22;
562
- $[78] = t23;
563
- } else t23 = $[78];
564
- return t23;
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(57);
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("files");
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
- } else t6 = $[16];
1062
- let t7;
1063
- if ($[17] !== onRun) {
1064
- t7 = onRun ? async (invocation) => {
1065
- const outcome = await onRun(invocation);
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: invocation.path,
1128
+ workflowPath: invocation_0.path,
1069
1129
  run: output
1070
- }, ...current.filter((candidate) => candidate.workflowPath !== invocation.path || candidate.run.path !== output.path)]);
1130
+ }, ...current.filter((candidate) => candidate.workflowPath !== invocation_0.path || candidate.run.path !== output.path)]);
1071
1131
  return outcome;
1072
1132
  } : void 0;
1073
- $[17] = onRun;
1074
- $[18] = t7;
1075
- } else t7 = $[18];
1076
- let t8;
1077
- if ($[19] !== host.automations || $[20] !== t5 || $[21] !== t6 || $[22] !== t7) {
1078
- t8 = {
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
- onRun: t7
1142
+ onScheduleTable: t7,
1143
+ onRun: t8
1083
1144
  };
1084
- $[19] = host.automations;
1085
- $[20] = t5;
1086
- $[21] = t6;
1087
- $[22] = t7;
1088
- $[23] = t8;
1089
- } else t8 = $[23];
1090
- const source = t8;
1091
- let t9;
1092
- if ($[24] !== host.schedules || $[25] !== runId) {
1093
- t9 = host.schedules.flatMap(_temp7).find((run_0) => getThinkExecutionRunId(run_0) === runId) ?? null;
1094
- $[24] = host.schedules;
1095
- $[25] = runId;
1096
- $[26] = t9;
1097
- } else t9 = $[26];
1098
- const selectedRun = t9;
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 t10;
1103
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
1104
- t10 = /* @__PURE__ */ jsxs(Tabs.Tab, {
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
- $[27] = t10;
1116
- } else t10 = $[27];
1117
- let t11;
1118
- if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
1119
- t11 = /* @__PURE__ */ jsxs(Tabs.Tab, {
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
- $[28] = t11;
1131
- } else t11 = $[28];
1132
- let t12;
1133
- if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
1134
- t12 = /* @__PURE__ */ jsxs(Tabs.List, {
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
- $[29] = t12;
1155
- } else t12 = $[29];
1156
- const sectionList = t12;
1157
- const t13 = section === "schedules" ? scheduleApp.renderMenus : void 0;
1158
- let t14;
1159
- if ($[30] !== outlet || $[31] !== scheduleApp.renderTitle || $[32] !== schedules.editing) {
1160
- t14 = schedules.editing ? scheduleApp.renderTitle : (t15) => {
1161
- const { phone } = t15;
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
- $[30] = outlet;
1168
- $[31] = scheduleApp.renderTitle;
1169
- $[32] = schedules.editing;
1170
- $[33] = t14;
1171
- } else t14 = $[33];
1172
- let t15;
1173
- if ($[34] !== host || $[35] !== openWorkspaceFile || $[36] !== outlet || $[37] !== recentWorkflowOutputs || $[38] !== runId || $[39] !== scheduleApp || $[40] !== schedules.editing || $[41] !== section || $[42] !== sections || $[43] !== selectedRun || $[44] !== selectedWorkflowPath || $[45] !== setSection || $[46] !== setSelectedRun || $[47] !== setSelectedWorkflowPath || $[48] !== source || $[49] !== workflows) {
1174
- t15 = (context) => {
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: host.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
- $[34] = host;
1241
- $[35] = openWorkspaceFile;
1242
- $[36] = outlet;
1243
- $[37] = recentWorkflowOutputs;
1244
- $[38] = runId;
1245
- $[39] = scheduleApp;
1246
- $[40] = schedules.editing;
1247
- $[41] = section;
1248
- $[42] = sections;
1249
- $[43] = selectedRun;
1250
- $[44] = selectedWorkflowPath;
1251
- $[45] = setSection;
1252
- $[46] = setSelectedRun;
1253
- $[47] = setSelectedWorkflowPath;
1254
- $[48] = source;
1255
- $[49] = workflows;
1256
- $[50] = t15;
1257
- } else t15 = $[50];
1258
- let t16;
1259
- if ($[51] !== scheduleApp.beforeQuit || $[52] !== scheduleApp.onKeyDown || $[53] !== t13 || $[54] !== t14 || $[55] !== t15) {
1260
- t16 = {
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: t13,
1264
- renderTitle: t14,
1265
- render: t15
1326
+ renderMenus: t14,
1327
+ renderTitle: t15,
1328
+ render: t16
1266
1329
  };
1267
- $[51] = scheduleApp.beforeQuit;
1268
- $[52] = scheduleApp.onKeyDown;
1269
- $[53] = t13;
1270
- $[54] = t14;
1271
- $[55] = t15;
1272
- $[56] = t16;
1273
- } else t16 = $[56];
1274
- return t16;
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(27);
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 ($[9] !== schedules || $[10] !== showSchedules) {
1325
- t5 = async (id) => {
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
- t6 = async () => {
1411
+ t8 = async () => {
1331
1412
  if (!await schedules.createSchedule()) return false;
1332
1413
  showSchedules();
1333
1414
  return true;
1334
1415
  };
1335
- $[9] = schedules;
1336
- $[10] = showSchedules;
1337
- $[11] = t5;
1338
- $[12] = t6;
1416
+ $[14] = schedules;
1417
+ $[15] = showSchedules;
1418
+ $[16] = t7;
1419
+ $[17] = t8;
1339
1420
  } else {
1340
- t5 = $[11];
1341
- t6 = $[12];
1421
+ t7 = $[16];
1422
+ t8 = $[17];
1342
1423
  }
1343
- let t7;
1344
- if ($[13] !== host || $[14] !== schedules) {
1345
- t7 = async (run) => {
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
- $[13] = host;
1354
- $[14] = schedules;
1355
- $[15] = t7;
1356
- } else t7 = $[15];
1357
- let t8;
1358
- if ($[16] !== t5 || $[17] !== t6 || $[18] !== t7) {
1359
- t8 = {
1360
- openSchedule: t5,
1361
- createSchedule: t6,
1362
- openRun: t7
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
- $[16] = t5;
1365
- $[17] = t6;
1366
- $[18] = t7;
1367
- $[19] = t8;
1368
- } else t8 = $[19];
1369
- let t9;
1370
- if ($[20] !== host || $[21] !== schedules || $[22] !== t8) {
1371
- t9 = {
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: t8
1456
+ calendar: t10
1375
1457
  };
1376
- $[20] = host;
1377
- $[21] = schedules;
1378
- $[22] = t8;
1379
- $[23] = t9;
1380
- } else t9 = $[23];
1381
- const context = t9;
1382
- let t10;
1383
- if ($[24] !== children || $[25] !== context) {
1384
- t10 = /* @__PURE__ */ jsx(ComputerAutomationsContext, {
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
- $[24] = children;
1389
- $[25] = context;
1390
- $[26] = t10;
1391
- } else t10 = $[26];
1392
- return t10;
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: "automations",
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 };