@tutti-os/agent-gui 0.0.216 → 0.0.217

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 (70) hide show
  1. package/README.md +6 -0
  2. package/dist/{agentFileMentionContracts-BeBex-Sf.d.ts → AgentMentionSearchContracts-y1_u9cPi.d.ts} +73 -1
  3. package/dist/{AgentRichTextReadonly-IPPNAAWG.js → AgentRichTextReadonly-WZHUIARR.js} +7 -7
  4. package/dist/agent-conversation/index.js +9 -9
  5. package/dist/agent-gui.d.ts +16 -3
  6. package/dist/agent-gui.js +23 -22
  7. package/dist/agent-message-center/index.js +6 -6
  8. package/dist/app/renderer/agentactivity.css +93 -69
  9. package/dist/{chunk-VMPPZO5C.js → chunk-2QF3RBR4.js} +4 -4
  10. package/dist/{chunk-DTP2OMCE.js → chunk-44OCOBJS.js} +9 -11
  11. package/dist/chunk-44OCOBJS.js.map +1 -0
  12. package/dist/chunk-6GX57XB5.js +135 -0
  13. package/dist/chunk-6GX57XB5.js.map +1 -0
  14. package/dist/{chunk-EZRQMJTX.js → chunk-FS7EMOVD.js} +4 -4
  15. package/dist/{chunk-6A6OVD66.js → chunk-G2KRK7Z5.js} +44 -18
  16. package/dist/chunk-G2KRK7Z5.js.map +1 -0
  17. package/dist/{chunk-YY5WM3OE.js → chunk-GDLM6FLK.js} +90 -47
  18. package/dist/chunk-GDLM6FLK.js.map +1 -0
  19. package/dist/{chunk-UERICUWM.js → chunk-GLVENTN6.js} +2 -2
  20. package/dist/{chunk-B4TM2HYJ.js → chunk-JQOQETPN.js} +5 -5
  21. package/dist/{chunk-QFYOJMEQ.js → chunk-M6WEFXPL.js} +2 -2
  22. package/dist/{chunk-AOK22J62.js → chunk-N2M4B3G3.js} +2 -2
  23. package/dist/{chunk-DLN33TPF.js → chunk-NXQGAXIE.js} +8 -8
  24. package/dist/{chunk-MOCBHFJ2.js → chunk-O4QFGCLU.js} +42 -118
  25. package/dist/chunk-O4QFGCLU.js.map +1 -0
  26. package/dist/{chunk-Z5UJC4Q3.js → chunk-PPAV2TB4.js} +3 -3
  27. package/dist/{chunk-4CHBM3G3.js → chunk-SUVMLCED.js} +5 -5
  28. package/dist/{chunk-KJA3HHUJ.js → chunk-TKECUCUW.js} +529 -291
  29. package/dist/chunk-TKECUCUW.js.map +1 -0
  30. package/dist/{chunk-P2RIZAK5.js → chunk-ZXEICU6J.js} +3 -1
  31. package/dist/chunk-ZXEICU6J.js.map +1 -0
  32. package/dist/context-mention-palette/index.d.ts +3 -3
  33. package/dist/context-mention-palette/index.js +12 -12
  34. package/dist/headerLayout-CP4ujEbo.d.ts +14 -0
  35. package/dist/i18n/index.d.ts +2 -0
  36. package/dist/i18n/index.js +2 -2
  37. package/dist/index.d.ts +77 -46
  38. package/dist/index.js +46 -39
  39. package/dist/index.js.map +1 -1
  40. package/dist/layout.d.ts +7 -0
  41. package/dist/layout.js +9 -0
  42. package/dist/layout.js.map +1 -0
  43. package/dist/mention-search.d.ts +6 -73
  44. package/dist/mention-search.js +8 -8
  45. package/dist/workbench/browser-element-context/index.js +2 -2
  46. package/dist/workbench/contribution.js +7 -6
  47. package/dist/workbench/index.d.ts +3 -1
  48. package/dist/workbench/index.js +10 -9
  49. package/dist/workbench/launch.js +2 -2
  50. package/dist/workbench/sessionTitle.js +2 -2
  51. package/dist/workbench/tool-sidebar/index.d.ts +14 -13
  52. package/dist/workbench/tool-sidebar/index.js +66 -55
  53. package/dist/workbench/tool-sidebar/index.js.map +1 -1
  54. package/package.json +23 -16
  55. package/dist/chunk-6A6OVD66.js.map +0 -1
  56. package/dist/chunk-DTP2OMCE.js.map +0 -1
  57. package/dist/chunk-KJA3HHUJ.js.map +0 -1
  58. package/dist/chunk-MOCBHFJ2.js.map +0 -1
  59. package/dist/chunk-P2RIZAK5.js.map +0 -1
  60. package/dist/chunk-YY5WM3OE.js.map +0 -1
  61. /package/dist/{AgentRichTextReadonly-IPPNAAWG.js.map → AgentRichTextReadonly-WZHUIARR.js.map} +0 -0
  62. /package/dist/{chunk-VMPPZO5C.js.map → chunk-2QF3RBR4.js.map} +0 -0
  63. /package/dist/{chunk-EZRQMJTX.js.map → chunk-FS7EMOVD.js.map} +0 -0
  64. /package/dist/{chunk-UERICUWM.js.map → chunk-GLVENTN6.js.map} +0 -0
  65. /package/dist/{chunk-B4TM2HYJ.js.map → chunk-JQOQETPN.js.map} +0 -0
  66. /package/dist/{chunk-QFYOJMEQ.js.map → chunk-M6WEFXPL.js.map} +0 -0
  67. /package/dist/{chunk-AOK22J62.js.map → chunk-N2M4B3G3.js.map} +0 -0
  68. /package/dist/{chunk-DLN33TPF.js.map → chunk-NXQGAXIE.js.map} +0 -0
  69. /package/dist/{chunk-Z5UJC4Q3.js.map → chunk-PPAV2TB4.js.map} +0 -0
  70. /package/dist/{chunk-4CHBM3G3.js.map → chunk-SUVMLCED.js.map} +0 -0
@@ -2,7 +2,26 @@ import {
2
2
  AgentRichTextReadonly,
3
3
  promptForProviderSkills,
4
4
  skillTriggerForPrefix
5
- } from "./chunk-DLN33TPF.js";
5
+ } from "./chunk-NXQGAXIE.js";
6
+ import {
7
+ AgentGUIConversation_styles_default,
8
+ AgentMessageMarkdown,
9
+ CustomScrollArea,
10
+ MessageSquareMoreIcon,
11
+ ZoomableImage,
12
+ extractAgentMcpToolTarget,
13
+ extractExitPlanKeepPlanningOptionId,
14
+ extractExitPlanModeOptions,
15
+ isExitPlanSwitchModeInput,
16
+ normalizeAgentApprovalPurpose,
17
+ normalizeAskUserQuestions,
18
+ resolveWorkspaceFileLinkAction,
19
+ resolveWorkspaceFilePathCandidate,
20
+ resolveWorkspaceLinkAction
21
+ } from "./chunk-PPAV2TB4.js";
22
+ import {
23
+ cn
24
+ } from "./chunk-LQMIEH4C.js";
6
25
  import {
7
26
  classifyRecoverableAgentMessage,
8
27
  resolveAgentErrorPresentation,
@@ -18,7 +37,7 @@ import {
18
37
  agentPromptFileBlocks,
19
38
  agentPromptPastedTextBlocks,
20
39
  materializeAgentComposerFileMentions
21
- } from "./chunk-B4TM2HYJ.js";
40
+ } from "./chunk-JQOQETPN.js";
22
41
  import {
23
42
  extractImageGenerationPreview,
24
43
  isImageGenerationToolCall,
@@ -27,34 +46,11 @@ import {
27
46
  resolveImageGenerationPreviewSrc,
28
47
  stripImagePayloadData
29
48
  } from "./chunk-JDVP33S5.js";
30
- import {
31
- AGENT_PASTED_TEXT_BLOCK_KIND,
32
- AGENT_PASTED_TEXT_MENTION_KIND
33
- } from "./chunk-FGLQZ6I4.js";
34
- import {
35
- AgentGUIConversation_styles_default,
36
- AgentMessageMarkdown,
37
- CustomScrollArea,
38
- MessageSquareMoreIcon,
39
- ZoomableImage,
40
- extractAgentMcpToolTarget,
41
- extractExitPlanKeepPlanningOptionId,
42
- extractExitPlanModeOptions,
43
- isExitPlanSwitchModeInput,
44
- normalizeAgentApprovalPurpose,
45
- normalizeAskUserQuestions,
46
- resolveWorkspaceFileLinkAction,
47
- resolveWorkspaceFilePathCandidate,
48
- resolveWorkspaceLinkAction
49
- } from "./chunk-Z5UJC4Q3.js";
50
- import {
51
- cn
52
- } from "./chunk-LQMIEH4C.js";
53
49
  import {
54
50
  useOptionalAgentActivityRuntime,
55
51
  useOptionalAgentHostApi,
56
52
  workspaceAgentProviderLabel
57
- } from "./chunk-QFYOJMEQ.js";
53
+ } from "./chunk-M6WEFXPL.js";
58
54
  import {
59
55
  fileChangeCountFromChanges,
60
56
  fileChangeEntriesFromChanges,
@@ -64,10 +60,14 @@ import {
64
60
  getActiveUiLanguage,
65
61
  translate,
66
62
  useTranslation
67
- } from "./chunk-UERICUWM.js";
63
+ } from "./chunk-GLVENTN6.js";
68
64
  import {
69
65
  normalizeAgentTitleText
70
66
  } from "./chunk-MIJXEELH.js";
67
+ import {
68
+ AGENT_PASTED_TEXT_BLOCK_KIND,
69
+ AGENT_PASTED_TEXT_MENTION_KIND
70
+ } from "./chunk-FGLQZ6I4.js";
71
71
 
72
72
  // shared/workspaceAgentSystemNoticeSemantics.ts
73
73
  function resolveWorkspaceAgentNoticeCommandSemantics(input) {
@@ -5605,7 +5605,7 @@ import {
5605
5605
  memo as memo4,
5606
5606
  useCallback as useCallback15,
5607
5607
  useLayoutEffect as useLayoutEffect4,
5608
- useMemo as useMemo8,
5608
+ useMemo as useMemo9,
5609
5609
  useRef as useRef13,
5610
5610
  useState as useState25
5611
5611
  } from "react";
@@ -12406,7 +12406,8 @@ function AgentMessageBlock({
12406
12406
  workspaceAppIcons,
12407
12407
  showRawTimelineJson = false,
12408
12408
  rawTimelineJsonLabel = "",
12409
- participantPresentation
12409
+ participantPresentation,
12410
+ showParticipantHeader = true
12410
12411
  }) {
12411
12412
  "use memo";
12412
12413
  const agentHostApi = useOptionalAgentHostApi();
@@ -12572,7 +12573,7 @@ function AgentMessageBlock({
12572
12573
  return /* @__PURE__ */ jsx61(Fragment6, { children: content }, message.id);
12573
12574
  });
12574
12575
  const enabledParticipantPresentation = participantPresentation?.enabled === true ? participantPresentation : null;
12575
- const showParticipant = enabledParticipantPresentation !== null && row.messages.length > 0;
12576
+ const showParticipant = enabledParticipantPresentation !== null && showParticipantHeader && row.messages.length > 0;
12576
12577
  return /* @__PURE__ */ jsxs43(
12577
12578
  "div",
12578
12579
  {
@@ -13723,6 +13724,7 @@ var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
13723
13724
  workspaceAppIcons,
13724
13725
  showRawTimelineJson = false,
13725
13726
  participantPresentation,
13727
+ showParticipantHeader,
13726
13728
  toolGroupExpanded,
13727
13729
  toolGroupExpansionKey,
13728
13730
  onToolGroupExpandedChange
@@ -13770,7 +13772,8 @@ var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
13770
13772
  toolCallsLabel: labels.toolCallsLabel,
13771
13773
  showRawTimelineJson,
13772
13774
  rawTimelineJsonLabel: labels.rawTimelineJson,
13773
- participantPresentation
13775
+ participantPresentation,
13776
+ showParticipantHeader
13774
13777
  }
13775
13778
  );
13776
13779
  case "tool-group":
@@ -13844,6 +13847,34 @@ import { Button as Button2 } from "@tutti-os/ui-system/components";
13844
13847
  import { ChevronDownIcon } from "@tutti-os/ui-system/icons";
13845
13848
 
13846
13849
  // shared/agentConversation/components/agentTurnWorkSectionModel.ts
13850
+ function findParticipantHeaderRenderKeys(groups, rowKeys, modelByGroupKey) {
13851
+ const headerKeys = /* @__PURE__ */ new Set();
13852
+ for (const group of groups) {
13853
+ const model = modelByGroupKey.get(group.key);
13854
+ const renderedRows = model ? model.collapseEligible ? [
13855
+ ...model.leadingRows,
13856
+ ...model.sections.flatMap(
13857
+ (section) => section.kind === "visible" ? section.rows : []
13858
+ ),
13859
+ ...model.sections.flatMap(
13860
+ (section) => section.kind === "work" ? section.rows : []
13861
+ )
13862
+ ] : [
13863
+ ...model.leadingRows,
13864
+ ...model.sections.flatMap((section) => section.rows)
13865
+ ] : group.rows;
13866
+ const seenSpeakers = /* @__PURE__ */ new Set();
13867
+ for (const entry of renderedRows) {
13868
+ const row = entry.row;
13869
+ if (row.kind !== "message" || row.messages.length === 0 || seenSpeakers.has(row.speaker)) {
13870
+ continue;
13871
+ }
13872
+ seenSpeakers.add(row.speaker);
13873
+ headerKeys.add(entry.renderKey ?? rowKeys[entry.rowIndex] ?? row.id);
13874
+ }
13875
+ }
13876
+ return headerKeys;
13877
+ }
13847
13878
  function resolveAgentTurnTiming(turn, isActiveTurn, submittedAtUnixMs) {
13848
13879
  if (!turn || !Number.isFinite(turn.startedAtUnixMs)) {
13849
13880
  return null;
@@ -14387,7 +14418,7 @@ import {
14387
14418
  } from "react";
14388
14419
 
14389
14420
  // shared/agentConversation/components/agentTranscriptModel.ts
14390
- import { useLayoutEffect as useLayoutEffect2, useRef as useRef9 } from "react";
14421
+ import { useLayoutEffect as useLayoutEffect2, useMemo as useMemo7, useRef as useRef9 } from "react";
14391
14422
  function useEnteringTranscriptRows(rowKeys) {
14392
14423
  const previousKeysRef = useRef9(null);
14393
14424
  const previousKeys = previousKeysRef.current;
@@ -14567,6 +14598,12 @@ function attachLeadingToolRowsToFollowingMessages(rows) {
14567
14598
  result.push(...pendingToolRows);
14568
14599
  return result;
14569
14600
  }
14601
+ function useAgentTranscriptDisplayRows(rows, participantHeadersEnabled) {
14602
+ return useMemo7(() => {
14603
+ const displayRows = participantHeadersEnabled ? attachLeadingToolRowsToFollowingMessages(rows) : rows;
14604
+ return { rows: displayRows, rowKeys: displayRows.map(transcriptRowKey) };
14605
+ }, [rows, participantHeadersEnabled]);
14606
+ }
14570
14607
 
14571
14608
  // shared/agentConversation/components/AgentMessageLocatorRail.tsx
14572
14609
  import { jsx as jsx68, jsxs as jsxs47 } from "react/jsx-runtime";
@@ -15184,12 +15221,12 @@ function useTurnDisclosureMotion() {
15184
15221
  import {
15185
15222
  useCallback as useCallback14,
15186
15223
  useImperativeHandle as useImperativeHandle6,
15187
- useMemo as useMemo7,
15224
+ useMemo as useMemo8,
15188
15225
  useRef as useRef12
15189
15226
  } from "react";
15190
15227
  import { jsx as jsx69 } from "react/jsx-runtime";
15191
15228
  function useAgentTranscriptTurnAttachments(input) {
15192
- const projection = useMemo7(() => {
15229
+ const projection = useMemo8(() => {
15193
15230
  const lastGroupIndexByTurnId = /* @__PURE__ */ new Map();
15194
15231
  input.turnGroups.forEach((group, groupIndex) => {
15195
15232
  if (group.turnId) lastGroupIndexByTurnId.set(group.turnId, groupIndex);
@@ -15381,21 +15418,21 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
15381
15418
  const virtualizerHostRef = useRef13(null);
15382
15419
  const [virtualScrollElement, setVirtualScrollElement] = useState25(null);
15383
15420
  const participantHeadersEnabled = participantPresentation?.enabled === true;
15384
- const transcriptRowSet = useMemo8(() => {
15385
- const rows = participantHeadersEnabled ? attachLeadingToolRowsToFollowingMessages(conversation.rows) : conversation.rows;
15386
- return { rows, rowKeys: rows.map(transcriptRowKey) };
15387
- }, [conversation.rows, participantHeadersEnabled]);
15421
+ const transcriptRowSet = useAgentTranscriptDisplayRows(
15422
+ conversation.rows,
15423
+ participantHeadersEnabled
15424
+ );
15388
15425
  const displayRows = transcriptRowSet.rows;
15389
15426
  const rowKeys = transcriptRowSet.rowKeys;
15390
- const turnGroups = useMemo8(
15427
+ const turnGroups = useMemo9(
15391
15428
  () => buildAgentTranscriptTurnGroups(displayRows, rowKeys),
15392
15429
  [displayRows, rowKeys]
15393
15430
  );
15394
- const turnGroupIndexByRowIndex = useMemo8(
15431
+ const turnGroupIndexByRowIndex = useMemo9(
15395
15432
  () => buildTurnGroupIndexByRowIndex(turnGroups),
15396
15433
  [turnGroups]
15397
15434
  );
15398
- const userMessageLocatorItems = useMemo8(
15435
+ const userMessageLocatorItems = useMemo9(
15399
15436
  () => buildUserMessageLocatorItems(
15400
15437
  displayRows,
15401
15438
  rowKeys,
@@ -15418,13 +15455,13 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
15418
15455
  },
15419
15456
  []
15420
15457
  );
15421
- const turnIndexById = useMemo8(
15458
+ const turnIndexById = useMemo9(
15422
15459
  () => new Map(
15423
15460
  conversation.sourceDetail.turns.map((turn, index) => [turn.id, index])
15424
15461
  ),
15425
15462
  [conversation.sourceDetail.turns]
15426
15463
  );
15427
- const dividerRowIndexes = useMemo8(
15464
+ const dividerRowIndexes = useMemo9(
15428
15465
  () => participantHeadersEnabled ? findParticipantTurnDividerRowIndexes(displayRows) : findTurnDividerRowIndexes(turnIndexById, displayRows),
15429
15466
  [displayRows, turnIndexById, participantHeadersEnabled]
15430
15467
  );
@@ -15450,10 +15487,15 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
15450
15487
  ];
15451
15488
  })
15452
15489
  );
15490
+ const participantHeaderRenderKeys = participantHeadersEnabled ? findParticipantHeaderRenderKeys(
15491
+ turnGroups,
15492
+ rowKeys,
15493
+ turnWorkSectionModelByKey
15494
+ ) : null;
15453
15495
  const basePath = conversation.sourceDetail.cwd;
15454
15496
  const workspaceRoot = conversation.workspaceRoot;
15455
15497
  const provider = conversation.activity.agentProvider;
15456
- const shouldVirtualize = useMemo8(
15498
+ const shouldVirtualize = useMemo9(
15457
15499
  () => assessAgentTranscriptComplexity(turnGroups).shouldVirtualize,
15458
15500
  [turnGroups]
15459
15501
  );
@@ -15540,6 +15582,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
15540
15582
  workspaceAppIcons,
15541
15583
  showRawTimelineJson,
15542
15584
  participantPresentation,
15585
+ showParticipantHeader: participantHeaderRenderKeys?.has(rowKey) ?? false,
15543
15586
  toolGroupExpanded: row.kind === "tool-group" ? expandedToolRows[rowKey] === true : void 0,
15544
15587
  toolGroupExpansionKey: row.kind === "tool-group" ? rowKey : void 0,
15545
15588
  onToolGroupExpandedChange: handleToolGroupExpandedChange
@@ -15715,14 +15758,14 @@ var AgentConversationFlow = memo5(function AgentConversationFlow2({
15715
15758
  });
15716
15759
 
15717
15760
  // shared/agentConversation/projection/useProjectedAgentConversation.ts
15718
- import { useMemo as useMemo9, useRef as useRef14 } from "react";
15761
+ import { useMemo as useMemo10, useRef as useRef14 } from "react";
15719
15762
  function useProjectedAgentConversation({
15720
15763
  conversation,
15721
15764
  detail,
15722
15765
  avoidGroupingEdits = false
15723
15766
  }) {
15724
15767
  const previousConversationRef = useRef14(null);
15725
- return useMemo9(() => {
15768
+ return useMemo10(() => {
15726
15769
  if (!conversation && !detail) {
15727
15770
  previousConversationRef.current = null;
15728
15771
  return null;
@@ -15781,4 +15824,4 @@ export {
15781
15824
  AgentConversationFlow,
15782
15825
  useProjectedAgentConversation
15783
15826
  };
15784
- //# sourceMappingURL=chunk-YY5WM3OE.js.map
15827
+ //# sourceMappingURL=chunk-GDLM6FLK.js.map