@athenaintel/react 0.15.1 → 0.16.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/index.js CHANGED
@@ -17,8 +17,8 @@ var __privateWrapper = (obj, member, setter, getter) => ({
17
17
  }
18
18
  });
19
19
  var _mutations, _scopes, _mutationId, _a2, _queries, _b, _queryCache, _mutationCache, _defaultOptions, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _c;
20
- import { a as athenaDiagnostics, D as DEFAULT_API_URL, b as DEFAULT_BACKEND_URL, g as getThreadState, C as CLIENT_TOOL_INTERRUPT_SOURCE, c as CLIENT_TOOL_RESULT_STATUS_ERROR, d as CLIENT_TOOL_RESULT_STATUS_SUCCESS, S as StatewireSuspended, e as Subscribable, M as Mutation, n as notifyManager, m as matchMutation, f as noop$1, h as hashQueryKeyByOptions, Q as Query, i as matchQuery, j as focusManager, o as onlineManager, r as resolveStaleTime, k as functionalUpdate, l as infiniteQueryBehavior, p as hashKey, q as partialMatchKey, s as skipToken, t as readDeepAgentStreamValues, u as isDeepAgentStateHydrated, v as DEEP_AGENT_PROTOCOL_VERSION, w as DEEP_AGENT_PROTOCOL_STATE_KEY, x as DEEP_AGENT_PROTOCOL_VERSION_HEADER, y as convertDeepAgentState, z as deepAgentMaterialize, A as readPersistedFailedSendStamps, B as QuotaSafeLocalStorageSession, E as useFloating, F as offset, G as shift, H as limitShift, I as flip, J as size, K as arrow$1, L as hide, N as autoUpdate, O as cn, P as archiveThread, R as listThreads, T as QueryClientProvider, U as createRestConversationListFetcher, V as useConversationList, W as installAthenaDiagnosticsGlobal, X as debugPropToDiagnosticsConfig, Y as getAthenaEnvironmentUrls, Z as deriveAthenaAppUrl, _ as resolveStatewireSyncUrl, $ as PostHogProvider, a0 as Mark, a1 as markPasteRule, a2 as mergeAttributes, a3 as Plugin, a4 as PluginKey, a5 as combineTransactionSteps, a6 as getChangedRanges, a7 as findChildrenInRange, a8 as getMarksBetween, a9 as getAttributes, aa as Selection, ab as SelectionRange, ac as TextSelection, ad as Fragment, ae as Slice, af as DecorationSet, ag as Decoration, ah as keydownHandler, ai as NodeSelection, aj as Transform, ak as Node$1, al as callOrReturn, am as getExtensionField, an as findParentNodeClosestToPos, ao as Schema, ap as Mark$1, aq as Extension, ar as index, as as DOMParser, at as getHTMLFromFragment, au as createLucideIcon, av as Wrench, aw as Workflow, ax as Users, ay as Package, az as Monitor, aA as MessageSquare, aB as Mail, aC as LayoutGrid, aD as HardDrive, aE as Globe, aF as FolderKanban, aG as Folder, aH as FileText, aI as Database, aJ as Calendar, aK as BookOpen, aL as NodeViewWrapper, aM as nodePasteRule, aN as ReactNodeViewRenderer, aO as useEditor, aP as EditorContent, aQ as StarterKit, aR as useStore$1, aS as getFilteredItems, aT as ChevronRight, aU as useFloating$1, aV as FloatingPortal, aW as Suggestion, aX as ReactRenderer, aY as Store, aZ as registerSource, a_ as addItems, a$ as createItemCache, b0 as createScopeRegistry, b1 as createAthenaSpacesUrl, b2 as DEFAULT_APP_URL, b3 as Placeholder, b4 as RefreshCw, b5 as Check, b6 as ChevronDown, b7 as Archive, b8 as Code$2, b9 as Search, ba as Table$3, bb as Image$2, bc as Sheet, bd as Camera, be as LoaderCircle, bf as Copy, bg as ChatThreadShell, bh as ChatComposerDock, bi as ComposerSendOrStop, bj as ArrowUp, bk as ListPlus, bl as File$1, bm as Plus, bn as useRestConversationHistory, bo as useMutation, bp as setThreadReadState } from "./use-rest-conversation-history-DYvfgoBF.js";
21
- import { bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI } from "./use-rest-conversation-history-DYvfgoBF.js";
20
+ import { a as athenaDiagnostics, D as DEFAULT_API_URL, b as DEFAULT_BACKEND_URL, g as getThreadState, C as CLIENT_TOOL_INTERRUPT_SOURCE, c as CLIENT_TOOL_RESULT_STATUS_ERROR, d as CLIENT_TOOL_RESULT_STATUS_SUCCESS, S as StatewireSuspended, e as Subscribable, M as Mutation, n as notifyManager, m as matchMutation, f as noop$1, h as hashQueryKeyByOptions, Q as Query, i as matchQuery, j as focusManager, o as onlineManager, r as resolveStaleTime, k as functionalUpdate, l as infiniteQueryBehavior, p as hashKey, q as partialMatchKey, s as skipToken, t as readDeepAgentStreamValues, u as isDeepAgentStateHydrated, v as DEEP_AGENT_PROTOCOL_VERSION, w as DEEP_AGENT_PROTOCOL_STATE_KEY, x as DEEP_AGENT_PROTOCOL_VERSION_HEADER, y as convertDeepAgentState, z as deepAgentMaterialize, A as readPersistedFailedSendStamps, B as QuotaSafeLocalStorageSession, E as useFloating, F as offset, G as shift, H as limitShift, I as flip, J as size, K as arrow$1, L as hide, N as autoUpdate, O as cn, P as archiveThread, R as listThreads, T as QueryClientProvider, U as createRestConversationListFetcher, V as useConversationList, W as installAthenaDiagnosticsGlobal, X as debugPropToDiagnosticsConfig, Y as getAthenaEnvironmentUrls, Z as deriveAthenaAppUrl, _ as resolveStatewireSyncUrl, $ as PostHogProvider, a0 as Mark, a1 as markPasteRule, a2 as mergeAttributes, a3 as Plugin, a4 as PluginKey, a5 as combineTransactionSteps, a6 as getChangedRanges, a7 as findChildrenInRange, a8 as getMarksBetween, a9 as getAttributes, aa as Selection, ab as SelectionRange, ac as TextSelection, ad as Fragment, ae as Slice, af as DecorationSet, ag as Decoration, ah as keydownHandler, ai as NodeSelection, aj as Transform, ak as Node$1, al as callOrReturn, am as getExtensionField, an as findParentNodeClosestToPos, ao as Schema, ap as Mark$1, aq as Extension, ar as index, as as DOMParser, at as getHTMLFromFragment, au as createLucideIcon, av as Wrench, aw as Workflow, ax as Users, ay as Package, az as Monitor, aA as MessageSquare, aB as Mail, aC as LayoutGrid, aD as HardDrive, aE as Globe, aF as FolderKanban, aG as Folder, aH as FileText, aI as Database, aJ as Calendar, aK as BookOpen, aL as NodeViewWrapper, aM as nodePasteRule, aN as ReactNodeViewRenderer, aO as useEditor, aP as EditorContent, aQ as StarterKit, aR as useStore$1, aS as getFilteredItems, aT as ChevronRight, aU as useFloating$1, aV as FloatingPortal, aW as Suggestion, aX as ReactRenderer, aY as Store, aZ as registerSource, a_ as addItems, a$ as createItemCache, b0 as createScopeRegistry, b1 as createAthenaSpacesUrl, b2 as DEFAULT_APP_URL, b3 as Placeholder, b4 as RefreshCw, b5 as Check, b6 as ChevronDown, b7 as Archive, b8 as Code$2, b9 as Search, ba as Table$3, bb as Image$2, bc as Sheet, bd as Camera, be as LoaderCircle, bf as Copy, bg as ChatThreadShell, bh as ChatComposerDock, bi as ComposerSendOrStop, bj as ArrowUp, bk as ListPlus, bl as File$1, bm as Plus, bn as useRestConversationHistory, bo as useMutation, bp as setThreadReadState } from "./use-rest-conversation-history-BZ9Pl9kF.js";
21
+ import { bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI } from "./use-rest-conversation-history-BZ9Pl9kF.js";
22
22
  import * as React from "react";
23
23
  import React__default, { useSyncExternalStore, useCallback, useMemo, useState, useRef, useEffect, useContext, createContext, useReducer, forwardRef, useImperativeHandle, Component, Fragment as Fragment$1, memo } from "react";
24
24
  import { jsx, jsxs, Fragment as Fragment$2 } from "react/jsx-runtime";
@@ -2210,7 +2210,7 @@ class Doc {
2210
2210
  return new F(...args, lines.join("\n"));
2211
2211
  }
2212
2212
  }
2213
- const version = {
2213
+ const version$1 = {
2214
2214
  major: 4,
2215
2215
  minor: 4,
2216
2216
  patch: 3
@@ -2221,7 +2221,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2221
2221
  inst ?? (inst = {});
2222
2222
  inst._zod.def = def;
2223
2223
  inst._zod.bag = inst._zod.bag || {};
2224
- inst._zod.version = version;
2224
+ inst._zod.version = version$1;
2225
2225
  const checks = [...inst._zod.def.checks ?? []];
2226
2226
  if (inst._zod.traits.has("$ZodCheck")) {
2227
2227
  checks.unshift(inst);
@@ -8964,11 +8964,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
8964
8964
  return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
8965
8965
  }
8966
8966
  __name$d(createContextScope, "createContextScope");
8967
- function composeContextScopes(...scopes) {
8968
- const baseScope = scopes[0];
8969
- if (scopes.length === 1) return baseScope;
8967
+ function composeContextScopes(...scopes2) {
8968
+ const baseScope = scopes2[0];
8969
+ if (scopes2.length === 1) return baseScope;
8970
8970
  const createScope = /* @__PURE__ */ __name$d(() => {
8971
- const scopeHooks = scopes.map((createScope2) => ({
8971
+ const scopeHooks = scopes2.map((createScope2) => ({
8972
8972
  useScope: createScope2(),
8973
8973
  scopeName: createScope2.scopeName
8974
8974
  }));
@@ -10754,22 +10754,22 @@ function TooltipContent({
10754
10754
  }
10755
10755
  const createStoreImpl = (createState) => {
10756
10756
  let state;
10757
- const listeners = /* @__PURE__ */ new Set();
10757
+ const listeners2 = /* @__PURE__ */ new Set();
10758
10758
  const setState = (partial2, replace2) => {
10759
10759
  const nextState = typeof partial2 === "function" ? partial2(state) : partial2;
10760
10760
  if (!Object.is(nextState, state)) {
10761
10761
  const previousState = state;
10762
10762
  state = (replace2 != null ? replace2 : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
10763
- listeners.forEach((listener) => listener(state, previousState));
10763
+ listeners2.forEach((listener) => listener(state, previousState));
10764
10764
  }
10765
10765
  };
10766
10766
  const getState2 = () => state;
10767
10767
  const getInitialState = () => initialState;
10768
- const subscribe = (listener) => {
10769
- listeners.add(listener);
10770
- return () => listeners.delete(listener);
10768
+ const subscribe2 = (listener) => {
10769
+ listeners2.add(listener);
10770
+ return () => listeners2.delete(listener);
10771
10771
  };
10772
- const api = { setState, getState: getState2, getInitialState, subscribe };
10772
+ const api = { setState, getState: getState2, getInitialState, subscribe: subscribe2 };
10773
10773
  const initialState = state = createState(setState, getState2, api);
10774
10774
  return api;
10775
10775
  };
@@ -23462,40 +23462,40 @@ function detectMentionTypeFromUrl(url) {
23462
23462
  * This source code is licensed under the ISC license.
23463
23463
  * See the LICENSE file in the root directory of this source tree.
23464
23464
  */
23465
- const __iconNode$K = [
23465
+ const __iconNode$L = [
23466
23466
  ["path", { d: "M12 5v14", key: "s699le" }],
23467
23467
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
23468
23468
  ];
23469
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$K);
23469
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$L);
23470
23470
  /**
23471
23471
  * @license lucide-react v0.575.0 - ISC
23472
23472
  *
23473
23473
  * This source code is licensed under the ISC license.
23474
23474
  * See the LICENSE file in the root directory of this source tree.
23475
23475
  */
23476
- const __iconNode$J = [
23476
+ const __iconNode$K = [
23477
23477
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
23478
23478
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
23479
23479
  ];
23480
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$J);
23480
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$K);
23481
23481
  /**
23482
23482
  * @license lucide-react v0.575.0 - ISC
23483
23483
  *
23484
23484
  * This source code is licensed under the ISC license.
23485
23485
  * See the LICENSE file in the root directory of this source tree.
23486
23486
  */
23487
- const __iconNode$I = [
23487
+ const __iconNode$J = [
23488
23488
  ["path", { d: "M5 12h14", key: "1ays0h" }],
23489
23489
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
23490
23490
  ];
23491
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$I);
23491
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$J);
23492
23492
  /**
23493
23493
  * @license lucide-react v0.575.0 - ISC
23494
23494
  *
23495
23495
  * This source code is licensed under the ISC license.
23496
23496
  * See the LICENSE file in the root directory of this source tree.
23497
23497
  */
23498
- const __iconNode$H = [
23498
+ const __iconNode$I = [
23499
23499
  [
23500
23500
  "path",
23501
23501
  {
@@ -23527,14 +23527,14 @@ const __iconNode$H = [
23527
23527
  ["path", { d: "m12 8 4.74-2.85", key: "3rx089" }],
23528
23528
  ["path", { d: "M12 13.5V8", key: "1io7kd" }]
23529
23529
  ];
23530
- const Boxes = createLucideIcon("boxes", __iconNode$H);
23530
+ const Boxes = createLucideIcon("boxes", __iconNode$I);
23531
23531
  /**
23532
23532
  * @license lucide-react v0.575.0 - ISC
23533
23533
  *
23534
23534
  * This source code is licensed under the ISC license.
23535
23535
  * See the LICENSE file in the root directory of this source tree.
23536
23536
  */
23537
- const __iconNode$G = [
23537
+ const __iconNode$H = [
23538
23538
  ["path", { d: "M12 18V5", key: "adv99a" }],
23539
23539
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
23540
23540
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -23544,27 +23544,27 @@ const __iconNode$G = [
23544
23544
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
23545
23545
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
23546
23546
  ];
23547
- const Brain = createLucideIcon("brain", __iconNode$G);
23547
+ const Brain = createLucideIcon("brain", __iconNode$H);
23548
23548
  /**
23549
23549
  * @license lucide-react v0.575.0 - ISC
23550
23550
  *
23551
23551
  * This source code is licensed under the ISC license.
23552
23552
  * See the LICENSE file in the root directory of this source tree.
23553
23553
  */
23554
- const __iconNode$F = [
23554
+ const __iconNode$G = [
23555
23555
  ["path", { d: "M12 12h.01", key: "1mp3jc" }],
23556
23556
  ["path", { d: "M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2", key: "1ksdt3" }],
23557
23557
  ["path", { d: "M22 13a18.15 18.15 0 0 1-20 0", key: "12hx5q" }],
23558
23558
  ["rect", { width: "20", height: "14", x: "2", y: "6", rx: "2", key: "i6l2r4" }]
23559
23559
  ];
23560
- const BriefcaseBusiness = createLucideIcon("briefcase-business", __iconNode$F);
23560
+ const BriefcaseBusiness = createLucideIcon("briefcase-business", __iconNode$G);
23561
23561
  /**
23562
23562
  * @license lucide-react v0.575.0 - ISC
23563
23563
  *
23564
23564
  * This source code is licensed under the ISC license.
23565
23565
  * See the LICENSE file in the root directory of this source tree.
23566
23566
  */
23567
- const __iconNode$E = [
23567
+ const __iconNode$F = [
23568
23568
  [
23569
23569
  "path",
23570
23570
  { d: "M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z", key: "trhst0" }
@@ -23579,153 +23579,153 @@ const __iconNode$E = [
23579
23579
  ],
23580
23580
  ["path", { d: "M7 5V3", key: "1t1388" }]
23581
23581
  ];
23582
- const Cable = createLucideIcon("cable", __iconNode$E);
23582
+ const Cable = createLucideIcon("cable", __iconNode$F);
23583
23583
  /**
23584
23584
  * @license lucide-react v0.575.0 - ISC
23585
23585
  *
23586
23586
  * This source code is licensed under the ISC license.
23587
23587
  * See the LICENSE file in the root directory of this source tree.
23588
23588
  */
23589
- const __iconNode$D = [
23589
+ const __iconNode$E = [
23590
23590
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
23591
23591
  ["path", { d: "M7 16h8", key: "srdodz" }],
23592
23592
  ["path", { d: "M7 11h12", key: "127s9w" }],
23593
23593
  ["path", { d: "M7 6h3", key: "w9rmul" }]
23594
23594
  ];
23595
- const ChartBar = createLucideIcon("chart-bar", __iconNode$D);
23595
+ const ChartBar = createLucideIcon("chart-bar", __iconNode$E);
23596
23596
  /**
23597
23597
  * @license lucide-react v0.575.0 - ISC
23598
23598
  *
23599
23599
  * This source code is licensed under the ISC license.
23600
23600
  * See the LICENSE file in the root directory of this source tree.
23601
23601
  */
23602
- const __iconNode$C = [
23602
+ const __iconNode$D = [
23603
23603
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
23604
23604
  ["path", { d: "M18 17V9", key: "2bz60n" }],
23605
23605
  ["path", { d: "M13 17V5", key: "1frdt8" }],
23606
23606
  ["path", { d: "M8 17v-3", key: "17ska0" }]
23607
23607
  ];
23608
- const ChartColumn = createLucideIcon("chart-column", __iconNode$C);
23608
+ const ChartColumn = createLucideIcon("chart-column", __iconNode$D);
23609
23609
  /**
23610
23610
  * @license lucide-react v0.575.0 - ISC
23611
23611
  *
23612
23612
  * This source code is licensed under the ISC license.
23613
23613
  * See the LICENSE file in the root directory of this source tree.
23614
23614
  */
23615
- const __iconNode$B = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
23616
- const ChevronUp = createLucideIcon("chevron-up", __iconNode$B);
23615
+ const __iconNode$C = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
23616
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$C);
23617
23617
  /**
23618
23618
  * @license lucide-react v0.575.0 - ISC
23619
23619
  *
23620
23620
  * This source code is licensed under the ISC license.
23621
23621
  * See the LICENSE file in the root directory of this source tree.
23622
23622
  */
23623
- const __iconNode$A = [
23623
+ const __iconNode$B = [
23624
23624
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
23625
23625
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
23626
23626
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
23627
23627
  ];
23628
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$A);
23628
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$B);
23629
23629
  /**
23630
23630
  * @license lucide-react v0.575.0 - ISC
23631
23631
  *
23632
23632
  * This source code is licensed under the ISC license.
23633
23633
  * See the LICENSE file in the root directory of this source tree.
23634
23634
  */
23635
- const __iconNode$z = [
23635
+ const __iconNode$A = [
23636
23636
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
23637
23637
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
23638
23638
  ];
23639
- const CircleCheck = createLucideIcon("circle-check", __iconNode$z);
23639
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$A);
23640
23640
  /**
23641
23641
  * @license lucide-react v0.575.0 - ISC
23642
23642
  *
23643
23643
  * This source code is licensed under the ISC license.
23644
23644
  * See the LICENSE file in the root directory of this source tree.
23645
23645
  */
23646
- const __iconNode$y = [
23646
+ const __iconNode$z = [
23647
23647
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
23648
23648
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
23649
23649
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
23650
23650
  ];
23651
- const CircleX = createLucideIcon("circle-x", __iconNode$y);
23651
+ const CircleX = createLucideIcon("circle-x", __iconNode$z);
23652
23652
  /**
23653
23653
  * @license lucide-react v0.575.0 - ISC
23654
23654
  *
23655
23655
  * This source code is licensed under the ISC license.
23656
23656
  * See the LICENSE file in the root directory of this source tree.
23657
23657
  */
23658
- const __iconNode$x = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
23659
- const Circle = createLucideIcon("circle", __iconNode$x);
23658
+ const __iconNode$y = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
23659
+ const Circle = createLucideIcon("circle", __iconNode$y);
23660
23660
  /**
23661
23661
  * @license lucide-react v0.575.0 - ISC
23662
23662
  *
23663
23663
  * This source code is licensed under the ISC license.
23664
23664
  * See the LICENSE file in the root directory of this source tree.
23665
23665
  */
23666
- const __iconNode$w = [
23666
+ const __iconNode$x = [
23667
23667
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
23668
23668
  ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2", key: "4jdomd" }],
23669
23669
  ["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
23670
23670
  ["path", { d: "M21 14H11", key: "1bme5i" }],
23671
23671
  ["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
23672
23672
  ];
23673
- const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$w);
23673
+ const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$x);
23674
23674
  /**
23675
23675
  * @license lucide-react v0.575.0 - ISC
23676
23676
  *
23677
23677
  * This source code is licensed under the ISC license.
23678
23678
  * See the LICENSE file in the root directory of this source tree.
23679
23679
  */
23680
- const __iconNode$v = [
23680
+ const __iconNode$w = [
23681
23681
  ["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
23682
23682
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
23683
23683
  ["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
23684
23684
  ];
23685
- const CodeXml = createLucideIcon("code-xml", __iconNode$v);
23685
+ const CodeXml = createLucideIcon("code-xml", __iconNode$w);
23686
23686
  /**
23687
23687
  * @license lucide-react v0.575.0 - ISC
23688
23688
  *
23689
23689
  * This source code is licensed under the ISC license.
23690
23690
  * See the LICENSE file in the root directory of this source tree.
23691
23691
  */
23692
- const __iconNode$u = [
23692
+ const __iconNode$v = [
23693
23693
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
23694
23694
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
23695
23695
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
23696
23696
  ];
23697
- const Download = createLucideIcon("download", __iconNode$u);
23697
+ const Download = createLucideIcon("download", __iconNode$v);
23698
23698
  /**
23699
23699
  * @license lucide-react v0.575.0 - ISC
23700
23700
  *
23701
23701
  * This source code is licensed under the ISC license.
23702
23702
  * See the LICENSE file in the root directory of this source tree.
23703
23703
  */
23704
- const __iconNode$t = [
23704
+ const __iconNode$u = [
23705
23705
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
23706
23706
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
23707
23707
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
23708
23708
  ];
23709
- const Ellipsis = createLucideIcon("ellipsis", __iconNode$t);
23709
+ const Ellipsis = createLucideIcon("ellipsis", __iconNode$u);
23710
23710
  /**
23711
23711
  * @license lucide-react v0.575.0 - ISC
23712
23712
  *
23713
23713
  * This source code is licensed under the ISC license.
23714
23714
  * See the LICENSE file in the root directory of this source tree.
23715
23715
  */
23716
- const __iconNode$s = [
23716
+ const __iconNode$t = [
23717
23717
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
23718
23718
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
23719
23719
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
23720
23720
  ];
23721
- const ExternalLink = createLucideIcon("external-link", __iconNode$s);
23721
+ const ExternalLink = createLucideIcon("external-link", __iconNode$t);
23722
23722
  /**
23723
23723
  * @license lucide-react v0.575.0 - ISC
23724
23724
  *
23725
23725
  * This source code is licensed under the ISC license.
23726
23726
  * See the LICENSE file in the root directory of this source tree.
23727
23727
  */
23728
- const __iconNode$r = [
23728
+ const __iconNode$s = [
23729
23729
  [
23730
23730
  "path",
23731
23731
  {
@@ -23737,14 +23737,14 @@ const __iconNode$r = [
23737
23737
  ["path", { d: "M9 15h6", key: "cctwl0" }],
23738
23738
  ["path", { d: "M12 18v-6", key: "17g6i2" }]
23739
23739
  ];
23740
- const FilePlus = createLucideIcon("file-plus", __iconNode$r);
23740
+ const FilePlus = createLucideIcon("file-plus", __iconNode$s);
23741
23741
  /**
23742
23742
  * @license lucide-react v0.575.0 - ISC
23743
23743
  *
23744
23744
  * This source code is licensed under the ISC license.
23745
23745
  * See the LICENSE file in the root directory of this source tree.
23746
23746
  */
23747
- const __iconNode$q = [
23747
+ const __iconNode$r = [
23748
23748
  [
23749
23749
  "path",
23750
23750
  {
@@ -23758,14 +23758,14 @@ const __iconNode$q = [
23758
23758
  ["path", { d: "M8 17h2", key: "2yhykz" }],
23759
23759
  ["path", { d: "M14 17h2", key: "10kma7" }]
23760
23760
  ];
23761
- const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$q);
23761
+ const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$r);
23762
23762
  /**
23763
23763
  * @license lucide-react v0.575.0 - ISC
23764
23764
  *
23765
23765
  * This source code is licensed under the ISC license.
23766
23766
  * See the LICENSE file in the root directory of this source tree.
23767
23767
  */
23768
- const __iconNode$p = [
23768
+ const __iconNode$q = [
23769
23769
  [
23770
23770
  "path",
23771
23771
  {
@@ -23774,14 +23774,14 @@ const __iconNode$p = [
23774
23774
  }
23775
23775
  ]
23776
23776
  ];
23777
- const FolderOpen = createLucideIcon("folder-open", __iconNode$p);
23777
+ const FolderOpen = createLucideIcon("folder-open", __iconNode$q);
23778
23778
  /**
23779
23779
  * @license lucide-react v0.575.0 - ISC
23780
23780
  *
23781
23781
  * This source code is licensed under the ISC license.
23782
23782
  * See the LICENSE file in the root directory of this source tree.
23783
23783
  */
23784
- const __iconNode$o = [
23784
+ const __iconNode$p = [
23785
23785
  [
23786
23786
  "path",
23787
23787
  {
@@ -23804,39 +23804,39 @@ const __iconNode$o = [
23804
23804
  }
23805
23805
  ]
23806
23806
  ];
23807
- const Layers = createLucideIcon("layers", __iconNode$o);
23807
+ const Layers = createLucideIcon("layers", __iconNode$p);
23808
23808
  /**
23809
23809
  * @license lucide-react v0.575.0 - ISC
23810
23810
  *
23811
23811
  * This source code is licensed under the ISC license.
23812
23812
  * See the LICENSE file in the root directory of this source tree.
23813
23813
  */
23814
- const __iconNode$n = [
23814
+ const __iconNode$o = [
23815
23815
  ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
23816
23816
  ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
23817
23817
  ];
23818
- const Link = createLucideIcon("link", __iconNode$n);
23818
+ const Link = createLucideIcon("link", __iconNode$o);
23819
23819
  /**
23820
23820
  * @license lucide-react v0.575.0 - ISC
23821
23821
  *
23822
23822
  * This source code is licensed under the ISC license.
23823
23823
  * See the LICENSE file in the root directory of this source tree.
23824
23824
  */
23825
- const __iconNode$m = [
23825
+ const __iconNode$n = [
23826
23826
  ["path", { d: "M13 5h8", key: "a7qcls" }],
23827
23827
  ["path", { d: "M13 12h8", key: "h98zly" }],
23828
23828
  ["path", { d: "M13 19h8", key: "c3s6r1" }],
23829
23829
  ["path", { d: "m3 17 2 2 4-4", key: "1jhpwq" }],
23830
23830
  ["path", { d: "m3 7 2 2 4-4", key: "1obspn" }]
23831
23831
  ];
23832
- const ListChecks = createLucideIcon("list-checks", __iconNode$m);
23832
+ const ListChecks = createLucideIcon("list-checks", __iconNode$n);
23833
23833
  /**
23834
23834
  * @license lucide-react v0.575.0 - ISC
23835
23835
  *
23836
23836
  * This source code is licensed under the ISC license.
23837
23837
  * See the LICENSE file in the root directory of this source tree.
23838
23838
  */
23839
- const __iconNode$l = [
23839
+ const __iconNode$m = [
23840
23840
  ["path", { d: "M12 2v4", key: "3427ic" }],
23841
23841
  ["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
23842
23842
  ["path", { d: "M18 12h4", key: "wj9ykh" }],
@@ -23846,27 +23846,27 @@ const __iconNode$l = [
23846
23846
  ["path", { d: "M2 12h4", key: "j09sii" }],
23847
23847
  ["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
23848
23848
  ];
23849
- const Loader = createLucideIcon("loader", __iconNode$l);
23849
+ const Loader = createLucideIcon("loader", __iconNode$m);
23850
23850
  /**
23851
23851
  * @license lucide-react v0.575.0 - ISC
23852
23852
  *
23853
23853
  * This source code is licensed under the ISC license.
23854
23854
  * See the LICENSE file in the root directory of this source tree.
23855
23855
  */
23856
- const __iconNode$k = [
23856
+ const __iconNode$l = [
23857
23857
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
23858
23858
  ["path", { d: "m21 3-7 7", key: "1l2asr" }],
23859
23859
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
23860
23860
  ["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
23861
23861
  ];
23862
- const Maximize2 = createLucideIcon("maximize-2", __iconNode$k);
23862
+ const Maximize2 = createLucideIcon("maximize-2", __iconNode$l);
23863
23863
  /**
23864
23864
  * @license lucide-react v0.575.0 - ISC
23865
23865
  *
23866
23866
  * This source code is licensed under the ISC license.
23867
23867
  * See the LICENSE file in the root directory of this source tree.
23868
23868
  */
23869
- const __iconNode$j = [
23869
+ const __iconNode$k = [
23870
23870
  [
23871
23871
  "path",
23872
23872
  {
@@ -23877,27 +23877,27 @@ const __iconNode$j = [
23877
23877
  ["path", { d: "M6 14a12 12 0 0 0 2.4 7.2 2 2 0 0 0 3.2-2.4A8 8 0 0 1 10 14", key: "1853fq" }],
23878
23878
  ["path", { d: "M8 6v8", key: "15ugcq" }]
23879
23879
  ];
23880
- const Megaphone = createLucideIcon("megaphone", __iconNode$j);
23880
+ const Megaphone = createLucideIcon("megaphone", __iconNode$k);
23881
23881
  /**
23882
23882
  * @license lucide-react v0.575.0 - ISC
23883
23883
  *
23884
23884
  * This source code is licensed under the ISC license.
23885
23885
  * See the LICENSE file in the root directory of this source tree.
23886
23886
  */
23887
- const __iconNode$i = [
23887
+ const __iconNode$j = [
23888
23888
  ["path", { d: "m14 10 7-7", key: "oa77jy" }],
23889
23889
  ["path", { d: "M20 10h-6V4", key: "mjg0md" }],
23890
23890
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
23891
23891
  ["path", { d: "M4 14h6v6", key: "rmj7iw" }]
23892
23892
  ];
23893
- const Minimize2 = createLucideIcon("minimize-2", __iconNode$i);
23893
+ const Minimize2 = createLucideIcon("minimize-2", __iconNode$j);
23894
23894
  /**
23895
23895
  * @license lucide-react v0.575.0 - ISC
23896
23896
  *
23897
23897
  * This source code is licensed under the ISC license.
23898
23898
  * See the LICENSE file in the root directory of this source tree.
23899
23899
  */
23900
- const __iconNode$h = [
23900
+ const __iconNode$i = [
23901
23901
  ["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4", key: "re6nr2" }],
23902
23902
  ["path", { d: "M2 6h4", key: "aawbzj" }],
23903
23903
  ["path", { d: "M2 10h4", key: "l0bgd4" }],
@@ -23911,25 +23911,25 @@ const __iconNode$h = [
23911
23911
  }
23912
23912
  ]
23913
23913
  ];
23914
- const NotebookPen = createLucideIcon("notebook-pen", __iconNode$h);
23914
+ const NotebookPen = createLucideIcon("notebook-pen", __iconNode$i);
23915
23915
  /**
23916
23916
  * @license lucide-react v0.575.0 - ISC
23917
23917
  *
23918
23918
  * This source code is licensed under the ISC license.
23919
23919
  * See the LICENSE file in the root directory of this source tree.
23920
23920
  */
23921
- const __iconNode$g = [
23921
+ const __iconNode$h = [
23922
23922
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
23923
23923
  ["path", { d: "M3 9h18", key: "1pudct" }]
23924
23924
  ];
23925
- const PanelTop = createLucideIcon("panel-top", __iconNode$g);
23925
+ const PanelTop = createLucideIcon("panel-top", __iconNode$h);
23926
23926
  /**
23927
23927
  * @license lucide-react v0.575.0 - ISC
23928
23928
  *
23929
23929
  * This source code is licensed under the ISC license.
23930
23930
  * See the LICENSE file in the root directory of this source tree.
23931
23931
  */
23932
- const __iconNode$f = [
23932
+ const __iconNode$g = [
23933
23933
  [
23934
23934
  "path",
23935
23935
  {
@@ -23938,14 +23938,14 @@ const __iconNode$f = [
23938
23938
  }
23939
23939
  ]
23940
23940
  ];
23941
- const Paperclip = createLucideIcon("paperclip", __iconNode$f);
23941
+ const Paperclip = createLucideIcon("paperclip", __iconNode$g);
23942
23942
  /**
23943
23943
  * @license lucide-react v0.575.0 - ISC
23944
23944
  *
23945
23945
  * This source code is licensed under the ISC license.
23946
23946
  * See the LICENSE file in the root directory of this source tree.
23947
23947
  */
23948
- const __iconNode$e = [
23948
+ const __iconNode$f = [
23949
23949
  ["path", { d: "M13 21h8", key: "1jsn5i" }],
23950
23950
  [
23951
23951
  "path",
@@ -23955,14 +23955,14 @@ const __iconNode$e = [
23955
23955
  }
23956
23956
  ]
23957
23957
  ];
23958
- const PenLine = createLucideIcon("pen-line", __iconNode$e);
23958
+ const PenLine = createLucideIcon("pen-line", __iconNode$f);
23959
23959
  /**
23960
23960
  * @license lucide-react v0.575.0 - ISC
23961
23961
  *
23962
23962
  * This source code is licensed under the ISC license.
23963
23963
  * See the LICENSE file in the root directory of this source tree.
23964
23964
  */
23965
- const __iconNode$d = [
23965
+ const __iconNode$e = [
23966
23966
  [
23967
23967
  "path",
23968
23968
  {
@@ -23971,26 +23971,26 @@ const __iconNode$d = [
23971
23971
  }
23972
23972
  ]
23973
23973
  ];
23974
- const Play = createLucideIcon("play", __iconNode$d);
23974
+ const Play = createLucideIcon("play", __iconNode$e);
23975
23975
  /**
23976
23976
  * @license lucide-react v0.575.0 - ISC
23977
23977
  *
23978
23978
  * This source code is licensed under the ISC license.
23979
23979
  * See the LICENSE file in the root directory of this source tree.
23980
23980
  */
23981
- const __iconNode$c = [
23981
+ const __iconNode$d = [
23982
23982
  ["path", { d: "M2 3h20", key: "91anmk" }],
23983
23983
  ["path", { d: "M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3", key: "2k9sn8" }],
23984
23984
  ["path", { d: "m7 21 5-5 5 5", key: "bip4we" }]
23985
23985
  ];
23986
- const Presentation = createLucideIcon("presentation", __iconNode$c);
23986
+ const Presentation = createLucideIcon("presentation", __iconNode$d);
23987
23987
  /**
23988
23988
  * @license lucide-react v0.575.0 - ISC
23989
23989
  *
23990
23990
  * This source code is licensed under the ISC license.
23991
23991
  * See the LICENSE file in the root directory of this source tree.
23992
23992
  */
23993
- const __iconNode$b = [
23993
+ const __iconNode$c = [
23994
23994
  [
23995
23995
  "path",
23996
23996
  {
@@ -24006,7 +24006,22 @@ const __iconNode$b = [
24006
24006
  }
24007
24007
  ]
24008
24008
  ];
24009
- const Quote = createLucideIcon("quote", __iconNode$b);
24009
+ const Quote = createLucideIcon("quote", __iconNode$c);
24010
+ /**
24011
+ * @license lucide-react v0.575.0 - ISC
24012
+ *
24013
+ * This source code is licensed under the ISC license.
24014
+ * See the LICENSE file in the root directory of this source tree.
24015
+ */
24016
+ const __iconNode$b = [
24017
+ ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
24018
+ ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
24019
+ ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
24020
+ ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
24021
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }],
24022
+ ["path", { d: "m16 16-1.9-1.9", key: "1dq9hf" }]
24023
+ ];
24024
+ const ScanSearch = createLucideIcon("scan-search", __iconNode$b);
24010
24025
  /**
24011
24026
  * @license lucide-react v0.575.0 - ISC
24012
24027
  *
@@ -27114,7 +27129,14 @@ const ReadAssetToolUIImpl = ({
27114
27129
  const resolvedAssetCount = Math.max(assetCount, new Set(resultAssetIds).size);
27115
27130
  const primaryAsset = getAssetInfo(firstAssetId || resultAssetIds[0] || "");
27116
27131
  const resultTitle = (_a3 = resultItems.find((item) => item.title)) == null ? void 0 : _a3.title;
27117
- const assetLabel = resolvedAssetCount > 1 ? `${primaryAsset.name} + ${resolvedAssetCount - 1} more` : resultTitle ?? primaryAsset.name;
27132
+ const isOpaqueId = (label) => /^asset_[0-9a-f-]{8,}/i.test(label);
27133
+ const primaryLabel = resultTitle ?? (isOpaqueId(primaryAsset.name) ? "1 document" : primaryAsset.name);
27134
+ const sourceList = resolvedAssetCount > 1 ? resultItems.filter((item) => typeof item.title === "string" && item.title !== "").map((item, index2) => ({
27135
+ key: item.asset_id ?? `${index2}-${item.title}`,
27136
+ label: item.title,
27137
+ failed: item.success === false
27138
+ })) : [];
27139
+ const assetLabel = resolvedAssetCount > 1 ? `${resolvedAssetCount} documents` : primaryLabel;
27118
27140
  const statusTitle = isRunning ? "Reviewing asset content" : hasError ? "Asset content review failed" : hasPartialIssues ? "Asset content reviewed with issues" : "Asset content review complete";
27119
27141
  const badge = hasPartialIssues ? `${failedItems.length} ${failedItems.length === 1 ? "issue" : "issues"}` : resolvedAssetCount > 1 ? `${resolvedAssetCount} sources` : workbookData ? "Workbook review" : "Content review";
27120
27142
  const hasContent = (isComplete || isIncomplete) && (resultText || workbookData);
@@ -27154,6 +27176,24 @@ const ReadAssetToolUIImpl = ({
27154
27176
  /* @__PURE__ */ jsx("div", { className: "h-1.5 w-8 animate-pulse rounded-full bg-blue-100" })
27155
27177
  ] })
27156
27178
  ] }),
27179
+ sourceList.length > 1 && /* @__PURE__ */ jsxs("ul", { className: "border-t px-4 py-2", children: [
27180
+ sourceList.slice(0, 8).map((source) => /* @__PURE__ */ jsxs(
27181
+ "li",
27182
+ {
27183
+ className: "flex items-center gap-2 py-0.5 text-[12px] text-muted-foreground",
27184
+ children: [
27185
+ source.failed ? /* @__PURE__ */ jsx(CircleAlert, { className: "size-3.5 shrink-0 text-red-400" }) : /* @__PURE__ */ jsx(CircleCheck, { className: "size-3.5 shrink-0 text-emerald-500" }),
27186
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: source.label })
27187
+ ]
27188
+ },
27189
+ source.key
27190
+ )),
27191
+ sourceList.length > 8 && /* @__PURE__ */ jsxs("li", { className: "py-0.5 text-[11px] text-muted-foreground/70", children: [
27192
+ "and ",
27193
+ sourceList.length - 8,
27194
+ " more"
27195
+ ] })
27196
+ ] }),
27157
27197
  hasError && errorMessage && /* @__PURE__ */ jsx("div", { className: "border-t bg-red-50/50 px-4 py-2.5", children: /* @__PURE__ */ jsx("p", { className: "text-[12px] leading-relaxed text-red-600", children: errorMessage }) }),
27158
27198
  hasContent && !hasError && /* @__PURE__ */ jsxs("div", { className: "border-t", children: [
27159
27199
  /* @__PURE__ */ jsxs(
@@ -27187,6 +27227,176 @@ const ReadAssetToolUI = memo(
27187
27227
  ReadAssetToolUIImpl
27188
27228
  );
27189
27229
  ReadAssetToolUI.displayName = "ReadAssetToolUI";
27230
+ function friendlyWorkspacePath(value) {
27231
+ if (typeof value !== "string" || value.trim() === "") return void 0;
27232
+ const path = value.trim();
27233
+ if (path.includes("large_tool_results")) {
27234
+ return "detailed results from an earlier step";
27235
+ }
27236
+ if (path.includes("/memory/")) return "session memory";
27237
+ if (path.includes("/skills/")) return "a skill reference";
27238
+ const base2 = path.split("/").filter(Boolean).pop();
27239
+ return base2 ?? path;
27240
+ }
27241
+ function rawDetails(result) {
27242
+ if (result === null || result === void 0) return null;
27243
+ if (typeof result === "string") {
27244
+ return result.trim() !== "" ? result : null;
27245
+ }
27246
+ if (typeof result === "object") {
27247
+ const inner = result.result;
27248
+ if (typeof inner === "string") {
27249
+ return inner.trim() !== "" ? inner : null;
27250
+ }
27251
+ }
27252
+ const data = normalizeResult(result);
27253
+ if (data === null) return null;
27254
+ const text2 = JSON.stringify(data, null, 2);
27255
+ return text2.trim() !== "" ? text2 : null;
27256
+ }
27257
+ function makeQuietFileToolUI(spec) {
27258
+ const Impl = ({ args, result, status }) => {
27259
+ const typedArgs = args;
27260
+ let subtitle;
27261
+ for (const key of spec.subtitleArgs) {
27262
+ subtitle = friendlyWorkspacePath(typedArgs == null ? void 0 : typedArgs[key]);
27263
+ if (subtitle) break;
27264
+ }
27265
+ const isRunning = (status == null ? void 0 : status.type) === "running";
27266
+ const isFailed = (status == null ? void 0 : status.type) === "incomplete";
27267
+ const errorMsg = isFailed ? String(status.error ?? "") : null;
27268
+ const details = (status == null ? void 0 : status.type) === "complete" ? rawDetails(result) : null;
27269
+ return /* @__PURE__ */ jsx(
27270
+ ToolCard,
27271
+ {
27272
+ icon: spec.icon,
27273
+ status: (status == null ? void 0 : status.type) ?? "complete",
27274
+ title: isRunning ? spec.runningTitle : isFailed ? spec.failedTitle : spec.doneTitle,
27275
+ subtitle: subtitle ? truncate(subtitle, 70) : void 0,
27276
+ error: errorMsg || void 0,
27277
+ children: details && /* @__PURE__ */ jsx(ExpandableSection, { label: spec.detailsLabel, children: /* @__PURE__ */ jsx("pre", { className: "max-h-64 overflow-auto whitespace-pre-wrap break-all text-[11px] leading-snug text-muted-foreground", children: truncate(details, 6e3) }) })
27278
+ }
27279
+ );
27280
+ };
27281
+ const Quiet = memo(Impl);
27282
+ Quiet.displayName = `QuietFileToolUI(${spec.doneTitle})`;
27283
+ return Quiet;
27284
+ }
27285
+ const ReadFileToolUI = makeQuietFileToolUI({
27286
+ icon: ScanSearch,
27287
+ runningTitle: "Reviewing working files…",
27288
+ doneTitle: "Reviewed working files",
27289
+ failedTitle: "Couldn't review working files",
27290
+ subtitleArgs: ["file_path", "path"],
27291
+ detailsLabel: "Show details"
27292
+ });
27293
+ const ListFilesToolUI = makeQuietFileToolUI({
27294
+ icon: FolderOpen,
27295
+ runningTitle: "Checking the workspace…",
27296
+ doneTitle: "Checked the workspace",
27297
+ failedTitle: "Couldn't check the workspace",
27298
+ subtitleArgs: ["path"],
27299
+ detailsLabel: "Show files"
27300
+ });
27301
+ const WriteFileToolUI = makeQuietFileToolUI({
27302
+ icon: FileText,
27303
+ runningTitle: "Saving working files…",
27304
+ doneTitle: "Saved working files",
27305
+ failedTitle: "Couldn't save working files",
27306
+ subtitleArgs: ["file_path", "path"],
27307
+ detailsLabel: "Show details"
27308
+ });
27309
+ const EditFileToolUI = makeQuietFileToolUI({
27310
+ icon: PenLine,
27311
+ runningTitle: "Updating working files…",
27312
+ doneTitle: "Updated working files",
27313
+ failedTitle: "Couldn't update working files",
27314
+ subtitleArgs: ["file_path", "path"],
27315
+ detailsLabel: "Show details"
27316
+ });
27317
+ const SearchFilesToolUI = makeQuietFileToolUI({
27318
+ icon: Search,
27319
+ runningTitle: "Searching working files…",
27320
+ doneTitle: "Searched working files",
27321
+ failedTitle: "Couldn't search working files",
27322
+ subtitleArgs: ["pattern", "query", "path"],
27323
+ detailsLabel: "Show matches"
27324
+ });
27325
+ const DEFAULT_SCOPE = "default";
27326
+ let nextSeq = 1;
27327
+ const scopes = /* @__PURE__ */ new Map();
27328
+ const listeners = /* @__PURE__ */ new Set();
27329
+ let version = 0;
27330
+ function emit() {
27331
+ version++;
27332
+ for (const listener of listeners) listener();
27333
+ }
27334
+ function scopeEntries(scope) {
27335
+ let entries = scopes.get(scope);
27336
+ if (!entries) {
27337
+ entries = /* @__PURE__ */ new Map();
27338
+ scopes.set(scope, entries);
27339
+ }
27340
+ return entries;
27341
+ }
27342
+ function allocatePlanSeq() {
27343
+ return nextSeq++;
27344
+ }
27345
+ function registerPlanCard(scope, seq, plan, isWriting) {
27346
+ scopeEntries(scope).set(seq, { seq, plan, isWriting });
27347
+ emit();
27348
+ }
27349
+ function updatePlanCard(scope, seq, plan, isWriting) {
27350
+ var _a3;
27351
+ const entry = (_a3 = scopes.get(scope)) == null ? void 0 : _a3.get(seq);
27352
+ if (!entry) return;
27353
+ entry.plan = plan;
27354
+ entry.isWriting = isWriting;
27355
+ emit();
27356
+ }
27357
+ function unregisterPlanCard(scope, seq) {
27358
+ const entries = scopes.get(scope);
27359
+ if (!entries) return;
27360
+ if (entries.delete(seq)) {
27361
+ if (entries.size === 0) scopes.delete(scope);
27362
+ emit();
27363
+ }
27364
+ }
27365
+ function latestPlanSeq(scope) {
27366
+ const entries = scopes.get(scope);
27367
+ if (!entries) return null;
27368
+ let latest = null;
27369
+ for (const seq of entries.keys()) {
27370
+ if (latest === null || seq > latest) latest = seq;
27371
+ }
27372
+ return latest;
27373
+ }
27374
+ function latestPlanEntry(scope) {
27375
+ var _a3;
27376
+ const seq = latestPlanSeq(scope);
27377
+ return seq === null ? null : ((_a3 = scopes.get(scope)) == null ? void 0 : _a3.get(seq)) ?? null;
27378
+ }
27379
+ function subscribe(listener) {
27380
+ listeners.add(listener);
27381
+ return () => {
27382
+ listeners.delete(listener);
27383
+ };
27384
+ }
27385
+ const getVersion = () => version;
27386
+ function usePlanScope() {
27387
+ return useContext(AthenaThreadIdContext) ?? DEFAULT_SCOPE;
27388
+ }
27389
+ function useIsLatestPlanCard(scope, seq) {
27390
+ useSyncExternalStore(subscribe, getVersion, getVersion);
27391
+ const latest = latestPlanSeq(scope);
27392
+ return latest === null || latest === seq;
27393
+ }
27394
+ function useLatestTodoPlan() {
27395
+ const scope = usePlanScope();
27396
+ useSyncExternalStore(subscribe, getVersion, getVersion);
27397
+ const entry = latestPlanEntry(scope);
27398
+ return entry ? { plan: entry.plan, isWriting: entry.isWriting } : null;
27399
+ }
27190
27400
  const STEP_STATUSES = [
27191
27401
  "pending",
27192
27402
  "in_progress",
@@ -27300,17 +27510,50 @@ function PlanBadge({
27300
27510
  }
27301
27511
  );
27302
27512
  }
27513
+ function usePlanCardRegistration(plan, isWriting) {
27514
+ const scope = usePlanScope();
27515
+ const [seq] = useState(allocatePlanSeq);
27516
+ useEffect(() => {
27517
+ registerPlanCard(scope, seq, plan, isWriting);
27518
+ return () => unregisterPlanCard(scope, seq);
27519
+ }, [scope, seq]);
27520
+ useEffect(() => {
27521
+ updatePlanCard(scope, seq, plan, isWriting);
27522
+ }, [scope, seq, plan, isWriting]);
27523
+ return useIsLatestPlanCard(scope, seq);
27524
+ }
27525
+ const HiddenWriteTodosToolUIImpl = ({
27526
+ args,
27527
+ argsText,
27528
+ result,
27529
+ status
27530
+ }) => {
27531
+ const plan = useMemo(
27532
+ () => parseTodoPlan({ args, argsText, result }),
27533
+ [args, argsText, result]
27534
+ );
27535
+ usePlanCardRegistration(plan, (status == null ? void 0 : status.type) === "running");
27536
+ return null;
27537
+ };
27538
+ const HiddenWriteTodosToolUI = memo(
27539
+ HiddenWriteTodosToolUIImpl
27540
+ );
27541
+ HiddenWriteTodosToolUI.displayName = "HiddenWriteTodosToolUI";
27303
27542
  const WriteTodosToolUIImpl = ({
27304
27543
  args,
27305
27544
  argsText,
27306
27545
  result,
27307
27546
  status
27308
27547
  }) => {
27309
- const { steps, changeDescription } = useMemo(
27548
+ const plan = useMemo(
27310
27549
  () => parseTodoPlan({ args, argsText, result }),
27311
27550
  [args, argsText, result]
27312
27551
  );
27552
+ const { steps, changeDescription } = plan;
27313
27553
  const [collapsed, setCollapsed] = useState(false);
27554
+ const isWriting = (status == null ? void 0 : status.type) === "running";
27555
+ const isLatest = usePlanCardRegistration(plan, isWriting);
27556
+ if (!isLatest) return null;
27314
27557
  const completed = steps.filter((s) => s.status === "completed").length;
27315
27558
  const stopped = steps.filter(
27316
27559
  (s) => s.status === "cancelled" || s.status === "failed"
@@ -27318,7 +27561,6 @@ const WriteTodosToolUIImpl = ({
27318
27561
  const current = steps.find((s) => s.status === "in_progress");
27319
27562
  const total = steps.length;
27320
27563
  const resolved = completed + stopped;
27321
- const isWriting = (status == null ? void 0 : status.type) === "running";
27322
27564
  const isDone = total > 0 && resolved === total;
27323
27565
  if (total === 0) {
27324
27566
  return isWriting ? /* @__PURE__ */ jsxs("div", { className: "my-3 flex w-full items-center gap-2 rounded-xl border border-border/60 bg-background px-4 py-3 shadow-sm", children: [
@@ -30531,7 +30773,15 @@ const TOOL_UI_REGISTRY = {
30531
30773
  run_sql: RunSqlToolUI,
30532
30774
  run_database_sql: RunSqlToolUI,
30533
30775
  run_sql_query_tool: RunSqlToolUI,
30534
- write_todos: WriteTodosToolUI
30776
+ write_todos: WriteTodosToolUI,
30777
+ // Deep-agent workspace-file tools — quiet plain-English cards; the generic
30778
+ // fallback dumped raw scratch-space JSON (see file-tool-uis.tsx).
30779
+ read_file: ReadFileToolUI,
30780
+ ls: ListFilesToolUI,
30781
+ write_file: WriteFileToolUI,
30782
+ edit_file: EditFileToolUI,
30783
+ glob: SearchFilesToolUI,
30784
+ grep: SearchFilesToolUI
30535
30785
  };
30536
30786
  const TOOLKIT_THEMES = {
30537
30787
  Web: { color: "#7BCCFA" },
@@ -33444,18 +33694,23 @@ export {
33444
33694
  DEFAULT_STATEWIRE_MODEL,
33445
33695
  bt as DEFAULT_STATEWIRE_SYNC_URL,
33446
33696
  DescribeDatabaseToolUI,
33697
+ EditFileToolUI,
33447
33698
  EmailSearchToolUI,
33448
33699
  ExpandableSection,
33449
33700
  FileUploadButton,
33450
33701
  GetDatabaseTableSchemaToolUI,
33702
+ HiddenWriteTodosToolUI,
33451
33703
  ListDatabaseTablesToolUI,
33704
+ ListFilesToolUI,
33452
33705
  NestedPtcMessages,
33453
33706
  OpenAssetToolUI,
33454
33707
  OpenBrowserToolUI,
33455
33708
  PTC_SUBCALL_DID_NOT_COMPLETE_MESSAGE,
33456
33709
  ReadAssetToolUI,
33710
+ ReadFileToolUI,
33457
33711
  RunPythonCodeToolUI,
33458
33712
  RunSqlToolUI,
33713
+ SearchFilesToolUI,
33459
33714
  StatewireApprovalCard,
33460
33715
  StatewireClientToolBridge,
33461
33716
  StatewireConnectionBanner,
@@ -33482,6 +33737,7 @@ export {
33482
33737
  TooltipTrigger,
33483
33738
  UpdateSheetRangeToolUI,
33484
33739
  WebSearchToolUI,
33740
+ WriteFileToolUI,
33485
33741
  WriteTodosToolUI,
33486
33742
  allowsMidRunSend,
33487
33743
  archiveThread,
@@ -33507,6 +33763,7 @@ export {
33507
33763
  deriveAthenaAppUrl,
33508
33764
  bA as deriveStatewireSyncUrl,
33509
33765
  formatToolName,
33766
+ friendlyWorkspacePath,
33510
33767
  getAssetInfo,
33511
33768
  bB as getPostHogInstance,
33512
33769
  bC as getPosthogCaptureGate,
@@ -33550,6 +33807,7 @@ export {
33550
33807
  useAthenaThreadManager,
33551
33808
  useComposerAttachment,
33552
33809
  useFileUpload,
33810
+ useLatestTodoPlan,
33553
33811
  useMentionSuggestions,
33554
33812
  useParentAuth,
33555
33813
  useParentBridge,