@tutti-os/agent-gui 0.0.108 → 0.0.109
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.
- package/dist/{AgentGUI-CkxdEB8F.d.ts → AgentGUI-BSr3cWcJ.d.ts} +1 -1
- package/dist/agent-conversation/index.d.ts +1 -1
- package/dist/agent-gui.d.ts +2 -2
- package/dist/agent-gui.js +3 -3
- package/dist/agent-message-center/index.d.ts +9 -2
- package/dist/agent-message-center/index.js +53 -21
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/{agentGuiNodeTypes-B3N_hJZp.d.ts → agentGuiNodeTypes-CR_l4HhU.d.ts} +1 -0
- package/dist/app/renderer/agentactivity.css +3 -3
- package/dist/{chunk-KXZMIZ5H.js → chunk-34JD75OB.js} +30 -12
- package/dist/chunk-34JD75OB.js.map +1 -0
- package/dist/{chunk-QTW5CH62.js → chunk-A5UXTAYJ.js} +2 -2
- package/dist/{chunk-UFD2QKGC.js → chunk-K7WFXVSD.js} +73 -40
- package/dist/chunk-K7WFXVSD.js.map +1 -0
- package/dist/context-mention-palette/index.js +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/dist/mention-search.js +1 -1
- package/package.json +12 -12
- package/dist/chunk-KXZMIZ5H.js.map +0 -1
- package/dist/chunk-UFD2QKGC.js.map +0 -1
- /package/dist/{chunk-QTW5CH62.js.map → chunk-A5UXTAYJ.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
|
|
|
4
4
|
import { AgentActivityGoalControlInput, AgentActivityGoalControlResult, AgentActivityCreateSessionInput, AgentActivitySession, AgentActivityDeleteSessionInput, AgentActivityDeleteSessionResult, AgentActivitySendInput, AgentActivitySessionSettings, AgentActivityActivateSessionResult, AgentActivitySnapshot, AgentSessionEngine, AgentActivityMessageOrder, AgentActivityMessagePage, AgentActivitySendInputResult, AgentActivityRenameSessionInput, AgentActivitySubmitInteractiveInput, AgentActivitySubmitInteractiveResult, AgentActivitySnapshotListener, AgentActivitySubmitSettingsPatch } from '@tutti-os/agent-activity-core';
|
|
5
5
|
import { u as AgentHostAgentSessionComposerSettings, y as AgentHostUnactivateAgentSessionResult, h as AgentGUIAgentTarget, n as AgentGUIProvider, z as AgentPromptContentBlock, m as AgentGUINodeData, P as Point, o as AgentGUIProviderRailAllPresentation, p as AgentGUIProviderRailMode, q as AgentGUIProviderReadinessGate, l as AgentGUIHomeSuggestionId, N as NodeFrame, e as AgentGUIAgentDirectorySnapshot, k as AgentGUIAllAgentsPresentation } from './types-yF_0mrNS.js';
|
|
6
6
|
import { WorkspaceQueryCache } from './workspace-query-cache.js';
|
|
7
|
-
import { A as AgentComposerDraft, q as AgentSessionCommand, d as AgentGUIProviderSkillOption, b as AgentGUIComposerSettingsVM, e as AgentGUIQueueStatus, f as AgentGUIQueuedPromptVM, l as AgentMessageMarkdownWorkspaceAppIcon, r as AgentSlashCommandCapability, c as AgentGUINodeViewModel, n as AgentProbeSnapshot, a as AgentComposerDraftFile, i as AgentHostInputApi } from './agentGuiNodeTypes-
|
|
7
|
+
import { A as AgentComposerDraft, q as AgentSessionCommand, d as AgentGUIProviderSkillOption, b as AgentGUIComposerSettingsVM, e as AgentGUIQueueStatus, f as AgentGUIQueuedPromptVM, l as AgentMessageMarkdownWorkspaceAppIcon, r as AgentSlashCommandCapability, c as AgentGUINodeViewModel, n as AgentProbeSnapshot, a as AgentComposerDraftFile, i as AgentHostInputApi } from './agentGuiNodeTypes-CR_l4HhU.js';
|
|
8
8
|
import { WorkspaceFileReference, ReferenceLocateTarget, WorkspaceFileReferenceAdapter, ReferenceProvenanceCatalog } from '@tutti-os/workspace-file-reference/contracts';
|
|
9
9
|
import { A as AgentContextMentionItem } from './agentFileMentionContracts-B70VnPWO.js';
|
|
10
10
|
import { WorkspaceFileEntry } from '@tutti-os/workspace-file-manager/services';
|
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode, JSX } from 'react';
|
|
3
3
|
import { c as AgentConversationVM, e as WorkspaceLinkAction, d as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-D3Dn2LqN.js';
|
|
4
4
|
export { B as BuildWorkspaceAgentSessionDetailInput, W as WorkspaceAgentActivityTimelineItem, f as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-D3Dn2LqN.js';
|
|
5
|
-
import { d as AgentGUIProviderSkillOption, l as AgentMessageMarkdownWorkspaceAppIcon } from '../agentGuiNodeTypes-
|
|
5
|
+
import { d as AgentGUIProviderSkillOption, l as AgentMessageMarkdownWorkspaceAppIcon } from '../agentGuiNodeTypes-CR_l4HhU.js';
|
|
6
6
|
export { W as WorkspaceAgentActivityCard } from '../workspaceAgentActivityListTypes-DZfS_HgG.js';
|
|
7
7
|
import '@tutti-os/workspace-issue-manager/core';
|
|
8
8
|
import '@tutti-os/agent-activity-core';
|
package/dist/agent-gui.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '@tutti-os/ui-i18n-runtime';
|
|
3
|
-
export { n as AgentGUI, w as AgentGUIProps } from './AgentGUI-
|
|
4
|
-
import './agentGuiNodeTypes-
|
|
3
|
+
export { n as AgentGUI, w as AgentGUIProps } from './AgentGUI-BSr3cWcJ.js';
|
|
4
|
+
import './agentGuiNodeTypes-CR_l4HhU.js';
|
|
5
5
|
export { l as AgentGUIHomeSuggestionId } from './types-yF_0mrNS.js';
|
|
6
6
|
import './runtime-BBNdWgDU.js';
|
|
7
7
|
export { ReferenceProvenanceCatalog as AgentGUIReferenceProvenanceFilterCatalog } from '@tutti-os/workspace-file-reference/contracts';
|
package/dist/agent-gui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentGUI
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-34JD75OB.js";
|
|
4
4
|
import "./chunk-J4K7KIFZ.js";
|
|
5
5
|
import "./chunk-EBXOSQ5G.js";
|
|
6
6
|
import "./chunk-AY5AFMT2.js";
|
|
@@ -11,11 +11,11 @@ import "./chunk-UHBCM6RO.js";
|
|
|
11
11
|
import "./chunk-BRLKORQI.js";
|
|
12
12
|
import "./chunk-JBX3JPTC.js";
|
|
13
13
|
import "./chunk-VMQNG2KI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-A5UXTAYJ.js";
|
|
15
15
|
import "./chunk-7OYHDOGG.js";
|
|
16
16
|
import "./chunk-FGLQZ6I4.js";
|
|
17
17
|
import "./chunk-L2GENUG3.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-K7WFXVSD.js";
|
|
19
19
|
import "./chunk-USIFGHT3.js";
|
|
20
20
|
import "./chunk-XJ34OIEQ.js";
|
|
21
21
|
import "./chunk-R7AXDQCA.js";
|
|
@@ -52,12 +52,18 @@ interface WorkspaceAgentMessageCenterItem {
|
|
|
52
52
|
digest: WorkspaceAgentMessageCenterDigest;
|
|
53
53
|
lastAgentMessageSummary: string;
|
|
54
54
|
lastAgentMessageAtUnixMs: number | null;
|
|
55
|
+
pendingInteractionTarget: WorkspaceAgentMessageCenterInteractionTarget | null;
|
|
55
56
|
pendingPrompt: AgentConversationPromptVM | null;
|
|
56
57
|
needsAttentionKind: AgentActivityNeedsAttentionItem["kind"] | null;
|
|
57
58
|
needsAttentionSummary: string | null;
|
|
58
59
|
latestTurnOutcome?: WorkspaceAgentMessageCenterTurnOutcome | null;
|
|
59
60
|
sortTimeUnixMs: number;
|
|
60
61
|
}
|
|
62
|
+
interface WorkspaceAgentMessageCenterInteractionTarget {
|
|
63
|
+
agentSessionId: string;
|
|
64
|
+
requestId: string;
|
|
65
|
+
turnId: string;
|
|
66
|
+
}
|
|
61
67
|
interface WorkspaceAgentMessageCenterTurnOutcome {
|
|
62
68
|
notificationKey: string;
|
|
63
69
|
status: "completed" | "failed";
|
|
@@ -230,6 +236,7 @@ interface WorkspaceAgentMessageCenterPanelProps {
|
|
|
230
236
|
payload?: Record<string, unknown>;
|
|
231
237
|
promptKind?: string;
|
|
232
238
|
requestId: string;
|
|
239
|
+
turnId?: string;
|
|
233
240
|
}) => Promise<void> | void;
|
|
234
241
|
}
|
|
235
242
|
declare const WorkspaceAgentMessageCenterPanel: react.NamedExoticComponent<WorkspaceAgentMessageCenterPanelProps>;
|
|
@@ -434,7 +441,7 @@ interface WorkspaceAgentMessageCenterPresentation {
|
|
|
434
441
|
declare function selectWorkspaceAgentMessageCenterPresentation(state: AgentSessionEngineState): WorkspaceAgentMessageCenterPresentation;
|
|
435
442
|
declare function workspaceAgentMessageCenterPresentationEqual(left: WorkspaceAgentMessageCenterPresentation, right: WorkspaceAgentMessageCenterPresentation): boolean;
|
|
436
443
|
type WorkspaceAgentMessageCenterPromptStatus = "idle" | "responding" | "unknown" | "failed";
|
|
437
|
-
declare function workspaceAgentMessageCenterPromptStatus(presentation: WorkspaceAgentMessageCenterPresentation, item: Pick<WorkspaceAgentMessageCenterItem, "agentSessionId" | "pendingPrompt">): WorkspaceAgentMessageCenterPromptStatus;
|
|
444
|
+
declare function workspaceAgentMessageCenterPromptStatus(presentation: WorkspaceAgentMessageCenterPresentation, item: Pick<WorkspaceAgentMessageCenterItem, "agentSessionId" | "pendingInteractionTarget" | "pendingPrompt">): WorkspaceAgentMessageCenterPromptStatus;
|
|
438
445
|
|
|
439
446
|
declare function stabilizeWorkspaceAgentMessageCenterModel(previous: WorkspaceAgentMessageCenterModel | null, next: WorkspaceAgentMessageCenterModel): WorkspaceAgentMessageCenterModel;
|
|
440
447
|
|
|
@@ -447,4 +454,4 @@ interface MessageCenterFilterPreferences {
|
|
|
447
454
|
declare function readMessageCenterFilterPreferences(): MessageCenterFilterPreferences;
|
|
448
455
|
declare function writeMessageCenterFilterPreferences(preferences: MessageCenterFilterPreferences): void;
|
|
449
456
|
|
|
450
|
-
export { AgentInteractivePromptSurface, AgentVerticalScrollArea, type BuildWorkspaceAgentMessageCenterOptions, type MessageCenterAgentUserStack, type MessageCenterFilterPreferences, type MessageCenterGroup, type MessageCenterGroupBy, MessageCenterGroupHeading, MessageCenterIdentityAvatarMark, MessageCenterIdentityAvatarStack, MessageCenterIdentityLabel, MessageCenterOpenChatButton, type MessageCenterProviderOption, type MessageCenterStatusFilter, type MessageCenterStatusOption, type MessageCenterStatusTone, MessageCenterSummary, type MessageCenterTranslate, type PromptToolDetail, type WorkspaceAgentMessageCenterAgentPresentation, WorkspaceAgentMessageCenterAttentionDeck, type WorkspaceAgentMessageCenterAttentionDeckProps, type WorkspaceAgentMessageCenterAttentionDeckRenderCardInput, WorkspaceAgentMessageCenterCard, type WorkspaceAgentMessageCenterCardProps, type WorkspaceAgentMessageCenterCounts, type WorkspaceAgentMessageCenterDigest, type WorkspaceAgentMessageCenterDigestPrimary, type WorkspaceAgentMessageCenterDigestPrimaryKind, type WorkspaceAgentMessageCenterIdentity, type WorkspaceAgentMessageCenterItem, type WorkspaceAgentMessageCenterModel, WorkspaceAgentMessageCenterPanel, type WorkspaceAgentMessageCenterPanelPresentation, type WorkspaceAgentMessageCenterPanelProps, type WorkspaceAgentMessageCenterPresentation, type WorkspaceAgentMessageCenterPromptStatus, WorkspaceAgentMessageCenterStack, MessageCenterViewMenu as WorkspaceAgentMessageCenterViewMenu, approvalOptionDisplayLabel, buildMessageCenterProviderOptions, buildMessageCenterStatusOptions, buildWorkspaceAgentInteractivePromptLabels, buildWorkspaceAgentMessageCenterModelFromEngine, getPromptToolDetails, groupMessageCenterItems, isInteractiveMessageCenterItem, isPromptRequestIdTitle, isRecentlyCompletedMessageCenterItem, isWaitingMessageCenterItem, itemMatchesViewFilters, managedAgentRoundedIconUrl, messageCenterAgentUserStackId, messageCenterFiltersStorageKey, messageCenterGroupLabel, messageCenterStackPreviewNodes, messageCenterStackPreviewText, messageCenterStackRenderId, messageCenterStackScrollSyncSegment, messageCenterStatusFilterValue, messageCenterStatusTone, messageCenterStatusToneClass, partitionMessageCenterItemsByAgentUser, readMessageCenterFilterPreferences, resolveMessageCenterNotificationAction, selectMessageCenterAttentionDeckItems, selectWorkspaceAgentMessageCenterPresentation, stabilizeWorkspaceAgentMessageCenterModel, statusFilterSummary, userAvatarPlaceholderUrl, workspaceAgentActivityStatusLabel, workspaceAgentMessageCenterPresentationEqual, workspaceAgentMessageCenterPromptStatus, writeMessageCenterFilterPreferences };
|
|
457
|
+
export { AgentInteractivePromptSurface, AgentVerticalScrollArea, type BuildWorkspaceAgentMessageCenterOptions, type MessageCenterAgentUserStack, type MessageCenterFilterPreferences, type MessageCenterGroup, type MessageCenterGroupBy, MessageCenterGroupHeading, MessageCenterIdentityAvatarMark, MessageCenterIdentityAvatarStack, MessageCenterIdentityLabel, MessageCenterOpenChatButton, type MessageCenterProviderOption, type MessageCenterStatusFilter, type MessageCenterStatusOption, type MessageCenterStatusTone, MessageCenterSummary, type MessageCenterTranslate, type PromptToolDetail, type WorkspaceAgentMessageCenterAgentPresentation, WorkspaceAgentMessageCenterAttentionDeck, type WorkspaceAgentMessageCenterAttentionDeckProps, type WorkspaceAgentMessageCenterAttentionDeckRenderCardInput, WorkspaceAgentMessageCenterCard, type WorkspaceAgentMessageCenterCardProps, type WorkspaceAgentMessageCenterCounts, type WorkspaceAgentMessageCenterDigest, type WorkspaceAgentMessageCenterDigestPrimary, type WorkspaceAgentMessageCenterDigestPrimaryKind, type WorkspaceAgentMessageCenterIdentity, type WorkspaceAgentMessageCenterInteractionTarget, type WorkspaceAgentMessageCenterItem, type WorkspaceAgentMessageCenterModel, WorkspaceAgentMessageCenterPanel, type WorkspaceAgentMessageCenterPanelPresentation, type WorkspaceAgentMessageCenterPanelProps, type WorkspaceAgentMessageCenterPresentation, type WorkspaceAgentMessageCenterPromptStatus, WorkspaceAgentMessageCenterStack, MessageCenterViewMenu as WorkspaceAgentMessageCenterViewMenu, approvalOptionDisplayLabel, buildMessageCenterProviderOptions, buildMessageCenterStatusOptions, buildWorkspaceAgentInteractivePromptLabels, buildWorkspaceAgentMessageCenterModelFromEngine, getPromptToolDetails, groupMessageCenterItems, isInteractiveMessageCenterItem, isPromptRequestIdTitle, isRecentlyCompletedMessageCenterItem, isWaitingMessageCenterItem, itemMatchesViewFilters, managedAgentRoundedIconUrl, messageCenterAgentUserStackId, messageCenterFiltersStorageKey, messageCenterGroupLabel, messageCenterStackPreviewNodes, messageCenterStackPreviewText, messageCenterStackRenderId, messageCenterStackScrollSyncSegment, messageCenterStatusFilterValue, messageCenterStatusTone, messageCenterStatusToneClass, partitionMessageCenterItemsByAgentUser, readMessageCenterFilterPreferences, resolveMessageCenterNotificationAction, selectMessageCenterAttentionDeckItems, selectWorkspaceAgentMessageCenterPresentation, stabilizeWorkspaceAgentMessageCenterModel, statusFilterSummary, userAvatarPlaceholderUrl, workspaceAgentActivityStatusLabel, workspaceAgentMessageCenterPresentationEqual, workspaceAgentMessageCenterPromptStatus, writeMessageCenterFilterPreferences };
|
|
@@ -538,6 +538,7 @@ function buildWorkspaceAgentMessageCenterItem({
|
|
|
538
538
|
messages,
|
|
539
539
|
status,
|
|
540
540
|
needsAttention,
|
|
541
|
+
pendingInteractionTarget,
|
|
541
542
|
pendingPrompt,
|
|
542
543
|
latestTurnOutcome,
|
|
543
544
|
options = {}
|
|
@@ -578,6 +579,7 @@ function buildWorkspaceAgentMessageCenterItem({
|
|
|
578
579
|
digest,
|
|
579
580
|
lastAgentMessageSummary: lastAgentMessage?.summary ?? needsAttention?.summary ?? title,
|
|
580
581
|
lastAgentMessageAtUnixMs: lastAgentMessage?.occurredAtUnixMs ?? null,
|
|
582
|
+
pendingInteractionTarget,
|
|
581
583
|
pendingPrompt,
|
|
582
584
|
needsAttentionKind: needsAttention?.kind ?? null,
|
|
583
585
|
needsAttentionSummary: needsAttention?.summary ?? null,
|
|
@@ -3077,7 +3079,8 @@ function WorkspaceAgentMessageCenterPanelContent({
|
|
|
3077
3079
|
}
|
|
3078
3080
|
await onSubmitPrompt({
|
|
3079
3081
|
...input,
|
|
3080
|
-
agentSessionId: item.agentSessionId,
|
|
3082
|
+
agentSessionId: item.pendingInteractionTarget?.agentSessionId ?? item.agentSessionId,
|
|
3083
|
+
...item.pendingInteractionTarget ? { turnId: item.pendingInteractionTarget.turnId } : {},
|
|
3081
3084
|
promptKind: item.pendingPrompt?.kind
|
|
3082
3085
|
});
|
|
3083
3086
|
},
|
|
@@ -3446,17 +3449,9 @@ var MessageCenterRenderedCard = memo2(function MessageCenterRenderedCard2({
|
|
|
3446
3449
|
import {
|
|
3447
3450
|
selectEngineInteractionResponse,
|
|
3448
3451
|
selectPendingSubmitsForSession,
|
|
3449
|
-
selectPlanDecisionForTurn
|
|
3452
|
+
selectPlanDecisionForTurn,
|
|
3453
|
+
selectWorkspaceAgentRootConversationSessions
|
|
3450
3454
|
} from "@tutti-os/agent-activity-core";
|
|
3451
|
-
|
|
3452
|
-
// agent-message-center/workspaceAgentConsumerSelectors.ts
|
|
3453
|
-
import {
|
|
3454
|
-
selectWorkspaceAgentConsumerCounts,
|
|
3455
|
-
selectWorkspaceAgentConsumerSession,
|
|
3456
|
-
selectWorkspaceAgentConsumerSessions
|
|
3457
|
-
} from "@tutti-os/agent-activity-core";
|
|
3458
|
-
|
|
3459
|
-
// agent-message-center/workspaceAgentMessageCenterEngineModel.ts
|
|
3460
3455
|
function buildWorkspaceAgentMessageCenterModelFromEngine(presentation, snapshot, options = {}) {
|
|
3461
3456
|
const items = presentation.consumers.filter((consumer) => consumer.session.visible !== false).map((consumer) => {
|
|
3462
3457
|
const interaction = latestPendingInteraction(consumer);
|
|
@@ -3467,6 +3462,7 @@ function buildWorkspaceAgentMessageCenterModelFromEngine(presentation, snapshot,
|
|
|
3467
3462
|
messages: sessionMessages(snapshot.sessionMessagesById, consumer),
|
|
3468
3463
|
status: consumer.displayStatus,
|
|
3469
3464
|
needsAttention,
|
|
3465
|
+
pendingInteractionTarget: interaction ? interactionTarget(interaction) : null,
|
|
3470
3466
|
pendingPrompt: interaction ? promptFromInteraction(interaction) : null,
|
|
3471
3467
|
latestTurnOutcome: turnOutcome(consumer),
|
|
3472
3468
|
options
|
|
@@ -3478,26 +3474,30 @@ function buildWorkspaceAgentMessageCenterModelFromEngine(presentation, snapshot,
|
|
|
3478
3474
|
);
|
|
3479
3475
|
}
|
|
3480
3476
|
function selectWorkspaceAgentMessageCenterPresentation(state) {
|
|
3481
|
-
const consumers =
|
|
3477
|
+
const consumers = selectWorkspaceAgentRootConversationSessions(state);
|
|
3482
3478
|
const promptStatusByKey = {};
|
|
3483
3479
|
for (const consumer of consumers) {
|
|
3484
3480
|
const sessionId = consumer.session.agentSessionId;
|
|
3485
3481
|
for (const interaction of consumer.pendingInteractions) {
|
|
3486
3482
|
const response = selectEngineInteractionResponse(
|
|
3487
3483
|
state,
|
|
3488
|
-
|
|
3484
|
+
interaction.agentSessionId,
|
|
3489
3485
|
interaction.turnId,
|
|
3490
3486
|
interaction.requestId
|
|
3491
3487
|
);
|
|
3492
3488
|
if (response) {
|
|
3493
|
-
promptStatusByKey[promptStatusKey(
|
|
3489
|
+
promptStatusByKey[promptStatusKey(
|
|
3490
|
+
interaction.agentSessionId,
|
|
3491
|
+
interaction.turnId,
|
|
3492
|
+
interaction.requestId
|
|
3493
|
+
)] = response.status;
|
|
3494
3494
|
}
|
|
3495
3495
|
}
|
|
3496
3496
|
const turnId = consumer.latestTurn?.turnId ?? "";
|
|
3497
3497
|
if (!turnId) continue;
|
|
3498
3498
|
const decision = selectPlanDecisionForTurn(state, sessionId, turnId);
|
|
3499
3499
|
if (decision) {
|
|
3500
|
-
promptStatusByKey[promptStatusKey(sessionId, turnId)] = decision.status === "requested" ? "responding" : decision.status;
|
|
3500
|
+
promptStatusByKey[promptStatusKey(sessionId, turnId, turnId)] = decision.status === "requested" ? "responding" : decision.status;
|
|
3501
3501
|
continue;
|
|
3502
3502
|
}
|
|
3503
3503
|
const feedbackPrefix = [
|
|
@@ -3511,7 +3511,7 @@ function selectWorkspaceAgentMessageCenterPresentation(state) {
|
|
|
3511
3511
|
(record) => record.clientSubmitId.startsWith(feedbackPrefix)
|
|
3512
3512
|
);
|
|
3513
3513
|
if (submit) {
|
|
3514
|
-
promptStatusByKey[promptStatusKey(sessionId, turnId)] = submit.status === "failed" ? "failed" : submit.status === "uncertain" ? "unknown" : "responding";
|
|
3514
|
+
promptStatusByKey[promptStatusKey(sessionId, turnId, turnId)] = submit.status === "failed" ? "failed" : submit.status === "uncertain" ? "unknown" : "responding";
|
|
3515
3515
|
}
|
|
3516
3516
|
}
|
|
3517
3517
|
return {
|
|
@@ -3530,10 +3530,19 @@ function workspaceAgentMessageCenterPresentationEqual(left, right) {
|
|
|
3530
3530
|
function workspaceAgentMessageCenterPromptStatus(presentation, item) {
|
|
3531
3531
|
const prompt = item.pendingPrompt;
|
|
3532
3532
|
if (!prompt) return "idle";
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3533
|
+
const target = item.pendingInteractionTarget;
|
|
3534
|
+
return presentation.promptStatusByKey[target ? promptStatusKey(
|
|
3535
|
+
target.agentSessionId,
|
|
3536
|
+
target.turnId,
|
|
3537
|
+
target.requestId
|
|
3538
|
+
) : promptStatusKey(
|
|
3539
|
+
item.agentSessionId,
|
|
3540
|
+
prompt.requestId,
|
|
3541
|
+
prompt.requestId
|
|
3542
|
+
)] ?? "idle";
|
|
3543
|
+
}
|
|
3544
|
+
function promptStatusKey(agentSessionId, turnId, requestId) {
|
|
3545
|
+
return `${agentSessionId}\0${turnId}\0${requestId}`;
|
|
3537
3546
|
}
|
|
3538
3547
|
function promptStatusMapsEqual(left, right) {
|
|
3539
3548
|
const keys = Object.keys(left);
|
|
@@ -3554,6 +3563,13 @@ function sessionMessages(sessionMessagesById, consumer) {
|
|
|
3554
3563
|
function latestPendingInteraction(consumer) {
|
|
3555
3564
|
return consumer.pendingInteractions.at(-1) ?? null;
|
|
3556
3565
|
}
|
|
3566
|
+
function interactionTarget(interaction) {
|
|
3567
|
+
return {
|
|
3568
|
+
agentSessionId: interaction.agentSessionId,
|
|
3569
|
+
requestId: interaction.requestId,
|
|
3570
|
+
turnId: interaction.turnId
|
|
3571
|
+
};
|
|
3572
|
+
}
|
|
3557
3573
|
function needsAttentionFromInteraction(consumer, interaction) {
|
|
3558
3574
|
const summary = interactionSummary(interaction);
|
|
3559
3575
|
return {
|
|
@@ -3622,6 +3638,9 @@ function promptFromInteraction(interaction) {
|
|
|
3622
3638
|
};
|
|
3623
3639
|
}
|
|
3624
3640
|
function turnOutcome(consumer) {
|
|
3641
|
+
if (consumer.displayStatus !== "completed" && consumer.displayStatus !== "failed") {
|
|
3642
|
+
return null;
|
|
3643
|
+
}
|
|
3625
3644
|
const turn = consumer.latestTurn;
|
|
3626
3645
|
if (!turn || turn.phase !== "settled") return null;
|
|
3627
3646
|
const status = turn.outcome === "completed" ? "completed" : turn.outcome === "failed" ? "failed" : null;
|
|
@@ -3674,11 +3693,17 @@ function stabilizeWorkspaceAgentMessageCenterModel(previous, next) {
|
|
|
3674
3693
|
};
|
|
3675
3694
|
}
|
|
3676
3695
|
function messageCenterItemsEqual(left, right) {
|
|
3677
|
-
return left.id === right.id && left.agentSessionId === right.agentSessionId && left.agentTargetId === right.agentTargetId && left.agentName === right.agentName && left.agentAvatarUrl === right.agentAvatarUrl && left.provider === right.provider && left.userId === right.userId && left.title === right.title && left.imported === right.imported && left.cwd === right.cwd && left.status === right.status && left.lastAgentMessageSummary === right.lastAgentMessageSummary && left.lastAgentMessageAtUnixMs === right.lastAgentMessageAtUnixMs &&
|
|
3696
|
+
return left.id === right.id && left.agentSessionId === right.agentSessionId && left.agentTargetId === right.agentTargetId && left.agentName === right.agentName && left.agentAvatarUrl === right.agentAvatarUrl && left.provider === right.provider && left.userId === right.userId && left.title === right.title && left.imported === right.imported && left.cwd === right.cwd && left.status === right.status && left.lastAgentMessageSummary === right.lastAgentMessageSummary && left.lastAgentMessageAtUnixMs === right.lastAgentMessageAtUnixMs && messageCenterInteractionTargetEqual(
|
|
3697
|
+
left.pendingInteractionTarget,
|
|
3698
|
+
right.pendingInteractionTarget
|
|
3699
|
+
) && left.needsAttentionKind === right.needsAttentionKind && left.needsAttentionSummary === right.needsAttentionSummary && left.sortTimeUnixMs === right.sortTimeUnixMs && messageCenterIdentityEqual(left.identity, right.identity) && messageCenterDigestEqual(left.digest, right.digest) && messageCenterPromptEqual(left.pendingPrompt, right.pendingPrompt) && messageCenterTurnOutcomeEqual(
|
|
3678
3700
|
left.latestTurnOutcome ?? null,
|
|
3679
3701
|
right.latestTurnOutcome ?? null
|
|
3680
3702
|
);
|
|
3681
3703
|
}
|
|
3704
|
+
function messageCenterInteractionTargetEqual(left, right) {
|
|
3705
|
+
return left === right || left !== null && right !== null && left.agentSessionId === right.agentSessionId && left.turnId === right.turnId && left.requestId === right.requestId;
|
|
3706
|
+
}
|
|
3682
3707
|
function messageCenterCountsEqual(left, right) {
|
|
3683
3708
|
return left.all === right.all && left.working === right.working && left.waiting === right.waiting && left.completed === right.completed && left.failed === right.failed;
|
|
3684
3709
|
}
|
|
@@ -3782,6 +3807,13 @@ function messageCenterJsonValueEqual(left, right) {
|
|
|
3782
3807
|
(key) => messageCenterJsonValueEqual(leftRecord[key], rightRecord[key])
|
|
3783
3808
|
);
|
|
3784
3809
|
}
|
|
3810
|
+
|
|
3811
|
+
// agent-message-center/workspaceAgentConsumerSelectors.ts
|
|
3812
|
+
import {
|
|
3813
|
+
selectWorkspaceAgentConsumerCounts,
|
|
3814
|
+
selectWorkspaceAgentConsumerSession,
|
|
3815
|
+
selectWorkspaceAgentConsumerSessions
|
|
3816
|
+
} from "@tutti-os/agent-activity-core";
|
|
3785
3817
|
export {
|
|
3786
3818
|
AgentInteractivePromptSurface,
|
|
3787
3819
|
AgentVerticalScrollArea,
|