@tutti-os/agent-gui 0.0.110 → 0.0.112

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 (55) hide show
  1. package/dist/{AgentGUI-BSr3cWcJ.d.ts → AgentGUI-BP3qpvtu.d.ts} +6 -3
  2. package/dist/{AgentRichTextReadonly-42TUVYX5.js → AgentRichTextReadonly-2XWSOTX4.js} +5 -5
  3. package/dist/agent-conversation/index.d.ts +1 -1
  4. package/dist/agent-conversation/index.js +7 -7
  5. package/dist/agent-gui.d.ts +3 -3
  6. package/dist/agent-gui.js +14 -14
  7. package/dist/agent-message-center/index.js +6 -6
  8. package/dist/{agentFileMentionContracts-B70VnPWO.d.ts → agentFileMentionContracts-DY4Z70CN.d.ts} +1 -0
  9. package/dist/{agentGuiNodeTypes-CR_l4HhU.d.ts → agentGuiNodeTypes-diw3oP7y.d.ts} +2 -0
  10. package/dist/{chunk-A5UXTAYJ.js → chunk-3IYKN4ZT.js} +22 -11
  11. package/dist/chunk-3IYKN4ZT.js.map +1 -0
  12. package/dist/{chunk-J7KJ4MX4.js → chunk-44HFASN6.js} +3 -3
  13. package/dist/{chunk-K7WFXVSD.js → chunk-5L5LHAJ3.js} +92 -24
  14. package/dist/chunk-5L5LHAJ3.js.map +1 -0
  15. package/dist/{chunk-YRMT6UYB.js → chunk-7H4T7OZ4.js} +47 -17
  16. package/dist/chunk-7H4T7OZ4.js.map +1 -0
  17. package/dist/{chunk-AIZJHA4Q.js → chunk-C6DI6AJZ.js} +4 -4
  18. package/dist/{chunk-7BN2WQ2M.js → chunk-CZIOYBMC.js} +5 -3
  19. package/dist/chunk-CZIOYBMC.js.map +1 -0
  20. package/dist/{chunk-JBX3JPTC.js → chunk-FAJIWGIT.js} +2 -2
  21. package/dist/{chunk-25BPR75P.js → chunk-FGWORVFI.js} +2 -2
  22. package/dist/{chunk-E74BMFHI.js → chunk-JGPI7CC6.js} +2 -2
  23. package/dist/chunk-JGPI7CC6.js.map +1 -0
  24. package/dist/{chunk-BM3CSFWU.js → chunk-P6SRATRQ.js} +2 -2
  25. package/dist/{chunk-U4CVBCHD.js → chunk-RMTPZVKO.js} +3 -3
  26. package/dist/{chunk-2QHKXI5N.js → chunk-UKCQMTN3.js} +2 -2
  27. package/dist/{chunk-OEYXSD3O.js → chunk-VMZJPA5L.js} +2 -2
  28. package/dist/{chunk-BRLKORQI.js → chunk-VVDJHPV4.js} +5 -5
  29. package/dist/context-mention-palette/index.d.ts +1 -1
  30. package/dist/context-mention-palette/index.js +7 -7
  31. package/dist/i18n/index.d.ts +4 -2
  32. package/dist/i18n/index.js +2 -2
  33. package/dist/index.d.ts +5 -5
  34. package/dist/index.js +14 -14
  35. package/dist/mention-search.d.ts +15 -2
  36. package/dist/mention-search.js +5 -5
  37. package/dist/workbench/contribution.js +3 -3
  38. package/dist/workbench/index.js +3 -3
  39. package/dist/workbench/sessionTitle.js +2 -2
  40. package/package.json +12 -12
  41. package/dist/chunk-7BN2WQ2M.js.map +0 -1
  42. package/dist/chunk-A5UXTAYJ.js.map +0 -1
  43. package/dist/chunk-E74BMFHI.js.map +0 -1
  44. package/dist/chunk-K7WFXVSD.js.map +0 -1
  45. package/dist/chunk-YRMT6UYB.js.map +0 -1
  46. /package/dist/{AgentRichTextReadonly-42TUVYX5.js.map → AgentRichTextReadonly-2XWSOTX4.js.map} +0 -0
  47. /package/dist/{chunk-J7KJ4MX4.js.map → chunk-44HFASN6.js.map} +0 -0
  48. /package/dist/{chunk-AIZJHA4Q.js.map → chunk-C6DI6AJZ.js.map} +0 -0
  49. /package/dist/{chunk-JBX3JPTC.js.map → chunk-FAJIWGIT.js.map} +0 -0
  50. /package/dist/{chunk-25BPR75P.js.map → chunk-FGWORVFI.js.map} +0 -0
  51. /package/dist/{chunk-BM3CSFWU.js.map → chunk-P6SRATRQ.js.map} +0 -0
  52. /package/dist/{chunk-U4CVBCHD.js.map → chunk-RMTPZVKO.js.map} +0 -0
  53. /package/dist/{chunk-2QHKXI5N.js.map → chunk-UKCQMTN3.js.map} +0 -0
  54. /package/dist/{chunk-OEYXSD3O.js.map → chunk-VMZJPA5L.js.map} +0 -0
  55. /package/dist/{chunk-BRLKORQI.js.map → chunk-VVDJHPV4.js.map} +0 -0
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-XJ34OIEQ.js";
8
8
  import {
9
9
  normalizeAgentSessionMentionTitle
10
- } from "./chunk-OEYXSD3O.js";
10
+ } from "./chunk-VMZJPA5L.js";
11
11
  import {
12
12
  resolveAgentMentionFileThumbnailUrl
13
13
  } from "./chunk-LUGELG5V.js";
@@ -20,14 +20,14 @@ import {
20
20
  import {
21
21
  getOptionalAgentHostApi,
22
22
  workspaceAgentProviderLabel
23
- } from "./chunk-E74BMFHI.js";
23
+ } from "./chunk-JGPI7CC6.js";
24
24
  import {
25
25
  normalizeAgentTitleText
26
26
  } from "./chunk-MIJXEELH.js";
27
27
  import {
28
28
  translate,
29
29
  translateInUiLanguage
30
- } from "./chunk-25BPR75P.js";
30
+ } from "./chunk-FGWORVFI.js";
31
31
 
32
32
  // agent-gui/agentGuiNode/AgentMentionLabels.ts
33
33
  function agentMentionGroupLabel(groupId) {
@@ -727,25 +727,27 @@ function buildAgentProvenanceGroups(input) {
727
727
  const catalogAgentTargetIds = new Set(
728
728
  input.provenanceCatalog.agentOptions.map((option) => option.id)
729
729
  );
730
- const catalogGroups = input.provenanceCatalog.agentOptions.flatMap(
731
- (option) => {
732
- const items = sourceItems.filter(
733
- (item) => agentTargetIdForMentionItem(item) === option.id
734
- );
735
- if (items.length === 0) {
736
- return [];
737
- }
738
- return [
739
- buildAgentProvenanceGroup({
740
- currentFilter: input.currentFilter,
741
- expandedCounts: input.expandedCounts,
742
- id: agentProvenanceMentionGroupId(option.id),
743
- label: option.label,
744
- items
745
- })
746
- ];
730
+ const catalogGroups = agentProvenanceGroupSpecs(
731
+ input.currentFilter,
732
+ input.provenanceCatalog
733
+ ).flatMap((group) => {
734
+ const items = sourceItems.filter((item) => {
735
+ const agentTargetId = agentTargetIdForMentionItem(item);
736
+ return agentTargetId !== null && group.agentTargetIds.has(agentTargetId);
737
+ });
738
+ if (items.length === 0) {
739
+ return [];
747
740
  }
748
- );
741
+ return [
742
+ buildAgentProvenanceGroup({
743
+ currentFilter: input.currentFilter,
744
+ expandedCounts: input.expandedCounts,
745
+ id: group.id,
746
+ label: group.label,
747
+ items
748
+ })
749
+ ];
750
+ });
749
751
  if (selectedAgentTargetIdSet !== null) {
750
752
  return catalogGroups;
751
753
  }
@@ -779,6 +781,44 @@ function buildAgentProvenanceGroups(input) {
779
781
  )
780
782
  ];
781
783
  }
784
+ function agentProvenanceGroupSpecs(currentFilter, catalog) {
785
+ if (currentFilter === "session") {
786
+ return catalog.agentOptions.map((option) => ({
787
+ id: agentProvenanceMentionGroupId(option.id),
788
+ label: option.label,
789
+ agentTargetIds: /* @__PURE__ */ new Set([option.id])
790
+ }));
791
+ }
792
+ const groupedAgentTargetIds = /* @__PURE__ */ new Set();
793
+ const memberGroups = catalog.memberOptions.flatMap((member) => {
794
+ const agentTargetIds = catalog.agentOptions.flatMap(
795
+ (option) => option.parentMemberId?.trim() === member.id ? [option.id] : []
796
+ );
797
+ if (agentTargetIds.length === 0) {
798
+ return [];
799
+ }
800
+ agentTargetIds.forEach(
801
+ (agentTargetId) => groupedAgentTargetIds.add(agentTargetId)
802
+ );
803
+ return [
804
+ {
805
+ id: memberProvenanceMentionGroupId(member.id),
806
+ label: member.label,
807
+ agentTargetIds: new Set(agentTargetIds)
808
+ }
809
+ ];
810
+ });
811
+ const unownedAgentGroups = catalog.agentOptions.flatMap(
812
+ (option) => groupedAgentTargetIds.has(option.id) ? [] : [
813
+ {
814
+ id: agentProvenanceMentionGroupId(option.id),
815
+ label: option.label,
816
+ agentTargetIds: /* @__PURE__ */ new Set([option.id])
817
+ }
818
+ ]
819
+ );
820
+ return [...memberGroups, ...unownedAgentGroups];
821
+ }
782
822
  function agentProvenanceItemsForFilter(input) {
783
823
  if (input.currentFilter === "session") {
784
824
  return input.rawGroups.sessions.filter((item) => item.kind === "session");
@@ -824,6 +864,9 @@ function buildAgentProvenanceGroup(input) {
824
864
  function agentProvenanceMentionGroupId(agentTargetId) {
825
865
  return `agent:${encodeURIComponent(agentTargetId)}`;
826
866
  }
867
+ function memberProvenanceMentionGroupId(memberId) {
868
+ return `member:${encodeURIComponent(memberId)}`;
869
+ }
827
870
  function emptyAgentMentionRawGroups() {
828
871
  return {
829
872
  apps: [],
@@ -1009,7 +1052,8 @@ function providerItemToAgentMentionItem(input) {
1009
1052
  name: label,
1010
1053
  description: compactText4(presentation.description) || compactText4(presentation.subtitle) || compactText4(input.subtitle) || void 0,
1011
1054
  agentProviderId,
1012
- iconUrl: presentation.iconUrl?.trim() || void 0
1055
+ iconUrl: presentation.iconUrl?.trim() || void 0,
1056
+ availabilityStatus: presentation.status?.trim() || void 0
1013
1057
  };
1014
1058
  }
1015
1059
  if (input.providerId === AGENT_SESSION_PROVIDER_ID) {
@@ -1269,6 +1313,7 @@ function buildAgentMentionBrowseCacheKey(input) {
1269
1313
  workspaceId: input.workspaceId,
1270
1314
  currentUserId: input.currentUserId,
1271
1315
  sessionCwd: input.sessionCwd,
1316
+ sectionKey: input.sectionKey,
1272
1317
  filter: input.filter,
1273
1318
  fileLimit: input.fileLimit,
1274
1319
  issueLimit: input.issueLimit,
@@ -1484,6 +1529,7 @@ async function fetchAgentMentionFilterResult(input) {
1484
1529
  query: input.query,
1485
1530
  limit: input.fileLimit,
1486
1531
  sessionCwd: input.sessionCwd,
1532
+ sectionKey: input.sectionKey,
1487
1533
  diagnostics: providerDiagnostics,
1488
1534
  provenanceFilter: input.provenanceFilter
1489
1535
  }) : Promise.resolve([]);
@@ -1603,6 +1649,7 @@ async function queryAgentMentionProviderItems(input) {
1603
1649
  context: {
1604
1650
  metadata: {
1605
1651
  currentUserId: input.currentUserId,
1652
+ sectionKey: input.sectionKey || void 0,
1606
1653
  sessionCwd: input.sessionCwd || void 0,
1607
1654
  target: "agent-gui",
1608
1655
  workspaceId: input.workspaceId,
@@ -1630,6 +1677,7 @@ async function queryAgentMentionProviderGroups(input) {
1630
1677
  context: {
1631
1678
  metadata: {
1632
1679
  currentUserId: input.currentUserId,
1680
+ sectionKey: input.sectionKey || void 0,
1633
1681
  sessionCwd: input.sessionCwd || void 0,
1634
1682
  target: "agent-gui",
1635
1683
  workspaceId: input.workspaceId,
@@ -1675,6 +1723,7 @@ async function queryAgentMentionProviderGroupPage(input) {
1675
1723
  context: {
1676
1724
  metadata: {
1677
1725
  currentUserId: input.currentUserId,
1726
+ sectionKey: input.sectionKey || void 0,
1678
1727
  sessionCwd: input.sessionCwd || void 0,
1679
1728
  target: "agent-gui",
1680
1729
  workspaceId: input.workspaceId,
@@ -1791,6 +1840,7 @@ var AgentMentionSearchControllerBase = class {
1791
1840
  currentFilter = DEFAULT_AGENT_MENTION_FILTER;
1792
1841
  currentQuery = "";
1793
1842
  currentSessionCwd = "";
1843
+ currentSectionKey = "";
1794
1844
  currentProvenanceFilter = null;
1795
1845
  currentProvenanceCatalog = null;
1796
1846
  currentFileSearchLimit;
@@ -1836,6 +1886,7 @@ var AgentMentionSearchControllerBase = class {
1836
1886
  const cacheKey = this.browseCacheKey({
1837
1887
  currentUserId: this.currentUserId,
1838
1888
  filter,
1889
+ sectionKey: this.currentSectionKey,
1839
1890
  sessionCwd: this.currentSessionCwd,
1840
1891
  workspaceId: this.activeWorkspaceId
1841
1892
  });
@@ -1879,6 +1930,7 @@ var AgentMentionSearchControllerBase = class {
1879
1930
  currentUserId: this.currentUserId,
1880
1931
  requestId,
1881
1932
  filter,
1933
+ sectionKey: this.currentSectionKey,
1882
1934
  sessionCwd: this.currentSessionCwd,
1883
1935
  abortSignal
1884
1936
  });
@@ -1893,6 +1945,7 @@ var AgentMentionSearchControllerBase = class {
1893
1945
  currentUserId: input.currentUserId,
1894
1946
  query: input.query,
1895
1947
  filter: input.filter,
1948
+ sectionKey: input.sectionKey,
1896
1949
  sessionCwd: input.sessionCwd,
1897
1950
  includeAgentGeneratedFiles: false
1898
1951
  },
@@ -2102,6 +2155,7 @@ var AgentMentionSearchControllerBase = class {
2102
2155
  currentUserId: input.currentUserId,
2103
2156
  query: input.query,
2104
2157
  limit: input.limit,
2158
+ sectionKey: input.sectionKey ?? this.currentSectionKey,
2105
2159
  sessionCwd: input.sessionCwd ?? this.currentSessionCwd,
2106
2160
  abortSignal,
2107
2161
  provenanceFilter: input.provenanceFilter
@@ -2128,6 +2182,7 @@ var AgentMentionSearchControllerBase = class {
2128
2182
  currentUserId: input.currentUserId,
2129
2183
  query: input.query,
2130
2184
  limit: input.limit,
2185
+ sectionKey: input.sectionKey ?? this.currentSectionKey,
2131
2186
  sessionCwd: input.sessionCwd ?? this.currentSessionCwd,
2132
2187
  abortSignal,
2133
2188
  provenanceFilter: input.provenanceFilter
@@ -2317,6 +2372,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2317
2372
  workspaceId: this.activeWorkspaceId,
2318
2373
  currentUserId: this.currentUserId,
2319
2374
  query: this.currentQuery,
2375
+ sectionKey: this.currentSectionKey,
2320
2376
  sessionCwd: this.currentSessionCwd
2321
2377
  });
2322
2378
  }
@@ -2333,6 +2389,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2333
2389
  }
2334
2390
  this.activeWorkspaceId = input.workspaceId.trim();
2335
2391
  this.currentUserId = input.currentUserId?.trim() ?? "";
2392
+ this.currentSectionKey = input.sectionKey?.trim() ?? "";
2336
2393
  this.currentSessionCwd = input.sessionCwd?.trim() ?? "";
2337
2394
  this.currentQuery = normalizeQuery(input.query);
2338
2395
  this.clearTimer();
@@ -2377,6 +2434,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2377
2434
  requestId,
2378
2435
  filter: this.currentFilter,
2379
2436
  provenanceFilter: this.currentProvenanceFilter,
2437
+ sectionKey: this.currentSectionKey,
2380
2438
  sessionCwd: this.currentSessionCwd,
2381
2439
  abortSignal
2382
2440
  });
@@ -2428,6 +2486,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2428
2486
  requestId,
2429
2487
  filter,
2430
2488
  provenanceFilter: this.currentProvenanceFilter,
2489
+ sectionKey: this.currentSectionKey,
2431
2490
  sessionCwd: this.currentSessionCwd,
2432
2491
  abortSignal
2433
2492
  });
@@ -2442,10 +2501,11 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2442
2501
  }
2443
2502
  const filter = input.filter ?? DEFAULT_AGENT_MENTION_FILTER;
2444
2503
  const currentUserId = input.currentUserId?.trim() ?? "";
2504
+ const sectionKey = input.sectionKey?.trim() ?? "";
2445
2505
  const sessionCwd = input.sessionCwd?.trim() ?? "";
2446
2506
  const provenanceFilter = this.currentProvenanceFilter;
2447
2507
  const cacheKey = this.browseCacheKey(
2448
- { currentUserId, filter, sessionCwd, workspaceId },
2508
+ { currentUserId, filter, sectionKey, sessionCwd, workspaceId },
2449
2509
  provenanceFilter
2450
2510
  );
2451
2511
  if (this.readBrowseCache(cacheKey).isFresh) {
@@ -2467,6 +2527,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2467
2527
  currentUserId,
2468
2528
  filter,
2469
2529
  provenanceFilter,
2530
+ sectionKey,
2470
2531
  sessionCwd,
2471
2532
  workspaceId
2472
2533
  });
@@ -2478,6 +2539,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2478
2539
  currentUserId,
2479
2540
  filter,
2480
2541
  provenanceFilter,
2542
+ sectionKey,
2481
2543
  sessionCwd,
2482
2544
  workspaceId
2483
2545
  } = input;
@@ -2503,6 +2565,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2503
2565
  workspaceId,
2504
2566
  currentUserId,
2505
2567
  filter,
2568
+ sectionKey,
2506
2569
  sessionCwd
2507
2570
  },
2508
2571
  cacheKey,
@@ -2628,6 +2691,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2628
2691
  requestId,
2629
2692
  filter: this.currentFilter,
2630
2693
  provenanceFilter: this.currentProvenanceFilter,
2694
+ sectionKey: this.currentSectionKey,
2631
2695
  sessionCwd: this.currentSessionCwd,
2632
2696
  abortSignal
2633
2697
  });
@@ -2696,6 +2760,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2696
2760
  const requestId = this.requestId;
2697
2761
  const workspaceId = this.activeWorkspaceId;
2698
2762
  const currentUserId = this.currentUserId;
2763
+ const sectionKey = this.currentSectionKey;
2699
2764
  const sessionCwd = this.currentSessionCwd;
2700
2765
  const provenanceFilter = this.currentProvenanceFilter;
2701
2766
  const query = this.currentQuery;
@@ -2724,6 +2789,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2724
2789
  query,
2725
2790
  cursor,
2726
2791
  pageSize: DEFAULT_MENTION_GROUP_PAGE_SIZE,
2792
+ sectionKey,
2727
2793
  sessionCwd,
2728
2794
  abortSignal,
2729
2795
  provenanceFilter
@@ -2764,6 +2830,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
2764
2830
  workspaceId,
2765
2831
  currentUserId,
2766
2832
  filter,
2833
+ sectionKey,
2767
2834
  sessionCwd
2768
2835
  },
2769
2836
  provenanceFilter
@@ -2822,6 +2889,7 @@ function preloadAgentMentionBrowse(input) {
2822
2889
  controller.preloadBrowse({
2823
2890
  workspaceId: input.workspaceId,
2824
2891
  currentUserId: input.currentUserId,
2892
+ sectionKey: input.sectionKey,
2825
2893
  sessionCwd: input.sessionCwd,
2826
2894
  filter: input.filter
2827
2895
  });
@@ -2842,4 +2910,4 @@ export {
2842
2910
  AgentMentionSearchController,
2843
2911
  preloadAgentMentionBrowse
2844
2912
  };
2845
- //# sourceMappingURL=chunk-K7WFXVSD.js.map
2913
+ //# sourceMappingURL=chunk-5L5LHAJ3.js.map