@tutti-os/agent-gui 0.0.108 → 0.0.110

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/dist/{AgentGUI-CkxdEB8F.d.ts → AgentGUI-BSr3cWcJ.d.ts} +1 -1
  2. package/dist/agent-conversation/index.d.ts +1 -1
  3. package/dist/agent-gui.d.ts +2 -2
  4. package/dist/agent-gui.js +5 -5
  5. package/dist/agent-message-center/index.d.ts +9 -2
  6. package/dist/agent-message-center/index.js +53 -21
  7. package/dist/agent-message-center/index.js.map +1 -1
  8. package/dist/{agentGuiNodeTypes-B3N_hJZp.d.ts → agentGuiNodeTypes-CR_l4HhU.d.ts} +1 -0
  9. package/dist/app/renderer/agentactivity.css +3 -3
  10. package/dist/{chunk-J4K7KIFZ.js → chunk-A4WCTHWS.js} +4 -13
  11. package/dist/chunk-A4WCTHWS.js.map +1 -0
  12. package/dist/{chunk-QTW5CH62.js → chunk-A5UXTAYJ.js} +2 -2
  13. package/dist/{chunk-EBXOSQ5G.js → chunk-J7KJ4MX4.js} +3 -1
  14. package/dist/{chunk-EBXOSQ5G.js.map → chunk-J7KJ4MX4.js.map} +1 -1
  15. package/dist/{chunk-UFD2QKGC.js → chunk-K7WFXVSD.js} +73 -40
  16. package/dist/chunk-K7WFXVSD.js.map +1 -0
  17. package/dist/{chunk-KXZMIZ5H.js → chunk-YRMT6UYB.js} +47 -36
  18. package/dist/chunk-YRMT6UYB.js.map +1 -0
  19. package/dist/context-mention-palette/index.js +2 -2
  20. package/dist/index.d.ts +4 -4
  21. package/dist/index.js +5 -5
  22. package/dist/mention-search.js +1 -1
  23. package/dist/workbench/contribution.js +1 -1
  24. package/dist/workbench/index.js +1 -1
  25. package/dist/workspace-query-cache.d.ts +0 -1
  26. package/dist/workspace-query-cache.js +1 -1
  27. package/package.json +14 -14
  28. package/dist/chunk-J4K7KIFZ.js.map +0 -1
  29. package/dist/chunk-KXZMIZ5H.js.map +0 -1
  30. package/dist/chunk-UFD2QKGC.js.map +0 -1
  31. /package/dist/{chunk-QTW5CH62.js.map → chunk-A5UXTAYJ.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createWorkspaceQueryCache
3
- } from "./chunk-J4K7KIFZ.js";
3
+ } from "./chunk-A4WCTHWS.js";
4
4
  import {
5
5
  AGENT_GUI_COLLAPSED_MIN_WIDTH_PX,
6
6
  AGENT_GUI_CONVERSATION_RAIL_MIN_WIDTH_PX,
@@ -12,7 +12,7 @@ import {
12
12
  resolveAgentGuiSessionProviderFlatIconUrl,
13
13
  resolveNextAgentGUIConversationRailWidthPx,
14
14
  shouldAutoCollapseAgentGUIConversationRail
15
- } from "./chunk-EBXOSQ5G.js";
15
+ } from "./chunk-J7KJ4MX4.js";
16
16
  import {
17
17
  AGENT_PROVIDERS,
18
18
  AGENT_PROVIDER_LABEL,
@@ -81,7 +81,7 @@ import {
81
81
  import {
82
82
  AgentFileMentionPalette,
83
83
  agentMentionItemKey
84
- } from "./chunk-QTW5CH62.js";
84
+ } from "./chunk-A5UXTAYJ.js";
85
85
  import {
86
86
  normalizeAgentGUIAgents,
87
87
  projectAgentGUIAgentsToInternalTargets
@@ -92,7 +92,7 @@ import {
92
92
  DEFAULT_AGENT_MENTION_FILTER,
93
93
  agentGuiScheduler,
94
94
  buildWorkspaceAgentActivityListViewModel
95
- } from "./chunk-UFD2QKGC.js";
95
+ } from "./chunk-K7WFXVSD.js";
96
96
  import {
97
97
  AGENT_RICH_TEXT_CARET_ANCHOR,
98
98
  createAgentSessionMarkdownLink,
@@ -3320,6 +3320,7 @@ function conversationSummaryFromAgentSession(session, options = {}) {
3320
3320
  project: resolveConversationProject(session, projectResolver),
3321
3321
  ...isExternalImportNoProjectSession(session) ? { projectMode: "none" } : {},
3322
3322
  pinnedAtUnixMs: session.pinnedAtUnixMs ?? null,
3323
+ needsUserAction: options.needsUserAction ?? false,
3323
3324
  sortTimeUnixMs: resolveWorkspaceAgentSessionSortTimeUnixMs(session),
3324
3325
  updatedAtUnixMs: session.updatedAtUnixMs || session.createdAtUnixMs || Date.now()
3325
3326
  };
@@ -5365,7 +5366,7 @@ function conversationSummariesRenderEqual(left, right) {
5365
5366
  return left.id === right.id && left.userId === right.userId && left.provider === right.provider && left.title === right.title && left.titleLeadingMentionKind === right.titleLeadingMentionKind && conversationTitleFallbacksRenderEqual(
5366
5367
  left.titleFallback,
5367
5368
  right.titleFallback
5368
- ) && left.status === right.status && left.cwd === right.cwd && left.railSectionKey === right.railSectionKey && left.pinnedAtUnixMs === right.pinnedAtUnixMs && left.sortTimeUnixMs === right.sortTimeUnixMs && left.updatedAtUnixMs === right.updatedAtUnixMs && left.projectionSource === right.projectionSource && left.isImported === right.isImported && left.hasUnreadCompletion === right.hasUnreadCompletion && left.unreadCompletionKey === right.unreadCompletionKey && conversationProjectsRenderEqual(left.project, right.project);
5369
+ ) && left.status === right.status && left.cwd === right.cwd && left.railSectionKey === right.railSectionKey && left.pinnedAtUnixMs === right.pinnedAtUnixMs && left.sortTimeUnixMs === right.sortTimeUnixMs && left.updatedAtUnixMs === right.updatedAtUnixMs && left.projectionSource === right.projectionSource && left.isImported === right.isImported && left.hasUnreadCompletion === right.hasUnreadCompletion && left.unreadCompletionKey === right.unreadCompletionKey && left.needsUserAction === right.needsUserAction && conversationProjectsRenderEqual(left.project, right.project);
5369
5370
  }
5370
5371
  function conversationTitleFallbacksRenderEqual(left, right) {
5371
5372
  return left === right || JSON.stringify(left ?? null) === JSON.stringify(right ?? null);
@@ -6526,8 +6527,9 @@ import { useMemo as useMemo6, useRef as useRef7, useState as useState3 } from "r
6526
6527
  import { useMemo as useMemo5 } from "react";
6527
6528
  import {
6528
6529
  isPendingActivationViable as isPendingActivationViable4,
6529
- selectWorkspaceAgentConsumerSessions,
6530
6530
  selectPendingActivations,
6531
+ selectRootAgentSessionIdsWithPendingInteractions,
6532
+ selectWorkspaceAgentConsumerSessions,
6531
6533
  selectWorkspaceReconcileState
6532
6534
  } from "@tutti-os/agent-activity-core";
6533
6535
 
@@ -6562,7 +6564,7 @@ function agentGUIConversationRailTitlePromptsEqual(left, right) {
6562
6564
 
6563
6565
  // contexts/workspace/presentation/renderer/agentGuiConversationList/useAgentGuiConversationList.ts
6564
6566
  var EMPTY_AGENT_GUI_AGENT_TARGETS = [];
6565
- function projectCanonicalAgentGUIConversationSummaries(sessions, firstUserDisplayPromptsBySessionId = {}) {
6567
+ function projectCanonicalAgentGUIConversationSummaries(sessions, firstUserDisplayPromptsBySessionId = {}, rootSessionIdsAwaitingUserAction) {
6566
6568
  return sessions.map((item) => {
6567
6569
  const provider = resolveAgentGUIProviderIdentity({
6568
6570
  sessionProvider: item.session.provider
@@ -6587,6 +6589,7 @@ function projectCanonicalAgentGUIConversationSummaries(sessions, firstUserDispla
6587
6589
  agentTargetId: item.session.agentTargetId ?? null,
6588
6590
  cwd: item.session.cwd,
6589
6591
  id: item.session.agentSessionId,
6592
+ needsUserAction: rootSessionIdsAwaitingUserAction?.has(item.session.agentSessionId) ?? item.pendingInteractions.length > 0,
6590
6593
  pinnedAtUnixMs: item.session.pinnedAtUnixMs ?? null,
6591
6594
  provider,
6592
6595
  railSectionKey: item.session.railSectionKey,
@@ -6614,6 +6617,11 @@ function useAgentGuiConversationList(engine, query, agentTargets = EMPTY_AGENT_G
6614
6617
  selectWorkspaceAgentConsumerSessions,
6615
6618
  consumerSessionsEqual
6616
6619
  );
6620
+ const rootAgentSessionIdsWithPendingInteractions = useEngineSelector(
6621
+ engine,
6622
+ selectRootAgentSessionIdsWithPendingInteractions,
6623
+ stringArraysEqual
6624
+ );
6617
6625
  const pendingActivations = useEngineSelector(
6618
6626
  engine,
6619
6627
  selectPendingActivations,
@@ -6630,6 +6638,9 @@ function useAgentGuiConversationList(engine, query, agentTargets = EMPTY_AGENT_G
6630
6638
  );
6631
6639
  return useMemo5(() => {
6632
6640
  if (!query) return null;
6641
+ const rootSessionIdsAwaitingUserAction = new Set(
6642
+ rootAgentSessionIdsWithPendingInteractions
6643
+ );
6633
6644
  const canonicalIds = new Set(
6634
6645
  sessions.map((item) => item.session.agentSessionId)
6635
6646
  );
@@ -6685,7 +6696,8 @@ function useAgentGuiConversationList(engine, query, agentTargets = EMPTY_AGENT_G
6685
6696
  sessions.filter(
6686
6697
  (item) => item.session.workspaceId === query.workspaceId
6687
6698
  ),
6688
- firstUserDisplayPromptsBySessionId
6699
+ firstUserDisplayPromptsBySessionId,
6700
+ rootSessionIdsAwaitingUserAction
6689
6701
  ).map((conversation) => {
6690
6702
  const canonicalUpdatedAtUnixMs = conversation.updatedAtUnixMs;
6691
6703
  const activation = latestNewActivationBySessionId.get(conversation.id);
@@ -6748,6 +6760,7 @@ function useAgentGuiConversationList(engine, query, agentTargets = EMPTY_AGENT_G
6748
6760
  firstUserDisplayPromptsBySessionId,
6749
6761
  pendingActivations,
6750
6762
  query,
6763
+ rootAgentSessionIdsWithPendingInteractions,
6751
6764
  sessions,
6752
6765
  workspaceReconcile
6753
6766
  ]);
@@ -6764,6 +6777,9 @@ function consumerSessionsEqual(left, right) {
6764
6777
  ) && item.displayStatus === other.displayStatus;
6765
6778
  });
6766
6779
  }
6780
+ function stringArraysEqual(left, right) {
6781
+ return left.length === right.length && left.every((item, index) => item === right[index]);
6782
+ }
6767
6783
 
6768
6784
  // agent-gui/agentGuiNode/controller/useAgentGUIConversationListState.ts
6769
6785
  function useAgentGUIConversationListState({
@@ -12574,10 +12590,12 @@ function useAgentGUINodeController({
12574
12590
  }
12575
12591
  return conversationSummaryFromAgentSession(session, {
12576
12592
  isNoProjectPath,
12593
+ needsUserAction: activeRelatedPendingInteractions.length > 0,
12577
12594
  userProjects
12578
12595
  });
12579
12596
  }, [
12580
12597
  activeEngineSession,
12598
+ activeRelatedPendingInteractions.length,
12581
12599
  agentActivityDisplayStatuses,
12582
12600
  conversations,
12583
12601
  isNoProjectPath,
@@ -27212,7 +27230,7 @@ function comparePinnedConversations(left, right) {
27212
27230
  return (right.pinnedAtUnixMs ?? 0) - (left.pinnedAtUnixMs ?? 0) || (right.sortTimeUnixMs ?? right.updatedAtUnixMs) - (left.sortTimeUnixMs ?? left.updatedAtUnixMs) || left.id.localeCompare(right.id);
27213
27231
  }
27214
27232
  function conversationSummariesRenderEqual2(left, right) {
27215
- return left.id === right.id && left.agentTargetId === right.agentTargetId && left.provider === right.provider && left.title === right.title && left.titleLeadingMentionKind === right.titleLeadingMentionKind && left.titleFallback === right.titleFallback && left.status === right.status && left.cwd === right.cwd && left.railSectionKey === right.railSectionKey && left.pinnedAtUnixMs === right.pinnedAtUnixMs && left.sortTimeUnixMs === right.sortTimeUnixMs && left.updatedAtUnixMs === right.updatedAtUnixMs && left.projectionSource === right.projectionSource && left.isImported === right.isImported && left.hasUnreadCompletion === right.hasUnreadCompletion && left.unreadCompletionKey === right.unreadCompletionKey && conversationProjectsRenderEqual2(left.project, right.project);
27233
+ return left.id === right.id && left.agentTargetId === right.agentTargetId && left.provider === right.provider && left.title === right.title && left.titleLeadingMentionKind === right.titleLeadingMentionKind && left.titleFallback === right.titleFallback && left.status === right.status && left.cwd === right.cwd && left.railSectionKey === right.railSectionKey && left.pinnedAtUnixMs === right.pinnedAtUnixMs && left.sortTimeUnixMs === right.sortTimeUnixMs && left.updatedAtUnixMs === right.updatedAtUnixMs && left.projectionSource === right.projectionSource && left.isImported === right.isImported && left.hasUnreadCompletion === right.hasUnreadCompletion && left.unreadCompletionKey === right.unreadCompletionKey && left.needsUserAction === right.needsUserAction && conversationProjectsRenderEqual2(left.project, right.project);
27216
27234
  }
27217
27235
  function conversationProjectsRenderEqual2(left, right) {
27218
27236
  return left === right || (!left || !right ? !left && !right : left.id === right.id && left.path === right.path && left.sectionKey === right.sectionKey && left.label === right.label && left.createdAtUnixMs === right.createdAtUnixMs && left.updatedAtUnixMs === right.updatedAtUnixMs && left.lastUsedAtUnixMs === right.lastUsedAtUnixMs && left.sectionKey === right.sectionKey);
@@ -27420,12 +27438,12 @@ function ConversationMeta({
27420
27438
  );
27421
27439
  }
27422
27440
  function conversationMetaKind(conversation) {
27423
- if (conversation.status === "working") {
27424
- return "loading";
27425
- }
27426
- if (conversation.status === "waiting") {
27441
+ if (conversation.needsUserAction) {
27427
27442
  return "waiting";
27428
27443
  }
27444
+ if (conversation.status === "working" || conversation.status === "waiting") {
27445
+ return "loading";
27446
+ }
27429
27447
  if (conversation.status === "failed") {
27430
27448
  return "failed";
27431
27449
  }
@@ -29079,10 +29097,6 @@ function cachedConversationRailQueryFromFirstPages(page, scopeKey) {
29079
29097
  conversationRailPageState(section)
29080
29098
  );
29081
29099
  }
29082
- const sessions = [
29083
- ...page.pinned?.sessions ?? [],
29084
- ...page.sections.flatMap((section) => section.sessions)
29085
- ];
29086
29100
  return {
29087
29101
  queryState: {
29088
29102
  pending: false,
@@ -29091,15 +29105,14 @@ function cachedConversationRailQueryFromFirstPages(page, scopeKey) {
29091
29105
  sectionPageStates,
29092
29106
  sections
29093
29107
  },
29094
- returnedSessionCount: sessions.length,
29095
- sectionCount: page.sections.length + (page.pinned ? 1 : 0),
29096
- sessions
29108
+ returnedSessionCount: (page.pinned?.sessions.length ?? 0) + page.sections.reduce(
29109
+ (count, section) => count + section.sessions.length,
29110
+ 0
29111
+ ),
29112
+ sectionCount: page.sections.length + (page.pinned ? 1 : 0)
29097
29113
  };
29098
29114
  }
29099
29115
  function applyCachedConversationRailQuery(input) {
29100
- if (input.cache.claimIngestion(input.scopeKey, input.entry.version)) {
29101
- input.upsertSessions(input.entry.value.sessions);
29102
- }
29103
29116
  return input.entry.value.queryState;
29104
29117
  }
29105
29118
  function writeConversationRailQueryCache(input) {
@@ -29113,8 +29126,7 @@ function writeConversationRailQueryCache(input) {
29113
29126
  (count, section) => count + section.sessionIds.length,
29114
29127
  0
29115
29128
  ),
29116
- sectionCount: queryState.sections.length,
29117
- sessions: []
29129
+ sectionCount: queryState.sections.length
29118
29130
  });
29119
29131
  }
29120
29132
  function replaceConversationRailFirstPages(input) {
@@ -29570,7 +29582,7 @@ var AgentGUIConversationRailQueryController = class {
29570
29582
  };
29571
29583
  handleEngineState(state) {
29572
29584
  const next = projectConversationRailMembershipRecords(state);
29573
- if (this.ingestingSessions || !this.runtimeSectionsEnabled()) {
29585
+ if (this.ingestingSessions || !this.runtimeSectionsEnabled() || state.engineRuntime.workspaceReconcile.status === "loading") {
29574
29586
  this.previousMembershipRecords = next;
29575
29587
  return;
29576
29588
  }
@@ -29613,7 +29625,7 @@ var AgentGUIConversationRailQueryController = class {
29613
29625
  const cached = this.sessionSectionsQueryCache.read(scopeKey);
29614
29626
  const cacheApplyStartedAt = cached && this.providerSwitchDiagnostics.hasPending(scopeKey) ? this.diagnosticNow() : null;
29615
29627
  if (cached && this.queryState.resolvedScopeKey !== scopeKey) {
29616
- this.applyCachedFirstPages(scopeKey, cached);
29628
+ this.applyCachedFirstPages(cached);
29617
29629
  this.emit();
29618
29630
  }
29619
29631
  if (cached && !cached.stale && this.cacheNow() - cached.resolvedAtUnixMs <= this.cacheFreshMs) {
@@ -29645,13 +29657,17 @@ var AgentGUIConversationRailQueryController = class {
29645
29657
  limitPerSection: SECTION_PAGE_SIZE2,
29646
29658
  workspaceId: this.workspaceId
29647
29659
  });
29660
+ this.upsertSessions([
29661
+ ...page.pinned?.sessions ?? [],
29662
+ ...page.sections.flatMap((section) => section.sessions)
29663
+ ]);
29648
29664
  return cachedConversationRailQueryFromFirstPages(page, scopeKey);
29649
29665
  }).then((entry) => {
29650
29666
  if (requestSequence !== this.pagingRequestSequence || scopeKey !== this.railSectionQueryKey) {
29651
29667
  return;
29652
29668
  }
29653
29669
  const requestResolvedAt = this.diagnosticNow();
29654
- this.applyCachedFirstPages(scopeKey, entry);
29670
+ this.applyCachedFirstPages(entry);
29655
29671
  this.emit();
29656
29672
  const completedAt = this.diagnosticNow();
29657
29673
  this.providerSwitchDiagnostics.complete(scopeKey, {
@@ -29719,13 +29735,8 @@ var AgentGUIConversationRailQueryController = class {
29719
29735
  this.emit();
29720
29736
  });
29721
29737
  }
29722
- applyCachedFirstPages(scopeKey, entry) {
29723
- this.queryState = applyCachedConversationRailQuery({
29724
- cache: this.sessionSectionsQueryCache,
29725
- entry,
29726
- scopeKey,
29727
- upsertSessions: (sessions) => this.upsertSessions(sessions)
29728
- });
29738
+ applyCachedFirstPages(entry) {
29739
+ this.queryState = applyCachedConversationRailQuery({ entry });
29729
29740
  }
29730
29741
  writeCurrentQueryCache() {
29731
29742
  writeConversationRailQueryCache({
@@ -35312,4 +35323,4 @@ export {
35312
35323
  resolveAgentGUIAgentTarget,
35313
35324
  AgentGUI
35314
35325
  };
35315
- //# sourceMappingURL=chunk-KXZMIZ5H.js.map
35326
+ //# sourceMappingURL=chunk-YRMT6UYB.js.map