@tutti-os/agent-gui 0.0.10 → 0.0.12
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/AgentMessageMarkdown-DeYPURtF.d.ts +7 -0
- package/dist/agent-conversation/index.d.ts +135 -0
- package/dist/agent-conversation/index.js +77 -0
- package/dist/agent-conversation/index.js.map +1 -0
- package/dist/agent-message-center/index.d.ts +45 -46
- package/dist/agent-message-center/index.js +1801 -1166
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/agentConversationVM-BtHYOTgv.d.ts +342 -0
- package/dist/app/renderer/agentactivity.css +233 -0
- package/dist/chunk-72YSPOHX.js +13290 -0
- package/dist/chunk-72YSPOHX.js.map +1 -0
- package/dist/{chunk-3D5VTIKP.js → chunk-IBIMGLCD.js} +1 -28
- package/dist/chunk-IBIMGLCD.js.map +1 -0
- package/dist/chunk-MKHDRIGN.js +71 -0
- package/dist/chunk-MKHDRIGN.js.map +1 -0
- package/dist/{chunk-EHLA6MSQ.js → chunk-PKCJR6GC.js} +10 -20
- package/dist/chunk-PKCJR6GC.js.map +1 -0
- package/dist/chunk-PONEQEJ5.js +2616 -0
- package/dist/chunk-PONEQEJ5.js.map +1 -0
- package/dist/chunk-TYGL25EL.js +30 -0
- package/dist/chunk-TYGL25EL.js.map +1 -0
- package/dist/chunk-XJ34OIEQ.js +18 -0
- package/dist/chunk-XJ34OIEQ.js.map +1 -0
- package/dist/{chunk-T6U7AB7F.js → chunk-Y3AQGWJA.js} +55 -3
- package/dist/chunk-Y3AQGWJA.js.map +1 -0
- package/dist/{chunk-CUQJ3VO3.js → chunk-Y5O7BVGU.js} +282 -2531
- package/dist/chunk-Y5O7BVGU.js.map +1 -0
- package/dist/i18n/index.d.ts +54 -2
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +11 -8
- package/dist/index.js +10179 -21761
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +70 -0
- package/dist/plan-decision-ops.js +19 -0
- package/dist/plan-decision-ops.js.map +1 -0
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/workspace-agent-generated-files.js +5 -3
- package/dist/{workspaceAgentActivityListViewModel-Be4zm3nk.d.ts → workspaceAgentActivityListViewModel-BLLYGuFO.d.ts} +36 -2
- package/package.json +24 -10
- package/dist/chunk-3D5VTIKP.js.map +0 -1
- package/dist/chunk-CUQJ3VO3.js.map +0 -1
- package/dist/chunk-EHLA6MSQ.js.map +0 -1
- package/dist/chunk-T6U7AB7F.js.map +0 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode, JSX } from 'react';
|
|
3
|
+
import { WorkspaceIssueMentionMode } from '@tutti-os/workspace-issue-manager/core';
|
|
4
|
+
import { A as AgentMessageMarkdownWorkspaceAppIcon } from '../AgentMessageMarkdown-DeYPURtF.js';
|
|
5
|
+
import { a as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BtHYOTgv.js';
|
|
6
|
+
export { B as BuildWorkspaceAgentSessionDetailInput, b as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-BtHYOTgv.js';
|
|
7
|
+
export { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, p as WorkspaceAgentActivityTimelineItem } from '../workspaceAgentActivityListViewModel-BLLYGuFO.js';
|
|
8
|
+
import '@tutti-os/agent-activity-core';
|
|
9
|
+
|
|
10
|
+
type WorkspaceLinkActionSource = "agent-markdown" | "agent-file-change" | string;
|
|
11
|
+
interface OpenWorkspaceFileLinkAction {
|
|
12
|
+
type: "open-workspace-file";
|
|
13
|
+
path: string;
|
|
14
|
+
directoryPath: string;
|
|
15
|
+
workspaceRoot: string;
|
|
16
|
+
source: WorkspaceLinkActionSource;
|
|
17
|
+
prefetchedDirectoryListing?: WorkspaceFileLinkDirectoryListing | null;
|
|
18
|
+
}
|
|
19
|
+
interface WorkspaceFileLinkDirectoryEntry {
|
|
20
|
+
path: string;
|
|
21
|
+
name: string;
|
|
22
|
+
kind: "file" | "directory" | "unknown";
|
|
23
|
+
hasChildren: boolean | null;
|
|
24
|
+
sizeBytes: number | null;
|
|
25
|
+
mtimeMs: number | null;
|
|
26
|
+
}
|
|
27
|
+
interface WorkspaceFileLinkDirectoryListing {
|
|
28
|
+
workspaceId: string;
|
|
29
|
+
root: string;
|
|
30
|
+
directoryPath: string;
|
|
31
|
+
entries: WorkspaceFileLinkDirectoryEntry[];
|
|
32
|
+
}
|
|
33
|
+
interface OpenWorkspaceUrlLinkAction {
|
|
34
|
+
type: "open-url";
|
|
35
|
+
url: string;
|
|
36
|
+
source: WorkspaceLinkActionSource;
|
|
37
|
+
}
|
|
38
|
+
interface OpenAgentSessionLinkAction {
|
|
39
|
+
type: "open-agent-session";
|
|
40
|
+
workspaceId: string;
|
|
41
|
+
agentSessionId: string;
|
|
42
|
+
provider?: string | null;
|
|
43
|
+
source: WorkspaceLinkActionSource;
|
|
44
|
+
}
|
|
45
|
+
interface OpenWorkspaceIssueLinkAction {
|
|
46
|
+
type: "open-workspace-issue";
|
|
47
|
+
workspaceId: string;
|
|
48
|
+
issueId: string | null;
|
|
49
|
+
mode?: WorkspaceIssueMentionMode;
|
|
50
|
+
outputDir?: string | null;
|
|
51
|
+
runId?: string | null;
|
|
52
|
+
taskId?: string | null;
|
|
53
|
+
topicId?: string | null;
|
|
54
|
+
source: WorkspaceLinkActionSource;
|
|
55
|
+
}
|
|
56
|
+
type WorkspaceLinkAction = OpenWorkspaceFileLinkAction | OpenWorkspaceUrlLinkAction | OpenAgentSessionLinkAction | OpenWorkspaceIssueLinkAction;
|
|
57
|
+
|
|
58
|
+
interface AgentGUIProviderSkillOption {
|
|
59
|
+
name: string;
|
|
60
|
+
trigger: string;
|
|
61
|
+
sourceKind: "project" | "personal" | "bundled" | "plugin" | "system" | "tutti-injected";
|
|
62
|
+
description?: string;
|
|
63
|
+
pluginName?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface AgentConversationFlowProps {
|
|
67
|
+
conversation: AgentConversationVM | null;
|
|
68
|
+
isLoading: boolean;
|
|
69
|
+
loadingLabel: string;
|
|
70
|
+
loadingTestId?: string;
|
|
71
|
+
empty: ReactNode;
|
|
72
|
+
onLinkAction?: (action: WorkspaceLinkAction) => void;
|
|
73
|
+
onAuthLogin?: (provider?: string | null) => void;
|
|
74
|
+
availableSkills?: readonly AgentGUIProviderSkillOption[];
|
|
75
|
+
workspaceAppIcons?: readonly AgentMessageMarkdownWorkspaceAppIcon[];
|
|
76
|
+
showRawTimelineJson?: boolean;
|
|
77
|
+
labels: {
|
|
78
|
+
toolCallsLabel: (count: number) => string;
|
|
79
|
+
thinkingLabel: string;
|
|
80
|
+
processing: string;
|
|
81
|
+
turnSummary: string;
|
|
82
|
+
rawTimelineJson?: string;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
declare const AgentConversationFlow: react.NamedExoticComponent<AgentConversationFlowProps>;
|
|
86
|
+
|
|
87
|
+
interface AgentTranscriptViewProps {
|
|
88
|
+
conversation: AgentConversationVM;
|
|
89
|
+
onLinkAction?: (action: WorkspaceLinkAction) => void;
|
|
90
|
+
onAuthLogin?: (provider?: string | null) => void;
|
|
91
|
+
availableSkills?: readonly AgentGUIProviderSkillOption[];
|
|
92
|
+
workspaceAppIcons?: readonly AgentMessageMarkdownWorkspaceAppIcon[];
|
|
93
|
+
showRawTimelineJson?: boolean;
|
|
94
|
+
labels: {
|
|
95
|
+
toolCallsLabel: (count: number) => string;
|
|
96
|
+
thinkingLabel: string;
|
|
97
|
+
processing: string;
|
|
98
|
+
turnSummary: string;
|
|
99
|
+
rawTimelineJson?: string;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
declare const AgentTranscriptView: react.NamedExoticComponent<AgentTranscriptViewProps>;
|
|
103
|
+
|
|
104
|
+
declare function AgentTranscriptSkeleton({ label, testId }: {
|
|
105
|
+
label: string;
|
|
106
|
+
testId?: string;
|
|
107
|
+
}): React.JSX.Element;
|
|
108
|
+
|
|
109
|
+
interface WorkspaceAgentSessionDetailProps {
|
|
110
|
+
detail: WorkspaceAgentSessionDetailViewModel;
|
|
111
|
+
avoidGroupingEdits?: boolean;
|
|
112
|
+
isLoading: boolean;
|
|
113
|
+
timelineItemCount: number;
|
|
114
|
+
onLinkAction?: (action: WorkspaceLinkAction) => void;
|
|
115
|
+
toolCallsLabel: (count: number) => string;
|
|
116
|
+
thinkingLabel?: string;
|
|
117
|
+
loadingLabel?: string;
|
|
118
|
+
rawTimelineJsonLabel?: string;
|
|
119
|
+
showRawTimelineJson?: boolean;
|
|
120
|
+
}
|
|
121
|
+
declare function WorkspaceAgentSessionDetail({ detail, avoidGroupingEdits, isLoading, timelineItemCount, onLinkAction, toolCallsLabel, thinkingLabel, loadingLabel, rawTimelineJsonLabel, showRawTimelineJson }: WorkspaceAgentSessionDetailProps): JSX.Element;
|
|
122
|
+
|
|
123
|
+
interface AgentConversationProjectionOptions {
|
|
124
|
+
avoidGroupingEdits?: boolean;
|
|
125
|
+
}
|
|
126
|
+
declare function projectAgentConversationVM(detail: WorkspaceAgentSessionDetailViewModel, options?: AgentConversationProjectionOptions): AgentConversationVM;
|
|
127
|
+
declare function reconcileProjectedAgentConversationVM(previous: AgentConversationVM | null | undefined, next: AgentConversationVM): AgentConversationVM;
|
|
128
|
+
|
|
129
|
+
declare function useProjectedAgentConversation({ conversation, detail, avoidGroupingEdits }: {
|
|
130
|
+
conversation?: AgentConversationVM | null;
|
|
131
|
+
detail?: WorkspaceAgentSessionDetailViewModel | null;
|
|
132
|
+
avoidGroupingEdits?: boolean;
|
|
133
|
+
}): AgentConversationVM | null;
|
|
134
|
+
|
|
135
|
+
export { AgentConversationFlow, AgentConversationVM, AgentTranscriptSkeleton, AgentTranscriptView, WorkspaceAgentSessionDetail, WorkspaceAgentSessionDetailViewModel, projectAgentConversationVM, reconcileProjectedAgentConversationVM, useProjectedAgentConversation };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentConversationFlow,
|
|
3
|
+
AgentTranscriptSkeleton,
|
|
4
|
+
AgentTranscriptView,
|
|
5
|
+
buildWorkspaceAgentSessionDetailViewModel,
|
|
6
|
+
projectAgentConversationVM,
|
|
7
|
+
reconcileProjectedAgentConversationVM,
|
|
8
|
+
useProjectedAgentConversation
|
|
9
|
+
} from "../chunk-72YSPOHX.js";
|
|
10
|
+
import "../chunk-XJ34OIEQ.js";
|
|
11
|
+
import "../chunk-PONEQEJ5.js";
|
|
12
|
+
import "../chunk-TYGL25EL.js";
|
|
13
|
+
import {
|
|
14
|
+
translate
|
|
15
|
+
} from "../chunk-Y3AQGWJA.js";
|
|
16
|
+
import "../chunk-LUGELG5V.js";
|
|
17
|
+
import "../chunk-PJP5BUU6.js";
|
|
18
|
+
|
|
19
|
+
// shared/WorkspaceAgentSessionDetail.tsx
|
|
20
|
+
import { useMemo } from "react";
|
|
21
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
22
|
+
function WorkspaceAgentSessionDetail({
|
|
23
|
+
detail,
|
|
24
|
+
avoidGroupingEdits = false,
|
|
25
|
+
isLoading,
|
|
26
|
+
timelineItemCount,
|
|
27
|
+
onLinkAction,
|
|
28
|
+
toolCallsLabel,
|
|
29
|
+
thinkingLabel = translate("agentHost.workspaceAgentSessionDetailThinking"),
|
|
30
|
+
loadingLabel = translate("common.loading"),
|
|
31
|
+
rawTimelineJsonLabel,
|
|
32
|
+
showRawTimelineJson = false
|
|
33
|
+
}) {
|
|
34
|
+
const conversation = useProjectedAgentConversation({
|
|
35
|
+
detail,
|
|
36
|
+
avoidGroupingEdits
|
|
37
|
+
});
|
|
38
|
+
const showLoadingSkeleton = detail.turns.length === 0 && (isLoading || detail.activity.status === "waiting" || detail.activity.status === "working");
|
|
39
|
+
const emptySummary = detail.activity.latestActivitySummary || (timelineItemCount > 0 ? translate("agentHost.workspaceAgentSessionDetailEmptyWithTimeline") : translate("agentHost.workspaceAgentSessionDetailEmptyNoTimeline"));
|
|
40
|
+
const flowLabels = useMemo(
|
|
41
|
+
() => ({
|
|
42
|
+
thinkingLabel,
|
|
43
|
+
toolCallsLabel,
|
|
44
|
+
processing: translate("agentHost.agentGui.processing"),
|
|
45
|
+
turnSummary: translate("agentHost.agentGui.turnSummary"),
|
|
46
|
+
rawTimelineJson: rawTimelineJsonLabel
|
|
47
|
+
}),
|
|
48
|
+
[rawTimelineJsonLabel, thinkingLabel, toolCallsLabel]
|
|
49
|
+
);
|
|
50
|
+
const emptyState = useMemo(
|
|
51
|
+
() => /* @__PURE__ */ jsx("div", { className: "workspace-agents-status-panel__detail-empty", children: emptySummary }),
|
|
52
|
+
[emptySummary]
|
|
53
|
+
);
|
|
54
|
+
return /* @__PURE__ */ jsx("div", { className: "workspace-agents-status-panel__detail", children: /* @__PURE__ */ jsx(
|
|
55
|
+
AgentConversationFlow,
|
|
56
|
+
{
|
|
57
|
+
conversation: detail.turns.length > 0 ? conversation : null,
|
|
58
|
+
isLoading: showLoadingSkeleton,
|
|
59
|
+
loadingLabel,
|
|
60
|
+
empty: emptyState,
|
|
61
|
+
onLinkAction,
|
|
62
|
+
showRawTimelineJson,
|
|
63
|
+
labels: flowLabels
|
|
64
|
+
}
|
|
65
|
+
) });
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
AgentConversationFlow,
|
|
69
|
+
AgentTranscriptSkeleton,
|
|
70
|
+
AgentTranscriptView,
|
|
71
|
+
WorkspaceAgentSessionDetail,
|
|
72
|
+
buildWorkspaceAgentSessionDetailViewModel,
|
|
73
|
+
projectAgentConversationVM,
|
|
74
|
+
reconcileProjectedAgentConversationVM,
|
|
75
|
+
useProjectedAgentConversation
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../shared/WorkspaceAgentSessionDetail.tsx"],"sourcesContent":["import { useMemo, type JSX } from \"react\";\nimport type { WorkspaceLinkAction } from \"../contexts/workspace/presentation/renderer/actions/workspaceLinkActions\";\nimport { translate } from \"../i18n/index\";\nimport { AgentConversationFlow } from \"./agentConversation/components/AgentConversationFlow\";\nimport { useProjectedAgentConversation } from \"./agentConversation/projection/useProjectedAgentConversation\";\nimport type { WorkspaceAgentSessionDetailViewModel } from \"./workspaceAgentSessionDetailViewModel\";\n\ninterface WorkspaceAgentSessionDetailProps {\n detail: WorkspaceAgentSessionDetailViewModel;\n avoidGroupingEdits?: boolean;\n isLoading: boolean;\n timelineItemCount: number;\n onLinkAction?: (action: WorkspaceLinkAction) => void;\n toolCallsLabel: (count: number) => string;\n thinkingLabel?: string;\n loadingLabel?: string;\n rawTimelineJsonLabel?: string;\n showRawTimelineJson?: boolean;\n}\n\nexport function WorkspaceAgentSessionDetail({\n detail,\n avoidGroupingEdits = false,\n isLoading,\n timelineItemCount,\n onLinkAction,\n toolCallsLabel,\n thinkingLabel = translate(\"agentHost.workspaceAgentSessionDetailThinking\"),\n loadingLabel = translate(\"common.loading\"),\n rawTimelineJsonLabel,\n showRawTimelineJson = false\n}: WorkspaceAgentSessionDetailProps): JSX.Element {\n const conversation = useProjectedAgentConversation({\n detail,\n avoidGroupingEdits\n });\n const showLoadingSkeleton =\n detail.turns.length === 0 &&\n (isLoading ||\n detail.activity.status === \"waiting\" ||\n detail.activity.status === \"working\");\n const emptySummary =\n detail.activity.latestActivitySummary ||\n (timelineItemCount > 0\n ? translate(\"agentHost.workspaceAgentSessionDetailEmptyWithTimeline\")\n : translate(\"agentHost.workspaceAgentSessionDetailEmptyNoTimeline\"));\n const flowLabels = useMemo(\n () => ({\n thinkingLabel,\n toolCallsLabel,\n processing: translate(\"agentHost.agentGui.processing\"),\n turnSummary: translate(\"agentHost.agentGui.turnSummary\"),\n rawTimelineJson: rawTimelineJsonLabel\n }),\n [rawTimelineJsonLabel, thinkingLabel, toolCallsLabel]\n );\n const emptyState = useMemo(\n () => (\n <div className=\"workspace-agents-status-panel__detail-empty\">\n {emptySummary}\n </div>\n ),\n [emptySummary]\n );\n\n return (\n <div className=\"workspace-agents-status-panel__detail\">\n <AgentConversationFlow\n conversation={detail.turns.length > 0 ? conversation : null}\n isLoading={showLoadingSkeleton}\n loadingLabel={loadingLabel}\n empty={emptyState}\n onLinkAction={onLinkAction}\n showRawTimelineJson={showRawTimelineJson}\n labels={flowLabels}\n />\n </div>\n );\n}\n\nexport function WorkspaceAgentSessionDetailSkeleton({\n loading = true,\n loadingLabel = translate(\"common.loading\")\n}: {\n loading?: boolean;\n loadingLabel?: string;\n}): JSX.Element {\n const flowLabels = useMemo(\n () => ({\n thinkingLabel: translate(\"agentHost.workspaceAgentSessionDetailThinking\"),\n toolCallsLabel: (count: number) =>\n translate(\"agentHost.workspaceAgentSessionDetailToolCalls\", { count }),\n processing: translate(\"agentHost.agentGui.processing\"),\n turnSummary: translate(\"agentHost.agentGui.turnSummary\")\n }),\n []\n );\n\n if (!loading) {\n return <></>;\n }\n\n return (\n <div\n className=\"workspace-agents-status-panel__detail-skeleton\"\n data-testid=\"workspace-agents-status-panel-detail-skeleton\"\n role=\"status\"\n aria-busy=\"true\"\n aria-label={loadingLabel}\n >\n <AgentConversationFlow\n conversation={null}\n isLoading\n loadingLabel={loadingLabel}\n loadingTestId=\"workspace-agents-status-panel-detail-skeleton\"\n empty={null}\n labels={flowLabels}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,SAAS,eAAyB;AA0D5B,SAyCK,UAzCL;AAtCC,SAAS,4BAA4B;AAAA,EAC1C;AAAA,EACA,qBAAqB;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,gBAAgB,UAAU,+CAA+C;AAAA,EACzE,eAAe,UAAU,gBAAgB;AAAA,EACzC;AAAA,EACA,sBAAsB;AACxB,GAAkD;AAChD,QAAM,eAAe,8BAA8B;AAAA,IACjD;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,sBACJ,OAAO,MAAM,WAAW,MACvB,aACC,OAAO,SAAS,WAAW,aAC3B,OAAO,SAAS,WAAW;AAC/B,QAAM,eACJ,OAAO,SAAS,0BACf,oBAAoB,IACjB,UAAU,wDAAwD,IAClE,UAAU,sDAAsD;AACtE,QAAM,aAAa;AAAA,IACjB,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA,YAAY,UAAU,+BAA+B;AAAA,MACrD,aAAa,UAAU,gCAAgC;AAAA,MACvD,iBAAiB;AAAA,IACnB;AAAA,IACA,CAAC,sBAAsB,eAAe,cAAc;AAAA,EACtD;AACA,QAAM,aAAa;AAAA,IACjB,MACE,oBAAC,SAAI,WAAU,+CACZ,wBACH;AAAA,IAEF,CAAC,YAAY;AAAA,EACf;AAEA,SACE,oBAAC,SAAI,WAAU,yCACb;AAAA,IAAC;AAAA;AAAA,MACC,cAAc,OAAO,MAAM,SAAS,IAAI,eAAe;AAAA,MACvD,WAAW;AAAA,MACX;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA,QAAQ;AAAA;AAAA,EACV,GACF;AAEJ;","names":[]}
|
|
@@ -4,54 +4,21 @@ import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
|
|
|
4
4
|
import { useTranslation, AgentGuiI18nLocale } from '../i18n/index.js';
|
|
5
5
|
import { W as WorkspaceLinkAction } from '../workspaceLinkActions-Bwa-phu8.js';
|
|
6
6
|
import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot } from '@tutti-os/agent-activity-core';
|
|
7
|
-
import {
|
|
7
|
+
import { A as AgentConversationPromptVM } from '../agentConversationVM-BtHYOTgv.js';
|
|
8
|
+
import { o as WorkspaceAgentActivityStatus } from '../workspaceAgentActivityListViewModel-BLLYGuFO.js';
|
|
9
|
+
export { PLAN_IMPLEMENTATION_ACTION_IMPLEMENT, PLAN_IMPLEMENTATION_PROMPT } from '../plan-decision-ops.js';
|
|
8
10
|
import '@tutti-os/workspace-issue-manager/core';
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
description?: string;
|
|
15
|
-
}
|
|
16
|
-
interface AgentApprovalItemVM {
|
|
17
|
-
kind: "approval";
|
|
18
|
-
id: string;
|
|
19
|
-
turnId: string;
|
|
20
|
-
requestId: string;
|
|
21
|
-
callId: string;
|
|
22
|
-
title: string;
|
|
23
|
-
toolName: string | null;
|
|
24
|
-
status: string | null;
|
|
25
|
-
input: Record<string, unknown> | null;
|
|
26
|
-
options: AgentApprovalOptionVM[];
|
|
27
|
-
output?: Record<string, unknown> | null;
|
|
12
|
+
type WorkspaceAgentMessageCenterDigestPrimaryKind = "input-required" | "error" | "outcome" | "progress" | "summary";
|
|
13
|
+
interface WorkspaceAgentMessageCenterDigestPrimary {
|
|
14
|
+
kind: WorkspaceAgentMessageCenterDigestPrimaryKind;
|
|
15
|
+
summary: string;
|
|
28
16
|
occurredAtUnixMs: number | null;
|
|
29
17
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
label: string;
|
|
33
|
-
description: string;
|
|
34
|
-
}
|
|
35
|
-
interface AgentAskUserQuestionVM {
|
|
36
|
-
id: string;
|
|
37
|
-
header: string;
|
|
38
|
-
question: string;
|
|
39
|
-
options: AgentAskUserQuestionOptionVM[];
|
|
40
|
-
multiSelect: boolean;
|
|
41
|
-
answer?: string | string[] | null;
|
|
18
|
+
interface WorkspaceAgentMessageCenterDigest {
|
|
19
|
+
primary: WorkspaceAgentMessageCenterDigestPrimary;
|
|
42
20
|
}
|
|
43
21
|
|
|
44
|
-
type AgentConversationPromptVM = AgentApprovalItemVM | {
|
|
45
|
-
kind: "ask-user";
|
|
46
|
-
requestId: string;
|
|
47
|
-
title: string;
|
|
48
|
-
questions: AgentAskUserQuestionVM[];
|
|
49
|
-
} | {
|
|
50
|
-
kind: "exit-plan";
|
|
51
|
-
requestId: string;
|
|
52
|
-
title: string;
|
|
53
|
-
};
|
|
54
|
-
|
|
55
22
|
interface WorkspaceAgentMessageCenterModel {
|
|
56
23
|
waitingCount: number;
|
|
57
24
|
items: WorkspaceAgentMessageCenterItem[];
|
|
@@ -73,13 +40,20 @@ interface WorkspaceAgentMessageCenterItem {
|
|
|
73
40
|
identity: WorkspaceAgentMessageCenterIdentity | null;
|
|
74
41
|
cwd: string;
|
|
75
42
|
status: WorkspaceAgentActivityStatus;
|
|
43
|
+
digest: WorkspaceAgentMessageCenterDigest;
|
|
76
44
|
lastAgentMessageSummary: string;
|
|
77
45
|
lastAgentMessageAtUnixMs: number | null;
|
|
78
46
|
pendingPrompt: AgentConversationPromptVM | null;
|
|
79
47
|
needsAttentionKind: AgentActivityNeedsAttentionItem["kind"] | null;
|
|
80
48
|
needsAttentionSummary: string | null;
|
|
49
|
+
latestTurnOutcome?: WorkspaceAgentMessageCenterTurnOutcome | null;
|
|
81
50
|
sortTimeUnixMs: number;
|
|
82
51
|
}
|
|
52
|
+
interface WorkspaceAgentMessageCenterTurnOutcome {
|
|
53
|
+
notificationKey: string;
|
|
54
|
+
status: "completed" | "failed";
|
|
55
|
+
turnId: string | null;
|
|
56
|
+
}
|
|
83
57
|
interface BuildWorkspaceAgentMessageCenterOptions {
|
|
84
58
|
avoidGroupingEdits?: boolean;
|
|
85
59
|
identityBySessionId?: Record<string, WorkspaceAgentMessageCenterIdentity>;
|
|
@@ -105,6 +79,7 @@ interface WorkspaceAgentMessageCenterCardProps {
|
|
|
105
79
|
item: WorkspaceAgentMessageCenterItem;
|
|
106
80
|
cardRef?: (node: HTMLElement | null) => void;
|
|
107
81
|
highlighted?: boolean;
|
|
82
|
+
interactive?: boolean;
|
|
108
83
|
isSubmitting: boolean;
|
|
109
84
|
onLinkAction?: (action: WorkspaceLinkAction) => void;
|
|
110
85
|
onOpenChat: (input: {
|
|
@@ -118,7 +93,7 @@ interface WorkspaceAgentMessageCenterCardProps {
|
|
|
118
93
|
requestId: string;
|
|
119
94
|
}) => void;
|
|
120
95
|
}
|
|
121
|
-
declare function WorkspaceAgentMessageCenterCard({ cardRef, highlighted, item, isSubmitting, onLinkAction, onOpenChat, onSubmitPrompt }: WorkspaceAgentMessageCenterCardProps): JSX.Element;
|
|
96
|
+
declare function WorkspaceAgentMessageCenterCard({ cardRef, highlighted, interactive, item, isSubmitting, onLinkAction, onOpenChat, onSubmitPrompt }: WorkspaceAgentMessageCenterCardProps): JSX.Element;
|
|
122
97
|
declare function buildWorkspaceAgentInteractivePromptLabels(t: ReturnType<typeof useTranslation>["t"], provider?: string): {
|
|
123
98
|
approvalLead: string;
|
|
124
99
|
planLead: string;
|
|
@@ -135,6 +110,11 @@ declare function buildWorkspaceAgentInteractivePromptLabels(t: ReturnType<typeof
|
|
|
135
110
|
submitAnswers: string;
|
|
136
111
|
answerPlaceholder: string;
|
|
137
112
|
waitingForAnswer: string;
|
|
113
|
+
planImplementationLead: string;
|
|
114
|
+
planImplementationConfirm: string;
|
|
115
|
+
planImplementationFeedbackPlaceholder: string;
|
|
116
|
+
planImplementationSend: string;
|
|
117
|
+
planImplementationSkip: string;
|
|
138
118
|
};
|
|
139
119
|
|
|
140
120
|
interface WorkspaceAgentMessageCenterPanelProps {
|
|
@@ -160,13 +140,27 @@ interface WorkspaceAgentMessageCenterPanelProps {
|
|
|
160
140
|
agentSessionId: string;
|
|
161
141
|
optionId?: string;
|
|
162
142
|
payload?: Record<string, unknown>;
|
|
143
|
+
promptKind?: string;
|
|
163
144
|
requestId: string;
|
|
164
145
|
}) => Promise<void> | void;
|
|
165
146
|
}
|
|
166
147
|
declare const WorkspaceAgentMessageCenterPanel: react.NamedExoticComponent<WorkspaceAgentMessageCenterPanelProps>;
|
|
167
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Where the prompt is rendered, which sets its interaction budget:
|
|
151
|
+
* - "full" (conversation / composer): the user is focused here, so every action
|
|
152
|
+
* is shown — primary decisions plus rich follow-ups (feedback textareas,
|
|
153
|
+
* multi-step wizards, "stay in plan").
|
|
154
|
+
* - "compact" (message-center attention deck): a glanceable needs-attention card
|
|
155
|
+
* across many sessions. Only the primary decision is shown; rich follow-up
|
|
156
|
+
* input is deferred to the conversation, reachable via the card's "open
|
|
157
|
+
* conversation" jump. New prompt kinds must consciously choose their compact
|
|
158
|
+
* form here instead of silently inheriting the full conversation surface.
|
|
159
|
+
*/
|
|
160
|
+
type AgentInteractivePromptVariant = "full" | "compact";
|
|
168
161
|
interface AgentInteractivePromptSurfaceProps {
|
|
169
162
|
prompt: AgentConversationPromptVM;
|
|
163
|
+
variant?: AgentInteractivePromptVariant;
|
|
170
164
|
edgeGlow?: boolean;
|
|
171
165
|
keyboardShortcuts?: boolean;
|
|
172
166
|
isSubmitting: boolean;
|
|
@@ -192,16 +186,21 @@ interface AgentInteractivePromptSurfaceProps {
|
|
|
192
186
|
submitAnswers: string;
|
|
193
187
|
answerPlaceholder: string;
|
|
194
188
|
waitingForAnswer: string;
|
|
189
|
+
planImplementationLead: string;
|
|
190
|
+
planImplementationConfirm: string;
|
|
191
|
+
planImplementationFeedbackPlaceholder: string;
|
|
192
|
+
planImplementationSend: string;
|
|
193
|
+
planImplementationSkip: string;
|
|
195
194
|
};
|
|
196
195
|
}
|
|
197
|
-
declare function AgentInteractivePromptSurface({ prompt, edgeGlow, embedded, keyboardShortcuts, isSubmitting, onSubmit, labels }: AgentInteractivePromptSurfaceProps & {
|
|
196
|
+
declare function AgentInteractivePromptSurface({ prompt, variant, edgeGlow, embedded, keyboardShortcuts, isSubmitting, onSubmit, labels }: AgentInteractivePromptSurfaceProps & {
|
|
198
197
|
embedded?: boolean;
|
|
199
198
|
}): JSX.Element | null;
|
|
200
199
|
|
|
201
200
|
declare function managedAgentRoundedIconUrl(provider: string | undefined): string;
|
|
202
201
|
|
|
203
202
|
interface PromptToolDetail {
|
|
204
|
-
kind: "command" | "path" | "query";
|
|
203
|
+
kind: "command" | "mcp" | "path" | "query";
|
|
205
204
|
value: string;
|
|
206
205
|
meta?: string;
|
|
207
206
|
}
|
|
@@ -216,4 +215,4 @@ declare function approvalOptionDisplayLabel(option: {
|
|
|
216
215
|
feedback?: boolean;
|
|
217
216
|
}): string;
|
|
218
217
|
|
|
219
|
-
export { AgentInteractivePromptSurface, type BuildWorkspaceAgentMessageCenterOptions, type PromptToolDetail, WorkspaceAgentMessageCenterCard, type WorkspaceAgentMessageCenterCardProps, type WorkspaceAgentMessageCenterCounts, type WorkspaceAgentMessageCenterIdentity, type WorkspaceAgentMessageCenterItem, type WorkspaceAgentMessageCenterModel, WorkspaceAgentMessageCenterPanel, type WorkspaceAgentMessageCenterPanelProps, approvalOptionDisplayLabel, buildWorkspaceAgentInteractivePromptLabels, buildWorkspaceAgentMessageCenterModel, getPromptToolDetails, isPromptRequestIdTitle, isWaitingMessageCenterItem, managedAgentRoundedIconUrl };
|
|
218
|
+
export { AgentInteractivePromptSurface, type BuildWorkspaceAgentMessageCenterOptions, type PromptToolDetail, WorkspaceAgentMessageCenterCard, type WorkspaceAgentMessageCenterCardProps, type WorkspaceAgentMessageCenterCounts, type WorkspaceAgentMessageCenterDigest, type WorkspaceAgentMessageCenterDigestPrimary, type WorkspaceAgentMessageCenterDigestPrimaryKind, type WorkspaceAgentMessageCenterIdentity, type WorkspaceAgentMessageCenterItem, type WorkspaceAgentMessageCenterModel, WorkspaceAgentMessageCenterPanel, type WorkspaceAgentMessageCenterPanelProps, approvalOptionDisplayLabel, buildWorkspaceAgentInteractivePromptLabels, buildWorkspaceAgentMessageCenterModel, getPromptToolDetails, isPromptRequestIdTitle, isWaitingMessageCenterItem, managedAgentRoundedIconUrl };
|