@tutti-os/agent-gui 0.0.4 → 0.0.6
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/agent-message-center/index.d.ts +1 -0
- package/dist/agent-message-center/index.js +23 -9
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/app/renderer/agentactivity.css +11 -0
- package/dist/app/renderer/assets/icons/arrow-left-filled.svg +1 -0
- package/dist/{chunk-RORLLV27.js → chunk-3735XYFZ.js} +2 -40
- package/dist/chunk-3735XYFZ.js.map +1 -0
- package/dist/{chunk-IVPB4MLI.js → chunk-6AZ2KF6R.js} +1 -1
- package/dist/chunk-6AZ2KF6R.js.map +1 -0
- package/dist/{chunk-ZX5PDYAS.js → chunk-C63Z2JWT.js} +8 -10
- package/dist/chunk-C63Z2JWT.js.map +1 -0
- package/dist/chunk-FKCXHCPO.js +3478 -0
- package/dist/chunk-FKCXHCPO.js.map +1 -0
- package/dist/{chunk-ZP7P7DYO.js → chunk-GEXHKJK5.js} +6 -47
- package/dist/chunk-GEXHKJK5.js.map +1 -0
- package/dist/{chunk-UJWUGMWC.js → chunk-GYG57VTA.js} +17 -32
- package/dist/{chunk-UJWUGMWC.js.map → chunk-GYG57VTA.js.map} +1 -1
- package/dist/{chunk-HSR5DI6O.js → chunk-JWVLIF5R.js} +5 -1
- package/dist/chunk-JWVLIF5R.js.map +1 -0
- package/dist/{chunk-UKQIGNN3.js → chunk-KGFWU4FL.js} +2 -2
- package/dist/{chunk-BABBC24I.js → chunk-LUGELG5V.js} +4 -1
- package/dist/chunk-LUGELG5V.js.map +1 -0
- package/dist/chunk-ZU3FKYMG.js +47 -0
- package/dist/chunk-ZU3FKYMG.js.map +1 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.js +1 -1
- package/dist/index.d.ts +2 -11
- package/dist/index.js +176 -60
- package/dist/index.js.map +1 -1
- package/dist/mention-file-presentation.d.ts +2 -1
- package/dist/mention-file-presentation.js +1 -1
- package/dist/workbench/contribution.js +6 -5
- package/dist/workbench/index.d.ts +1 -1
- package/dist/workbench/index.js +6 -5
- package/dist/workbench/launch.d.ts +1 -7
- package/dist/workbench/launch.js +2 -2
- package/dist/workbench/state.js +1 -1
- package/dist/workbench/types.d.ts +1 -12
- package/dist/workbench/types.js +1 -1
- package/dist/workspace-agent-generated-files.js +2 -2
- package/package.json +10 -10
- package/dist/chunk-5Q36BEUM.js +0 -3478
- package/dist/chunk-5Q36BEUM.js.map +0 -1
- package/dist/chunk-BABBC24I.js.map +0 -1
- package/dist/chunk-HSR5DI6O.js.map +0 -1
- package/dist/chunk-IVPB4MLI.js.map +0 -1
- package/dist/chunk-RORLLV27.js.map +0 -1
- package/dist/chunk-ZP7P7DYO.js.map +0 -1
- package/dist/chunk-ZX5PDYAS.js.map +0 -1
- package/dist/user-avatar-placeholder-WP2373TS.png +0 -0
- /package/dist/{chunk-UKQIGNN3.js.map → chunk-KGFWU4FL.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../managedAgentIconAssets.ts"],"sourcesContent":["import claudeRoundedAssetUrl from \"./app/renderer/assets/icons/agents/claude-rounded.png\";\nimport codexRoundedAssetUrl from \"./app/renderer/assets/icons/agents/codex-rounded.png\";\nimport geminiRoundedAssetUrl from \"./app/renderer/assets/icons/agents/gemini-rounded.png\";\nimport hermesRoundedAssetUrl from \"./app/renderer/assets/icons/agents/hermes-rounded.png\";\nimport manageAgentNextopAssetUrl from \"./app/renderer/assets/icons/agents/manage-agent-nextop.png\";\nimport openclawRoundedAssetUrl from \"./app/renderer/assets/icons/agents/openclaw-rounded.png\";\n\nexport const manageAgentClaudeCodeUrl = claudeRoundedAssetUrl;\nexport const manageAgentCodexUrl = codexRoundedAssetUrl;\nexport const manageAgentGeminiUrl = geminiRoundedAssetUrl;\nexport const manageAgentHermesUrl = hermesRoundedAssetUrl;\nexport const manageAgentNextopUrl = manageAgentNextopAssetUrl;\nexport const manageAgentOpenclawUrl = openclawRoundedAssetUrl;\nexport const claudeRoundedUrl = claudeRoundedAssetUrl;\nexport const codexRoundedUrl = codexRoundedAssetUrl;\nexport const geminiRoundedUrl = geminiRoundedAssetUrl;\nexport const hermesRoundedUrl = hermesRoundedAssetUrl;\nexport const nextopDocRoundedUrl = manageAgentNextopAssetUrl;\nexport const openclawRoundedUrl = openclawRoundedAssetUrl;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAOO,IAAM,2BAA2B;AACjC,IAAM,sBAAsB;AAC5B,IAAM,uBAAuB;AAC7B,IAAM,uBAAuB;AAC7B,IAAM,uBAAuB;AAC7B,IAAM,yBAAyB;AAC/B,IAAM,mBAAmB;AACzB,IAAM,kBAAkB;AACxB,IAAM,mBAAmB;AACzB,IAAM,mBAAmB;AACzB,IAAM,sBAAsB;AAC5B,IAAM,qBAAqB;","names":[]}
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -590,6 +590,7 @@ declare const agentGuiI18nResources: {
|
|
|
590
590
|
readonly approvalUnavailable: "No choices are available.";
|
|
591
591
|
readonly approvalOptions: {
|
|
592
592
|
readonly allowOnce: "Yes, proceed";
|
|
593
|
+
readonly allowForSession: "Yes, for this session";
|
|
593
594
|
readonly allowAlways: "Yes, and don't ask again";
|
|
594
595
|
readonly allowAlwaysForCommandPrefix: "Yes, and don't ask again for commands that start with `{{command}}`";
|
|
595
596
|
readonly allowAlwaysForCommandPrefixLead: "Yes, and don't ask again for commands that start with";
|
|
@@ -1454,6 +1455,7 @@ declare const agentGuiI18nResources: {
|
|
|
1454
1455
|
readonly taskCompletedCount: "{{count}} completed";
|
|
1455
1456
|
readonly issueStatusNotStarted: "To run";
|
|
1456
1457
|
readonly issueStatusRunning: "Running";
|
|
1458
|
+
readonly issueStatusInProgress: "Progress started";
|
|
1457
1459
|
readonly issueStatusPendingAcceptance: "Pending acceptance";
|
|
1458
1460
|
readonly issueStatusCompleted: "Completed";
|
|
1459
1461
|
readonly issueStatusFailed: "Failed";
|
|
@@ -2865,6 +2867,7 @@ declare const agentGuiI18nResources: {
|
|
|
2865
2867
|
readonly approvalUnavailable: "没有可用选项。";
|
|
2866
2868
|
readonly approvalOptions: {
|
|
2867
2869
|
readonly allowOnce: "允许执行";
|
|
2870
|
+
readonly allowForSession: "本次会话允许";
|
|
2868
2871
|
readonly allowAlways: "允许,并且不再询问";
|
|
2869
2872
|
readonly allowAlwaysForCommandPrefix: "允许,并且不再询问以 `{{command}}` 开头的命令";
|
|
2870
2873
|
readonly allowAlwaysForCommandPrefixLead: "允许,并且不再询问以下列内容开头的命令";
|
|
@@ -3729,6 +3732,7 @@ declare const agentGuiI18nResources: {
|
|
|
3729
3732
|
readonly taskCompletedCount: "{{count}} 个已完成";
|
|
3730
3733
|
readonly issueStatusNotStarted: "未启动";
|
|
3731
3734
|
readonly issueStatusRunning: "执行中";
|
|
3735
|
+
readonly issueStatusInProgress: "已推进";
|
|
3732
3736
|
readonly issueStatusPendingAcceptance: "待验收";
|
|
3733
3737
|
readonly issueStatusCompleted: "已完成";
|
|
3734
3738
|
readonly issueStatusFailed: "失败";
|
package/dist/i18n/index.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot, AgentActivityCancelSessionInput,
|
|
1
|
+
import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot, AgentActivityCancelSessionInput, AgentActivityCancelSessionResult, AgentActivityCreateSessionInput, AgentActivitySession, AgentActivityDeleteSessionInput, AgentActivityDeleteSessionResult, AgentActivitySendInput, AgentActivityMessageOrder, AgentActivityMessagePage, AgentActivitySubmitInteractiveInput, AgentActivitySnapshotListener } from '@tutti-os/agent-activity-core';
|
|
2
2
|
export { AgentActivityAdapter, AgentActivityController, AgentActivityMessage, AgentActivityNeedsAttentionItem, AgentActivitySnapshot, selectNeedsAttentionCount, selectNeedsAttentionItems } from '@tutti-os/agent-activity-core';
|
|
3
3
|
import { m as WorkspaceAgentActivityListViewModel, g as AgentHostWorkspaceAgentSession, f as AgentHostWorkspaceAgentMessage, l as AgentHostWorkspaceAgentSnapshot, B as BuildWorkspaceAgentActivityListOptions, d as AgentHostRuntimeOpenclawGatewayWarmupResult, A as AgentHostBatchUserInfoInput, a as AgentHostBatchUserInfoResult, b as AgentHostDeleteWorkspaceAgentSessionInput, k as AgentHostWorkspaceAgentSessionSummaryInput, j as AgentHostWorkspaceAgentSessionSummary, e as AgentHostWorkspaceAgentListInput, i as AgentHostWorkspaceAgentSessionMessagesInput, h as AgentHostWorkspaceAgentSessionMessages, c as AgentHostManagedAgentsState } from './workspaceAgentActivityListViewModel-PvLQDj60.js';
|
|
4
4
|
import { PropsWithChildren, JSX } from 'react';
|
|
@@ -264,7 +264,7 @@ interface AgentActivityRuntimeSessionAttachment {
|
|
|
264
264
|
data: string;
|
|
265
265
|
}
|
|
266
266
|
interface AgentActivityRuntime {
|
|
267
|
-
cancelSession(input: AgentActivityCancelSessionInput): Promise<
|
|
267
|
+
cancelSession(input: AgentActivityCancelSessionInput): Promise<AgentActivityCancelSessionResult>;
|
|
268
268
|
createSession(input: AgentActivityCreateSessionInput): Promise<AgentActivitySession>;
|
|
269
269
|
deleteSession(input: AgentActivityDeleteSessionInput): Promise<AgentActivityDeleteSessionResult>;
|
|
270
270
|
activateSession(input: AgentActivityRuntimeActivateSessionInput): Promise<AgentHostActivateAgentSessionResult>;
|
|
@@ -635,15 +635,6 @@ interface AgentSettings {
|
|
|
635
635
|
interface AgentGUINodeData {
|
|
636
636
|
provider: AgentGUIProvider;
|
|
637
637
|
lastActiveAgentSessionId: string | null;
|
|
638
|
-
pendingHandoff?: {
|
|
639
|
-
requestId: string;
|
|
640
|
-
title: string;
|
|
641
|
-
prompt: string;
|
|
642
|
-
taskId?: string | null;
|
|
643
|
-
issueId?: string | null;
|
|
644
|
-
taskTitle: string;
|
|
645
|
-
issueTitle?: string | null;
|
|
646
|
-
} | null;
|
|
647
638
|
lastActiveConversationTitle?: string | null;
|
|
648
639
|
conversationCount?: number | null;
|
|
649
640
|
conversationRailWidthPx?: number | null;
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
mergeWorkspaceAgentActivityDurableAndOverlayMessages,
|
|
8
8
|
normalizeOptionalWorkspaceAgentStatus,
|
|
9
9
|
selectWorkspaceAgentActivityOverlayMessages
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KGFWU4FL.js";
|
|
11
11
|
import {
|
|
12
12
|
AgentActivityHostProvider,
|
|
13
13
|
AgentActivityRuntimeProvider,
|
|
@@ -27,7 +27,6 @@ import {
|
|
|
27
27
|
getOptionalAgentHostApi,
|
|
28
28
|
managedAgentRoundedIconUrl,
|
|
29
29
|
normalizeManagedAgentProvider,
|
|
30
|
-
normalizeWorkspaceAgentActivityDisplayStatus,
|
|
31
30
|
resetAgentActivityRuntimeForTests,
|
|
32
31
|
resolveWebsiteNavigationUrl,
|
|
33
32
|
resolveWorkspaceLinkAction,
|
|
@@ -39,7 +38,7 @@ import {
|
|
|
39
38
|
useOptionalAgentHostApi,
|
|
40
39
|
user_avatar_placeholder_default,
|
|
41
40
|
workspaceAgentActivityStatusLabel
|
|
42
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-FKCXHCPO.js";
|
|
43
42
|
import {
|
|
44
43
|
resolveWorkspaceAgentSessionSortTimeUnixMs,
|
|
45
44
|
workspaceAgentProviderLabel
|
|
@@ -57,11 +56,11 @@ import {
|
|
|
57
56
|
getActiveUiLanguage,
|
|
58
57
|
translate,
|
|
59
58
|
useTranslation
|
|
60
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-JWVLIF5R.js";
|
|
61
60
|
import {
|
|
62
61
|
resolveAgentMentionFileThumbnailUrl,
|
|
63
62
|
resolveAgentMentionFileVisualKind
|
|
64
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-LUGELG5V.js";
|
|
65
64
|
import "./chunk-PJP5BUU6.js";
|
|
66
65
|
import {
|
|
67
66
|
AGENT_GUI_COLLAPSED_MIN_WIDTH_PX,
|
|
@@ -74,7 +73,8 @@ import {
|
|
|
74
73
|
resolveAgentGUIExpandedWindowFrame,
|
|
75
74
|
resolveNextAgentGUIConversationRailWidthPx,
|
|
76
75
|
shouldAutoCollapseAgentGUIConversationRail
|
|
77
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-GYG57VTA.js";
|
|
77
|
+
import "./chunk-ZU3FKYMG.js";
|
|
78
78
|
|
|
79
79
|
// shared/agentActivitySnapshotProjection.ts
|
|
80
80
|
import {
|
|
@@ -160,7 +160,7 @@ function agentHostSessionFromCore(session, id, presenceId) {
|
|
|
160
160
|
title: session.title || void 0,
|
|
161
161
|
turnPhase: agentHostTurnPhaseFromCore(session.status),
|
|
162
162
|
updatedAtUnixMs: session.updatedAtUnixMs ?? session.lastEventUnixMs,
|
|
163
|
-
userId: "local",
|
|
163
|
+
userId: session.userId?.trim() || "local",
|
|
164
164
|
workspaceId: session.workspaceId
|
|
165
165
|
};
|
|
166
166
|
}
|
|
@@ -237,7 +237,7 @@ function agentHostTurnPhaseFromCore(status) {
|
|
|
237
237
|
import { TooltipProvider as TooltipProvider3 } from "@tutti-os/ui-system";
|
|
238
238
|
|
|
239
239
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
240
|
-
import { memo as memo6, useCallback as useCallback20, useEffect as useEffect23, useMemo as useMemo16
|
|
240
|
+
import { memo as memo6, useCallback as useCallback20, useEffect as useEffect23, useMemo as useMemo16 } from "react";
|
|
241
241
|
import { createWorkspaceUserProjectI18nRuntime } from "@tutti-os/workspace-user-project/i18n";
|
|
242
242
|
|
|
243
243
|
// shared/errors/appError.ts
|
|
@@ -11263,6 +11263,68 @@ function reportAgentGUIRuntimeError(input) {
|
|
|
11263
11263
|
} catch {
|
|
11264
11264
|
}
|
|
11265
11265
|
}
|
|
11266
|
+
function reportAgentGUICancelDiagnostic(input) {
|
|
11267
|
+
if (input.result.canceled) {
|
|
11268
|
+
return;
|
|
11269
|
+
}
|
|
11270
|
+
const reportDiagnostic = input.runtime.reportDiagnostic;
|
|
11271
|
+
if (!reportDiagnostic) {
|
|
11272
|
+
return;
|
|
11273
|
+
}
|
|
11274
|
+
try {
|
|
11275
|
+
void Promise.resolve(
|
|
11276
|
+
reportDiagnostic.call(input.runtime, {
|
|
11277
|
+
details: {
|
|
11278
|
+
agentSessionId: input.agentSessionId,
|
|
11279
|
+
busySource: input.busySource ?? "unknown",
|
|
11280
|
+
canceled: input.result.canceled,
|
|
11281
|
+
cancelReason: input.result.reason,
|
|
11282
|
+
currentSessionStatus: input.currentSessionStatus ?? null,
|
|
11283
|
+
phase: input.phase,
|
|
11284
|
+
provider: input.provider ?? null,
|
|
11285
|
+
returnedSessionNonBusy: cancelResultSessionStatusIsNonBusy(
|
|
11286
|
+
input.result
|
|
11287
|
+
),
|
|
11288
|
+
returnedSessionStatus: input.result.session.status
|
|
11289
|
+
},
|
|
11290
|
+
event: "agent.gui.cancel.noop",
|
|
11291
|
+
level: "info",
|
|
11292
|
+
source: "agent-gui",
|
|
11293
|
+
workspaceId: input.workspaceId
|
|
11294
|
+
})
|
|
11295
|
+
).catch(() => {
|
|
11296
|
+
});
|
|
11297
|
+
} catch {
|
|
11298
|
+
}
|
|
11299
|
+
}
|
|
11300
|
+
function cancelResultSessionStatusIsNonBusy(result) {
|
|
11301
|
+
const status = normalizeOptionalWorkspaceAgentStatus({
|
|
11302
|
+
currentPhase: result.session.currentPhase,
|
|
11303
|
+
status: result.session.status
|
|
11304
|
+
});
|
|
11305
|
+
return status !== null && status.kind !== "working" && status.kind !== "waiting";
|
|
11306
|
+
}
|
|
11307
|
+
function cancelBusySource(input) {
|
|
11308
|
+
if (input.hasActivePrompt) {
|
|
11309
|
+
return "interactive_prompt";
|
|
11310
|
+
}
|
|
11311
|
+
if (agentSessionStatusBusy({
|
|
11312
|
+
status: input.conversationStatus ?? void 0
|
|
11313
|
+
})) {
|
|
11314
|
+
return "conversation_status";
|
|
11315
|
+
}
|
|
11316
|
+
if (agentSessionStatusBusy({
|
|
11317
|
+
status: input.runtimeSessionStatus ?? void 0
|
|
11318
|
+
})) {
|
|
11319
|
+
return "runtime_session";
|
|
11320
|
+
}
|
|
11321
|
+
if (agentSessionStatusBusy({
|
|
11322
|
+
status: input.sessionStateStatus ?? void 0
|
|
11323
|
+
})) {
|
|
11324
|
+
return "session_state";
|
|
11325
|
+
}
|
|
11326
|
+
return "unknown";
|
|
11327
|
+
}
|
|
11266
11328
|
function normalizeAgentGUIDiagnosticError(error) {
|
|
11267
11329
|
const record = error && typeof error === "object" ? error : null;
|
|
11268
11330
|
const appErrorCode = getAgentGUIErrorCode(error);
|
|
@@ -14803,6 +14865,27 @@ function useAgentGUINodeController({
|
|
|
14803
14865
|
if (!result || !isCurrentConversation(agentSessionId)) {
|
|
14804
14866
|
return;
|
|
14805
14867
|
}
|
|
14868
|
+
const conversationStatus = resolveConversationSummaryById(
|
|
14869
|
+
conversations,
|
|
14870
|
+
agentSessionId,
|
|
14871
|
+
transientConversationRef.current
|
|
14872
|
+
)?.status ?? null;
|
|
14873
|
+
const runtimeSessionStatus = runtimeSessionsBySessionId.get(agentSessionId)?.status ?? null;
|
|
14874
|
+
reportAgentGUICancelDiagnostic({
|
|
14875
|
+
agentSessionId,
|
|
14876
|
+
busySource: cancelBusySource({
|
|
14877
|
+
conversationStatus,
|
|
14878
|
+
hasActivePrompt: activePendingPrompt?.sessionId === agentSessionId,
|
|
14879
|
+
runtimeSessionStatus,
|
|
14880
|
+
sessionStateStatus: activeSessionState?.status ?? null
|
|
14881
|
+
}),
|
|
14882
|
+
currentSessionStatus: activeSessionState?.status ?? runtimeSessionStatus,
|
|
14883
|
+
phase: "interrupt_current_turn",
|
|
14884
|
+
provider: dataRef.current.provider,
|
|
14885
|
+
result,
|
|
14886
|
+
runtime: agentActivityRuntime,
|
|
14887
|
+
workspaceId
|
|
14888
|
+
});
|
|
14806
14889
|
void refreshMessagesFromSnapshot(agentSessionId);
|
|
14807
14890
|
void loadSessionState(agentSessionId);
|
|
14808
14891
|
void syncConversationListProjection(agentSessionId);
|
|
@@ -14843,6 +14926,9 @@ function useAgentGUINodeController({
|
|
|
14843
14926
|
syncConversationListProjection,
|
|
14844
14927
|
loadSessionState,
|
|
14845
14928
|
refreshMessagesFromSnapshot,
|
|
14929
|
+
conversations,
|
|
14930
|
+
runtimeSessionsBySessionId,
|
|
14931
|
+
activeSessionState,
|
|
14846
14932
|
workspaceId,
|
|
14847
14933
|
agentActivityRuntime
|
|
14848
14934
|
]
|
|
@@ -15177,6 +15263,21 @@ function useAgentGUINodeController({
|
|
|
15177
15263
|
if (!result || !isCurrentConversation(activeConversationId)) {
|
|
15178
15264
|
return;
|
|
15179
15265
|
}
|
|
15266
|
+
reportAgentGUICancelDiagnostic({
|
|
15267
|
+
agentSessionId: activeConversationId,
|
|
15268
|
+
busySource: cancelBusySource({
|
|
15269
|
+
conversationStatus: activeConversationSummary?.status ?? null,
|
|
15270
|
+
hasActivePrompt: false,
|
|
15271
|
+
runtimeSessionStatus: runtimeSessionsBySessionId.get(activeConversationId)?.status ?? null,
|
|
15272
|
+
sessionStateStatus: activeSessionState2?.status ?? null
|
|
15273
|
+
}),
|
|
15274
|
+
currentSessionStatus: activeSessionState2?.status ?? null,
|
|
15275
|
+
phase: "drain_queued_prompt_interrupt",
|
|
15276
|
+
provider: dataRef.current.provider,
|
|
15277
|
+
result,
|
|
15278
|
+
runtime: agentActivityRuntime,
|
|
15279
|
+
workspaceId
|
|
15280
|
+
});
|
|
15180
15281
|
void refreshMessagesFromSnapshot(activeConversationId);
|
|
15181
15282
|
void loadSessionState(activeConversationId);
|
|
15182
15283
|
void syncConversationListProjection(activeConversationId);
|
|
@@ -15213,6 +15314,7 @@ function useAgentGUINodeController({
|
|
|
15213
15314
|
loadSessionState,
|
|
15214
15315
|
refreshMessagesFromSnapshot,
|
|
15215
15316
|
queuedPromptsBySessionId,
|
|
15317
|
+
runtimeSessionsBySessionId,
|
|
15216
15318
|
workspaceId,
|
|
15217
15319
|
sessionViewRef,
|
|
15218
15320
|
sendNextQueuedPromptIdBySessionId,
|
|
@@ -27727,6 +27829,9 @@ import {
|
|
|
27727
27829
|
useRef as useRef18,
|
|
27728
27830
|
useState as useState24
|
|
27729
27831
|
} from "react";
|
|
27832
|
+
import {
|
|
27833
|
+
normalizeAgentActivityDisplayStatus
|
|
27834
|
+
} from "@tutti-os/agent-activity-core";
|
|
27730
27835
|
|
|
27731
27836
|
// app/renderer/components/icons/FolderFailedFilledIcon.tsx
|
|
27732
27837
|
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
@@ -27777,19 +27882,6 @@ function KeyboardFilledIcon(props) {
|
|
|
27777
27882
|
// app/renderer/components/ui/underline-tabs.tsx
|
|
27778
27883
|
import { UnderlineTabs } from "@tutti-os/ui-system";
|
|
27779
27884
|
|
|
27780
|
-
// shared/workspaceAgentActivityStatusClassName.ts
|
|
27781
|
-
var STATUS_CLASS_BY_STATUS = {
|
|
27782
|
-
working: "working",
|
|
27783
|
-
waiting: "waiting",
|
|
27784
|
-
idle: "idle",
|
|
27785
|
-
completed: "done",
|
|
27786
|
-
canceled: "done",
|
|
27787
|
-
failed: "failed"
|
|
27788
|
-
};
|
|
27789
|
-
function workspaceAgentActivityStatusClassName(status) {
|
|
27790
|
-
return STATUS_CLASS_BY_STATUS[status];
|
|
27791
|
-
}
|
|
27792
|
-
|
|
27793
27885
|
// shared/roomIssueStatusLabel.ts
|
|
27794
27886
|
function roomIssueStatusLabel(status, t) {
|
|
27795
27887
|
const translateFn = t ?? translate;
|
|
@@ -27798,6 +27890,8 @@ function roomIssueStatusLabel(status, t) {
|
|
|
27798
27890
|
return translateFn("agentHost.roomIssueNode.issueStatusNotStarted");
|
|
27799
27891
|
case "running":
|
|
27800
27892
|
return translateFn("agentHost.roomIssueNode.issueStatusRunning");
|
|
27893
|
+
case "in_progress":
|
|
27894
|
+
return translateFn("agentHost.roomIssueNode.issueStatusInProgress");
|
|
27801
27895
|
case "pending_acceptance":
|
|
27802
27896
|
return translateFn(
|
|
27803
27897
|
"agentHost.roomIssueNode.issueStatusPendingAcceptance"
|
|
@@ -27814,7 +27908,7 @@ function roomIssueStatusLabel(status, t) {
|
|
|
27814
27908
|
}
|
|
27815
27909
|
|
|
27816
27910
|
// agent-gui/agentGuiNode/AgentFileMentionPalette.tsx
|
|
27817
|
-
import { Badge, menuItemClassName as menuItemClassName2 } from "@tutti-os/ui-system";
|
|
27911
|
+
import { Badge, StatusDot as StatusDot2, menuItemClassName as menuItemClassName2 } from "@tutti-os/ui-system";
|
|
27818
27912
|
import { Fragment as Fragment12, jsx as jsx82, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
27819
27913
|
var paletteStyles2 = {
|
|
27820
27914
|
palette: "agent-gui-node__mention-palette nodrag grid h-full max-h-[320px] min-h-0 grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden text-[13px] [-webkit-app-region:no-drag]",
|
|
@@ -28514,7 +28608,13 @@ function shouldRenderMentionGroupLabel(input) {
|
|
|
28514
28608
|
}
|
|
28515
28609
|
function renderMentionRow(item) {
|
|
28516
28610
|
if (item.kind === "file") {
|
|
28517
|
-
const visualKind = resolveAgentMentionFileVisualKind(
|
|
28611
|
+
const visualKind = resolveAgentMentionFileVisualKind({
|
|
28612
|
+
entryKind: item.entryKind,
|
|
28613
|
+
href: item.href,
|
|
28614
|
+
mentionNavigation: item.mentionNavigation,
|
|
28615
|
+
name: item.name,
|
|
28616
|
+
path: item.path
|
|
28617
|
+
});
|
|
28518
28618
|
const childCountLabel = item.mentionNavigation === "agent-generated-folder" && typeof item.childCount === "number" && item.childCount > 0 ? translate("agentHost.agentGui.mentionAgentGeneratedFolderFileCount", {
|
|
28519
28619
|
count: item.childCount
|
|
28520
28620
|
}) : null;
|
|
@@ -28526,6 +28626,7 @@ function renderMentionRow(item) {
|
|
|
28526
28626
|
"data-agent-mention-kind": "file",
|
|
28527
28627
|
"data-agent-file-entry-kind": item.entryKind,
|
|
28528
28628
|
"data-agent-file-visual-kind": visualKind,
|
|
28629
|
+
...item.mentionNavigation ? { "data-agent-mention-navigation": item.mentionNavigation } : {},
|
|
28529
28630
|
children: [
|
|
28530
28631
|
/* @__PURE__ */ jsx82(MentionFileIcon, { item, visualKind }),
|
|
28531
28632
|
/* @__PURE__ */ jsxs53("span", { className: "flex min-w-0 items-baseline gap-1 overflow-hidden", children: [
|
|
@@ -28538,8 +28639,8 @@ function renderMentionRow(item) {
|
|
|
28538
28639
|
}
|
|
28539
28640
|
if (item.kind === "session") {
|
|
28540
28641
|
const statusTag = renderSessionMentionStatusTag(item.status);
|
|
28541
|
-
return /* @__PURE__ */ jsxs53("span", { className: "
|
|
28542
|
-
/* @__PURE__ */ jsxs53("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
28642
|
+
return /* @__PURE__ */ jsxs53("span", { className: "grid w-full min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-3", children: [
|
|
28643
|
+
/* @__PURE__ */ jsxs53("span", { className: "flex min-w-0 items-center gap-2 overflow-hidden", children: [
|
|
28543
28644
|
/* @__PURE__ */ jsx82(MentionSessionAvatarStack, { item }),
|
|
28544
28645
|
/* @__PURE__ */ jsx82("span", { className: "min-w-0 truncate text-[13px] font-semibold leading-[16px] text-[var(--text-primary)]", children: /* @__PURE__ */ jsx82(MentionSessionTitle, { item }) })
|
|
28545
28646
|
] }),
|
|
@@ -28721,19 +28822,33 @@ function MentionSessionTitle({
|
|
|
28721
28822
|
}
|
|
28722
28823
|
function MentionStatusTag({ status }) {
|
|
28723
28824
|
"use memo";
|
|
28724
|
-
const activityStatus =
|
|
28725
|
-
const
|
|
28726
|
-
|
|
28825
|
+
const activityStatus = normalizeAgentActivityDisplayStatus(status);
|
|
28826
|
+
const statusTone = mentionStatusTone(activityStatus);
|
|
28827
|
+
const statusLabel = workspaceAgentActivityStatusLabel(activityStatus);
|
|
28828
|
+
return /* @__PURE__ */ jsxs53(
|
|
28727
28829
|
Badge,
|
|
28728
28830
|
{
|
|
28729
28831
|
variant: "secondary",
|
|
28730
28832
|
className: cn(
|
|
28731
|
-
"shrink-0 text-[
|
|
28732
|
-
mentionStatusBadgeClassName(
|
|
28833
|
+
"inline-flex h-5 shrink-0 items-center gap-1.5 rounded-[4px] px-2 text-[11px] font-semibold leading-none",
|
|
28834
|
+
mentionStatusBadgeClassName(activityStatus)
|
|
28733
28835
|
),
|
|
28734
28836
|
"data-agent-mention-status-tag": "true",
|
|
28735
28837
|
"data-status": activityStatus,
|
|
28736
|
-
|
|
28838
|
+
"data-tone": statusTone,
|
|
28839
|
+
title: statusLabel,
|
|
28840
|
+
children: [
|
|
28841
|
+
/* @__PURE__ */ jsx82(
|
|
28842
|
+
StatusDot2,
|
|
28843
|
+
{
|
|
28844
|
+
tone: statusTone,
|
|
28845
|
+
pulse: activityStatus === "working" || activityStatus === "waiting",
|
|
28846
|
+
size: "xs",
|
|
28847
|
+
title: statusLabel
|
|
28848
|
+
}
|
|
28849
|
+
),
|
|
28850
|
+
/* @__PURE__ */ jsx82("span", { children: statusLabel })
|
|
28851
|
+
]
|
|
28737
28852
|
}
|
|
28738
28853
|
);
|
|
28739
28854
|
}
|
|
@@ -28741,10 +28856,7 @@ function renderSessionMentionStatusTag(status) {
|
|
|
28741
28856
|
if (!status) {
|
|
28742
28857
|
return null;
|
|
28743
28858
|
}
|
|
28744
|
-
const activityStatus =
|
|
28745
|
-
if (activityStatus !== "working" && activityStatus !== "waiting" && activityStatus !== "canceled" && activityStatus !== "failed") {
|
|
28746
|
-
return null;
|
|
28747
|
-
}
|
|
28859
|
+
const activityStatus = normalizeAgentActivityDisplayStatus(status);
|
|
28748
28860
|
return /* @__PURE__ */ jsx82(MentionStatusTag, { status: activityStatus });
|
|
28749
28861
|
}
|
|
28750
28862
|
function IssueMentionStatusTag({
|
|
@@ -28766,11 +28878,32 @@ function IssueMentionStatusTag({
|
|
|
28766
28878
|
}
|
|
28767
28879
|
);
|
|
28768
28880
|
}
|
|
28769
|
-
function
|
|
28770
|
-
if (
|
|
28771
|
-
return "
|
|
28881
|
+
function mentionStatusTone(status) {
|
|
28882
|
+
if (status === "working") {
|
|
28883
|
+
return "blue";
|
|
28884
|
+
}
|
|
28885
|
+
if (status === "waiting" || status === "canceled") {
|
|
28886
|
+
return "amber";
|
|
28887
|
+
}
|
|
28888
|
+
if (status === "completed" || status === "idle") {
|
|
28889
|
+
return "green";
|
|
28890
|
+
}
|
|
28891
|
+
if (status === "failed") {
|
|
28892
|
+
return "red";
|
|
28893
|
+
}
|
|
28894
|
+
return "neutral";
|
|
28895
|
+
}
|
|
28896
|
+
function mentionStatusBadgeClassName(status) {
|
|
28897
|
+
if (status === "working") {
|
|
28898
|
+
return "bg-sky-500/10 text-sky-700";
|
|
28899
|
+
}
|
|
28900
|
+
if (status === "waiting" || status === "canceled") {
|
|
28901
|
+
return "bg-[color:color-mix(in_srgb,var(--color-amber-500)_12%,transparent)] text-[var(--color-amber-500)]";
|
|
28902
|
+
}
|
|
28903
|
+
if (status === "completed" || status === "idle") {
|
|
28904
|
+
return "bg-[var(--tsh-ui-pill-success-bg)] text-[var(--tsh-ui-pill-success-fg)]";
|
|
28772
28905
|
}
|
|
28773
|
-
if (
|
|
28906
|
+
if (status === "failed") {
|
|
28774
28907
|
return "bg-[var(--on-danger)] text-[var(--state-danger)]";
|
|
28775
28908
|
}
|
|
28776
28909
|
return "bg-[var(--transparency-block)] text-[var(--text-secondary)]";
|
|
@@ -30900,8 +31033,11 @@ function AttentionGlyph() {
|
|
|
30900
31033
|
import { Fragment as Fragment16, jsx as jsx86, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
30901
31034
|
var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
|
|
30902
31035
|
var AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE = {
|
|
31036
|
+
width: "100%",
|
|
30903
31037
|
minWidth: "100%",
|
|
30904
31038
|
display: "grid",
|
|
31039
|
+
gridTemplateColumns: "minmax(0, min(100%, var(--agent-gui-detail-flow-max-width)))",
|
|
31040
|
+
justifyContent: "center",
|
|
30905
31041
|
gap: "24px"
|
|
30906
31042
|
};
|
|
30907
31043
|
var EMPTY_WORKSPACE_APP_ICONS4 = [];
|
|
@@ -33573,7 +33709,7 @@ function normalizeSlashStatusModelName(value) {
|
|
|
33573
33709
|
return value?.trim().toLowerCase().replace(/[^a-z0-9]+/gu, "-").replace(/^-+|-+$/gu, "") ?? "";
|
|
33574
33710
|
}
|
|
33575
33711
|
function agentGuiStateEquals(left, right) {
|
|
33576
|
-
return left === right || left.provider === right.provider && left.lastActiveAgentSessionId === right.lastActiveAgentSessionId &&
|
|
33712
|
+
return left === right || left.provider === right.provider && left.lastActiveAgentSessionId === right.lastActiveAgentSessionId && left.lastActiveConversationTitle === right.lastActiveConversationTitle && left.conversationRailWidthPx === right.conversationRailWidthPx && left.conversationRailCollapsed === right.conversationRailCollapsed && (left.composerOverrides?.model ?? null) === (right.composerOverrides?.model ?? null) && (left.composerOverrides?.reasoningEffort ?? null) === (right.composerOverrides?.reasoningEffort ?? null) && (left.composerOverrides?.planMode ?? null) === (right.composerOverrides?.planMode ?? null) && (left.composerOverrides?.permissionModeId ?? null) === (right.composerOverrides?.permissionModeId ?? null) && composerOverridesByProviderEqual(
|
|
33577
33713
|
left.composerOverridesByProvider,
|
|
33578
33714
|
right.composerOverridesByProvider
|
|
33579
33715
|
);
|
|
@@ -33640,7 +33776,6 @@ var AgentGUINode = memo6(function AgentGUINode2({
|
|
|
33640
33776
|
() => createWorkspaceUserProjectI18nRuntime(i18n),
|
|
33641
33777
|
[i18n]
|
|
33642
33778
|
);
|
|
33643
|
-
const handledHandoffRequestIdRef = useRef22(null);
|
|
33644
33779
|
const handleLinkAction = useCallback20(
|
|
33645
33780
|
(action) => {
|
|
33646
33781
|
onLinkAction?.(
|
|
@@ -33752,25 +33887,6 @@ var AgentGUINode = memo6(function AgentGUINode2({
|
|
|
33752
33887
|
onDataChange: handleDataChange,
|
|
33753
33888
|
onShowMessage
|
|
33754
33889
|
});
|
|
33755
|
-
useEffect23(() => {
|
|
33756
|
-
const pendingHandoff = state.pendingHandoff;
|
|
33757
|
-
const requestId = pendingHandoff?.requestId?.trim() ?? "";
|
|
33758
|
-
const prompt = pendingHandoff?.prompt?.trim() ?? "";
|
|
33759
|
-
if (!requestId || !prompt || handledHandoffRequestIdRef.current === requestId) {
|
|
33760
|
-
return;
|
|
33761
|
-
}
|
|
33762
|
-
handledHandoffRequestIdRef.current = requestId;
|
|
33763
|
-
actions.createConversation();
|
|
33764
|
-
actions.updateDraftPrompt(prompt);
|
|
33765
|
-
onUpdateNode(
|
|
33766
|
-
(current) => current.pendingHandoff?.requestId === requestId ? { ...current, pendingHandoff: null } : current
|
|
33767
|
-
);
|
|
33768
|
-
}, [
|
|
33769
|
-
actions.createConversation,
|
|
33770
|
-
actions.updateDraftPrompt,
|
|
33771
|
-
onUpdateNode,
|
|
33772
|
-
state.pendingHandoff
|
|
33773
|
-
]);
|
|
33774
33890
|
const fallbackAgentTitle = t("sidebar.fallbackAgentLabel");
|
|
33775
33891
|
const activeProvider = viewModel.activeConversation?.provider ?? state.provider;
|
|
33776
33892
|
const displayProviderLabel = resolveAgentGUIProviderDisplayLabel(
|