@tutti-os/agent-gui 0.0.202 → 0.0.204

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 (31) hide show
  1. package/README.md +30 -0
  2. package/dist/agent-conversation/index.d.ts +21 -2
  3. package/dist/agent-conversation/index.js +6 -4
  4. package/dist/agent-conversation/index.js.map +1 -1
  5. package/dist/agent-gui.d.ts +2 -1
  6. package/dist/agent-gui.js +7 -7
  7. package/dist/agent-message-center/index.js +3 -3
  8. package/dist/app/renderer/agentactivity.css +32 -0
  9. package/dist/{chunk-F5ARZZES.js → chunk-4OJSSUEU.js} +2 -2
  10. package/dist/{chunk-MFQB4LR5.js → chunk-FHCARLIO.js} +3 -3
  11. package/dist/{chunk-UVJBQ6WD.js → chunk-GJZEMI6Z.js} +193 -108
  12. package/dist/chunk-GJZEMI6Z.js.map +1 -0
  13. package/dist/{chunk-3FA5JIDL.js → chunk-K5AOJ5DO.js} +1 -1
  14. package/dist/chunk-K5AOJ5DO.js.map +1 -0
  15. package/dist/{chunk-VZ4QAXXL.js → chunk-STOGLKFA.js} +41 -12
  16. package/dist/chunk-STOGLKFA.js.map +1 -0
  17. package/dist/{chunk-5ZO3H4C5.js → chunk-VDTG6M6K.js} +2 -2
  18. package/dist/{chunk-PWPVYNGO.js → chunk-ZTRTBLLP.js} +5 -2
  19. package/dist/{chunk-PWPVYNGO.js.map → chunk-ZTRTBLLP.js.map} +1 -1
  20. package/dist/context-mention-palette/index.js +3 -3
  21. package/dist/conversation-rail-runtime.d.ts +2 -1
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.js +7 -7
  24. package/dist/mention-search.js +2 -2
  25. package/package.json +14 -14
  26. package/dist/chunk-3FA5JIDL.js.map +0 -1
  27. package/dist/chunk-UVJBQ6WD.js.map +0 -1
  28. package/dist/chunk-VZ4QAXXL.js.map +0 -1
  29. /package/dist/{chunk-F5ARZZES.js.map → chunk-4OJSSUEU.js.map} +0 -0
  30. /package/dist/{chunk-MFQB4LR5.js.map → chunk-FHCARLIO.js.map} +0 -0
  31. /package/dist/{chunk-5ZO3H4C5.js.map → chunk-VDTG6M6K.js.map} +0 -0
@@ -47,7 +47,7 @@ import {
47
47
  resolveWorkspaceFileLinkAction,
48
48
  resolveWorkspaceFilePathCandidate,
49
49
  resolveWorkspaceLinkAction
50
- } from "./chunk-PWPVYNGO.js";
50
+ } from "./chunk-ZTRTBLLP.js";
51
51
  import {
52
52
  cn
53
53
  } from "./chunk-ZVYUTXQJ.js";
@@ -55,7 +55,7 @@ import {
55
55
  useOptionalAgentActivityRuntime,
56
56
  useOptionalAgentHostApi,
57
57
  workspaceAgentProviderLabel
58
- } from "./chunk-3FA5JIDL.js";
58
+ } from "./chunk-K5AOJ5DO.js";
59
59
  import {
60
60
  fileChangeCountFromChanges,
61
61
  fileChangeEntriesFromChanges,
@@ -5745,6 +5745,7 @@ import {
5745
5745
  useEffect as useEffect6,
5746
5746
  useState as useState10
5747
5747
  } from "react";
5748
+ import { Avatar } from "@tutti-os/ui-system";
5748
5749
  import { CheckIcon, CopyIcon } from "@tutti-os/ui-system/icons";
5749
5750
 
5750
5751
  // shared/errors/appError.ts
@@ -7612,7 +7613,8 @@ function AgentMessageBlock({
7612
7613
  workspaceAppIcons,
7613
7614
  previewMode = false,
7614
7615
  showRawTimelineJson = false,
7615
- rawTimelineJsonLabel = ""
7616
+ rawTimelineJsonLabel = "",
7617
+ participantPresentation
7616
7618
  }) {
7617
7619
  "use memo";
7618
7620
  const agentHostApi = useOptionalAgentHostApi();
@@ -7665,6 +7667,110 @@ function AgentMessageBlock({
7665
7667
  },
7666
7668
  thinking.id
7667
7669
  )) : null;
7670
+ const messageContent = row.messages.map((message) => {
7671
+ const rawTimelineJson2 = showRawTimelineJson && rawTimelineJsonLabel && (message.sourceTimelineItems?.length ?? 0) > 0 ? /* @__PURE__ */ jsx18(
7672
+ RawTimelineJsonDisclosure,
7673
+ {
7674
+ items: message.sourceTimelineItems,
7675
+ label: rawTimelineJsonLabel
7676
+ }
7677
+ ) : null;
7678
+ const recoveredError = !isUser && !message.visibleError ? recoverVisibleErrorFromMessage(message, provider) : null;
7679
+ const content = isUser && message.contentKind === "image-grid" ? /* @__PURE__ */ jsx18(AgentUserImageGrid, { message }) : isUser ? /* @__PURE__ */ jsx18(
7680
+ AgentRichTextReadonly,
7681
+ {
7682
+ value: message.body,
7683
+ className: `workspace-agents-status-panel__detail-user-message ${AgentGUIConversation_styles_default.userMessageBubble}`,
7684
+ editorClassName: "text-[inherit]",
7685
+ onLinkClick: handleLinkClick,
7686
+ availableSkills,
7687
+ workspaceAppIcons
7688
+ }
7689
+ ) : message.visibleError ? /* @__PURE__ */ jsx18(
7690
+ AgentVisibleErrorMessage,
7691
+ {
7692
+ message,
7693
+ onAuthLogin,
7694
+ onExternalLink: handleLinkClick
7695
+ }
7696
+ ) : recoveredError ? /* @__PURE__ */ jsx18(
7697
+ AgentVisibleErrorMessage,
7698
+ {
7699
+ message: recoveredError,
7700
+ onAuthLogin,
7701
+ onExternalLink: handleLinkClick
7702
+ }
7703
+ ) : message.systemNotice ? /* @__PURE__ */ jsx18(AgentSystemNoticeMessage, { message }) : message.contentKind === "collaboration" && message.collaboration ? /* @__PURE__ */ jsx18(
7704
+ AgentCollaborationRow,
7705
+ {
7706
+ collaboration: message.collaboration,
7707
+ workspaceRoot,
7708
+ basePath,
7709
+ onLinkAction,
7710
+ workspaceAppIcons,
7711
+ previewMode
7712
+ }
7713
+ ) : message.contentKind === "plan" ? /* @__PURE__ */ jsx18(
7714
+ AgentPlanCardMessage,
7715
+ {
7716
+ message,
7717
+ workspaceRoot,
7718
+ basePath,
7719
+ onLinkAction,
7720
+ workspaceAppIcons,
7721
+ previewMode
7722
+ }
7723
+ ) : /* @__PURE__ */ jsx18(
7724
+ AgentMessageMarkdown,
7725
+ {
7726
+ content: message.body,
7727
+ className: AgentGUIConversation_styles_default.assistantMarkdown,
7728
+ onLinkAction,
7729
+ workspaceLinkContext: {
7730
+ workspaceRoot,
7731
+ basePath,
7732
+ source: "agent-markdown"
7733
+ },
7734
+ workspaceAppIcons,
7735
+ enableImageZoom: true,
7736
+ previewMode,
7737
+ streaming: message.statusKind === "working"
7738
+ }
7739
+ );
7740
+ if (rawTimelineJson2) {
7741
+ return /* @__PURE__ */ jsxs10(
7742
+ AgentCopyableMessageGroup,
7743
+ {
7744
+ copyText: message.copyText ?? null,
7745
+ occurredAtUnixMs: message.occurredAtUnixMs,
7746
+ speaker: row.speaker,
7747
+ onCopyMessageText: handleCopyMessageText,
7748
+ children: [
7749
+ content,
7750
+ rawTimelineJson2
7751
+ ]
7752
+ },
7753
+ message.id
7754
+ );
7755
+ }
7756
+ const copyText = message.copyText ?? null;
7757
+ if (copyText) {
7758
+ return /* @__PURE__ */ jsx18(
7759
+ AgentCopyableMessageGroup,
7760
+ {
7761
+ copyText,
7762
+ occurredAtUnixMs: message.occurredAtUnixMs,
7763
+ speaker: row.speaker,
7764
+ onCopyMessageText: handleCopyMessageText,
7765
+ children: content
7766
+ },
7767
+ message.id
7768
+ );
7769
+ }
7770
+ return /* @__PURE__ */ jsx18(Fragment2, { children: content }, message.id);
7771
+ });
7772
+ const enabledParticipantPresentation = participantPresentation?.enabled === true ? participantPresentation : null;
7773
+ const showParticipant = enabledParticipantPresentation !== null && row.messages.length > 0;
7668
7774
  return /* @__PURE__ */ jsxs10(
7669
7775
  "div",
7670
7776
  {
@@ -7673,112 +7779,64 @@ function AgentMessageBlock({
7673
7779
  "data-agent-message-flow-thinking-last": !isUser && row.thinking.length > 0 && row.messages.length === 0 ? "true" : void 0,
7674
7780
  children: [
7675
7781
  thinkingContent,
7676
- row.messages.map((message) => {
7677
- const rawTimelineJson2 = showRawTimelineJson && rawTimelineJsonLabel && (message.sourceTimelineItems?.length ?? 0) > 0 ? /* @__PURE__ */ jsx18(
7678
- RawTimelineJsonDisclosure,
7679
- {
7680
- items: message.sourceTimelineItems,
7681
- label: rawTimelineJsonLabel
7682
- }
7683
- ) : null;
7684
- const recoveredError = !isUser && !message.visibleError ? recoverVisibleErrorFromMessage(message, provider) : null;
7685
- const content = isUser && message.contentKind === "image-grid" ? /* @__PURE__ */ jsx18(AgentUserImageGrid, { message }) : isUser ? /* @__PURE__ */ jsx18(
7686
- AgentRichTextReadonly,
7687
- {
7688
- value: message.body,
7689
- className: `workspace-agents-status-panel__detail-user-message ${AgentGUIConversation_styles_default.userMessageBubble}`,
7690
- editorClassName: "text-[inherit]",
7691
- onLinkClick: handleLinkClick,
7692
- availableSkills,
7693
- workspaceAppIcons
7694
- }
7695
- ) : message.visibleError ? /* @__PURE__ */ jsx18(
7696
- AgentVisibleErrorMessage,
7697
- {
7698
- message,
7699
- onAuthLogin,
7700
- onExternalLink: handleLinkClick
7701
- }
7702
- ) : recoveredError ? /* @__PURE__ */ jsx18(
7703
- AgentVisibleErrorMessage,
7704
- {
7705
- message: recoveredError,
7706
- onAuthLogin,
7707
- onExternalLink: handleLinkClick
7708
- }
7709
- ) : message.systemNotice ? /* @__PURE__ */ jsx18(AgentSystemNoticeMessage, { message }) : message.contentKind === "collaboration" && message.collaboration ? /* @__PURE__ */ jsx18(
7710
- AgentCollaborationRow,
7711
- {
7712
- collaboration: message.collaboration,
7713
- workspaceRoot,
7714
- basePath,
7715
- onLinkAction,
7716
- workspaceAppIcons,
7717
- previewMode
7718
- }
7719
- ) : message.contentKind === "plan" ? /* @__PURE__ */ jsx18(
7720
- AgentPlanCardMessage,
7721
- {
7722
- message,
7723
- workspaceRoot,
7724
- basePath,
7725
- onLinkAction,
7726
- workspaceAppIcons,
7727
- previewMode
7728
- }
7729
- ) : /* @__PURE__ */ jsx18(
7730
- AgentMessageMarkdown,
7731
- {
7732
- content: message.body,
7733
- className: AgentGUIConversation_styles_default.assistantMarkdown,
7734
- onLinkAction,
7735
- workspaceLinkContext: {
7736
- workspaceRoot,
7737
- basePath,
7738
- source: "agent-markdown"
7739
- },
7740
- workspaceAppIcons,
7741
- enableImageZoom: true,
7742
- previewMode,
7743
- streaming: message.statusKind === "working"
7744
- }
7745
- );
7746
- if (rawTimelineJson2) {
7747
- return /* @__PURE__ */ jsxs10(
7748
- AgentCopyableMessageGroup,
7749
- {
7750
- copyText: message.copyText ?? null,
7751
- occurredAtUnixMs: message.occurredAtUnixMs,
7752
- speaker: row.speaker,
7753
- onCopyMessageText: handleCopyMessageText,
7754
- children: [
7755
- content,
7756
- rawTimelineJson2
7757
- ]
7758
- },
7759
- message.id
7760
- );
7761
- }
7762
- const copyText = message.copyText ?? null;
7763
- if (copyText) {
7764
- return /* @__PURE__ */ jsx18(
7765
- AgentCopyableMessageGroup,
7766
- {
7767
- copyText,
7768
- occurredAtUnixMs: message.occurredAtUnixMs,
7769
- speaker: row.speaker,
7770
- onCopyMessageText: handleCopyMessageText,
7771
- children: content
7772
- },
7773
- message.id
7774
- );
7782
+ showParticipant ? /* @__PURE__ */ jsxs10(
7783
+ "div",
7784
+ {
7785
+ className: AgentGUIConversation_styles_default.participantMessageLayout,
7786
+ "data-agent-message-speaker": row.speaker,
7787
+ children: [
7788
+ !isUser ? /* @__PURE__ */ jsx18(
7789
+ AgentConversationParticipantAvatar,
7790
+ {
7791
+ presentation: enabledParticipantPresentation,
7792
+ speaker: "assistant"
7793
+ }
7794
+ ) : null,
7795
+ /* @__PURE__ */ jsx18("div", { className: AgentGUIConversation_styles_default.participantMessageContent, children: messageContent }),
7796
+ isUser ? /* @__PURE__ */ jsx18(
7797
+ AgentConversationParticipantAvatar,
7798
+ {
7799
+ presentation: enabledParticipantPresentation,
7800
+ speaker: "user"
7801
+ }
7802
+ ) : null
7803
+ ]
7775
7804
  }
7776
- return /* @__PURE__ */ jsx18(Fragment2, { children: content }, message.id);
7777
- })
7805
+ ) : messageContent
7778
7806
  ]
7779
7807
  }
7780
7808
  );
7781
7809
  }
7810
+ function AgentConversationParticipantAvatar({
7811
+ presentation,
7812
+ speaker
7813
+ }) {
7814
+ if (presentation.status === "loading") {
7815
+ return /* @__PURE__ */ jsx18(
7816
+ Avatar,
7817
+ {
7818
+ "aria-hidden": "true",
7819
+ className: AgentGUIConversation_styles_default.participantAvatar,
7820
+ "data-agent-conversation-participant-avatar": speaker,
7821
+ label: "",
7822
+ loading: true,
7823
+ size: "md"
7824
+ }
7825
+ );
7826
+ }
7827
+ const participant = speaker === "user" ? presentation.user : presentation.agent;
7828
+ return /* @__PURE__ */ jsx18(
7829
+ Avatar,
7830
+ {
7831
+ "aria-label": participant.name,
7832
+ className: AgentGUIConversation_styles_default.participantAvatar,
7833
+ "data-agent-conversation-participant-avatar": speaker,
7834
+ label: participant.name,
7835
+ size: "md",
7836
+ src: participant.avatarUrl
7837
+ }
7838
+ );
7839
+ }
7782
7840
  function AgentCopyableMessageGroup({
7783
7841
  children,
7784
7842
  copyText,
@@ -13712,6 +13770,7 @@ var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
13712
13770
  workspaceAppIcons,
13713
13771
  previewMode = false,
13714
13772
  showRawTimelineJson = false,
13773
+ participantPresentation,
13715
13774
  toolGroupExpanded,
13716
13775
  toolGroupExpansionKey,
13717
13776
  onToolGroupExpandedChange
@@ -13758,7 +13817,8 @@ var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
13758
13817
  previewMode,
13759
13818
  thinkingLabel: labels.thinkingLabel,
13760
13819
  showRawTimelineJson,
13761
- rawTimelineJsonLabel: labels.rawTimelineJson
13820
+ rawTimelineJsonLabel: labels.rawTimelineJson,
13821
+ participantPresentation
13762
13822
  }
13763
13823
  );
13764
13824
  case "tool-group":
@@ -15261,6 +15321,24 @@ var AGENT_TRANSCRIPT_DISCLOSURE_TURN_GAP_PX = 24;
15261
15321
  var AGENT_TRANSCRIPT_LEGACY_TURN_GAP_PX = 12;
15262
15322
  var AGENT_TRANSCRIPT_FALLBACK_TURN_COUNT = 3;
15263
15323
  var preventVirtualScrollAdjustment = () => false;
15324
+ function participantPresentationEqual(previous, next) {
15325
+ if (previous === next) {
15326
+ return true;
15327
+ }
15328
+ if ((!previous || !previous.enabled) && (!next || !next.enabled)) {
15329
+ return true;
15330
+ }
15331
+ if (!previous?.enabled || !next?.enabled) {
15332
+ return false;
15333
+ }
15334
+ if (previous.status !== next.status) {
15335
+ return false;
15336
+ }
15337
+ if (previous.status === "loading" || next.status === "loading") {
15338
+ return true;
15339
+ }
15340
+ return previous.user.name === next.user.name && previous.user.avatarUrl === next.user.avatarUrl && previous.agent.name === next.agent.name && previous.agent.avatarUrl === next.agent.avatarUrl;
15341
+ }
15264
15342
  function transcriptLabelsEqual(previous, next) {
15265
15343
  return previous === next || previous.thinkingLabel === next.thinkingLabel && previous.processing === next.processing && previous.turnSummary === next.turnSummary && previous.rawTimelineJson === next.rawTimelineJson && previous.userMessageLocator === next.userMessageLocator && previous.toolCallsLabel === next.toolCallsLabel;
15266
15344
  }
@@ -15286,7 +15364,10 @@ function areAgentTranscriptViewPropsEqual(previous, next) {
15286
15364
  return transcriptConversationRenderInputEquals(
15287
15365
  previous.conversation,
15288
15366
  next.conversation
15289
- ) && previous.onLinkAction === next.onLinkAction && previous.onAuthLogin === next.onAuthLogin && previous.availableSkills === next.availableSkills && previous.workspaceAppIcons === next.workspaceAppIcons && previous.turnAttachments === next.turnAttachments && previous.turnAttachmentLocatorRef === next.turnAttachmentLocatorRef && previous.onTurnAttachmentVisibilityChange === next.onTurnAttachmentVisibilityChange && previous.previewMode === next.previewMode && previous.showRawTimelineJson === next.showRawTimelineJson && transcriptLabelsEqual(previous.labels, next.labels);
15367
+ ) && previous.onLinkAction === next.onLinkAction && previous.onAuthLogin === next.onAuthLogin && previous.availableSkills === next.availableSkills && previous.workspaceAppIcons === next.workspaceAppIcons && previous.turnAttachments === next.turnAttachments && previous.turnAttachmentLocatorRef === next.turnAttachmentLocatorRef && previous.onTurnAttachmentVisibilityChange === next.onTurnAttachmentVisibilityChange && previous.previewMode === next.previewMode && previous.showRawTimelineJson === next.showRawTimelineJson && participantPresentationEqual(
15368
+ previous.participantPresentation,
15369
+ next.participantPresentation
15370
+ ) && transcriptLabelsEqual(previous.labels, next.labels);
15290
15371
  }
15291
15372
  var AgentTranscriptView = memo4(function AgentTranscriptView2({
15292
15373
  conversation,
@@ -15299,6 +15380,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
15299
15380
  workspaceAppIcons,
15300
15381
  previewMode = false,
15301
15382
  showRawTimelineJson = false,
15383
+ participantPresentation,
15302
15384
  labels
15303
15385
  }) {
15304
15386
  "use memo";
@@ -15464,6 +15546,7 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
15464
15546
  workspaceAppIcons,
15465
15547
  previewMode,
15466
15548
  showRawTimelineJson,
15549
+ participantPresentation,
15467
15550
  toolGroupExpanded: row.kind === "tool-group" ? expandedToolRows[rowKey] === true : void 0,
15468
15551
  toolGroupExpansionKey: row.kind === "tool-group" ? rowKey : void 0,
15469
15552
  onToolGroupExpandedChange: handleToolGroupExpandedChange
@@ -15609,6 +15692,7 @@ var AgentConversationFlow = memo5(function AgentConversationFlow2({
15609
15692
  workspaceAppIcons,
15610
15693
  previewMode = false,
15611
15694
  showRawTimelineJson = false,
15695
+ participantPresentation,
15612
15696
  labels
15613
15697
  }) {
15614
15698
  "use memo";
@@ -15631,7 +15715,8 @@ var AgentConversationFlow = memo5(function AgentConversationFlow2({
15631
15715
  workspaceAppIcons,
15632
15716
  previewMode,
15633
15717
  labels,
15634
- showRawTimelineJson
15718
+ showRawTimelineJson,
15719
+ participantPresentation
15635
15720
  }
15636
15721
  );
15637
15722
  }
@@ -15704,4 +15789,4 @@ export {
15704
15789
  AgentConversationFlow,
15705
15790
  useProjectedAgentConversation
15706
15791
  };
15707
- //# sourceMappingURL=chunk-UVJBQ6WD.js.map
15792
+ //# sourceMappingURL=chunk-GJZEMI6Z.js.map