@tangle-network/agent-app 0.46.26 → 0.46.28

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.
@@ -188,6 +188,13 @@ export interface SandboxRuntimeConfig {
188
188
  permissionRole?: (workspaceRole: string) => SandboxPermissionLevel;
189
189
  resources?: SandboxResourceConfig;
190
190
  provider?: ProviderResolutionConfig;
191
+ /**
192
+ * Portable directory where the sandbox starts its agent processes.
193
+ *
194
+ * The value is relative to the sandbox workspace. The sandbox platform
195
+ * validates it and applies it when the box is created.
196
+ */
197
+ cwd?: string;
191
198
  /**
192
199
  * Product-declared outbound network policy. Applied when a sandbox is
193
200
  * created. A reused or resumed sandbox is returned only when its explicit
@@ -92,7 +92,7 @@ import {
92
92
  workspaceSandboxRecoveryMessage,
93
93
  workspaceSandboxRecoveryRecommendedActions,
94
94
  writeProfileFilesToBox
95
- } from "../chunk-G6A4BEZI.js";
95
+ } from "../chunk-57J36H7C.js";
96
96
  import "../chunk-TH7L265V.js";
97
97
  import "../chunk-LWSJK546.js";
98
98
  import "../chunk-P5PIAQVS.js";
@@ -2332,6 +2332,8 @@ function StudioToastProvider({ children }) {
2332
2332
  const sequence = useRef7(0);
2333
2333
  const dismissed = useRef7(/* @__PURE__ */ new Set());
2334
2334
  const records = useRef7(/* @__PURE__ */ new Map());
2335
+ const removalTimers = useRef7(/* @__PURE__ */ new Set());
2336
+ const active = useRef7(true);
2335
2337
  const leave = useCallback5((id, reason) => {
2336
2338
  if (dismissed.current.has(id)) return;
2337
2339
  const record = records.current.get(id);
@@ -2339,13 +2341,16 @@ function StudioToastProvider({ children }) {
2339
2341
  dismissed.current.add(id);
2340
2342
  record.onDismiss?.(reason);
2341
2343
  setToasts((current) => current.map((toast2) => toast2.id === id ? { ...toast2, leaving: true } : toast2));
2342
- window.setTimeout(() => {
2344
+ const timer = window.setTimeout(() => {
2345
+ removalTimers.current.delete(timer);
2343
2346
  records.current.delete(id);
2344
2347
  setToasts((current) => current.filter((toast2) => toast2.id !== id));
2345
2348
  }, 180);
2349
+ removalTimers.current.add(timer);
2346
2350
  }, []);
2347
2351
  const toast = useCallback5((input) => {
2348
2352
  const id = `studio-toast-${++sequence.current}`;
2353
+ if (!active.current) return id;
2349
2354
  const record = { ...input, id, leaving: false };
2350
2355
  records.current.set(id, record);
2351
2356
  setToasts((current) => [...current, record]);
@@ -2353,7 +2358,16 @@ function StudioToastProvider({ children }) {
2353
2358
  }, []);
2354
2359
  const dismiss = useCallback5((id) => leave(id, "dismissed"), [leave]);
2355
2360
  const value = useMemo5(() => ({ toast, dismiss, setDockLift }), [dismiss, toast]);
2356
- useEffect9(() => setMounted(true), []);
2361
+ useEffect9(() => {
2362
+ setMounted(true);
2363
+ return () => {
2364
+ active.current = false;
2365
+ for (const timer of removalTimers.current) window.clearTimeout(timer);
2366
+ removalTimers.current.clear();
2367
+ records.current.clear();
2368
+ dismissed.current.clear();
2369
+ };
2370
+ }, []);
2357
2371
  return /* @__PURE__ */ jsxs8(StudioToastContext.Provider, { value, children: [
2358
2372
  children,
2359
2373
  mounted && createPortal3(