@tutti-os/agent-gui 0.0.100 → 0.0.102

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 (30) hide show
  1. package/README.md +31 -0
  2. package/dist/{AgentGUI-DgBjACOL.d.ts → AgentGUI-BJ3As1gI.d.ts} +17 -36
  3. package/dist/agent-conversation/index.d.ts +1 -1
  4. package/dist/agent-conversation/index.js +2 -2
  5. package/dist/agent-gui.d.ts +3 -3
  6. package/dist/agent-gui.js +6 -6
  7. package/dist/agent-message-center/index.js +2 -2
  8. package/dist/{agentGuiNodeTypes-C-wBSM-Y.d.ts → agentGuiNodeTypes-BH3lz6gn.d.ts} +2 -1
  9. package/dist/app/renderer/agentactivity.css +2 -37
  10. package/dist/{chunk-BQJOYTW2.js → chunk-LHKBR77G.js} +474 -487
  11. package/dist/chunk-LHKBR77G.js.map +1 -0
  12. package/dist/{chunk-MES7BQWI.js → chunk-MJOQP2ED.js} +28 -97
  13. package/dist/chunk-MJOQP2ED.js.map +1 -0
  14. package/dist/{chunk-XFRY2WWB.js → chunk-TDVYZEUI.js} +2 -2
  15. package/dist/{chunk-FAE7CXZO.js → chunk-W4RYNKWO.js} +2 -2
  16. package/dist/{chunk-EUW6VPIK.js → chunk-YYE35EZ5.js} +8 -5
  17. package/dist/{chunk-EUW6VPIK.js.map → chunk-YYE35EZ5.js.map} +1 -1
  18. package/dist/{chunk-JWHPVETQ.js → chunk-ZPKPIHMZ.js} +44 -11
  19. package/dist/chunk-ZPKPIHMZ.js.map +1 -0
  20. package/dist/context-mention-palette/index.js +2 -2
  21. package/dist/index.d.ts +5 -5
  22. package/dist/index.js +6 -6
  23. package/dist/index.js.map +1 -1
  24. package/dist/mention-search.js +1 -1
  25. package/package.json +12 -12
  26. package/dist/chunk-BQJOYTW2.js.map +0 -1
  27. package/dist/chunk-JWHPVETQ.js.map +0 -1
  28. package/dist/chunk-MES7BQWI.js.map +0 -1
  29. /package/dist/{chunk-XFRY2WWB.js.map → chunk-TDVYZEUI.js.map} +0 -0
  30. /package/dist/{chunk-FAE7CXZO.js.map → chunk-W4RYNKWO.js.map} +0 -0
@@ -39,7 +39,7 @@ import {
39
39
  resolveWorkspaceFilePathCandidate,
40
40
  resolveWorkspaceLinkAction,
41
41
  useAgentTargetPresentations
42
- } from "./chunk-MES7BQWI.js";
42
+ } from "./chunk-MJOQP2ED.js";
43
43
  import {
44
44
  useOptionalAgentActivityRuntime,
45
45
  useOptionalAgentHostApi,
@@ -1430,6 +1430,17 @@ function stripReviewProcessSummaryTitle(body) {
1430
1430
  function normalizedMessageBody(body) {
1431
1431
  return body.trim().replace(/\s+/g, " ");
1432
1432
  }
1433
+ function userMessageProjectionKey(item, body) {
1434
+ const normalizedBody = normalizedMessageBody(body);
1435
+ if (normalizedBody) {
1436
+ return `text:${normalizedBody}`;
1437
+ }
1438
+ if (!hasRenderableUserPromptContent(item.payload?.content)) {
1439
+ return null;
1440
+ }
1441
+ const clientSubmitId = stringRecordValue4(item.payload, "clientSubmitId");
1442
+ return clientSubmitId ? `client-submit:${clientSubmitId}` : `event:${item.eventId}`;
1443
+ }
1433
1444
  function isRecentDuplicateUserMessage(previous, current) {
1434
1445
  if (!previous) {
1435
1446
  return false;
@@ -1454,6 +1465,21 @@ function isRecentDuplicateUserMessage(previous, current) {
1454
1465
  }
1455
1466
  return false;
1456
1467
  }
1468
+ function hasRenderableUserPromptContent(content) {
1469
+ if (!Array.isArray(content)) {
1470
+ return false;
1471
+ }
1472
+ return content.some((candidate) => {
1473
+ if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) {
1474
+ return false;
1475
+ }
1476
+ const block = candidate;
1477
+ if (block.type === "text") {
1478
+ return typeof block.text === "string" && block.text.trim().length > 0;
1479
+ }
1480
+ return block.type === "image" && typeof block.mimeType === "string" && block.mimeType.trim().length > 0;
1481
+ });
1482
+ }
1457
1483
  function stringRecordValue4(record, key) {
1458
1484
  if (!record || typeof record !== "object") {
1459
1485
  return null;
@@ -2215,11 +2241,12 @@ function buildCanonicalWorkspaceAgentDetailView({
2215
2241
  const explicitTurnId = item.turnId?.trim();
2216
2242
  if (role === "user") {
2217
2243
  const turnId2 = explicitTurnId || `seq:${item.seq || item.id}`;
2218
- if (!body) {
2244
+ const projectionKey = userMessageProjectionKey(item, body);
2245
+ if (!projectionKey) {
2219
2246
  continue;
2220
2247
  }
2221
2248
  if (isRecentDuplicateUserMessage(
2222
- recentUserMessages.get(normalizedMessageBody(body)),
2249
+ recentUserMessages.get(projectionKey),
2223
2250
  item
2224
2251
  )) {
2225
2252
  continue;
@@ -2237,7 +2264,7 @@ function buildCanonicalWorkspaceAgentDetailView({
2237
2264
  );
2238
2265
  turn2.userMessages.push(message);
2239
2266
  turn2.userMessage ??= message;
2240
- recentUserMessages.set(normalizedMessageBody(body), item);
2267
+ recentUserMessages.set(projectionKey, item);
2241
2268
  continue;
2242
2269
  }
2243
2270
  const turnId = explicitTurnId || activeSequenceTurnId || `seq:${item.seq || item.id}`;
@@ -4021,7 +4048,7 @@ function projectUserMessageContentParts(message, turnId, workspaceId) {
4021
4048
  body: "",
4022
4049
  contentKind: "image-grid",
4023
4050
  images: imageBlocks.map((image, index) => ({
4024
- id: image.path || image.attachmentId || `${message.id}:image:0:${index}`,
4051
+ id: `${message.id}:image:${index}`,
4025
4052
  workspaceId: image.workspaceId,
4026
4053
  agentSessionId: image.agentSessionId,
4027
4054
  attachmentId: image.attachmentId,
@@ -6591,7 +6618,10 @@ function AgentRichTextReadonly({
6591
6618
  );
6592
6619
  const isMentionOnly = isMentionOnlyRichTextDoc(contentDoc);
6593
6620
  const editor = useEditor({
6594
- immediatelyRender: false,
6621
+ // AgentGUI is client-only. Deferring editor creation leaves every user
6622
+ // message blank for one commit, then changes each transcript turn's
6623
+ // measured height when TipTap mounts.
6624
+ immediatelyRender: true,
6595
6625
  editable: false,
6596
6626
  extensions: createAgentRichTextReadonlyExtensions({
6597
6627
  skills: availableSkills
@@ -8102,7 +8132,6 @@ function AgentMessageBlock({
8102
8132
  source: "agent-markdown"
8103
8133
  },
8104
8134
  workspaceAppIcons,
8105
- deferLongContentRender: true,
8106
8135
  enableImageZoom: true,
8107
8136
  previewMode,
8108
8137
  streaming: message.statusKind === "working"
@@ -8376,7 +8405,6 @@ function AgentPlanCardMessage({
8376
8405
  source: "agent-markdown"
8377
8406
  },
8378
8407
  workspaceAppIcons,
8379
- deferLongContentRender: true,
8380
8408
  enableImageZoom: true,
8381
8409
  previewMode
8382
8410
  }
@@ -14221,6 +14249,7 @@ var AgentTranscriptItemView = memo3(function AgentTranscriptItemView2({
14221
14249
  var AGENT_TRANSCRIPT_COMPLEXITY_VIRTUALIZATION_SCORE = 40;
14222
14250
  var AGENT_TRANSCRIPT_COMPLEXITY_SINGLE_TURN_SCORE = 24;
14223
14251
  var AGENT_TRANSCRIPT_COMPLEXITY_TURN_COUNT = 30;
14252
+ var AGENT_TRANSCRIPT_COMPLEXITY_MINIMUM_TURN_COUNT = 8;
14224
14253
  function assessAgentTranscriptComplexity(turnGroups) {
14225
14254
  const complexity = calculateAgentTranscriptComplexity(turnGroups);
14226
14255
  return {
@@ -14242,6 +14271,9 @@ function calculateAgentTranscriptComplexity(turnGroups) {
14242
14271
  };
14243
14272
  }
14244
14273
  function shouldVirtualizeAgentTranscript(input) {
14274
+ if (input.turnCount < AGENT_TRANSCRIPT_COMPLEXITY_MINIMUM_TURN_COUNT) {
14275
+ return false;
14276
+ }
14245
14277
  return input.turnCount >= AGENT_TRANSCRIPT_COMPLEXITY_TURN_COUNT || input.complexity.totalScore >= AGENT_TRANSCRIPT_COMPLEXITY_VIRTUALIZATION_SCORE || input.complexity.maxTurnScore >= AGENT_TRANSCRIPT_COMPLEXITY_SINGLE_TURN_SCORE;
14246
14278
  }
14247
14279
  function calculateTurnScore(rows) {
@@ -15039,11 +15071,13 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
15039
15071
  [turnGroups]
15040
15072
  );
15041
15073
  const rowVirtualizer = useVirtualizer({
15074
+ anchorTo: "end",
15042
15075
  count: turnGroups.length,
15043
15076
  estimateSize: () => AGENT_TRANSCRIPT_ESTIMATED_TURN_HEIGHT_PX,
15044
15077
  getItemKey: (index) => turnGroups[index]?.key ?? index,
15045
15078
  getScrollElement: () => virtualScrollElement,
15046
- overscan: AGENT_TRANSCRIPT_VIRTUALIZATION_OVERSCAN
15079
+ overscan: AGENT_TRANSCRIPT_VIRTUALIZATION_OVERSCAN,
15080
+ scrollEndThreshold: 24
15047
15081
  });
15048
15082
  const handleLocateUserMessage = useCallback10(
15049
15083
  (item) => {
@@ -15075,7 +15109,6 @@ var AgentTranscriptView = memo4(function AgentTranscriptView2({
15075
15109
  );
15076
15110
  useLayoutEffect4(() => {
15077
15111
  if (!shouldVirtualize) {
15078
- setVirtualScrollElement(null);
15079
15112
  return;
15080
15113
  }
15081
15114
  setVirtualScrollElement(
@@ -15305,4 +15338,4 @@ export {
15305
15338
  AgentConversationFlow,
15306
15339
  useProjectedAgentConversation
15307
15340
  };
15308
- //# sourceMappingURL=chunk-JWHPVETQ.js.map
15341
+ //# sourceMappingURL=chunk-ZPKPIHMZ.js.map