@tutti-os/agent-gui 0.0.43 → 0.0.45
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-conversation/index.js +5 -4
- package/dist/agent-conversation/index.js.map +1 -1
- package/dist/agent-message-center/index.js +17 -11
- package/dist/agent-message-center/index.js.map +1 -1
- package/dist/app/renderer/agentactivity.css +116 -57
- package/dist/{chunk-3PVSIL3H.js → chunk-62QOR3TC.js} +4 -97
- package/dist/chunk-62QOR3TC.js.map +1 -0
- package/dist/{chunk-5UD2YEBX.js → chunk-AMNXH4DJ.js} +47 -14
- package/dist/{chunk-5UD2YEBX.js.map → chunk-AMNXH4DJ.js.map} +1 -1
- package/dist/{chunk-XTFRVACA.js → chunk-CZ7PS3DU.js} +22 -7
- package/dist/chunk-CZ7PS3DU.js.map +1 -0
- package/dist/{chunk-5LVFYNIP.js → chunk-D6IYEVDT.js} +2 -2
- package/dist/chunk-EIC7XS3C.js +71 -0
- package/dist/chunk-EIC7XS3C.js.map +1 -0
- package/dist/chunk-FJG2EH4V.js +317 -0
- package/dist/chunk-FJG2EH4V.js.map +1 -0
- package/dist/{chunk-42WP3P5C.js → chunk-NZ2BGOJU.js} +2 -2
- package/dist/chunk-OL54R6OL.js +99 -0
- package/dist/chunk-OL54R6OL.js.map +1 -0
- package/dist/{chunk-OLZP2EFK.js → chunk-QT45WUPQ.js} +71 -20
- package/dist/chunk-QT45WUPQ.js.map +1 -0
- package/dist/{chunk-5U4SXENC.js → chunk-UGV6JTWM.js} +16 -5
- package/dist/{chunk-5U4SXENC.js.map → chunk-UGV6JTWM.js.map} +1 -1
- package/dist/{chunk-LKOPLDPM.js → chunk-VFQR7AZI.js} +59 -64
- package/dist/chunk-VFQR7AZI.js.map +1 -0
- package/dist/{chunk-3WZWZHAJ.js → chunk-ZG3WZSMV.js} +2 -2
- package/dist/context-mention-palette/index.d.ts +2 -1
- package/dist/context-mention-palette/index.js +7 -6
- package/dist/i18n/index.d.ts +51 -3
- package/dist/i18n/index.js +2 -1
- package/dist/index.d.ts +1 -5
- package/dist/index.js +1153 -671
- package/dist/index.js.map +1 -1
- package/dist/uiSettings-BQS9r2eo.d.ts +6 -0
- package/dist/workbench/contribution.js +1 -1
- package/dist/workbench/index.d.ts +3 -0
- package/dist/workbench/index.js +13 -2
- package/dist/workbench/sessionTitle.d.ts +28 -0
- package/dist/workbench/sessionTitle.js +14 -0
- package/dist/workbench/sessionTitle.js.map +1 -0
- package/dist/workspace-agent-generated-files.js +3 -2
- package/package.json +21 -14
- package/dist/chunk-3PVSIL3H.js.map +0 -1
- package/dist/chunk-LKOPLDPM.js.map +0 -1
- package/dist/chunk-OLZP2EFK.js.map +0 -1
- package/dist/chunk-XTFRVACA.js.map +0 -1
- /package/dist/{chunk-5LVFYNIP.js.map → chunk-D6IYEVDT.js.map} +0 -0
- /package/dist/{chunk-42WP3P5C.js.map → chunk-NZ2BGOJU.js.map} +0 -0
- /package/dist/{chunk-3WZWZHAJ.js.map → chunk-ZG3WZSMV.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -21,9 +21,8 @@ import {
|
|
|
21
21
|
} from "./chunk-4K22O34C.js";
|
|
22
22
|
import {
|
|
23
23
|
AgentInteractivePromptSurface,
|
|
24
|
-
approvalOptionDisplayLabel
|
|
25
|
-
|
|
26
|
-
} from "./chunk-3PVSIL3H.js";
|
|
24
|
+
approvalOptionDisplayLabel
|
|
25
|
+
} from "./chunk-62QOR3TC.js";
|
|
27
26
|
import {
|
|
28
27
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
29
28
|
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
@@ -32,6 +31,17 @@ import {
|
|
|
32
31
|
planDecisionOps,
|
|
33
32
|
planImplementationPromptFromPlanTurn
|
|
34
33
|
} from "./chunk-MKHDRIGN.js";
|
|
34
|
+
import {
|
|
35
|
+
AGENT_PROVIDER_LABEL,
|
|
36
|
+
firstAgentGUIUserMessageTitle,
|
|
37
|
+
formatAgentGUIConversationPlainTitle,
|
|
38
|
+
normalizeAgentGUIProviderIdentity,
|
|
39
|
+
resolveAgentGUIConversationTitle,
|
|
40
|
+
resolveAgentGUIDockConversationTitle,
|
|
41
|
+
resolveAgentGUIExplicitConversationTitle,
|
|
42
|
+
resolveAgentGUIProviderDisplayLabel,
|
|
43
|
+
resolveAgentGUIProviderIdentity
|
|
44
|
+
} from "./chunk-FJG2EH4V.js";
|
|
35
45
|
import {
|
|
36
46
|
AgentConversationFlow,
|
|
37
47
|
Button,
|
|
@@ -48,13 +58,13 @@ import {
|
|
|
48
58
|
skillDescriptionForDisplay,
|
|
49
59
|
skillTriggerForPrefix,
|
|
50
60
|
useProjectedAgentConversation
|
|
51
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-CZ7PS3DU.js";
|
|
52
62
|
import {
|
|
53
63
|
AgentMessageMarkdown,
|
|
54
64
|
ZoomableImage,
|
|
55
65
|
cn,
|
|
56
66
|
resolveWorkspaceLinkAction
|
|
57
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-QT45WUPQ.js";
|
|
58
68
|
import {
|
|
59
69
|
AGENT_MENTION_FILTER_TAB_ORDER,
|
|
60
70
|
AgentFileMentionPalette,
|
|
@@ -62,7 +72,7 @@ import {
|
|
|
62
72
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
63
73
|
agentMentionItemKey,
|
|
64
74
|
preloadAgentMentionBrowse
|
|
65
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-UGV6JTWM.js";
|
|
66
76
|
import {
|
|
67
77
|
WORKSPACE_AGENT_ACTIVITY_RUNTIME_SESSION_ORIGIN,
|
|
68
78
|
buildWorkspaceAgentActivityListViewModel,
|
|
@@ -72,24 +82,24 @@ import {
|
|
|
72
82
|
isWorkspaceAgentUntitledTask,
|
|
73
83
|
mergeWorkspaceAgentActivityDurableAndOverlayMessages,
|
|
74
84
|
selectWorkspaceAgentActivityOverlayMessages
|
|
75
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-D6IYEVDT.js";
|
|
76
86
|
import {
|
|
77
87
|
MANAGED_AGENT_ICON_FALLBACK_URL,
|
|
78
88
|
MANAGED_AGENT_ICON_URLS,
|
|
79
89
|
Spinner,
|
|
80
90
|
normalizeManagedAgentProvider
|
|
81
|
-
} from "./chunk-
|
|
82
|
-
import "./chunk-MTFSQWZ6.js";
|
|
91
|
+
} from "./chunk-NZ2BGOJU.js";
|
|
83
92
|
import {
|
|
84
93
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
85
94
|
} from "./chunk-IBIMGLCD.js";
|
|
95
|
+
import "./chunk-MTFSQWZ6.js";
|
|
86
96
|
import {
|
|
87
97
|
exitAgentFileMentionSuggestion,
|
|
88
98
|
formatAgentMentionMarkdown,
|
|
89
99
|
mentionItemToAttrs,
|
|
90
100
|
normalizeAgentSessionMentionTitle,
|
|
91
101
|
parseMentionItemFromHref
|
|
92
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-ZG3WZSMV.js";
|
|
93
103
|
import "./chunk-Y35GDLP2.js";
|
|
94
104
|
import {
|
|
95
105
|
AgentActivityHostProvider,
|
|
@@ -108,9 +118,7 @@ import "./chunk-TYGL25EL.js";
|
|
|
108
118
|
import {
|
|
109
119
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
110
120
|
} from "./chunk-JM24HADP.js";
|
|
111
|
-
import
|
|
112
|
-
normalizeAgentTitleText
|
|
113
|
-
} from "./chunk-GCBDIQDX.js";
|
|
121
|
+
import "./chunk-GCBDIQDX.js";
|
|
114
122
|
import {
|
|
115
123
|
AgentGuiI18nProvider,
|
|
116
124
|
agentGuiI18nModule,
|
|
@@ -118,7 +126,8 @@ import {
|
|
|
118
126
|
getActiveUiLanguage,
|
|
119
127
|
translate,
|
|
120
128
|
useTranslation
|
|
121
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-EIC7XS3C.js";
|
|
130
|
+
import "./chunk-VFQR7AZI.js";
|
|
122
131
|
import "./chunk-LUGELG5V.js";
|
|
123
132
|
import "./chunk-PJP5BUU6.js";
|
|
124
133
|
|
|
@@ -2040,6 +2049,7 @@ function WorkspaceNodeWindow({
|
|
|
2040
2049
|
const renderedChildren = typeof children === "function" ? children(renderedFrame) : children;
|
|
2041
2050
|
const rootStyle = appearance === "embedded" ? {
|
|
2042
2051
|
"--node-header-padding-x": "16px",
|
|
2052
|
+
"--node-header-traffic-light-title-offset": "64px",
|
|
2043
2053
|
...resolvedStyle,
|
|
2044
2054
|
width: "100%",
|
|
2045
2055
|
height: "100%",
|
|
@@ -2051,6 +2061,7 @@ function WorkspaceNodeWindow({
|
|
|
2051
2061
|
WebkitBackdropFilter: "none"
|
|
2052
2062
|
} : {
|
|
2053
2063
|
"--node-header-padding-x": "16px",
|
|
2064
|
+
"--node-header-traffic-light-title-offset": "64px",
|
|
2054
2065
|
...resolvedStyle,
|
|
2055
2066
|
background: "transparent",
|
|
2056
2067
|
border: "1px solid var(--node-window-border)",
|
|
@@ -2087,7 +2098,7 @@ function WorkspaceNodeWindow({
|
|
|
2087
2098
|
hideHeader ? null : customHeader ? customHeader : /* @__PURE__ */ jsxs3(
|
|
2088
2099
|
"header",
|
|
2089
2100
|
{
|
|
2090
|
-
className: "workspace-node-window__header relative flex h-[var(--node-header-height)] min-h-[var(--node-header-height)] cursor-grab items-center gap-2 border-b border-[var(--node-header-border)] bg-[var(--node-header-surface)] px-2 pl-[var(--node-header-padding-x)] active:cursor-grabbing",
|
|
2101
|
+
className: "workspace-node-window__header relative flex h-[var(--node-header-height)] min-h-[var(--node-header-height)] cursor-grab items-center gap-2 border-b border-[var(--node-header-border)] bg-[var(--node-header-surface)] px-2 pl-[calc(var(--node-header-padding-x)+var(--node-header-traffic-light-title-offset))] active:cursor-grabbing",
|
|
2091
2102
|
style: {
|
|
2092
2103
|
borderBottomColor: "var(--node-header-border)",
|
|
2093
2104
|
background: "var(--node-header-surface)"
|
|
@@ -2106,7 +2117,7 @@ function WorkspaceNodeWindow({
|
|
|
2106
2117
|
/* @__PURE__ */ jsxs3(
|
|
2107
2118
|
"div",
|
|
2108
2119
|
{
|
|
2109
|
-
className: "workspace-node-window__controls nodrag absolute left-4 top-1/2 inline-flex -translate-y-1/2 items-center gap-2",
|
|
2120
|
+
className: "workspace-node-window__controls nodrag group/traffic-lights absolute left-4 top-1/2 inline-flex -translate-y-1/2 items-center gap-2",
|
|
2110
2121
|
"data-workspace-node-window-controls": "true",
|
|
2111
2122
|
children: [
|
|
2112
2123
|
/* @__PURE__ */ jsx10(
|
|
@@ -2141,7 +2152,7 @@ function WorkspaceNodeWindow({
|
|
|
2141
2152
|
/* @__PURE__ */ jsxs3(
|
|
2142
2153
|
"div",
|
|
2143
2154
|
{
|
|
2144
|
-
className: "workspace-node-window__title
|
|
2155
|
+
className: "workspace-node-window__title flex min-w-0 max-w-[280px] flex-1 items-center gap-2 text-[15px] leading-5 font-semibold text-foreground",
|
|
2145
2156
|
"data-workspace-node-window-title": "true",
|
|
2146
2157
|
title,
|
|
2147
2158
|
children: [
|
|
@@ -2228,16 +2239,17 @@ function WorkspaceNodeTrafficLightButton({
|
|
|
2228
2239
|
event.stopPropagation();
|
|
2229
2240
|
onClick();
|
|
2230
2241
|
};
|
|
2242
|
+
const iconName = tone === "maximize" ? pressed ? "unfullscreen" : "fullscreen" : tone;
|
|
2231
2243
|
return /* @__PURE__ */ jsx10(
|
|
2232
2244
|
"button",
|
|
2233
2245
|
{
|
|
2234
2246
|
"aria-label": ariaLabel,
|
|
2235
2247
|
"aria-pressed": pressed,
|
|
2236
2248
|
className: cn(
|
|
2237
|
-
"relative -m-1 inline-flex size-5 shrink-0 cursor-pointer rounded-full border-0 bg-transparent p-0 opacity-[0.78] outline-none transition-opacity duration-150 before:absolute before:inset-1 before:rounded-full before:bg-[color-mix(in_srgb,var(--text-tertiary)_72%,transparent)] before:content-[''] hover:opacity-100 focus-
|
|
2238
|
-
tone === "close" && "hover:before:bg-[#ff5f57] focus-
|
|
2239
|
-
tone === "minimize" && "hover:before:bg-[#ffbd2e] focus-
|
|
2240
|
-
tone === "maximize" && "hover:before:bg-[#28c840] focus-
|
|
2249
|
+
"relative -m-1 inline-flex size-5 shrink-0 cursor-pointer rounded-full border-0 bg-transparent p-0 opacity-[0.78] outline-none transition-opacity duration-150 before:absolute before:inset-1 before:rounded-full before:bg-[color-mix(in_srgb,var(--text-tertiary)_72%,transparent)] before:content-[''] group-hover/traffic-lights:opacity-100 group-focus-within/traffic-lights:opacity-100 focus-visible:ring-2 focus-visible:ring-[var(--accent)] focus-visible:ring-offset-1 focus-visible:ring-offset-[var(--node-header-surface)]",
|
|
2250
|
+
tone === "close" && "group-hover/traffic-lights:before:bg-[#ff5f57] group-focus-within/traffic-lights:before:bg-[#ff5f57]",
|
|
2251
|
+
tone === "minimize" && "group-hover/traffic-lights:before:bg-[#ffbd2e] group-focus-within/traffic-lights:before:bg-[#ffbd2e]",
|
|
2252
|
+
tone === "maximize" && "group-hover/traffic-lights:before:bg-[#28c840] group-focus-within/traffic-lights:before:bg-[#28c840]"
|
|
2241
2253
|
),
|
|
2242
2254
|
"data-window-header": "top",
|
|
2243
2255
|
"data-workspace-node-window-traffic-light": tone,
|
|
@@ -2246,10 +2258,42 @@ function WorkspaceNodeTrafficLightButton({
|
|
|
2246
2258
|
type: "button",
|
|
2247
2259
|
onClick: handleClick,
|
|
2248
2260
|
onDoubleClick: (event) => event.stopPropagation(),
|
|
2249
|
-
onPointerDown: (event) => event.stopPropagation()
|
|
2261
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
2262
|
+
children: /* @__PURE__ */ jsx10(
|
|
2263
|
+
WorkspaceNodeWindowTrafficLightIcon,
|
|
2264
|
+
{
|
|
2265
|
+
"aria-hidden": "true",
|
|
2266
|
+
className: "pointer-events-none absolute inset-[5px] z-[1] size-[10px] text-[color-mix(in_srgb,#000_68%,transparent)] opacity-0 transition-opacity duration-150 group-hover/traffic-lights:opacity-100 group-focus-within/traffic-lights:opacity-100",
|
|
2267
|
+
"data-workspace-node-window-traffic-light-icon": iconName,
|
|
2268
|
+
iconName
|
|
2269
|
+
}
|
|
2270
|
+
)
|
|
2250
2271
|
}
|
|
2251
2272
|
);
|
|
2252
2273
|
}
|
|
2274
|
+
function WorkspaceNodeWindowTrafficLightIcon({
|
|
2275
|
+
className,
|
|
2276
|
+
iconName,
|
|
2277
|
+
...props
|
|
2278
|
+
}) {
|
|
2279
|
+
return /* @__PURE__ */ jsx10(
|
|
2280
|
+
"svg",
|
|
2281
|
+
{
|
|
2282
|
+
...props,
|
|
2283
|
+
className,
|
|
2284
|
+
fill: "currentColor",
|
|
2285
|
+
viewBox: "0 0 24 24",
|
|
2286
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2287
|
+
children: /* @__PURE__ */ jsx10("path", { d: trafficLightIconPathByName[iconName] })
|
|
2288
|
+
}
|
|
2289
|
+
);
|
|
2290
|
+
}
|
|
2291
|
+
var trafficLightIconPathByName = {
|
|
2292
|
+
close: "M16.9395 4.93953C17.5253 4.35374 18.4748 4.35374 19.0606 4.93953C19.6463 5.52532 19.6464 6.47486 19.0606 7.06062L14.1212 12.0001L19.0606 16.9395C19.6463 17.5253 19.6464 18.4749 19.0606 19.0606C18.4749 19.6464 17.5253 19.6463 16.9395 19.0606L12.0001 14.1212L7.06062 19.0606C6.47486 19.6464 5.52532 19.6463 4.93953 19.0606C4.35374 18.4748 4.35374 17.5253 4.93953 16.9395L9.87898 12.0001L4.93953 7.06062C4.35374 6.47484 4.35374 5.52532 4.93953 4.93953C5.52532 4.35374 6.47484 4.35374 7.06062 4.93953L12.0001 9.87898L16.9395 4.93953Z",
|
|
2293
|
+
fullscreen: "M18.1465 7.85352C18.4615 7.53861 18.9999 7.76165 19 8.20703V18.5C19 18.7761 18.7761 19 18.5 19H8.20703C7.76165 18.9999 7.53861 18.4615 7.85352 18.1465L18.1465 7.85352ZM15.793 5C16.2384 5.00006 16.4614 5.53855 16.1465 5.85352L5.85352 16.1465C5.53855 16.4614 5.00006 16.2384 5 15.793V5.5C5 5.22386 5.22386 5 5.5 5H15.793Z",
|
|
2294
|
+
minimize: "M5 10.5H19C19.8284 10.5 20.5 11.1716 20.5 12C20.5 12.8284 19.8284 13.5 19 13.5H5C4.17157 13.5 3.5 12.8284 3.5 12C3.5 11.1716 4.17157 10.5 5 10.5Z",
|
|
2295
|
+
unfullscreen: "M20.793 12C21.2384 12.0001 21.4614 12.5386 21.1465 12.8536L12.8536 21.1465C12.5386 21.4614 12.0001 21.2384 12.0001 20.793V12.5C12.0001 12.2239 12.2239 12 12.5001 12H20.793ZM11.1465 2.85356C11.4615 2.53864 12 2.76166 12.0001 3.20708V11.5C12 11.7761 11.7762 12 11.5001 12H3.20708C2.76166 12 2.53864 11.4615 2.85357 11.1465L11.1465 2.85356Z"
|
|
2296
|
+
};
|
|
2253
2297
|
|
|
2254
2298
|
// agent-gui/agentGuiNode/controller/useAgentGUINodeController.ts
|
|
2255
2299
|
import {
|
|
@@ -2363,141 +2407,6 @@ var DEFAULT_AGENT_SETTINGS = {
|
|
|
2363
2407
|
hideWorktreeMismatchDropWarning: false
|
|
2364
2408
|
};
|
|
2365
2409
|
|
|
2366
|
-
// contexts/settings/domain/agentSettings.providerMeta.ts
|
|
2367
|
-
var AGENT_PROVIDER_LABEL = {
|
|
2368
|
-
"claude-code": "Claude Code",
|
|
2369
|
-
codex: "Codex",
|
|
2370
|
-
nexight: "Nexight",
|
|
2371
|
-
opencode: "OpenCode",
|
|
2372
|
-
gemini: "Gemini CLI",
|
|
2373
|
-
openclaw: "OpenClaw",
|
|
2374
|
-
hermes: "Hermes Agent"
|
|
2375
|
-
};
|
|
2376
|
-
|
|
2377
|
-
// agent-gui/agentGuiNode/model/agentGuiProviderIdentity.ts
|
|
2378
|
-
function normalizeAgentGUIProviderIdentity(provider) {
|
|
2379
|
-
switch (provider?.trim().toLowerCase() ?? "") {
|
|
2380
|
-
case "claude-code":
|
|
2381
|
-
case "claude":
|
|
2382
|
-
case "claude code":
|
|
2383
|
-
return "claude-code";
|
|
2384
|
-
case "codex":
|
|
2385
|
-
return "codex";
|
|
2386
|
-
case "nexight":
|
|
2387
|
-
case "tutti":
|
|
2388
|
-
return "nexight";
|
|
2389
|
-
case "gemini":
|
|
2390
|
-
return "gemini";
|
|
2391
|
-
case "hermes":
|
|
2392
|
-
return "hermes";
|
|
2393
|
-
case "openclaw":
|
|
2394
|
-
return "openclaw";
|
|
2395
|
-
default:
|
|
2396
|
-
return "unknown";
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
function resolveAgentGUIProviderIdentity(input) {
|
|
2400
|
-
const candidates = [
|
|
2401
|
-
input.sessionProvider,
|
|
2402
|
-
input.workspaceSessionProvider,
|
|
2403
|
-
input.conversationProvider,
|
|
2404
|
-
timelineProviderHint(input.timelineItems ?? [])
|
|
2405
|
-
];
|
|
2406
|
-
for (const candidate of candidates) {
|
|
2407
|
-
const normalized = normalizeAgentGUIProviderIdentity(candidate);
|
|
2408
|
-
if (normalized !== "unknown") {
|
|
2409
|
-
return normalized;
|
|
2410
|
-
}
|
|
2411
|
-
}
|
|
2412
|
-
return "unknown";
|
|
2413
|
-
}
|
|
2414
|
-
function resolveAgentGUIConversationTitle(title, provider) {
|
|
2415
|
-
const normalizedTitle = stripAgentGUITitleTrailingPeriod(
|
|
2416
|
-
normalizeAgentTitleText(title)
|
|
2417
|
-
);
|
|
2418
|
-
if (normalizedTitle) {
|
|
2419
|
-
return {
|
|
2420
|
-
title: normalizedTitle,
|
|
2421
|
-
titleFallback: null
|
|
2422
|
-
};
|
|
2423
|
-
}
|
|
2424
|
-
if (provider === "unknown") {
|
|
2425
|
-
return {
|
|
2426
|
-
title: "",
|
|
2427
|
-
titleFallback: "generic-agent"
|
|
2428
|
-
};
|
|
2429
|
-
}
|
|
2430
|
-
return {
|
|
2431
|
-
title: AGENT_PROVIDER_LABEL[provider],
|
|
2432
|
-
titleFallback: null
|
|
2433
|
-
};
|
|
2434
|
-
}
|
|
2435
|
-
function resolveAgentGUIConversationDisplayTitle(input, fallbackAgentLabel) {
|
|
2436
|
-
if (input.title) {
|
|
2437
|
-
return stripAgentGUITitleTrailingPeriod(
|
|
2438
|
-
normalizeAgentTitleText(input.title)
|
|
2439
|
-
);
|
|
2440
|
-
}
|
|
2441
|
-
if (input.titleFallback === "generic-agent") {
|
|
2442
|
-
return stripAgentGUITitleTrailingPeriod(fallbackAgentLabel);
|
|
2443
|
-
}
|
|
2444
|
-
return "";
|
|
2445
|
-
}
|
|
2446
|
-
function resolveAgentGUIDockConversationTitle(input) {
|
|
2447
|
-
return resolveAgentGUIExplicitConversationTitle(input);
|
|
2448
|
-
}
|
|
2449
|
-
function resolveAgentGUIExplicitConversationTitle(input) {
|
|
2450
|
-
if (input.titleFallback) {
|
|
2451
|
-
return null;
|
|
2452
|
-
}
|
|
2453
|
-
const title = stripAgentGUITitleTrailingPeriod(
|
|
2454
|
-
normalizeAgentTitleText(input.title)
|
|
2455
|
-
);
|
|
2456
|
-
if (!title) {
|
|
2457
|
-
return null;
|
|
2458
|
-
}
|
|
2459
|
-
if (isWorkspaceAgentUntitledTask(title)) {
|
|
2460
|
-
return null;
|
|
2461
|
-
}
|
|
2462
|
-
if (input.provider !== "unknown" && title === AGENT_PROVIDER_LABEL[input.provider]) {
|
|
2463
|
-
return null;
|
|
2464
|
-
}
|
|
2465
|
-
return title;
|
|
2466
|
-
}
|
|
2467
|
-
function resolveAgentGUIProviderDisplayLabel(provider, fallbackAgentLabel) {
|
|
2468
|
-
const resolvedProvider = normalizeAgentGUIProviderIdentity(provider);
|
|
2469
|
-
if (resolvedProvider === "unknown") {
|
|
2470
|
-
return fallbackAgentLabel;
|
|
2471
|
-
}
|
|
2472
|
-
return AGENT_PROVIDER_LABEL[resolvedProvider];
|
|
2473
|
-
}
|
|
2474
|
-
function stripAgentGUITitleTrailingPeriod(title) {
|
|
2475
|
-
return title.trimEnd().replace(/[.。]+$/u, "").trimEnd();
|
|
2476
|
-
}
|
|
2477
|
-
function timelineProviderHint(timelineItems) {
|
|
2478
|
-
for (const item of timelineItems) {
|
|
2479
|
-
if (isUserTimelineItem(item)) {
|
|
2480
|
-
continue;
|
|
2481
|
-
}
|
|
2482
|
-
const normalized = normalizeAgentGUIProviderIdentity(item.actorId);
|
|
2483
|
-
if (normalized !== "unknown") {
|
|
2484
|
-
return normalized;
|
|
2485
|
-
}
|
|
2486
|
-
}
|
|
2487
|
-
return null;
|
|
2488
|
-
}
|
|
2489
|
-
function isUserTimelineItem(item) {
|
|
2490
|
-
const role = item.role?.trim().toLowerCase();
|
|
2491
|
-
if (role === "user") {
|
|
2492
|
-
return true;
|
|
2493
|
-
}
|
|
2494
|
-
const actorType = item.actorType.trim().toLowerCase();
|
|
2495
|
-
if (actorType === "user") {
|
|
2496
|
-
return true;
|
|
2497
|
-
}
|
|
2498
|
-
return item.itemType.trim().toLowerCase() === "message.user";
|
|
2499
|
-
}
|
|
2500
|
-
|
|
2501
2410
|
// agent-gui/agentGuiNode/model/agentGuiConversationProjectResolver.ts
|
|
2502
2411
|
import { resolveWorkspaceUserProjectDisplayLabel } from "@tutti-os/workspace-user-project/core";
|
|
2503
2412
|
var AGENT_GUI_CONVERSATION_PROJECT_SUMMARY_CACHE_LIMIT = 512;
|
|
@@ -2960,10 +2869,7 @@ function firstUserMessageTitleFromTimelineItems(timelineItems) {
|
|
|
2960
2869
|
return userMessage ? timelineItemText(userMessage) : "";
|
|
2961
2870
|
}
|
|
2962
2871
|
function firstUserMessageTitleFromMessages(messages) {
|
|
2963
|
-
|
|
2964
|
-
(message) => messageRole(message) === "user" && messageText(message).length > 0
|
|
2965
|
-
).sort(compareMessagesAscending)[0];
|
|
2966
|
-
return userMessage ? messageText(userMessage) : "";
|
|
2872
|
+
return firstAgentGUIUserMessageTitle(messages);
|
|
2967
2873
|
}
|
|
2968
2874
|
function workspaceAgentMessagesFromTimelineItems(timelineItems) {
|
|
2969
2875
|
return timelineItems.map((item, index) => {
|
|
@@ -2993,38 +2899,6 @@ function workspaceAgentMessagesFromTimelineItems(timelineItems) {
|
|
|
2993
2899
|
};
|
|
2994
2900
|
});
|
|
2995
2901
|
}
|
|
2996
|
-
function messageRole(message) {
|
|
2997
|
-
const role = message.role?.trim().toLowerCase();
|
|
2998
|
-
if (role === "user") {
|
|
2999
|
-
return "user";
|
|
3000
|
-
}
|
|
3001
|
-
if (role === "assistant" || role === "agent") {
|
|
3002
|
-
return "agent";
|
|
3003
|
-
}
|
|
3004
|
-
const kind = message.kind.trim().toLowerCase();
|
|
3005
|
-
if (kind === "message.user") {
|
|
3006
|
-
return "user";
|
|
3007
|
-
}
|
|
3008
|
-
if (kind === "message.assistant" || kind === "message.agent") {
|
|
3009
|
-
return "agent";
|
|
3010
|
-
}
|
|
3011
|
-
return null;
|
|
3012
|
-
}
|
|
3013
|
-
function messageText(message) {
|
|
3014
|
-
const payloadDisplayPrompt = typeof message.payload?.displayPrompt === "string" ? message.payload.displayPrompt : "";
|
|
3015
|
-
const payloadContent = typeof message.payload?.content === "string" ? message.payload.content : "";
|
|
3016
|
-
const payloadText = typeof message.payload?.text === "string" ? message.payload.text : "";
|
|
3017
|
-
return (payloadDisplayPrompt || payloadText || payloadContent).replace(/\s+/g, " ").trim();
|
|
3018
|
-
}
|
|
3019
|
-
function compareMessagesAscending(left, right) {
|
|
3020
|
-
const leftTime = left.occurredAtUnixMs ?? left.completedAtUnixMs ?? left.startedAtUnixMs ?? 0;
|
|
3021
|
-
const rightTime = right.occurredAtUnixMs ?? right.completedAtUnixMs ?? right.startedAtUnixMs ?? 0;
|
|
3022
|
-
const timeDiff = leftTime - rightTime;
|
|
3023
|
-
if (timeDiff !== 0) {
|
|
3024
|
-
return timeDiff;
|
|
3025
|
-
}
|
|
3026
|
-
return (left.id ?? 0) - (right.id ?? 0) || left.messageId.localeCompare(right.messageId);
|
|
3027
|
-
}
|
|
3028
2902
|
function timelineItemRole(item) {
|
|
3029
2903
|
const role = item.role?.trim().toLowerCase();
|
|
3030
2904
|
if (role === "user") {
|
|
@@ -3579,7 +3453,7 @@ function projectWorkspaceAgentMessagesToTimelineItems(messages) {
|
|
|
3579
3453
|
actorType: "agent",
|
|
3580
3454
|
itemType: "message.assistant_thinking",
|
|
3581
3455
|
role: "assistant_thinking",
|
|
3582
|
-
content:
|
|
3456
|
+
content: messageText(message),
|
|
3583
3457
|
occurredAtUnixMs
|
|
3584
3458
|
});
|
|
3585
3459
|
}
|
|
@@ -3593,7 +3467,7 @@ function projectWorkspaceAgentMessagesToTimelineItems(messages) {
|
|
|
3593
3467
|
actorType: "user",
|
|
3594
3468
|
itemType: "message.user",
|
|
3595
3469
|
role: "user",
|
|
3596
|
-
content:
|
|
3470
|
+
content: messageText(message),
|
|
3597
3471
|
occurredAtUnixMs
|
|
3598
3472
|
});
|
|
3599
3473
|
}
|
|
@@ -3607,7 +3481,7 @@ function projectWorkspaceAgentMessagesToTimelineItems(messages) {
|
|
|
3607
3481
|
actorType: "agent",
|
|
3608
3482
|
itemType: "message.assistant",
|
|
3609
3483
|
role: "assistant",
|
|
3610
|
-
content:
|
|
3484
|
+
content: messageText(message),
|
|
3611
3485
|
occurredAtUnixMs
|
|
3612
3486
|
});
|
|
3613
3487
|
}
|
|
@@ -3734,7 +3608,7 @@ function toolCallItemType(status) {
|
|
|
3734
3608
|
return "call";
|
|
3735
3609
|
}
|
|
3736
3610
|
}
|
|
3737
|
-
function
|
|
3611
|
+
function messageText(message) {
|
|
3738
3612
|
const payload = normalizedPayload(message.payload);
|
|
3739
3613
|
const title = messagePayloadString(message, "title");
|
|
3740
3614
|
return firstNonEmptyString(
|
|
@@ -3748,7 +3622,7 @@ function messageText2(message) {
|
|
|
3748
3622
|
}
|
|
3749
3623
|
function statusMessageText(message) {
|
|
3750
3624
|
const title = messagePayloadString(message, "title") ?? "";
|
|
3751
|
-
const text =
|
|
3625
|
+
const text = messageText(message);
|
|
3752
3626
|
if (title && text && title !== text) {
|
|
3753
3627
|
return `${title}
|
|
3754
3628
|
|
|
@@ -7434,8 +7308,31 @@ function sessionHasRenderableMessages(input) {
|
|
|
7434
7308
|
const sessionView = getAgentSessionView(
|
|
7435
7309
|
input.sessionViewRef(normalizedAgentSessionId)
|
|
7436
7310
|
);
|
|
7311
|
+
if (sessionViewHasUnhydratedOlderDetailMessages({
|
|
7312
|
+
agentSessionId: normalizedAgentSessionId,
|
|
7313
|
+
detailMessages: sessionView?.detailMessages ?? [],
|
|
7314
|
+
hasLoadedInitialMessages: input.hasLoadedInitialMessages === true,
|
|
7315
|
+
hasOlderMessages: sessionView?.hasOlderMessages ?? false,
|
|
7316
|
+
oldestLoadedVersion: sessionView?.oldestLoadedVersion ?? null,
|
|
7317
|
+
snapshotMessagesById: input.snapshotMessagesById
|
|
7318
|
+
})) {
|
|
7319
|
+
return false;
|
|
7320
|
+
}
|
|
7437
7321
|
return (sessionView?.detailMessages?.length ?? 0) > 0 || (sessionView?.overlayMessages?.length ?? 0) > 0;
|
|
7438
7322
|
}
|
|
7323
|
+
function sessionViewHasUnhydratedOlderDetailMessages(input) {
|
|
7324
|
+
if (input.hasLoadedInitialMessages || input.hasOlderMessages || input.detailMessages.length === 0) {
|
|
7325
|
+
return false;
|
|
7326
|
+
}
|
|
7327
|
+
const oldestLoadedVersion = input.oldestLoadedVersion ?? minFiniteMessageVersion(input.detailMessages);
|
|
7328
|
+
if (oldestLoadedVersion === null) {
|
|
7329
|
+
return false;
|
|
7330
|
+
}
|
|
7331
|
+
const snapshotOldestVersion = minFiniteMessageVersion(
|
|
7332
|
+
input.snapshotMessagesById[input.agentSessionId] ?? []
|
|
7333
|
+
);
|
|
7334
|
+
return oldestLoadedVersion > 1 || snapshotOldestVersion !== null && snapshotOldestVersion < oldestLoadedVersion;
|
|
7335
|
+
}
|
|
7439
7336
|
function filterMessagesForDetailWindowOverlay(input) {
|
|
7440
7337
|
if (input.localMessages.length === 0) {
|
|
7441
7338
|
return [];
|
|
@@ -9425,6 +9322,9 @@ function useAgentGUINodeController({
|
|
|
9425
9322
|
if (previous !== normalized) {
|
|
9426
9323
|
const hasCachedMessages = sessionHasRenderableMessages({
|
|
9427
9324
|
agentSessionId: normalized,
|
|
9325
|
+
hasLoadedInitialMessages: selectedConversationInitialMessagesLoadedIdsRef.current.has(
|
|
9326
|
+
normalized
|
|
9327
|
+
),
|
|
9428
9328
|
sessionViewRef,
|
|
9429
9329
|
snapshotMessagesById: agentActivitySnapshotRef.current.sessionMessagesById
|
|
9430
9330
|
});
|
|
@@ -10396,6 +10296,9 @@ function useAgentGUINodeController({
|
|
|
10396
10296
|
);
|
|
10397
10297
|
const hasRenderableMessages = sessionHasRenderableMessages({
|
|
10398
10298
|
agentSessionId: normalizedAgentSessionId,
|
|
10299
|
+
hasLoadedInitialMessages: selectedConversationInitialMessagesLoadedIdsRef.current.has(
|
|
10300
|
+
normalizedAgentSessionId
|
|
10301
|
+
),
|
|
10399
10302
|
sessionViewRef,
|
|
10400
10303
|
snapshotMessagesById: agentActivitySnapshotRef.current.sessionMessagesById
|
|
10401
10304
|
});
|
|
@@ -10646,8 +10549,9 @@ function useAgentGUINodeController({
|
|
|
10646
10549
|
if (nextMessages.length === 0) {
|
|
10647
10550
|
return;
|
|
10648
10551
|
}
|
|
10649
|
-
const
|
|
10650
|
-
const
|
|
10552
|
+
const currentView = getAgentSessionView(sessionViewRef(agentSessionId));
|
|
10553
|
+
const currentMessages = currentView?.overlayMessages ?? [];
|
|
10554
|
+
const currentDetailMessages = currentView?.detailMessages ?? [];
|
|
10651
10555
|
const currentDurableDetailMessages = currentDetailMessages.filter(
|
|
10652
10556
|
(message) => !isWorkspaceAgentActivityOptimisticMessage(message)
|
|
10653
10557
|
);
|
|
@@ -10671,7 +10575,19 @@ function useAgentGUINodeController({
|
|
|
10671
10575
|
if (durableDetailWindowMessages.length > 0) {
|
|
10672
10576
|
mergeAgentSessionViewDetailMessages(
|
|
10673
10577
|
sessionViewRef(agentSessionId),
|
|
10674
|
-
durableDetailWindowMessages
|
|
10578
|
+
durableDetailWindowMessages,
|
|
10579
|
+
{
|
|
10580
|
+
hasOlderMessages: currentView?.hasOlderMessages === true || sessionViewHasUnhydratedOlderDetailMessages({
|
|
10581
|
+
agentSessionId,
|
|
10582
|
+
detailMessages: nextDetailMessages,
|
|
10583
|
+
hasLoadedInitialMessages: selectedConversationInitialMessagesLoadedIdsRef.current.has(
|
|
10584
|
+
agentSessionId
|
|
10585
|
+
),
|
|
10586
|
+
hasOlderMessages: currentView?.hasOlderMessages ?? false,
|
|
10587
|
+
oldestLoadedVersion: minFiniteMessageVersion(nextDetailMessages),
|
|
10588
|
+
snapshotMessagesById: agentActivitySnapshot.sessionMessagesById
|
|
10589
|
+
})
|
|
10590
|
+
}
|
|
10675
10591
|
);
|
|
10676
10592
|
}
|
|
10677
10593
|
const durableMessages = nextDetailMessages.length > 0 ? nextDetailMessages : durableSnapshotMessages;
|
|
@@ -13232,6 +13148,72 @@ function useAgentGUINodeController({
|
|
|
13232
13148
|
agentActivityRuntime,
|
|
13233
13149
|
removeConversations
|
|
13234
13150
|
]);
|
|
13151
|
+
const finalizeConversationBatchDeletion = useCallback4(
|
|
13152
|
+
(targetIds) => {
|
|
13153
|
+
for (const id of targetIds) {
|
|
13154
|
+
activatedConversationIdsRef.current.delete(id);
|
|
13155
|
+
deleteAgentSessionView(sessionViewRef(id));
|
|
13156
|
+
}
|
|
13157
|
+
if (conversationListQuery) {
|
|
13158
|
+
for (const id of targetIds) {
|
|
13159
|
+
markLocalDeletedAgentGUIConversation({
|
|
13160
|
+
query: conversationListQuery,
|
|
13161
|
+
agentSessionId: id
|
|
13162
|
+
});
|
|
13163
|
+
}
|
|
13164
|
+
scheduleAgentGUIConversationListProjection(
|
|
13165
|
+
conversationListQuery,
|
|
13166
|
+
"local-delete"
|
|
13167
|
+
);
|
|
13168
|
+
}
|
|
13169
|
+
setTransientConversation(
|
|
13170
|
+
(current) => current && targetIds.has(current.id) ? null : current
|
|
13171
|
+
);
|
|
13172
|
+
setDraftBySessionId(
|
|
13173
|
+
(current) => omitConversationLocalState(current, targetIds)
|
|
13174
|
+
);
|
|
13175
|
+
setQueuedPromptsBySessionId(
|
|
13176
|
+
(current) => omitConversationLocalState(current, targetIds)
|
|
13177
|
+
);
|
|
13178
|
+
setSendNextQueuedPromptIdBySessionId(
|
|
13179
|
+
(current) => omitConversationLocalState(current, targetIds)
|
|
13180
|
+
);
|
|
13181
|
+
setFailedQueuedPromptIdBySessionId(
|
|
13182
|
+
(current) => omitConversationLocalState(current, targetIds)
|
|
13183
|
+
);
|
|
13184
|
+
setQueuedPromptRetryBlockBySessionId(
|
|
13185
|
+
(current) => omitConversationLocalState(current, targetIds)
|
|
13186
|
+
);
|
|
13187
|
+
const nextConversations = conversationsRef.current.filter(
|
|
13188
|
+
(conversation2) => !targetIds.has(conversation2.id)
|
|
13189
|
+
);
|
|
13190
|
+
const currentActiveId = activeConversationIdRef.current;
|
|
13191
|
+
if (currentActiveId && targetIds.has(currentActiveId)) {
|
|
13192
|
+
const nextActive = nextConversations[0]?.id ?? null;
|
|
13193
|
+
if (nextActive) {
|
|
13194
|
+
markSelectedConversationDetailPending(nextActive);
|
|
13195
|
+
setIntent({ tag: "active", id: nextActive });
|
|
13196
|
+
} else {
|
|
13197
|
+
clearSelectedConversationNotFoundRetry();
|
|
13198
|
+
setIsLoadingMessages(false);
|
|
13199
|
+
setIntent({ tag: "home" });
|
|
13200
|
+
}
|
|
13201
|
+
activeConversationIdRef.current = nextActive;
|
|
13202
|
+
setActiveConversationId(nextActive);
|
|
13203
|
+
persistActiveConversation(nextActive);
|
|
13204
|
+
}
|
|
13205
|
+
removeConversations([...targetIds]);
|
|
13206
|
+
},
|
|
13207
|
+
[
|
|
13208
|
+
conversationListQuery,
|
|
13209
|
+
clearSelectedConversationNotFoundRetry,
|
|
13210
|
+
markSelectedConversationDetailPending,
|
|
13211
|
+
persistActiveConversation,
|
|
13212
|
+
sessionViewRef,
|
|
13213
|
+
setTransientConversation,
|
|
13214
|
+
removeConversations
|
|
13215
|
+
]
|
|
13216
|
+
);
|
|
13235
13217
|
const confirmDeleteProjectConversations = useCallback4(
|
|
13236
13218
|
(path) => {
|
|
13237
13219
|
const normalizedPath = normalizeProjectConversationPath(path);
|
|
@@ -13290,59 +13272,7 @@ function useAgentGUINodeController({
|
|
|
13290
13272
|
});
|
|
13291
13273
|
})
|
|
13292
13274
|
).then(() => {
|
|
13293
|
-
|
|
13294
|
-
activatedConversationIdsRef.current.delete(id);
|
|
13295
|
-
deleteAgentSessionView(sessionViewRef(id));
|
|
13296
|
-
}
|
|
13297
|
-
if (conversationListQuery) {
|
|
13298
|
-
for (const id of targetIds) {
|
|
13299
|
-
markLocalDeletedAgentGUIConversation({
|
|
13300
|
-
query: conversationListQuery,
|
|
13301
|
-
agentSessionId: id
|
|
13302
|
-
});
|
|
13303
|
-
}
|
|
13304
|
-
scheduleAgentGUIConversationListProjection(
|
|
13305
|
-
conversationListQuery,
|
|
13306
|
-
"local-delete"
|
|
13307
|
-
);
|
|
13308
|
-
}
|
|
13309
|
-
setTransientConversation(
|
|
13310
|
-
(current) => current && targetIds.has(current.id) ? null : current
|
|
13311
|
-
);
|
|
13312
|
-
setDraftBySessionId(
|
|
13313
|
-
(current) => omitConversationLocalState(current, targetIds)
|
|
13314
|
-
);
|
|
13315
|
-
setQueuedPromptsBySessionId(
|
|
13316
|
-
(current) => omitConversationLocalState(current, targetIds)
|
|
13317
|
-
);
|
|
13318
|
-
setSendNextQueuedPromptIdBySessionId(
|
|
13319
|
-
(current) => omitConversationLocalState(current, targetIds)
|
|
13320
|
-
);
|
|
13321
|
-
setFailedQueuedPromptIdBySessionId(
|
|
13322
|
-
(current) => omitConversationLocalState(current, targetIds)
|
|
13323
|
-
);
|
|
13324
|
-
setQueuedPromptRetryBlockBySessionId(
|
|
13325
|
-
(current) => omitConversationLocalState(current, targetIds)
|
|
13326
|
-
);
|
|
13327
|
-
const nextConversations = conversationsRef.current.filter(
|
|
13328
|
-
(conversation2) => !targetIds.has(conversation2.id)
|
|
13329
|
-
);
|
|
13330
|
-
const currentActiveId = activeConversationIdRef.current;
|
|
13331
|
-
if (currentActiveId && targetIds.has(currentActiveId)) {
|
|
13332
|
-
const nextActive = nextConversations[0]?.id ?? null;
|
|
13333
|
-
if (nextActive) {
|
|
13334
|
-
markSelectedConversationDetailPending(nextActive);
|
|
13335
|
-
setIntent({ tag: "active", id: nextActive });
|
|
13336
|
-
} else {
|
|
13337
|
-
clearSelectedConversationNotFoundRetry();
|
|
13338
|
-
setIsLoadingMessages(false);
|
|
13339
|
-
setIntent({ tag: "home" });
|
|
13340
|
-
}
|
|
13341
|
-
activeConversationIdRef.current = nextActive;
|
|
13342
|
-
setActiveConversationId(nextActive);
|
|
13343
|
-
persistActiveConversation(nextActive);
|
|
13344
|
-
}
|
|
13345
|
-
removeConversations([...targetIds]);
|
|
13275
|
+
finalizeConversationBatchDeletion(targetIds);
|
|
13346
13276
|
setPendingDeleteProjectConversations(null);
|
|
13347
13277
|
}).catch((error) => {
|
|
13348
13278
|
const message = getAgentGUIErrorMessage(error);
|
|
@@ -13376,6 +13306,7 @@ function useAgentGUINodeController({
|
|
|
13376
13306
|
agentActivityRuntime,
|
|
13377
13307
|
conversationListQuery,
|
|
13378
13308
|
clearSelectedConversationNotFoundRetry,
|
|
13309
|
+
finalizeConversationBatchDeletion,
|
|
13379
13310
|
isDeletingProjectConversations,
|
|
13380
13311
|
markSelectedConversationDetailPending,
|
|
13381
13312
|
pendingDeleteProjectConversations,
|
|
@@ -13386,6 +13317,78 @@ function useAgentGUINodeController({
|
|
|
13386
13317
|
workspaceId
|
|
13387
13318
|
]
|
|
13388
13319
|
);
|
|
13320
|
+
const confirmDeleteConversations = useCallback4(
|
|
13321
|
+
(agentSessionIds) => {
|
|
13322
|
+
if (isDeletingProjectConversations) {
|
|
13323
|
+
return;
|
|
13324
|
+
}
|
|
13325
|
+
const targetIds = new Set(
|
|
13326
|
+
agentSessionIds.map((id) => id.trim()).filter((id) => id !== "")
|
|
13327
|
+
);
|
|
13328
|
+
const targetConversations = conversationsRef.current.filter(
|
|
13329
|
+
(conversation2) => targetIds.has(conversation2.id)
|
|
13330
|
+
);
|
|
13331
|
+
if (targetConversations.length === 0) {
|
|
13332
|
+
return;
|
|
13333
|
+
}
|
|
13334
|
+
setIsDeletingProjectConversations(true);
|
|
13335
|
+
setDetailError(null);
|
|
13336
|
+
setListError(null);
|
|
13337
|
+
const activeDeletedConversationId = activeConversationIdRef.current;
|
|
13338
|
+
if (activeDeletedConversationId && targetIds.has(activeDeletedConversationId)) {
|
|
13339
|
+
clearSelectedConversationNotFoundRetry();
|
|
13340
|
+
setIsLoadingMessages(true);
|
|
13341
|
+
setAgentSessionViewMessagesLoading(
|
|
13342
|
+
sessionViewRef(activeDeletedConversationId),
|
|
13343
|
+
true
|
|
13344
|
+
);
|
|
13345
|
+
}
|
|
13346
|
+
void Promise.all(
|
|
13347
|
+
targetConversations.map(async (conversation2) => {
|
|
13348
|
+
await activation.unactivate(conversation2.id);
|
|
13349
|
+
await agentActivityRuntime.deleteSession({
|
|
13350
|
+
workspaceId,
|
|
13351
|
+
agentSessionId: conversation2.id
|
|
13352
|
+
});
|
|
13353
|
+
})
|
|
13354
|
+
).then(() => {
|
|
13355
|
+
finalizeConversationBatchDeletion(targetIds);
|
|
13356
|
+
}).catch((error) => {
|
|
13357
|
+
const message = getAgentGUIErrorMessage(error);
|
|
13358
|
+
reportAgentGUIRuntimeError({
|
|
13359
|
+
error,
|
|
13360
|
+
phase: "delete_conversation",
|
|
13361
|
+
provider: dataRef.current.provider,
|
|
13362
|
+
runtime: agentActivityRuntime,
|
|
13363
|
+
workspaceId,
|
|
13364
|
+
context: {
|
|
13365
|
+
conversationCount: targetConversations.length
|
|
13366
|
+
}
|
|
13367
|
+
});
|
|
13368
|
+
setListError(message);
|
|
13369
|
+
toast.error(message);
|
|
13370
|
+
setDetailError(message);
|
|
13371
|
+
if (activeDeletedConversationId && activeConversationIdRef.current === activeDeletedConversationId) {
|
|
13372
|
+
setIsLoadingMessages(false);
|
|
13373
|
+
setAgentSessionViewMessagesLoading(
|
|
13374
|
+
sessionViewRef(activeDeletedConversationId),
|
|
13375
|
+
false
|
|
13376
|
+
);
|
|
13377
|
+
}
|
|
13378
|
+
}).finally(() => {
|
|
13379
|
+
setIsDeletingProjectConversations(false);
|
|
13380
|
+
});
|
|
13381
|
+
},
|
|
13382
|
+
[
|
|
13383
|
+
activation,
|
|
13384
|
+
agentActivityRuntime,
|
|
13385
|
+
clearSelectedConversationNotFoundRetry,
|
|
13386
|
+
finalizeConversationBatchDeletion,
|
|
13387
|
+
isDeletingProjectConversations,
|
|
13388
|
+
sessionViewRef,
|
|
13389
|
+
workspaceId
|
|
13390
|
+
]
|
|
13391
|
+
);
|
|
13389
13392
|
const toggleConversationPinned = useCallback4(
|
|
13390
13393
|
(agentSessionId, pinned) => {
|
|
13391
13394
|
const normalizedAgentSessionId = agentSessionId.trim();
|
|
@@ -14064,6 +14067,9 @@ function useAgentGUINodeController({
|
|
|
14064
14067
|
const stableRequestDeleteProjectConversations = useStableControllerEventCallback(requestDeleteProjectConversations);
|
|
14065
14068
|
const stableCancelDeleteProjectConversations = useStableControllerEventCallback(cancelDeleteProjectConversations);
|
|
14066
14069
|
const stableConfirmDeleteProjectConversations = useStableControllerEventCallback(confirmDeleteProjectConversations);
|
|
14070
|
+
const stableConfirmDeleteConversations = useStableControllerEventCallback(
|
|
14071
|
+
confirmDeleteConversations
|
|
14072
|
+
);
|
|
14067
14073
|
const stableToggleConversationPinned = useStableControllerEventCallback(
|
|
14068
14074
|
toggleConversationPinned
|
|
14069
14075
|
);
|
|
@@ -14107,6 +14113,7 @@ function useAgentGUINodeController({
|
|
|
14107
14113
|
requestDeleteProjectConversations: stableRequestDeleteProjectConversations,
|
|
14108
14114
|
cancelDeleteProjectConversations: stableCancelDeleteProjectConversations,
|
|
14109
14115
|
confirmDeleteProjectConversations: stableConfirmDeleteProjectConversations,
|
|
14116
|
+
confirmDeleteConversations: stableConfirmDeleteConversations,
|
|
14110
14117
|
toggleConversationPinned: stableToggleConversationPinned,
|
|
14111
14118
|
requestDeleteConversation: stableRequestDeleteConversation,
|
|
14112
14119
|
retryActivation: stableRetryActivation,
|
|
@@ -14119,6 +14126,7 @@ function useAgentGUINodeController({
|
|
|
14119
14126
|
stableCancelDeleteConversation,
|
|
14120
14127
|
stableCancelDeleteProjectConversations,
|
|
14121
14128
|
stableConfirmDeleteConversation,
|
|
14129
|
+
stableConfirmDeleteConversations,
|
|
14122
14130
|
stableConfirmDeleteProjectConversations,
|
|
14123
14131
|
stableContinueInNewConversation,
|
|
14124
14132
|
stableCreateConversation,
|
|
@@ -14443,13 +14451,7 @@ import {
|
|
|
14443
14451
|
} from "react";
|
|
14444
14452
|
import { useSnapshot } from "valtio";
|
|
14445
14453
|
import { proxy as proxy2 } from "valtio/vanilla";
|
|
14446
|
-
import {
|
|
14447
|
-
ChevronRight as ChevronRight2,
|
|
14448
|
-
ExternalLink,
|
|
14449
|
-
Info,
|
|
14450
|
-
Settings,
|
|
14451
|
-
Wrench
|
|
14452
|
-
} from "lucide-react";
|
|
14454
|
+
import { ChevronRight as ChevronRight2, ExternalLink, Info as Info2, Wrench } from "lucide-react";
|
|
14453
14455
|
|
|
14454
14456
|
// app/renderer/components/ui/popover.tsx
|
|
14455
14457
|
import {
|
|
@@ -14583,6 +14585,30 @@ function UnavailableChatIcon(props) {
|
|
|
14583
14585
|
);
|
|
14584
14586
|
}
|
|
14585
14587
|
|
|
14588
|
+
// app/renderer/components/icons/EnvironmentLinedIcon.tsx
|
|
14589
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
14590
|
+
function EnvironmentLinedIcon(props) {
|
|
14591
|
+
"use memo";
|
|
14592
|
+
return /* @__PURE__ */ jsx15(
|
|
14593
|
+
"svg",
|
|
14594
|
+
{
|
|
14595
|
+
width: "24",
|
|
14596
|
+
height: "24",
|
|
14597
|
+
viewBox: "0 0 24 24",
|
|
14598
|
+
fill: "none",
|
|
14599
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14600
|
+
...props,
|
|
14601
|
+
children: /* @__PURE__ */ jsx15(
|
|
14602
|
+
"path",
|
|
14603
|
+
{
|
|
14604
|
+
d: "M2.0094 19.0001C2.56169 19.0001 3.0094 19.4478 3.0094 20.0001C3.0094 20.5523 2.56169 21.0001 2.0094 21.0001H1.99964C1.44752 20.9999 0.999635 20.5522 0.999635 20.0001C0.999635 19.4479 1.44752 19.0002 1.99964 19.0001H2.0094ZM1.01624 15.8174C1.1173 15.2748 1.63961 14.9161 2.18225 15.0166C3.37336 15.2385 4.47004 15.8162 5.32679 16.6729C6.18355 17.5297 6.76118 18.6263 6.98304 19.8174C7.08384 20.3602 6.72504 20.8824 6.18226 20.9835C5.63962 21.084 5.11731 20.7253 5.01624 20.1827C4.86826 19.3888 4.48377 18.658 3.91272 18.087C3.34169 17.516 2.61086 17.1314 1.81702 16.9834C1.27446 16.8822 0.915501 16.3601 1.01624 15.8174ZM2.1051 11.0059C4.37989 11.2473 6.50315 12.2614 8.12074 13.8789C9.73833 15.4965 10.7524 17.6197 10.9938 19.8946C11.052 20.4438 10.6543 20.9359 10.1051 20.9942C9.55607 21.0523 9.06377 20.6546 9.0055 20.1055C8.81236 18.2857 8.00074 16.5871 6.70667 15.293C5.41262 13.999 3.71397 13.1873 1.89417 12.9942C1.34517 12.9357 0.947265 12.4436 1.00549 11.8946C1.06376 11.3455 1.55606 10.9478 2.1051 11.0059ZM19.9997 3C20.7952 3 21.5582 3.31641 22.1208 3.87891C22.6834 4.44152 22.9997 5.20436 22.9997 6.00001V18.0001C22.9997 18.7957 22.6834 19.5585 22.1208 20.1212C21.5582 20.6837 20.7952 21.0001 19.9997 21.0001H13.9996C13.4475 20.9999 12.9996 20.5522 12.9996 20.0001C12.9996 19.4479 13.4475 19.0002 13.9996 19.0001H19.9997C20.2648 19.0001 20.5192 18.8945 20.7067 18.7071C20.8942 18.5195 20.9997 18.2653 20.9997 18.0001V6.00001C20.9997 5.73479 20.8942 5.48051 20.7067 5.29298C20.5192 5.10555 20.2648 5.00001 19.9997 5.00001H3.99964C3.73455 5.0001 3.48006 5.10552 3.29261 5.29298C3.10518 5.4805 2.99964 5.73488 2.99964 6.00001V8.00002C2.99964 8.5523 2.55192 9.00002 1.99964 9.00002C1.44752 8.99983 0.999635 8.55218 0.999635 8.00002V6.00001C0.999635 5.20444 1.31605 4.4415 1.87854 3.87891C2.44107 3.31638 3.20412 3.0001 3.99964 3H19.9997Z",
|
|
14605
|
+
fill: "currentColor"
|
|
14606
|
+
}
|
|
14607
|
+
)
|
|
14608
|
+
}
|
|
14609
|
+
);
|
|
14610
|
+
}
|
|
14611
|
+
|
|
14586
14612
|
// app/renderer/components/StatusDot.tsx
|
|
14587
14613
|
import { StatusDot } from "@tutti-os/ui-system";
|
|
14588
14614
|
|
|
@@ -14932,7 +14958,7 @@ var styles = {
|
|
|
14932
14958
|
var RoomIssueNode_styles_default = styles;
|
|
14933
14959
|
|
|
14934
14960
|
// agent-gui/RoomIssueNode/TaskSearchField.tsx
|
|
14935
|
-
import { jsx as
|
|
14961
|
+
import { jsx as jsx16, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
14936
14962
|
function TaskSearchField({
|
|
14937
14963
|
ariaLabel,
|
|
14938
14964
|
className,
|
|
@@ -14952,7 +14978,7 @@ function TaskSearchField({
|
|
|
14952
14978
|
className: `${RoomIssueNode_styles_default.searchField} ${className ?? ""}`.trim(),
|
|
14953
14979
|
"data-has-value": searchInput.value ? "true" : "false",
|
|
14954
14980
|
children: [
|
|
14955
|
-
/* @__PURE__ */
|
|
14981
|
+
/* @__PURE__ */ jsx16(
|
|
14956
14982
|
Input,
|
|
14957
14983
|
{
|
|
14958
14984
|
type: "search",
|
|
@@ -14975,7 +15001,7 @@ function TaskSearchField({
|
|
|
14975
15001
|
"data-testid": dataTestId
|
|
14976
15002
|
}
|
|
14977
15003
|
),
|
|
14978
|
-
searchInput.value ? /* @__PURE__ */
|
|
15004
|
+
searchInput.value ? /* @__PURE__ */ jsx16(
|
|
14979
15005
|
"button",
|
|
14980
15006
|
{
|
|
14981
15007
|
type: "button",
|
|
@@ -14983,7 +15009,7 @@ function TaskSearchField({
|
|
|
14983
15009
|
"aria-label": clearAriaLabel ?? t("common.clear"),
|
|
14984
15010
|
onMouseDown: (event) => event.preventDefault(),
|
|
14985
15011
|
onClick: searchInput.clearValue,
|
|
14986
|
-
children: /* @__PURE__ */
|
|
15012
|
+
children: /* @__PURE__ */ jsx16(CloseLinedIcon, { "aria-hidden": "true" })
|
|
14987
15013
|
}
|
|
14988
15014
|
) : null
|
|
14989
15015
|
]
|
|
@@ -15022,7 +15048,7 @@ import {
|
|
|
15022
15048
|
useAnimation,
|
|
15023
15049
|
useReducedMotion
|
|
15024
15050
|
} from "framer-motion";
|
|
15025
|
-
import { jsx as
|
|
15051
|
+
import { jsx as jsx17, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
15026
15052
|
var CAST_VARIANTS = {
|
|
15027
15053
|
normal: { opacity: 1 },
|
|
15028
15054
|
animate: (custom) => ({
|
|
@@ -15090,7 +15116,7 @@ var CastIcon = forwardRef2(
|
|
|
15090
15116
|
},
|
|
15091
15117
|
[onMouseLeave, stopAnimation]
|
|
15092
15118
|
);
|
|
15093
|
-
return /* @__PURE__ */
|
|
15119
|
+
return /* @__PURE__ */ jsx17(
|
|
15094
15120
|
"div",
|
|
15095
15121
|
{
|
|
15096
15122
|
className: cn("inline-flex items-center justify-center", className),
|
|
@@ -15110,8 +15136,8 @@ var CastIcon = forwardRef2(
|
|
|
15110
15136
|
width: size,
|
|
15111
15137
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15112
15138
|
children: [
|
|
15113
|
-
/* @__PURE__ */
|
|
15114
|
-
/* @__PURE__ */
|
|
15139
|
+
/* @__PURE__ */ jsx17("path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6" }),
|
|
15140
|
+
/* @__PURE__ */ jsx17(
|
|
15115
15141
|
motion.path,
|
|
15116
15142
|
{
|
|
15117
15143
|
animate: controls,
|
|
@@ -15120,7 +15146,7 @@ var CastIcon = forwardRef2(
|
|
|
15120
15146
|
variants: CAST_VARIANTS
|
|
15121
15147
|
}
|
|
15122
15148
|
),
|
|
15123
|
-
/* @__PURE__ */
|
|
15149
|
+
/* @__PURE__ */ jsx17(
|
|
15124
15150
|
motion.path,
|
|
15125
15151
|
{
|
|
15126
15152
|
animate: controls,
|
|
@@ -15129,7 +15155,7 @@ var CastIcon = forwardRef2(
|
|
|
15129
15155
|
variants: CAST_VARIANTS
|
|
15130
15156
|
}
|
|
15131
15157
|
),
|
|
15132
|
-
/* @__PURE__ */
|
|
15158
|
+
/* @__PURE__ */ jsx17(
|
|
15133
15159
|
motion.line,
|
|
15134
15160
|
{
|
|
15135
15161
|
animate: controls,
|
|
@@ -15179,7 +15205,7 @@ var styles2 = {
|
|
|
15179
15205
|
var AgentGUIChrome_styles_default = styles2;
|
|
15180
15206
|
|
|
15181
15207
|
// agent-gui/agentGuiNode/AgentSessionChrome.tsx
|
|
15182
|
-
import { Fragment as Fragment2, jsx as
|
|
15208
|
+
import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
15183
15209
|
function splitTrailingEllipsis(message) {
|
|
15184
15210
|
const match = message.match(/^(.*?)(\.{3}|…)\s*$/);
|
|
15185
15211
|
if (!match) {
|
|
@@ -15193,9 +15219,9 @@ function splitTrailingEllipsis(message) {
|
|
|
15193
15219
|
function LoadingEllipsis() {
|
|
15194
15220
|
"use memo";
|
|
15195
15221
|
return /* @__PURE__ */ jsxs7("span", { className: "tsh-inline-loading-ellipsis", "aria-hidden": "true", children: [
|
|
15196
|
-
/* @__PURE__ */
|
|
15197
|
-
/* @__PURE__ */
|
|
15198
|
-
/* @__PURE__ */
|
|
15222
|
+
/* @__PURE__ */ jsx18("span", {}),
|
|
15223
|
+
/* @__PURE__ */ jsx18("span", {}),
|
|
15224
|
+
/* @__PURE__ */ jsx18("span", {})
|
|
15199
15225
|
] });
|
|
15200
15226
|
}
|
|
15201
15227
|
function AgentChromeNotice({
|
|
@@ -15208,7 +15234,7 @@ function AgentChromeNotice({
|
|
|
15208
15234
|
}) {
|
|
15209
15235
|
"use memo";
|
|
15210
15236
|
const fullMessage = description ? `${title} ${description}` : title;
|
|
15211
|
-
return /* @__PURE__ */
|
|
15237
|
+
return /* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: /* @__PURE__ */ jsx18(
|
|
15212
15238
|
"section",
|
|
15213
15239
|
{
|
|
15214
15240
|
className: cn(
|
|
@@ -15219,16 +15245,16 @@ function AgentChromeNotice({
|
|
|
15219
15245
|
"data-expanded": "false",
|
|
15220
15246
|
role,
|
|
15221
15247
|
"data-testid": testId,
|
|
15222
|
-
children: /* @__PURE__ */
|
|
15223
|
-
icon ? /* @__PURE__ */
|
|
15248
|
+
children: /* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
15249
|
+
icon ? /* @__PURE__ */ jsx18("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: icon }) : null,
|
|
15224
15250
|
/* @__PURE__ */ jsxs7(
|
|
15225
15251
|
"p",
|
|
15226
15252
|
{
|
|
15227
15253
|
className: cn(AgentGUIChrome_styles_default.chromeMessage, AgentGUIChrome_styles_default.chromeNoticeMessage),
|
|
15228
15254
|
title: fullMessage,
|
|
15229
15255
|
children: [
|
|
15230
|
-
/* @__PURE__ */
|
|
15231
|
-
description ? /* @__PURE__ */
|
|
15256
|
+
/* @__PURE__ */ jsx18("span", { className: AgentGUIChrome_styles_default.chromeNoticeTitle, children: title }),
|
|
15257
|
+
description ? /* @__PURE__ */ jsx18("span", { className: AgentGUIChrome_styles_default.chromeNoticeDescription, children: description }) : null
|
|
15232
15258
|
]
|
|
15233
15259
|
}
|
|
15234
15260
|
)
|
|
@@ -15377,7 +15403,7 @@ function AgentSessionChrome({
|
|
|
15377
15403
|
event.stopPropagation();
|
|
15378
15404
|
};
|
|
15379
15405
|
return /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: [
|
|
15380
|
-
visibleAuth ? /* @__PURE__ */
|
|
15406
|
+
visibleAuth ? /* @__PURE__ */ jsx18(
|
|
15381
15407
|
"section",
|
|
15382
15408
|
{
|
|
15383
15409
|
ref: authCardRef,
|
|
@@ -15389,7 +15415,7 @@ function AgentSessionChrome({
|
|
|
15389
15415
|
onKeyDown: handleExpandableCardKeyDown("auth"),
|
|
15390
15416
|
children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
15391
15417
|
/* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
15392
|
-
/* @__PURE__ */
|
|
15418
|
+
/* @__PURE__ */ jsx18(
|
|
15393
15419
|
"p",
|
|
15394
15420
|
{
|
|
15395
15421
|
ref: authMessageRef,
|
|
@@ -15398,7 +15424,7 @@ function AgentSessionChrome({
|
|
|
15398
15424
|
children: visibleAuth.message
|
|
15399
15425
|
}
|
|
15400
15426
|
),
|
|
15401
|
-
/* @__PURE__ */
|
|
15427
|
+
/* @__PURE__ */ jsx18(
|
|
15402
15428
|
ChevronDown,
|
|
15403
15429
|
{
|
|
15404
15430
|
"aria-hidden": "true",
|
|
@@ -15411,7 +15437,7 @@ function AgentSessionChrome({
|
|
|
15411
15437
|
)
|
|
15412
15438
|
] }),
|
|
15413
15439
|
/* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeInlineActions, children: [
|
|
15414
|
-
onAuthLogin ? /* @__PURE__ */
|
|
15440
|
+
onAuthLogin ? /* @__PURE__ */ jsx18(
|
|
15415
15441
|
Button2,
|
|
15416
15442
|
{
|
|
15417
15443
|
type: "button",
|
|
@@ -15424,7 +15450,7 @@ function AgentSessionChrome({
|
|
|
15424
15450
|
children: labels.authLogin ?? labels.retryActivation
|
|
15425
15451
|
}
|
|
15426
15452
|
) : null,
|
|
15427
|
-
/* @__PURE__ */
|
|
15453
|
+
/* @__PURE__ */ jsx18(
|
|
15428
15454
|
Button2,
|
|
15429
15455
|
{
|
|
15430
15456
|
type: "button",
|
|
@@ -15442,9 +15468,9 @@ function AgentSessionChrome({
|
|
|
15442
15468
|
}
|
|
15443
15469
|
) : null,
|
|
15444
15470
|
chrome.approval ? /* @__PURE__ */ jsxs7("section", { className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardAction), children: [
|
|
15445
|
-
/* @__PURE__ */
|
|
15446
|
-
/* @__PURE__ */
|
|
15447
|
-
/* @__PURE__ */
|
|
15471
|
+
/* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.chromeTitle, children: labels.approvalRequired }),
|
|
15472
|
+
/* @__PURE__ */ jsx18("p", { className: AgentGUIChrome_styles_default.chromeMessage, children: chrome.approval.title }),
|
|
15473
|
+
/* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.chromeActions, children: chrome.approval.options.map((option) => /* @__PURE__ */ jsx18(
|
|
15448
15474
|
"button",
|
|
15449
15475
|
{
|
|
15450
15476
|
type: "button",
|
|
@@ -15458,7 +15484,7 @@ function AgentSessionChrome({
|
|
|
15458
15484
|
option.id
|
|
15459
15485
|
)) })
|
|
15460
15486
|
] }) : null,
|
|
15461
|
-
visibleRecovery ? /* @__PURE__ */
|
|
15487
|
+
visibleRecovery ? /* @__PURE__ */ jsx18(
|
|
15462
15488
|
"section",
|
|
15463
15489
|
{
|
|
15464
15490
|
ref: recoveryCardRef,
|
|
@@ -15476,7 +15502,7 @@ function AgentSessionChrome({
|
|
|
15476
15502
|
onKeyDown: handleExpandableCardKeyDown("recovery"),
|
|
15477
15503
|
children: /* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
15478
15504
|
/* @__PURE__ */ jsxs7("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
15479
|
-
visibleRecovery.kind === "activating" ? /* @__PURE__ */
|
|
15505
|
+
visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsx18(
|
|
15480
15506
|
CastIcon,
|
|
15481
15507
|
{
|
|
15482
15508
|
active: true,
|
|
@@ -15486,7 +15512,7 @@ function AgentSessionChrome({
|
|
|
15486
15512
|
size: 16
|
|
15487
15513
|
}
|
|
15488
15514
|
) : null,
|
|
15489
|
-
/* @__PURE__ */
|
|
15515
|
+
/* @__PURE__ */ jsx18(
|
|
15490
15516
|
"p",
|
|
15491
15517
|
{
|
|
15492
15518
|
ref: recoveryMessageRef,
|
|
@@ -15494,12 +15520,12 @@ function AgentSessionChrome({
|
|
|
15494
15520
|
"aria-label": visibleRecovery.kind === "activating" ? recoveryMessage : void 0,
|
|
15495
15521
|
title: recoveryMessage,
|
|
15496
15522
|
children: visibleRecovery.kind === "activating" ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
15497
|
-
/* @__PURE__ */
|
|
15498
|
-
activatingMessage.ellipsis ? /* @__PURE__ */
|
|
15523
|
+
/* @__PURE__ */ jsx18("span", { className: "tsh-inline-loading-label", children: activatingMessage.label }),
|
|
15524
|
+
activatingMessage.ellipsis ? /* @__PURE__ */ jsx18(LoadingEllipsis, {}) : null
|
|
15499
15525
|
] }) : recoveryMessage
|
|
15500
15526
|
}
|
|
15501
15527
|
),
|
|
15502
|
-
/* @__PURE__ */
|
|
15528
|
+
/* @__PURE__ */ jsx18(
|
|
15503
15529
|
ChevronDown,
|
|
15504
15530
|
{
|
|
15505
15531
|
"aria-hidden": "true",
|
|
@@ -15511,7 +15537,7 @@ function AgentSessionChrome({
|
|
|
15511
15537
|
}
|
|
15512
15538
|
)
|
|
15513
15539
|
] }),
|
|
15514
|
-
/* @__PURE__ */
|
|
15540
|
+
/* @__PURE__ */ jsx18("div", { className: AgentGUIChrome_styles_default.chromeInlineActions, children: visibleRecovery.kind === "failed" && visibleRecovery.followupAction === "continue-in-new-conversation" ? /* @__PURE__ */ jsx18(
|
|
15515
15541
|
Button2,
|
|
15516
15542
|
{
|
|
15517
15543
|
type: "button",
|
|
@@ -15524,7 +15550,7 @@ function AgentSessionChrome({
|
|
|
15524
15550
|
},
|
|
15525
15551
|
children: labels.continueInNewConversation
|
|
15526
15552
|
}
|
|
15527
|
-
) : visibleRecovery.kind === "failed" && visibleRecovery.canRetry !== false ? /* @__PURE__ */
|
|
15553
|
+
) : visibleRecovery.kind === "failed" && visibleRecovery.canRetry !== false ? /* @__PURE__ */ jsx18(
|
|
15528
15554
|
Button2,
|
|
15529
15555
|
{
|
|
15530
15556
|
type: "button",
|
|
@@ -15546,7 +15572,7 @@ function AgentSessionChrome({
|
|
|
15546
15572
|
|
|
15547
15573
|
// agent-gui/agentGuiNode/AgentGoalBanner.tsx
|
|
15548
15574
|
import { Target } from "lucide-react";
|
|
15549
|
-
import { jsx as
|
|
15575
|
+
import { jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
15550
15576
|
var TERMINAL_GOAL_STATUSES = /* @__PURE__ */ new Set(["complete", "completed", "done"]);
|
|
15551
15577
|
function normalizeGoalStatus(status) {
|
|
15552
15578
|
return (status ?? "").trim().toLowerCase();
|
|
@@ -15557,7 +15583,7 @@ function isGoalBannerVisible(objective, status) {
|
|
|
15557
15583
|
}
|
|
15558
15584
|
return !TERMINAL_GOAL_STATUSES.has(normalizeGoalStatus(status));
|
|
15559
15585
|
}
|
|
15560
|
-
function
|
|
15586
|
+
function goalStatusLabel(status, labels) {
|
|
15561
15587
|
switch (normalizeGoalStatus(status)) {
|
|
15562
15588
|
case "paused":
|
|
15563
15589
|
return labels.statusPaused;
|
|
@@ -15575,6 +15601,15 @@ function statusLabel(status, labels) {
|
|
|
15575
15601
|
return labels.statusActive;
|
|
15576
15602
|
}
|
|
15577
15603
|
}
|
|
15604
|
+
function describeGoal(input) {
|
|
15605
|
+
const trimmedObjective = input.objective.trim();
|
|
15606
|
+
const detailParts = [goalStatusLabel(input.status, input.labels)];
|
|
15607
|
+
if (typeof input.tokenBudget === "number" && input.tokenBudget > 0) {
|
|
15608
|
+
const used = typeof input.tokensUsed === "number" && input.tokensUsed >= 0 ? input.tokensUsed : 0;
|
|
15609
|
+
detailParts.push(input.labels.budgetUsage(used, input.tokenBudget));
|
|
15610
|
+
}
|
|
15611
|
+
return `${trimmedObjective} \xB7 ${detailParts.join(" \xB7 ")}`;
|
|
15612
|
+
}
|
|
15578
15613
|
function AgentGoalBanner({
|
|
15579
15614
|
objective,
|
|
15580
15615
|
status,
|
|
@@ -15583,15 +15618,15 @@ function AgentGoalBanner({
|
|
|
15583
15618
|
labels
|
|
15584
15619
|
}) {
|
|
15585
15620
|
"use memo";
|
|
15586
|
-
const
|
|
15587
|
-
|
|
15588
|
-
|
|
15589
|
-
|
|
15590
|
-
|
|
15591
|
-
|
|
15592
|
-
|
|
15621
|
+
const description = describeGoal({
|
|
15622
|
+
objective,
|
|
15623
|
+
status,
|
|
15624
|
+
tokenBudget,
|
|
15625
|
+
tokensUsed,
|
|
15626
|
+
labels
|
|
15627
|
+
});
|
|
15593
15628
|
const fullMessage = `${labels.goalLabel} ${description}`;
|
|
15594
|
-
return /* @__PURE__ */
|
|
15629
|
+
return /* @__PURE__ */ jsx19("div", { className: AgentGUIChrome_styles_default.sessionChrome, children: /* @__PURE__ */ jsx19(
|
|
15595
15630
|
"section",
|
|
15596
15631
|
{
|
|
15597
15632
|
className: cn(AgentGUIChrome_styles_default.chromeCard, AgentGUIChrome_styles_default.chromeCardMuted),
|
|
@@ -15601,20 +15636,20 @@ function AgentGoalBanner({
|
|
|
15601
15636
|
"data-testid": "agent-gui-goal-banner",
|
|
15602
15637
|
children: /* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMetaRow, children: [
|
|
15603
15638
|
/* @__PURE__ */ jsxs8("div", { className: AgentGUIChrome_styles_default.chromeMessageSlot, children: [
|
|
15604
|
-
/* @__PURE__ */
|
|
15639
|
+
/* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeIcon, children: /* @__PURE__ */ jsx19(Target, { "aria-hidden": true, className: "size-3.5" }) }),
|
|
15605
15640
|
/* @__PURE__ */ jsxs8(
|
|
15606
15641
|
"p",
|
|
15607
15642
|
{
|
|
15608
15643
|
className: cn(AgentGUIChrome_styles_default.chromeMessage, AgentGUIChrome_styles_default.chromeNoticeMessage),
|
|
15609
15644
|
title: fullMessage,
|
|
15610
15645
|
children: [
|
|
15611
|
-
/* @__PURE__ */
|
|
15612
|
-
/* @__PURE__ */
|
|
15646
|
+
/* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeNoticeTitle, children: labels.goalLabel }),
|
|
15647
|
+
/* @__PURE__ */ jsx19("span", { className: AgentGUIChrome_styles_default.chromeNoticeDescription, children: description })
|
|
15613
15648
|
]
|
|
15614
15649
|
}
|
|
15615
15650
|
)
|
|
15616
15651
|
] }),
|
|
15617
|
-
/* @__PURE__ */
|
|
15652
|
+
/* @__PURE__ */ jsx19(
|
|
15618
15653
|
"span",
|
|
15619
15654
|
{
|
|
15620
15655
|
className: AgentGUIChrome_styles_default.chromeGoalHint,
|
|
@@ -15648,8 +15683,8 @@ import {
|
|
|
15648
15683
|
} from "@tutti-os/ui-system";
|
|
15649
15684
|
|
|
15650
15685
|
// agent-gui/agentGuiNode/AgentComposer.tsx
|
|
15651
|
-
import { AddIcon, Select as Select2, SelectTrigger as SelectTrigger2 } from "@tutti-os/ui-system";
|
|
15652
|
-
import { ListChecks, X } from "lucide-react";
|
|
15686
|
+
import { AddIcon, Button as Button3, Select as Select2, SelectTrigger as SelectTrigger2 } from "@tutti-os/ui-system";
|
|
15687
|
+
import { ListChecks as ListChecks2, Target as Target3, X } from "lucide-react";
|
|
15653
15688
|
import {
|
|
15654
15689
|
createMentionPaletteStateAdapter,
|
|
15655
15690
|
makeAtPanelKeyDown,
|
|
@@ -15944,6 +15979,9 @@ function resolveSlashCommandSelectionEffect({
|
|
|
15944
15979
|
if (isLocalTogglePlanCommand(provider, commandName)) {
|
|
15945
15980
|
return { kind: "togglePlanMode" };
|
|
15946
15981
|
}
|
|
15982
|
+
if (isGoalModeCommand(commandName)) {
|
|
15983
|
+
return { kind: "activateGoalMode" };
|
|
15984
|
+
}
|
|
15947
15985
|
if (isLocalToggleSpeedCommand(provider, commandName)) {
|
|
15948
15986
|
return { kind: "toggleSpeed" };
|
|
15949
15987
|
}
|
|
@@ -16031,6 +16069,9 @@ function resolveSlashCommandSubmitEffect({
|
|
|
16031
16069
|
function isLocalTogglePlanCommand(provider, commandName) {
|
|
16032
16070
|
return isACPProvider(provider) && ACP_LOCAL_TOGGLE_PLAN_COMMANDS.has(commandName.trim().toLowerCase());
|
|
16033
16071
|
}
|
|
16072
|
+
function isGoalModeCommand(commandName) {
|
|
16073
|
+
return commandName.trim().toLowerCase() === "goal";
|
|
16074
|
+
}
|
|
16034
16075
|
function isReviewPickerCommand(provider, commandName) {
|
|
16035
16076
|
return providerSlashPolicy(provider)?.reviewPickerCommands.has(commandName) ?? false;
|
|
16036
16077
|
}
|
|
@@ -16086,12 +16127,25 @@ function filterUnavailableSlashCommands(commands, input) {
|
|
|
16086
16127
|
|
|
16087
16128
|
// agent-gui/agentGuiNode/AgentSlashCommandPalette.tsx
|
|
16088
16129
|
import { Fragment as Fragment3, useEffect as useEffect6, useRef as useRef7 } from "react";
|
|
16089
|
-
import {
|
|
16130
|
+
import {
|
|
16131
|
+
Globe,
|
|
16132
|
+
Info,
|
|
16133
|
+
ListChecks,
|
|
16134
|
+
Minimize2,
|
|
16135
|
+
Monitor,
|
|
16136
|
+
Search,
|
|
16137
|
+
Target as Target2,
|
|
16138
|
+
ZapIcon
|
|
16139
|
+
} from "lucide-react";
|
|
16140
|
+
import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
16090
16141
|
var paletteStyles = {
|
|
16091
16142
|
palette: "nodrag agent-gui-node__mention-palette flex h-full min-h-0 flex-col gap-1 overflow-y-auto px-1 pb-1 pt-2 [-webkit-app-region:no-drag]",
|
|
16092
|
-
option: "nodrag relative flex min-h-9 w-full min-w-0 cursor-pointer select-none items-center gap-
|
|
16093
|
-
|
|
16094
|
-
|
|
16143
|
+
option: "nodrag relative flex min-h-9 w-full min-w-0 cursor-pointer select-none items-center gap-2 overflow-hidden rounded-[6px] border-0 bg-transparent px-2.5 py-2 text-left text-[13px] text-[var(--text-primary)] outline-hidden transition-colors duration-200 [-webkit-app-region:no-drag] focus-visible:outline-none active:bg-[var(--transparency-active)] data-[highlighted]:bg-[var(--transparency-block)] data-[highlighted]:text-[var(--text-primary)] [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
16144
|
+
icon: "flex w-3 shrink-0 items-center justify-center self-center text-[var(--text-secondary)]",
|
|
16145
|
+
copy: "flex min-w-0 flex-1 items-center gap-1 overflow-hidden leading-[16px]",
|
|
16146
|
+
name: "flex min-w-0 max-w-[48%] shrink-0 items-center gap-1 overflow-hidden",
|
|
16147
|
+
primaryName: "min-w-0 truncate text-[11px] font-semibold text-[var(--text-primary)]",
|
|
16148
|
+
secondaryName: "shrink-0 text-[10px] font-normal text-[var(--text-secondary)]",
|
|
16095
16149
|
descriptionText: "min-w-0 flex-1 truncate text-[11px] font-normal text-[var(--text-secondary)]",
|
|
16096
16150
|
groupHeader: "select-none px-2.5 pb-0.5 text-[11px] font-normal text-[var(--text-secondary)]",
|
|
16097
16151
|
groupHeaderFirst: "pt-1.5",
|
|
@@ -16131,10 +16185,11 @@ function AgentSlashCommandPalette({
|
|
|
16131
16185
|
firstEntryIndexByType.set(groupType, index);
|
|
16132
16186
|
}
|
|
16133
16187
|
});
|
|
16134
|
-
return /* @__PURE__ */
|
|
16188
|
+
return /* @__PURE__ */ jsx20("div", { className: paletteStyles.palette, role: "listbox", "aria-label": label, children: entries.map((entry, index) => {
|
|
16135
16189
|
const isHighlighted = index === highlightedIndex;
|
|
16136
16190
|
const groupType = entryGroupType(entry);
|
|
16137
|
-
const
|
|
16191
|
+
const entryIcon = slashPaletteEntryIcon(entry);
|
|
16192
|
+
const groupHeader = showGroupHeaders && firstEntryIndexByType.get(groupType) === index ? /* @__PURE__ */ jsx20(
|
|
16138
16193
|
"div",
|
|
16139
16194
|
{
|
|
16140
16195
|
"aria-hidden": "true",
|
|
@@ -16183,11 +16238,15 @@ function AgentSlashCommandPalette({
|
|
|
16183
16238
|
onSelectSkill(entry.skill);
|
|
16184
16239
|
},
|
|
16185
16240
|
children: [
|
|
16241
|
+
entryIcon ? /* @__PURE__ */ jsx20("span", { "aria-hidden": "true", className: paletteStyles.icon, children: entryIcon }) : null,
|
|
16186
16242
|
/* @__PURE__ */ jsxs9("span", { className: paletteStyles.copy, children: [
|
|
16187
|
-
/* @__PURE__ */
|
|
16188
|
-
|
|
16243
|
+
/* @__PURE__ */ jsxs9("span", { className: paletteStyles.name, children: [
|
|
16244
|
+
/* @__PURE__ */ jsx20("span", { className: paletteStyles.primaryName, children: entry.type === "command" ? entry.primaryLabel ?? entry.label : entry.label }),
|
|
16245
|
+
entry.type === "command" && entry.secondaryLabel ? /* @__PURE__ */ jsx20("span", { className: paletteStyles.secondaryName, children: entry.secondaryLabel }) : null
|
|
16246
|
+
] }),
|
|
16247
|
+
entry.description ? /* @__PURE__ */ jsx20("span", { className: paletteStyles.descriptionText, children: entry.description }) : null
|
|
16189
16248
|
] }),
|
|
16190
|
-
entry.type === "capability" && entry.settingsLabel && onSelectCapabilitySettings ? /* @__PURE__ */
|
|
16249
|
+
entry.type === "capability" && entry.settingsLabel && onSelectCapabilitySettings ? /* @__PURE__ */ jsx20(
|
|
16191
16250
|
"button",
|
|
16192
16251
|
{
|
|
16193
16252
|
"aria-label": entry.settingsAriaLabel ?? entry.settingsLabel,
|
|
@@ -16239,6 +16298,31 @@ function labelForEntryGroupType(groupType, labels) {
|
|
|
16239
16298
|
return labels.skillsGroupLabel;
|
|
16240
16299
|
}
|
|
16241
16300
|
}
|
|
16301
|
+
var SLASH_PALETTE_ICON_CLASS = "size-3";
|
|
16302
|
+
function slashPaletteEntryIcon(entry) {
|
|
16303
|
+
if (entry.type === "capability") {
|
|
16304
|
+
return entry.capability.capability === "computerUse" ? /* @__PURE__ */ jsx20(Monitor, { className: SLASH_PALETTE_ICON_CLASS }) : /* @__PURE__ */ jsx20(Globe, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16305
|
+
}
|
|
16306
|
+
if (entry.type !== "command") {
|
|
16307
|
+
return null;
|
|
16308
|
+
}
|
|
16309
|
+
switch (entry.command.name.trim().toLowerCase()) {
|
|
16310
|
+
case "compact":
|
|
16311
|
+
return /* @__PURE__ */ jsx20(Minimize2, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16312
|
+
case "fast":
|
|
16313
|
+
return /* @__PURE__ */ jsx20(ZapIcon, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16314
|
+
case "goal":
|
|
16315
|
+
return /* @__PURE__ */ jsx20(Target2, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16316
|
+
case "plan":
|
|
16317
|
+
return /* @__PURE__ */ jsx20(ListChecks, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16318
|
+
case "review":
|
|
16319
|
+
return /* @__PURE__ */ jsx20(Search, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16320
|
+
case "status":
|
|
16321
|
+
return /* @__PURE__ */ jsx20(Info, { className: SLASH_PALETTE_ICON_CLASS });
|
|
16322
|
+
default:
|
|
16323
|
+
return null;
|
|
16324
|
+
}
|
|
16325
|
+
}
|
|
16242
16326
|
|
|
16243
16327
|
// agent-gui/agentGuiNode/AgentQueuedPromptPanel.tsx
|
|
16244
16328
|
import {
|
|
@@ -16367,6 +16451,7 @@ var styles3 = {
|
|
|
16367
16451
|
shell: "agent-gui-node__shell",
|
|
16368
16452
|
timeline: "agent-gui-node__timeline",
|
|
16369
16453
|
timelineCentered: "agent-gui-node__timeline-centered",
|
|
16454
|
+
timelineScrolledFromTop: "agent-gui-node__timeline--scrolled-from-top",
|
|
16370
16455
|
transcriptSkeleton: "agent-gui-node__transcript-skeleton",
|
|
16371
16456
|
transcriptSkeletonBubble: "agent-gui-node__transcript-skeleton-bubble",
|
|
16372
16457
|
transcriptSkeletonLine: "agent-gui-node__transcript-skeleton-line",
|
|
@@ -16384,7 +16469,7 @@ var styles3 = {
|
|
|
16384
16469
|
var AgentGUINode_styles_default = styles3;
|
|
16385
16470
|
|
|
16386
16471
|
// agent-gui/agentGuiNode/AgentQueuedPromptPanel.tsx
|
|
16387
|
-
import { jsx as
|
|
16472
|
+
import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
16388
16473
|
var EMPTY_WORKSPACE_APP_ICONS = [];
|
|
16389
16474
|
function queuedPromptImages(queuedPrompt) {
|
|
16390
16475
|
return agentPromptContentImageBlocks(
|
|
@@ -16511,9 +16596,9 @@ function AgentQueuedPromptPanel({
|
|
|
16511
16596
|
onKeyDown: handleKeyDown,
|
|
16512
16597
|
children: [
|
|
16513
16598
|
/* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptHeader, children: [
|
|
16514
|
-
/* @__PURE__ */
|
|
16515
|
-
/* @__PURE__ */
|
|
16516
|
-
canExpand ? /* @__PURE__ */
|
|
16599
|
+
/* @__PURE__ */ jsx21("span", { className: AgentGUINode_styles_default.composerQueuedPromptLabel, children: labels.queuedLabel }),
|
|
16600
|
+
/* @__PURE__ */ jsx21("span", { className: AgentGUINode_styles_default.composerQueuedPromptCount, children: queuedPrompts.length }),
|
|
16601
|
+
canExpand ? /* @__PURE__ */ jsx21(
|
|
16517
16602
|
ChevronRight,
|
|
16518
16603
|
{
|
|
16519
16604
|
"aria-hidden": "true",
|
|
@@ -16524,7 +16609,7 @@ function AgentQueuedPromptPanel({
|
|
|
16524
16609
|
}
|
|
16525
16610
|
) : null
|
|
16526
16611
|
] }),
|
|
16527
|
-
/* @__PURE__ */
|
|
16612
|
+
/* @__PURE__ */ jsx21(
|
|
16528
16613
|
"div",
|
|
16529
16614
|
{
|
|
16530
16615
|
ref: queuedPromptListRef,
|
|
@@ -16543,8 +16628,8 @@ function AgentQueuedPromptPanel({
|
|
|
16543
16628
|
"data-testid": `agent-gui-composer-queued-prompt-${queuedPrompt.id}`,
|
|
16544
16629
|
"data-draining": isDraining ? "true" : "false",
|
|
16545
16630
|
children: [
|
|
16546
|
-
/* @__PURE__ */
|
|
16547
|
-
displayText ? /* @__PURE__ */
|
|
16631
|
+
/* @__PURE__ */ jsx21("div", { className: AgentGUINode_styles_default.composerQueuedPromptMain, children: /* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptBody, title, children: [
|
|
16632
|
+
displayText ? /* @__PURE__ */ jsx21(
|
|
16548
16633
|
"div",
|
|
16549
16634
|
{
|
|
16550
16635
|
ref: queuedPrompts.length === 1 ? singlePromptTextRef : void 0,
|
|
@@ -16554,7 +16639,7 @@ function AgentQueuedPromptPanel({
|
|
|
16554
16639
|
event.stopPropagation();
|
|
16555
16640
|
}
|
|
16556
16641
|
},
|
|
16557
|
-
children: /* @__PURE__ */
|
|
16642
|
+
children: /* @__PURE__ */ jsx21(
|
|
16558
16643
|
AgentMessageMarkdown,
|
|
16559
16644
|
{
|
|
16560
16645
|
content: displayText,
|
|
@@ -16566,7 +16651,7 @@ function AgentQueuedPromptPanel({
|
|
|
16566
16651
|
)
|
|
16567
16652
|
}
|
|
16568
16653
|
) : null,
|
|
16569
|
-
images.length > 0 ? /* @__PURE__ */
|
|
16654
|
+
images.length > 0 ? /* @__PURE__ */ jsx21("div", { className: AgentGUINode_styles_default.composerQueuedPromptImages, children: images.slice(0, 3).map((image, index) => /* @__PURE__ */ jsx21(
|
|
16570
16655
|
"img",
|
|
16571
16656
|
{
|
|
16572
16657
|
alt: "",
|
|
@@ -16577,42 +16662,42 @@ function AgentQueuedPromptPanel({
|
|
|
16577
16662
|
)) }) : null
|
|
16578
16663
|
] }) }),
|
|
16579
16664
|
/* @__PURE__ */ jsxs10("div", { className: AgentGUINode_styles_default.composerQueuedPromptActions, children: [
|
|
16580
|
-
/* @__PURE__ */
|
|
16665
|
+
/* @__PURE__ */ jsx21(
|
|
16581
16666
|
CanvasNodeGhostIconButton,
|
|
16582
16667
|
{
|
|
16583
16668
|
"aria-label": labels.sendQueuedPromptNext,
|
|
16584
16669
|
disabled: isDraining,
|
|
16585
16670
|
onClick: () => onSendQueuedPromptNext(queuedPrompt.id),
|
|
16586
|
-
children: /* @__PURE__ */
|
|
16671
|
+
children: /* @__PURE__ */ jsx21(CanvasNodeGuideLinedIcon, { "aria-hidden": "true" })
|
|
16587
16672
|
}
|
|
16588
16673
|
),
|
|
16589
|
-
/* @__PURE__ */
|
|
16674
|
+
/* @__PURE__ */ jsx21(
|
|
16590
16675
|
CanvasNodeGhostIconButton,
|
|
16591
16676
|
{
|
|
16592
16677
|
"aria-label": labels.deleteQueuedPrompt,
|
|
16593
16678
|
disabled: isDraining,
|
|
16594
16679
|
onClick: () => onRemoveQueuedPrompt(queuedPrompt.id),
|
|
16595
|
-
children: /* @__PURE__ */
|
|
16680
|
+
children: /* @__PURE__ */ jsx21(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
|
|
16596
16681
|
}
|
|
16597
16682
|
),
|
|
16598
16683
|
/* @__PURE__ */ jsxs10(DropdownMenu, { children: [
|
|
16599
|
-
/* @__PURE__ */
|
|
16684
|
+
/* @__PURE__ */ jsx21(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx21(
|
|
16600
16685
|
CanvasNodeGhostIconButton,
|
|
16601
16686
|
{
|
|
16602
16687
|
"aria-label": labels.queuedPromptMoreActions,
|
|
16603
16688
|
disabled: isDraining,
|
|
16604
16689
|
stopsEventPropagation: false,
|
|
16605
16690
|
onClick: (event) => event.stopPropagation(),
|
|
16606
|
-
children: /* @__PURE__ */
|
|
16691
|
+
children: /* @__PURE__ */ jsx21(CanvasNodeMoreLinedIcon, { "aria-hidden": "true" })
|
|
16607
16692
|
}
|
|
16608
16693
|
) }),
|
|
16609
|
-
/* @__PURE__ */
|
|
16694
|
+
/* @__PURE__ */ jsx21(
|
|
16610
16695
|
DropdownMenuContent,
|
|
16611
16696
|
{
|
|
16612
16697
|
align: "end",
|
|
16613
16698
|
className: AgentGUINode_styles_default.composerMenuContent,
|
|
16614
16699
|
sideOffset: 8,
|
|
16615
|
-
children: /* @__PURE__ */
|
|
16700
|
+
children: /* @__PURE__ */ jsx21(
|
|
16616
16701
|
DropdownMenuItem,
|
|
16617
16702
|
{
|
|
16618
16703
|
className: AgentGUINode_styles_default.composerMenuItem,
|
|
@@ -16626,7 +16711,7 @@ function AgentQueuedPromptPanel({
|
|
|
16626
16711
|
onSelect: () => {
|
|
16627
16712
|
handleEditQueuedPromptSelect(queuedPrompt.id);
|
|
16628
16713
|
},
|
|
16629
|
-
children: /* @__PURE__ */
|
|
16714
|
+
children: /* @__PURE__ */ jsx21("span", { children: labels.editQueuedPrompt })
|
|
16630
16715
|
}
|
|
16631
16716
|
)
|
|
16632
16717
|
}
|
|
@@ -16652,7 +16737,7 @@ import {
|
|
|
16652
16737
|
useMemo as useMemo5,
|
|
16653
16738
|
useState as useState7
|
|
16654
16739
|
} from "react";
|
|
16655
|
-
import { ChevronDown as ChevronDown2, ZapIcon } from "lucide-react";
|
|
16740
|
+
import { ChevronDown as ChevronDown2, ZapIcon as ZapIcon2 } from "lucide-react";
|
|
16656
16741
|
import {
|
|
16657
16742
|
WorkspaceUserProjectSelect,
|
|
16658
16743
|
resolveWorkspaceUserProjectSelectLabels
|
|
@@ -17010,7 +17095,7 @@ function optionsWithSelectedValue(options, selectedValue) {
|
|
|
17010
17095
|
}
|
|
17011
17096
|
|
|
17012
17097
|
// agent-gui/agentGuiNode/AgentComposerSettingsMenus.tsx
|
|
17013
|
-
import { Fragment as Fragment4, jsx as
|
|
17098
|
+
import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
17014
17099
|
function basenameProjectPath(path) {
|
|
17015
17100
|
const normalized = path.trim().replaceAll("\\", "/").replace(/\/+$/, "");
|
|
17016
17101
|
return normalized.split("/").filter(Boolean).at(-1) ?? path;
|
|
@@ -17062,7 +17147,7 @@ function AgentProjectDropdown({
|
|
|
17062
17147
|
className: "workspace-user-project-trigger-label",
|
|
17063
17148
|
"data-workspace-user-project-trigger-label": "true",
|
|
17064
17149
|
children: [
|
|
17065
|
-
selectedPath ? /* @__PURE__ */
|
|
17150
|
+
selectedPath ? /* @__PURE__ */ jsx22(FolderIcon, { "aria-hidden": true, className: "shrink-0", size: 15 }) : /* @__PURE__ */ jsx22(
|
|
17066
17151
|
NoWorkspaceLinedIcon,
|
|
17067
17152
|
{
|
|
17068
17153
|
"aria-hidden": true,
|
|
@@ -17071,16 +17156,16 @@ function AgentProjectDropdown({
|
|
|
17071
17156
|
size: 15
|
|
17072
17157
|
}
|
|
17073
17158
|
),
|
|
17074
|
-
/* @__PURE__ */
|
|
17159
|
+
/* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate", children: triggerLabel })
|
|
17075
17160
|
]
|
|
17076
17161
|
}
|
|
17077
17162
|
),
|
|
17078
|
-
/* @__PURE__ */
|
|
17163
|
+
/* @__PURE__ */ jsx22(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
|
|
17079
17164
|
]
|
|
17080
17165
|
}
|
|
17081
17166
|
);
|
|
17082
17167
|
}
|
|
17083
|
-
return /* @__PURE__ */
|
|
17168
|
+
return /* @__PURE__ */ jsx22(
|
|
17084
17169
|
WorkspaceUserProjectSelect,
|
|
17085
17170
|
{
|
|
17086
17171
|
api: userProjectApi,
|
|
@@ -17100,7 +17185,7 @@ function AgentProjectDropdown({
|
|
|
17100
17185
|
i18n,
|
|
17101
17186
|
labels,
|
|
17102
17187
|
projectLocked: Boolean(composerSettings.projectLocked),
|
|
17103
|
-
renderAddProjectIcon: () => /* @__PURE__ */
|
|
17188
|
+
renderAddProjectIcon: () => /* @__PURE__ */ jsx22(
|
|
17104
17189
|
NewWorkspaceLinedIcon,
|
|
17105
17190
|
{
|
|
17106
17191
|
"aria-hidden": true,
|
|
@@ -17164,15 +17249,15 @@ function AgentPermissionModeDropdown({
|
|
|
17164
17249
|
"aria-label": labels.permissionLabel,
|
|
17165
17250
|
"data-permission-tone": triggerTone,
|
|
17166
17251
|
children: [
|
|
17167
|
-
/* @__PURE__ */
|
|
17168
|
-
/* @__PURE__ */
|
|
17252
|
+
/* @__PURE__ */ jsx22("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx22("span", { className: "truncate", children: triggerLabel }) }),
|
|
17253
|
+
/* @__PURE__ */ jsx22(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
|
|
17169
17254
|
]
|
|
17170
17255
|
}
|
|
17171
17256
|
);
|
|
17172
17257
|
if (previewMode) {
|
|
17173
17258
|
return trigger;
|
|
17174
17259
|
}
|
|
17175
|
-
const selectTrigger = /* @__PURE__ */
|
|
17260
|
+
const selectTrigger = /* @__PURE__ */ jsx22(
|
|
17176
17261
|
SelectTrigger,
|
|
17177
17262
|
{
|
|
17178
17263
|
className: cn2(
|
|
@@ -17183,7 +17268,7 @@ function AgentPermissionModeDropdown({
|
|
|
17183
17268
|
),
|
|
17184
17269
|
"aria-label": labels.permissionLabel,
|
|
17185
17270
|
"data-permission-tone": triggerTone,
|
|
17186
|
-
children: /* @__PURE__ */
|
|
17271
|
+
children: /* @__PURE__ */ jsx22("span", { className: "flex min-w-0 flex-1 items-center", children: /* @__PURE__ */ jsx22("span", { className: "truncate", children: triggerLabel }) })
|
|
17187
17272
|
}
|
|
17188
17273
|
);
|
|
17189
17274
|
return /* @__PURE__ */ jsxs11(
|
|
@@ -17200,11 +17285,11 @@ function AgentPermissionModeDropdown({
|
|
|
17200
17285
|
// it. Target the tooltip at a focusable wrapper span (Radix's pattern
|
|
17201
17286
|
// for disabled triggers) so hover/focus reliably surfaces the hint.
|
|
17202
17287
|
/* @__PURE__ */ jsxs11(Tooltip2, { children: [
|
|
17203
|
-
/* @__PURE__ */
|
|
17204
|
-
/* @__PURE__ */
|
|
17288
|
+
/* @__PURE__ */ jsx22(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx22("span", { className: "inline-flex", tabIndex: 0, children: selectTrigger }) }),
|
|
17289
|
+
/* @__PURE__ */ jsx22(TooltipContent2, { side: "top", children: labels.loadingOptions })
|
|
17205
17290
|
] })
|
|
17206
17291
|
) : selectTrigger,
|
|
17207
|
-
isSelectOpen ? /* @__PURE__ */
|
|
17292
|
+
isSelectOpen ? /* @__PURE__ */ jsx22(
|
|
17208
17293
|
SelectContent,
|
|
17209
17294
|
{
|
|
17210
17295
|
align: "end",
|
|
@@ -17215,7 +17300,7 @@ function AgentPermissionModeDropdown({
|
|
|
17215
17300
|
AgentGUINode_styles_default.composerMenuContent,
|
|
17216
17301
|
"w-max min-w-[220px] max-w-[calc(100vw-32px)] data-[side=top]:!translate-y-0"
|
|
17217
17302
|
),
|
|
17218
|
-
children: permissionOptions.map((option) => /* @__PURE__ */
|
|
17303
|
+
children: permissionOptions.map((option) => /* @__PURE__ */ jsx22(
|
|
17219
17304
|
SelectItem,
|
|
17220
17305
|
{
|
|
17221
17306
|
value: option.value,
|
|
@@ -17223,8 +17308,8 @@ function AgentPermissionModeDropdown({
|
|
|
17223
17308
|
className: cn2(AgentGUINode_styles_default.composerMenuItem, "group/composer-option"),
|
|
17224
17309
|
onPointerDown: (event) => handleSelectedItemPointerDown(event, option.value),
|
|
17225
17310
|
children: /* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
17226
|
-
/* @__PURE__ */
|
|
17227
|
-
option.description ? /* @__PURE__ */
|
|
17311
|
+
/* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate", children: option.label }),
|
|
17312
|
+
option.description ? /* @__PURE__ */ jsx22(
|
|
17228
17313
|
ComposerOptionInfoTooltip,
|
|
17229
17314
|
{
|
|
17230
17315
|
description: option.description,
|
|
@@ -17305,22 +17390,22 @@ function ComposerOptionInfoTooltip({
|
|
|
17305
17390
|
event.preventDefault();
|
|
17306
17391
|
event.stopPropagation();
|
|
17307
17392
|
};
|
|
17308
|
-
const trigger = /* @__PURE__ */
|
|
17393
|
+
const trigger = /* @__PURE__ */ jsx22(
|
|
17309
17394
|
"span",
|
|
17310
17395
|
{
|
|
17311
17396
|
className: "pointer-events-none inline-flex shrink-0 cursor-help text-[var(--agent-gui-text-tertiary)] opacity-0 transition-opacity group-hover/composer-option:pointer-events-auto group-hover/composer-option:opacity-100 group-data-[highlighted]/composer-option:pointer-events-auto group-data-[highlighted]/composer-option:opacity-100",
|
|
17312
17397
|
"data-agent-composer-option-info-trigger": "true",
|
|
17313
17398
|
onClick: stopSelect,
|
|
17314
17399
|
onPointerDown: stopSelect,
|
|
17315
|
-
children: /* @__PURE__ */
|
|
17400
|
+
children: /* @__PURE__ */ jsx22(RoomsHintIcon, { "aria-hidden": true, className: "size-3" })
|
|
17316
17401
|
}
|
|
17317
17402
|
);
|
|
17318
17403
|
if (!tooltipsEnabled) {
|
|
17319
17404
|
return trigger;
|
|
17320
17405
|
}
|
|
17321
17406
|
return /* @__PURE__ */ jsxs11(Tooltip2, { children: [
|
|
17322
|
-
/* @__PURE__ */
|
|
17323
|
-
/* @__PURE__ */
|
|
17407
|
+
/* @__PURE__ */ jsx22(TooltipTrigger2, { asChild: true, children: trigger }),
|
|
17408
|
+
/* @__PURE__ */ jsx22(TooltipContent2, { side: "right", className: "max-w-[240px] whitespace-normal", children: description })
|
|
17324
17409
|
] });
|
|
17325
17410
|
}
|
|
17326
17411
|
function resolvePermissionModeTriggerTone(value) {
|
|
@@ -17375,8 +17460,8 @@ function AgentModelReasoningDropdown({
|
|
|
17375
17460
|
"data-agent-model-reasoning-trigger": "true",
|
|
17376
17461
|
children: [
|
|
17377
17462
|
/* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
|
|
17378
|
-
menu.speed.show && menu.trigger.isFast ? /* @__PURE__ */
|
|
17379
|
-
|
|
17463
|
+
menu.speed.show && menu.trigger.isFast ? /* @__PURE__ */ jsx22(
|
|
17464
|
+
ZapIcon2,
|
|
17380
17465
|
{
|
|
17381
17466
|
"aria-hidden": true,
|
|
17382
17467
|
className: "size-3.5 shrink-0",
|
|
@@ -17384,12 +17469,12 @@ function AgentModelReasoningDropdown({
|
|
|
17384
17469
|
strokeWidth: 2.5
|
|
17385
17470
|
}
|
|
17386
17471
|
) : null,
|
|
17387
|
-
menu.trigger.showCombined ? /* @__PURE__ */
|
|
17388
|
-
/* @__PURE__ */
|
|
17389
|
-
/* @__PURE__ */
|
|
17472
|
+
menu.trigger.showCombined ? /* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate", children: menu.trigger.combinedLabel }) : /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
17473
|
+
/* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate", children: menu.trigger.modelLabel }),
|
|
17474
|
+
/* @__PURE__ */ jsx22("span", { className: "shrink-0", children: menu.trigger.reasoningLabel })
|
|
17390
17475
|
] })
|
|
17391
17476
|
] }),
|
|
17392
|
-
/* @__PURE__ */
|
|
17477
|
+
/* @__PURE__ */ jsx22(ChevronDown2, { "aria-hidden": "true", className: "shrink-0", size: 16 })
|
|
17393
17478
|
]
|
|
17394
17479
|
}
|
|
17395
17480
|
);
|
|
@@ -17402,10 +17487,10 @@ function AgentModelReasoningDropdown({
|
|
|
17402
17487
|
// it. Target the tooltip at a focusable wrapper span (Radix's pattern
|
|
17403
17488
|
// for disabled triggers) so hover/focus reliably surfaces the hint.
|
|
17404
17489
|
/* @__PURE__ */ jsxs11(Tooltip2, { children: [
|
|
17405
|
-
/* @__PURE__ */
|
|
17406
|
-
/* @__PURE__ */
|
|
17490
|
+
/* @__PURE__ */ jsx22(TooltipTrigger2, { asChild: true, children: /* @__PURE__ */ jsx22("span", { className: "inline-flex", tabIndex: 0, children: /* @__PURE__ */ jsx22(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }) }) }),
|
|
17491
|
+
/* @__PURE__ */ jsx22(TooltipContent2, { side: "top", children: labels.loadingOptions })
|
|
17407
17492
|
] })
|
|
17408
|
-
) : /* @__PURE__ */
|
|
17493
|
+
) : /* @__PURE__ */ jsx22(DropdownMenuTrigger2, { asChild: true, disabled: menuDisabled, children: trigger }),
|
|
17409
17494
|
/* @__PURE__ */ jsxs11(
|
|
17410
17495
|
DropdownMenuContent2,
|
|
17411
17496
|
{
|
|
@@ -17420,8 +17505,8 @@ function AgentModelReasoningDropdown({
|
|
|
17420
17505
|
"data-agent-composer-settings-layout": "model-primary",
|
|
17421
17506
|
children: [
|
|
17422
17507
|
menu.model.show ? /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
17423
|
-
/* @__PURE__ */
|
|
17424
|
-
/* @__PURE__ */
|
|
17508
|
+
/* @__PURE__ */ jsx22(DropdownMenuLabel2, { children: labels.modelSelectionLabel }),
|
|
17509
|
+
/* @__PURE__ */ jsx22(
|
|
17425
17510
|
ComposerMenuOptionItems,
|
|
17426
17511
|
{
|
|
17427
17512
|
options: menu.model.options,
|
|
@@ -17432,7 +17517,7 @@ function AgentModelReasoningDropdown({
|
|
|
17432
17517
|
}
|
|
17433
17518
|
)
|
|
17434
17519
|
] }) : null,
|
|
17435
|
-
menu.model.show && (menu.reasoning.show || menu.speed.show) ? /* @__PURE__ */
|
|
17520
|
+
menu.model.show && (menu.reasoning.show || menu.speed.show) ? /* @__PURE__ */ jsx22(DropdownMenuSeparator2, {}) : null,
|
|
17436
17521
|
menu.reasoning.show ? /* @__PURE__ */ jsxs11(DropdownMenuSub2, { children: [
|
|
17437
17522
|
/* @__PURE__ */ jsxs11(
|
|
17438
17523
|
DropdownMenuSubTrigger2,
|
|
@@ -17440,17 +17525,17 @@ function AgentModelReasoningDropdown({
|
|
|
17440
17525
|
className: cn2(AgentGUINode_styles_default.composerMenuItem, "[&>svg]:!ml-0.5"),
|
|
17441
17526
|
"data-agent-reasoning-submenu-trigger": "true",
|
|
17442
17527
|
children: [
|
|
17443
|
-
/* @__PURE__ */
|
|
17444
|
-
/* @__PURE__ */
|
|
17528
|
+
/* @__PURE__ */ jsx22("span", { className: "min-w-0 flex-1 truncate", children: labels.reasoningLabel }),
|
|
17529
|
+
/* @__PURE__ */ jsx22("span", { className: "text-[var(--text-tertiary)]", children: menu.reasoning.selectedLabel })
|
|
17445
17530
|
]
|
|
17446
17531
|
}
|
|
17447
17532
|
),
|
|
17448
|
-
/* @__PURE__ */
|
|
17533
|
+
/* @__PURE__ */ jsx22(
|
|
17449
17534
|
DropdownMenuSubContent2,
|
|
17450
17535
|
{
|
|
17451
17536
|
className: cn2(AgentGUINode_styles_default.composerMenuContent, "min-w-[132px]"),
|
|
17452
17537
|
"data-agent-composer-settings-layout": "model-submenu",
|
|
17453
|
-
children: /* @__PURE__ */
|
|
17538
|
+
children: /* @__PURE__ */ jsx22(
|
|
17454
17539
|
ComposerMenuOptionItems,
|
|
17455
17540
|
{
|
|
17456
17541
|
options: menu.reasoning.options,
|
|
@@ -17469,17 +17554,17 @@ function AgentModelReasoningDropdown({
|
|
|
17469
17554
|
className: cn2(AgentGUINode_styles_default.composerMenuItem, "[&>svg]:!ml-0.5"),
|
|
17470
17555
|
"data-agent-speed-submenu-trigger": "true",
|
|
17471
17556
|
children: [
|
|
17472
|
-
/* @__PURE__ */
|
|
17473
|
-
/* @__PURE__ */
|
|
17557
|
+
/* @__PURE__ */ jsx22("span", { className: "min-w-0 flex-1 truncate", children: labels.speedLabel }),
|
|
17558
|
+
/* @__PURE__ */ jsx22("span", { className: "text-[var(--text-tertiary)]", children: menu.speed.selectedLabel })
|
|
17474
17559
|
]
|
|
17475
17560
|
}
|
|
17476
17561
|
),
|
|
17477
|
-
/* @__PURE__ */
|
|
17562
|
+
/* @__PURE__ */ jsx22(
|
|
17478
17563
|
DropdownMenuSubContent2,
|
|
17479
17564
|
{
|
|
17480
17565
|
className: cn2(AgentGUINode_styles_default.composerMenuContent, "w-[200px]"),
|
|
17481
17566
|
"data-agent-composer-settings-layout": "model-submenu",
|
|
17482
|
-
children: /* @__PURE__ */
|
|
17567
|
+
children: /* @__PURE__ */ jsx22(
|
|
17483
17568
|
ComposerMenuOptionItems,
|
|
17484
17569
|
{
|
|
17485
17570
|
options: menu.speed.options,
|
|
@@ -17504,7 +17589,7 @@ function ComposerMenuOptionItems({
|
|
|
17504
17589
|
tooltipsEnabled = true,
|
|
17505
17590
|
onSelect
|
|
17506
17591
|
}) {
|
|
17507
|
-
return /* @__PURE__ */
|
|
17592
|
+
return /* @__PURE__ */ jsx22(Fragment4, { children: options.map((option) => {
|
|
17508
17593
|
const hasDescription = Boolean(option.description);
|
|
17509
17594
|
const showInlineDescription = descriptionPresentation === "inline" && hasDescription;
|
|
17510
17595
|
const showModelTooltip = descriptionPresentation === "model-tooltip";
|
|
@@ -17530,8 +17615,8 @@ function ComposerMenuOptionItems({
|
|
|
17530
17615
|
},
|
|
17531
17616
|
children: [
|
|
17532
17617
|
showModelTooltip ? /* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 flex-1 items-baseline gap-2 overflow-hidden", children: [
|
|
17533
|
-
/* @__PURE__ */
|
|
17534
|
-
option.summary && option.summary.length > 0 ? /* @__PURE__ */
|
|
17618
|
+
/* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
|
|
17619
|
+
option.summary && option.summary.length > 0 ? /* @__PURE__ */ jsx22("span", { className: "flex min-w-0 shrink-0 items-baseline gap-1.5 overflow-hidden text-[var(--agent-gui-text-tertiary)]", children: option.summary.map((summary) => /* @__PURE__ */ jsx22(
|
|
17535
17620
|
"span",
|
|
17536
17621
|
{
|
|
17537
17622
|
className: "max-w-[64px] truncate leading-[1.15]",
|
|
@@ -17548,8 +17633,8 @@ function ComposerMenuOptionItems({
|
|
|
17548
17633
|
),
|
|
17549
17634
|
children: [
|
|
17550
17635
|
/* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
17551
|
-
/* @__PURE__ */
|
|
17552
|
-
showTooltipDescription && option.description ? /* @__PURE__ */
|
|
17636
|
+
/* @__PURE__ */ jsx22("span", { className: "min-w-0 truncate leading-[1.15]", children: option.label }),
|
|
17637
|
+
showTooltipDescription && option.description ? /* @__PURE__ */ jsx22(
|
|
17553
17638
|
ComposerOptionInfoTooltip,
|
|
17554
17639
|
{
|
|
17555
17640
|
description: option.description,
|
|
@@ -17557,11 +17642,11 @@ function ComposerMenuOptionItems({
|
|
|
17557
17642
|
}
|
|
17558
17643
|
) : null
|
|
17559
17644
|
] }),
|
|
17560
|
-
showInlineDescription && option.description ? /* @__PURE__ */
|
|
17645
|
+
showInlineDescription && option.description ? /* @__PURE__ */ jsx22("span", { className: "whitespace-normal text-[11px] leading-[1.2] text-[var(--text-tertiary)]", children: option.description }) : null
|
|
17561
17646
|
]
|
|
17562
17647
|
}
|
|
17563
17648
|
),
|
|
17564
|
-
/* @__PURE__ */
|
|
17649
|
+
/* @__PURE__ */ jsx22(
|
|
17565
17650
|
CheckIcon,
|
|
17566
17651
|
{
|
|
17567
17652
|
"aria-hidden": true,
|
|
@@ -17575,7 +17660,7 @@ function ComposerMenuOptionItems({
|
|
|
17575
17660
|
},
|
|
17576
17661
|
option.value
|
|
17577
17662
|
);
|
|
17578
|
-
return showModelTooltip ? /* @__PURE__ */
|
|
17663
|
+
return showModelTooltip ? /* @__PURE__ */ jsx22(
|
|
17579
17664
|
ComposerModelOptionTooltip,
|
|
17580
17665
|
{
|
|
17581
17666
|
option,
|
|
@@ -17595,7 +17680,7 @@ function ComposerModelOptionTooltip({
|
|
|
17595
17680
|
return children;
|
|
17596
17681
|
}
|
|
17597
17682
|
return /* @__PURE__ */ jsxs11(Tooltip2, { children: [
|
|
17598
|
-
/* @__PURE__ */
|
|
17683
|
+
/* @__PURE__ */ jsx22(TooltipTrigger2, { asChild: true, children: cloneElement(children, {
|
|
17599
17684
|
"data-agent-model-option-tooltip-trigger": "true"
|
|
17600
17685
|
}) }),
|
|
17601
17686
|
/* @__PURE__ */ jsxs11(
|
|
@@ -17607,10 +17692,10 @@ function ComposerModelOptionTooltip({
|
|
|
17607
17692
|
className: "flex w-[320px] max-w-[calc(100vw-32px)] flex-col items-start gap-0 whitespace-normal rounded-lg border border-[var(--line-2)] bg-[var(--background-fronted)] px-4 py-3 text-[13px] leading-[1.3] text-[var(--text-primary)] shadow-lg",
|
|
17608
17693
|
"data-agent-model-option-tooltip": "true",
|
|
17609
17694
|
children: [
|
|
17610
|
-
/* @__PURE__ */
|
|
17611
|
-
option.tooltip.description ? /* @__PURE__ */
|
|
17612
|
-
option.tooltip.contextWindow ? /* @__PURE__ */
|
|
17613
|
-
option.tooltip.version ? /* @__PURE__ */
|
|
17695
|
+
/* @__PURE__ */ jsx22("span", { className: "block text-[15px] font-semibold leading-[1.2]", children: option.tooltip.title }),
|
|
17696
|
+
option.tooltip.description ? /* @__PURE__ */ jsx22("span", { className: "mt-1.5 block text-[13px] leading-[1.35]", children: option.tooltip.description }) : null,
|
|
17697
|
+
option.tooltip.contextWindow ? /* @__PURE__ */ jsx22("span", { className: "mt-4 block", children: option.tooltip.contextWindow }) : null,
|
|
17698
|
+
option.tooltip.version ? /* @__PURE__ */ jsx22("span", { className: "mt-4 block italic", children: option.tooltip.version }) : null
|
|
17614
17699
|
]
|
|
17615
17700
|
}
|
|
17616
17701
|
)
|
|
@@ -17829,7 +17914,7 @@ function fileToBase64(file) {
|
|
|
17829
17914
|
}
|
|
17830
17915
|
|
|
17831
17916
|
// agent-gui/agentGuiNode/agentRichText/AgentRichTextEditor.tsx
|
|
17832
|
-
import { jsx as
|
|
17917
|
+
import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
17833
17918
|
function buildWorkspaceFileMentionDropContent(entries) {
|
|
17834
17919
|
return entries.flatMap((entry) => [
|
|
17835
17920
|
{
|
|
@@ -18528,7 +18613,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18528
18613
|
lastEmittedPromptRef.current = value;
|
|
18529
18614
|
}, [availableCapabilities, availableSkills, editor, value]);
|
|
18530
18615
|
return /* @__PURE__ */ jsxs12("div", { className: "relative min-w-0", onKeyDownCapture: handleKeyDownCapture, children: [
|
|
18531
|
-
editor ? /* @__PURE__ */
|
|
18616
|
+
editor ? /* @__PURE__ */ jsx23(EditorContent, { editor }) : /* @__PURE__ */ jsx23(
|
|
18532
18617
|
"div",
|
|
18533
18618
|
{
|
|
18534
18619
|
role: "textbox",
|
|
@@ -18556,7 +18641,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18556
18641
|
onContextMenu: (event) => event.preventDefault(),
|
|
18557
18642
|
onPointerDown: (event) => event.stopPropagation(),
|
|
18558
18643
|
children: [
|
|
18559
|
-
/* @__PURE__ */
|
|
18644
|
+
/* @__PURE__ */ jsx23(
|
|
18560
18645
|
AgentRichTextContextMenuButton,
|
|
18561
18646
|
{
|
|
18562
18647
|
disabled: !contextMenu.canEdit || !contextMenu.hasSelection,
|
|
@@ -18564,7 +18649,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18564
18649
|
onSelect: cutSelection
|
|
18565
18650
|
}
|
|
18566
18651
|
),
|
|
18567
|
-
/* @__PURE__ */
|
|
18652
|
+
/* @__PURE__ */ jsx23(
|
|
18568
18653
|
AgentRichTextContextMenuButton,
|
|
18569
18654
|
{
|
|
18570
18655
|
disabled: !contextMenu.hasSelection,
|
|
@@ -18572,7 +18657,7 @@ var AgentRichTextEditor = forwardRef3(function AgentRichTextEditor2({
|
|
|
18572
18657
|
onSelect: copySelection
|
|
18573
18658
|
}
|
|
18574
18659
|
),
|
|
18575
|
-
/* @__PURE__ */
|
|
18660
|
+
/* @__PURE__ */ jsx23(
|
|
18576
18661
|
AgentRichTextContextMenuButton,
|
|
18577
18662
|
{
|
|
18578
18663
|
disabled: !contextMenu.canEdit,
|
|
@@ -18602,7 +18687,7 @@ function AgentRichTextContextMenuButton({
|
|
|
18602
18687
|
selectionStartedRef.current = false;
|
|
18603
18688
|
});
|
|
18604
18689
|
}, [disabled, onSelect]);
|
|
18605
|
-
return /* @__PURE__ */
|
|
18690
|
+
return /* @__PURE__ */ jsx23(
|
|
18606
18691
|
"button",
|
|
18607
18692
|
{
|
|
18608
18693
|
role: "menuitem",
|
|
@@ -18627,7 +18712,7 @@ function AgentRichTextContextMenuButton({
|
|
|
18627
18712
|
|
|
18628
18713
|
// agent-gui/agentGuiNode/AgentSlashStatusPanel.tsx
|
|
18629
18714
|
import { Fragment as Fragment5 } from "react";
|
|
18630
|
-
import { Fragment as Fragment6, jsx as
|
|
18715
|
+
import { Fragment as Fragment6, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
18631
18716
|
function formatSlashStatusTokenCount(value) {
|
|
18632
18717
|
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
18633
18718
|
return "";
|
|
@@ -18669,8 +18754,8 @@ function AgentSlashStatusPanel({
|
|
|
18669
18754
|
role: "status",
|
|
18670
18755
|
children: [
|
|
18671
18756
|
/* @__PURE__ */ jsxs13("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
|
|
18672
|
-
/* @__PURE__ */
|
|
18673
|
-
/* @__PURE__ */
|
|
18757
|
+
/* @__PURE__ */ jsx24("h3", { className: "truncate text-[11px] font-semibold leading-4", children: labels.slashStatusTitle }),
|
|
18758
|
+
/* @__PURE__ */ jsx24(
|
|
18674
18759
|
"button",
|
|
18675
18760
|
{
|
|
18676
18761
|
className: "nodrag shrink-0 rounded-[5px] px-1.5 py-0.5 text-[11px] leading-4 text-muted-foreground transition-colors hover:bg-background-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [-webkit-app-region:no-drag]",
|
|
@@ -18686,32 +18771,32 @@ function AgentSlashStatusPanel({
|
|
|
18686
18771
|
labels.slashStatusSession,
|
|
18687
18772
|
":"
|
|
18688
18773
|
] }),
|
|
18689
|
-
/* @__PURE__ */
|
|
18774
|
+
/* @__PURE__ */ jsx24("dd", { className: "min-w-0 truncate", children: agentSessionId }),
|
|
18690
18775
|
baseUrl ? /* @__PURE__ */ jsxs13(Fragment6, { children: [
|
|
18691
18776
|
/* @__PURE__ */ jsxs13("dt", { className: "text-muted-foreground", children: [
|
|
18692
18777
|
labels.slashStatusBaseUrl,
|
|
18693
18778
|
":"
|
|
18694
18779
|
] }),
|
|
18695
|
-
/* @__PURE__ */
|
|
18780
|
+
/* @__PURE__ */ jsx24("dd", { className: "min-w-0 truncate", children: baseUrl })
|
|
18696
18781
|
] }) : null,
|
|
18697
18782
|
/* @__PURE__ */ jsxs13("dt", { className: "text-muted-foreground", children: [
|
|
18698
18783
|
labels.slashStatusContext,
|
|
18699
18784
|
":"
|
|
18700
18785
|
] }),
|
|
18701
|
-
/* @__PURE__ */
|
|
18786
|
+
/* @__PURE__ */ jsx24("dd", { className: "min-w-0", children: slashStatusContextText(status, labels) })
|
|
18702
18787
|
] }) : null,
|
|
18703
18788
|
limits.map((limit) => /* @__PURE__ */ jsxs13(Fragment5, { children: [
|
|
18704
18789
|
/* @__PURE__ */ jsxs13("dt", { className: "text-muted-foreground", children: [
|
|
18705
18790
|
limit.label,
|
|
18706
18791
|
":"
|
|
18707
18792
|
] }),
|
|
18708
|
-
/* @__PURE__ */
|
|
18709
|
-
typeof limit.percentRemaining === "number" && Number.isFinite(limit.percentRemaining) ? /* @__PURE__ */
|
|
18793
|
+
/* @__PURE__ */ jsx24("dd", { className: "min-w-0", children: /* @__PURE__ */ jsxs13("span", { className: "agent-gui-node__slash-status-limit", children: [
|
|
18794
|
+
typeof limit.percentRemaining === "number" && Number.isFinite(limit.percentRemaining) ? /* @__PURE__ */ jsx24(
|
|
18710
18795
|
"span",
|
|
18711
18796
|
{
|
|
18712
18797
|
"aria-hidden": "true",
|
|
18713
18798
|
className: "agent-gui-node__slash-status-limit-meter",
|
|
18714
|
-
children: /* @__PURE__ */
|
|
18799
|
+
children: /* @__PURE__ */ jsx24(
|
|
18715
18800
|
"span",
|
|
18716
18801
|
{
|
|
18717
18802
|
className: "agent-gui-node__slash-status-limit-meter-fill",
|
|
@@ -18741,7 +18826,7 @@ function AgentSlashStatusPanel({
|
|
|
18741
18826
|
labels.slashStatusLimits,
|
|
18742
18827
|
":"
|
|
18743
18828
|
] }),
|
|
18744
|
-
/* @__PURE__ */
|
|
18829
|
+
/* @__PURE__ */ jsx24("dd", { className: "min-w-0 text-muted-foreground", children: labels.slashStatusLimitsUnavailable })
|
|
18745
18830
|
] }) : null
|
|
18746
18831
|
] })
|
|
18747
18832
|
]
|
|
@@ -18845,7 +18930,7 @@ var AgentReviewBranchController = class {
|
|
|
18845
18930
|
};
|
|
18846
18931
|
|
|
18847
18932
|
// agent-gui/agentGuiNode/AgentReviewPickerPanel.tsx
|
|
18848
|
-
import { jsx as
|
|
18933
|
+
import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
18849
18934
|
var reviewMenuStyles = {
|
|
18850
18935
|
panel: "agent-gui-node__slash-status-panel nodrag flex max-h-[280px] flex-col gap-1 overflow-hidden [-webkit-app-region:no-drag]",
|
|
18851
18936
|
search: "nodrag h-8 w-full shrink-0 rounded-[6px] border-0 bg-transparent px-2.5 text-[11px] leading-4 text-[var(--text-primary)] placeholder:text-[var(--text-secondary)] focus-visible:outline-none [-webkit-app-region:no-drag]",
|
|
@@ -19049,7 +19134,7 @@ function AgentReviewPickerPanel({
|
|
|
19049
19134
|
role: "dialog",
|
|
19050
19135
|
"aria-label": labels.title,
|
|
19051
19136
|
children: [
|
|
19052
|
-
/* @__PURE__ */
|
|
19137
|
+
/* @__PURE__ */ jsx25(
|
|
19053
19138
|
"input",
|
|
19054
19139
|
{
|
|
19055
19140
|
ref: searchInputRef,
|
|
@@ -19065,15 +19150,15 @@ function AgentReviewPickerPanel({
|
|
|
19065
19150
|
onKeyDown: handleKeyDown
|
|
19066
19151
|
}
|
|
19067
19152
|
),
|
|
19068
|
-
/* @__PURE__ */
|
|
19153
|
+
/* @__PURE__ */ jsx25(
|
|
19069
19154
|
"div",
|
|
19070
19155
|
{
|
|
19071
19156
|
className: reviewMenuStyles.list,
|
|
19072
19157
|
role: "listbox",
|
|
19073
19158
|
"aria-label": labels.title,
|
|
19074
|
-
children: entries.length === 0 ? /* @__PURE__ */
|
|
19159
|
+
children: entries.length === 0 ? /* @__PURE__ */ jsx25("div", { className: reviewMenuStyles.message, children: emptyMessage }) : entries.map((entry, index) => {
|
|
19075
19160
|
const isHighlighted = index === safeHighlightedIndex;
|
|
19076
|
-
return /* @__PURE__ */
|
|
19161
|
+
return /* @__PURE__ */ jsx25(
|
|
19077
19162
|
"button",
|
|
19078
19163
|
{
|
|
19079
19164
|
ref: isHighlighted ? highlightedOptionRef : null,
|
|
@@ -19094,8 +19179,8 @@ function AgentReviewPickerPanel({
|
|
|
19094
19179
|
}
|
|
19095
19180
|
},
|
|
19096
19181
|
children: /* @__PURE__ */ jsxs14("span", { className: reviewMenuStyles.copy, children: [
|
|
19097
|
-
/* @__PURE__ */
|
|
19098
|
-
entry.description ? /* @__PURE__ */
|
|
19182
|
+
/* @__PURE__ */ jsx25("span", { className: reviewMenuStyles.name, children: entry.label }),
|
|
19183
|
+
entry.description ? /* @__PURE__ */ jsx25("span", { className: reviewMenuStyles.description, children: entry.description }) : null
|
|
19099
19184
|
] })
|
|
19100
19185
|
},
|
|
19101
19186
|
entry.key
|
|
@@ -19119,7 +19204,7 @@ import {
|
|
|
19119
19204
|
useState as useState10
|
|
19120
19205
|
} from "react";
|
|
19121
19206
|
import { createPortal as createPortal2 } from "react-dom";
|
|
19122
|
-
import { jsx as
|
|
19207
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
19123
19208
|
var COMPOSER_MENU_GAP_PX = 8;
|
|
19124
19209
|
var COMPOSER_MENU_VIEWPORT_PADDING_PX = 8;
|
|
19125
19210
|
var COMPOSER_MENU_MIN_HEIGHT_PX = 280;
|
|
@@ -19337,7 +19422,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
19337
19422
|
}
|
|
19338
19423
|
const portalTarget = frame?.portalTarget ?? (anchorRef.current ? resolveComposerMenuPortalTarget(anchorRef.current) : document.body);
|
|
19339
19424
|
return createPortal2(
|
|
19340
|
-
/* @__PURE__ */
|
|
19425
|
+
/* @__PURE__ */ jsx26(
|
|
19341
19426
|
"div",
|
|
19342
19427
|
{
|
|
19343
19428
|
"data-testid": testId,
|
|
@@ -19348,7 +19433,7 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
19348
19433
|
className
|
|
19349
19434
|
),
|
|
19350
19435
|
style,
|
|
19351
|
-
children: contentClassName ? /* @__PURE__ */
|
|
19436
|
+
children: contentClassName ? /* @__PURE__ */ jsx26("div", { className: contentClassName, children }) : children
|
|
19352
19437
|
}
|
|
19353
19438
|
),
|
|
19354
19439
|
portalTarget
|
|
@@ -19356,11 +19441,12 @@ var ComposerFloatingMenuSurface = forwardRef4(function ComposerFloatingMenuSurfa
|
|
|
19356
19441
|
});
|
|
19357
19442
|
|
|
19358
19443
|
// agent-gui/agentGuiNode/AgentComposer.tsx
|
|
19359
|
-
import { jsx as
|
|
19444
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
19360
19445
|
var USAGE_POPOVER_HOVER_DELAY_MS = 120;
|
|
19361
19446
|
var DOCK_COMPOSER_INPUT_MIN_HEIGHT = 56;
|
|
19362
19447
|
var DOCK_COMPOSER_INPUT_MAX_HEIGHT = 120;
|
|
19363
19448
|
var DOCK_COMPOSER_INPUT_BORDER_HEIGHT = 2;
|
|
19449
|
+
var DOCK_COMPOSER_INPUT_PADDING_BLOCK_HEIGHT = 24;
|
|
19364
19450
|
var DOCK_COMPOSER_INPUT_TEXT_CHROME_HEIGHT = 26;
|
|
19365
19451
|
function agentUsageChipLevel(percentUsed) {
|
|
19366
19452
|
if (percentUsed >= USAGE_CRITICAL_PERCENT) {
|
|
@@ -19454,7 +19540,7 @@ function AgentUsageChip({
|
|
|
19454
19540
|
},
|
|
19455
19541
|
[clearUsagePopoverCloseTimer, clearUsagePopoverHoverTimer]
|
|
19456
19542
|
);
|
|
19457
|
-
const trigger = /* @__PURE__ */
|
|
19543
|
+
const trigger = /* @__PURE__ */ jsx27(
|
|
19458
19544
|
"button",
|
|
19459
19545
|
{
|
|
19460
19546
|
type: "button",
|
|
@@ -19478,7 +19564,7 @@ function AgentUsageChip({
|
|
|
19478
19564
|
style: {
|
|
19479
19565
|
background: `conic-gradient(${ringColor} ${clampedPercent}%, color-mix(in srgb, ${ringColor} 16%, transparent) 0)`
|
|
19480
19566
|
},
|
|
19481
|
-
children: /* @__PURE__ */
|
|
19567
|
+
children: /* @__PURE__ */ jsx27(
|
|
19482
19568
|
"span",
|
|
19483
19569
|
{
|
|
19484
19570
|
"aria-hidden": "true",
|
|
@@ -19496,8 +19582,8 @@ function AgentUsageChip({
|
|
|
19496
19582
|
open: usagePopoverOpen,
|
|
19497
19583
|
onOpenChange: handleUsagePopoverOpenChange,
|
|
19498
19584
|
children: [
|
|
19499
|
-
/* @__PURE__ */
|
|
19500
|
-
usagePopoverOpen ? /* @__PURE__ */
|
|
19585
|
+
/* @__PURE__ */ jsx27(PopoverTrigger, { asChild: true, children: trigger }),
|
|
19586
|
+
usagePopoverOpen ? /* @__PURE__ */ jsx27(
|
|
19501
19587
|
PopoverContent,
|
|
19502
19588
|
{
|
|
19503
19589
|
side: "bottom",
|
|
@@ -19508,8 +19594,8 @@ function AgentUsageChip({
|
|
|
19508
19594
|
onPointerEnter: openUsagePopover,
|
|
19509
19595
|
onPointerLeave: scheduleUsagePopoverClose,
|
|
19510
19596
|
children: /* @__PURE__ */ jsxs15("div", { className: "flex min-w-0 flex-col gap-3", children: [
|
|
19511
|
-
/* @__PURE__ */
|
|
19512
|
-
showTokens ? /* @__PURE__ */
|
|
19597
|
+
/* @__PURE__ */ jsx27("span", { className: "text-[13px] font-semibold leading-4", children: labels.usagePopoverTitle }),
|
|
19598
|
+
showTokens ? /* @__PURE__ */ jsx27(
|
|
19513
19599
|
AgentUsageMeter,
|
|
19514
19600
|
{
|
|
19515
19601
|
label: labels.usageContextWindowLabel,
|
|
@@ -19519,13 +19605,15 @@ function AgentUsageChip({
|
|
|
19519
19605
|
testId: "agent-gui-usage-context-meter"
|
|
19520
19606
|
}
|
|
19521
19607
|
) : null,
|
|
19522
|
-
compactSupported && onCompact ? /* @__PURE__ */
|
|
19523
|
-
|
|
19608
|
+
compactSupported && onCompact ? /* @__PURE__ */ jsx27(
|
|
19609
|
+
Button3,
|
|
19524
19610
|
{
|
|
19525
19611
|
type: "button",
|
|
19526
19612
|
"data-testid": "agent-gui-compact-button",
|
|
19527
19613
|
disabled: compactDisabled,
|
|
19528
|
-
className: "nodrag
|
|
19614
|
+
className: "nodrag w-full font-medium [-webkit-app-region:no-drag]",
|
|
19615
|
+
size: "sm",
|
|
19616
|
+
variant: "secondary",
|
|
19529
19617
|
onClick: onCompact,
|
|
19530
19618
|
children: labels.usageCompactAction
|
|
19531
19619
|
}
|
|
@@ -19559,6 +19647,7 @@ var EMPTY_CONTEXT_MENTION_PROVIDERS = [];
|
|
|
19559
19647
|
var EMPTY_PROMPT_TIPS = [];
|
|
19560
19648
|
var EMPTY_PROVIDER_SKILLS = [];
|
|
19561
19649
|
var EMPTY_WORKSPACE_APP_ICONS2 = [];
|
|
19650
|
+
var GOAL_MODE_SLASH_COMMAND = "/goal";
|
|
19562
19651
|
var PROMPT_TIP_CYCLE_STEP_MS = 5200;
|
|
19563
19652
|
var MENTION_PALETTE_DISMISS_INTERACTION_SELECTOR = [
|
|
19564
19653
|
"[data-node-drag-handle]",
|
|
@@ -19624,6 +19713,7 @@ function AgentComposer({
|
|
|
19624
19713
|
isInterrupting,
|
|
19625
19714
|
isSendingTurn,
|
|
19626
19715
|
isSubmittingPrompt,
|
|
19716
|
+
uiLanguage = "en",
|
|
19627
19717
|
isActive = true,
|
|
19628
19718
|
previewMode = false,
|
|
19629
19719
|
promptImagesSupported = true,
|
|
@@ -19653,6 +19743,8 @@ function AgentComposer({
|
|
|
19653
19743
|
}) {
|
|
19654
19744
|
"use memo";
|
|
19655
19745
|
const draftPrompt = draftContent.prompt;
|
|
19746
|
+
const goalDraftObjective = goalDraftObjectiveFromPrompt(draftPrompt);
|
|
19747
|
+
const isGoalModeActive = goalDraftObjective !== null;
|
|
19656
19748
|
const draftImages = draftContent.images;
|
|
19657
19749
|
const draftFiles = draftContent.files ?? [];
|
|
19658
19750
|
const agentActivityRuntime = useOptionalAgentActivityRuntime();
|
|
@@ -19665,7 +19757,9 @@ function AgentComposer({
|
|
|
19665
19757
|
shouldResetMentionHighlightToFilter,
|
|
19666
19758
|
setShouldResetMentionHighlightToFilter
|
|
19667
19759
|
] = useState11(false);
|
|
19668
|
-
const [paletteDraftPrompt, setPaletteDraftPrompt] = useState11(
|
|
19760
|
+
const [paletteDraftPrompt, setPaletteDraftPrompt] = useState11(
|
|
19761
|
+
goalDraftObjective ?? draftPrompt
|
|
19762
|
+
);
|
|
19669
19763
|
const [fileMentionSuggestion, setFileMentionSuggestion] = useState11(null);
|
|
19670
19764
|
const [isSelectedProjectMissing, setIsSelectedProjectMissing] = useState11(false);
|
|
19671
19765
|
const [isSlashStatusPanelOpen, setIsSlashStatusPanelOpen] = useState11(false);
|
|
@@ -19710,7 +19804,7 @@ function AgentComposer({
|
|
|
19710
19804
|
const [dockComposerTextHeight, setDockComposerTextHeight] = useState11(
|
|
19711
19805
|
DOCK_COMPOSER_INPUT_MIN_HEIGHT
|
|
19712
19806
|
);
|
|
19713
|
-
const slashQuery = getPromptStartSlashCommandQuery(paletteDraftPrompt);
|
|
19807
|
+
const slashQuery = isGoalModeActive ? null : getPromptStartSlashCommandQuery(paletteDraftPrompt);
|
|
19714
19808
|
const promptBeforeSelection = editorHandleRef.current?.getPromptTextBeforeSelection() ?? "";
|
|
19715
19809
|
const skillQueryDraft = promptBeforeSelection || paletteDraftPrompt;
|
|
19716
19810
|
const skillQueryMatch = getAgentComposerTriggerQueryMatch(skillQueryDraft);
|
|
@@ -19792,11 +19886,16 @@ function AgentComposer({
|
|
|
19792
19886
|
};
|
|
19793
19887
|
return [capabilityEntry];
|
|
19794
19888
|
}
|
|
19889
|
+
const commandDescription = slashCommandDescriptionForDisplay(
|
|
19890
|
+
command,
|
|
19891
|
+
labels
|
|
19892
|
+
);
|
|
19795
19893
|
const commandEntry = {
|
|
19796
19894
|
type: "command",
|
|
19797
19895
|
key: `command:${command.name}`,
|
|
19798
19896
|
label: labelForSlashCommand(command),
|
|
19799
|
-
...command
|
|
19897
|
+
...slashCommandLabelForDisplay(command, labels, uiLanguage),
|
|
19898
|
+
...commandDescription ? { description: commandDescription } : {},
|
|
19800
19899
|
command
|
|
19801
19900
|
};
|
|
19802
19901
|
return [commandEntry];
|
|
@@ -19832,6 +19931,25 @@ function AgentComposer({
|
|
|
19832
19931
|
labels.computerUseCapabilitySetupRequiredDescription,
|
|
19833
19932
|
labels.computerUseCapabilityLabel,
|
|
19834
19933
|
labels.computerUseCapabilitySettingsLabel,
|
|
19934
|
+
labels.slashCommandCompactLabel,
|
|
19935
|
+
labels.slashCommandContextLabel,
|
|
19936
|
+
labels.slashCommandFastLabel,
|
|
19937
|
+
labels.slashCommandGoalLabel,
|
|
19938
|
+
labels.slashCommandInitLabel,
|
|
19939
|
+
labels.slashCommandPlanLabel,
|
|
19940
|
+
labels.slashCommandReviewLabel,
|
|
19941
|
+
labels.slashCommandStatusLabel,
|
|
19942
|
+
labels.slashCommandUsageLabel,
|
|
19943
|
+
labels.slashCommandCompactDescription,
|
|
19944
|
+
labels.slashCommandContextDescription,
|
|
19945
|
+
labels.slashCommandFastDescription,
|
|
19946
|
+
labels.slashCommandGoalDescription,
|
|
19947
|
+
labels.slashCommandInitDescription,
|
|
19948
|
+
labels.slashCommandPlanDescription,
|
|
19949
|
+
labels.slashCommandReviewDescription,
|
|
19950
|
+
labels.slashCommandStatusDescription,
|
|
19951
|
+
labels.slashCommandUsageDescription,
|
|
19952
|
+
uiLanguage,
|
|
19835
19953
|
skillQueryMatch?.prefix
|
|
19836
19954
|
]);
|
|
19837
19955
|
const showFileMentionPalette = !disabled && isPaletteOpen && fileMentionSuggestion !== null;
|
|
@@ -19894,7 +20012,7 @@ function AgentComposer({
|
|
|
19894
20012
|
useEffect11(() => {
|
|
19895
20013
|
const isExternalDraftReplacement = draftPromptRef.current !== draftPrompt;
|
|
19896
20014
|
draftPromptRef.current = draftPrompt;
|
|
19897
|
-
setPaletteDraftPrompt(draftPrompt);
|
|
20015
|
+
setPaletteDraftPrompt(goalDraftObjective ?? draftPrompt);
|
|
19898
20016
|
if (isExternalDraftReplacement && draftPrompt) {
|
|
19899
20017
|
window.requestAnimationFrame(() => {
|
|
19900
20018
|
window.requestAnimationFrame(() => {
|
|
@@ -19902,7 +20020,7 @@ function AgentComposer({
|
|
|
19902
20020
|
});
|
|
19903
20021
|
});
|
|
19904
20022
|
}
|
|
19905
|
-
}, [draftPrompt]);
|
|
20023
|
+
}, [draftPrompt, goalDraftObjective]);
|
|
19906
20024
|
useEffect11(() => {
|
|
19907
20025
|
draftImagesRef.current = draftImages;
|
|
19908
20026
|
}, [draftImages]);
|
|
@@ -19926,6 +20044,7 @@ function AgentComposer({
|
|
|
19926
20044
|
setIsSlashStatusPanelOpen(false);
|
|
19927
20045
|
}, []);
|
|
19928
20046
|
const settingsControlsDisabled = isSendingTurn || isSubmittingPrompt || showStopButton;
|
|
20047
|
+
const composerControlsHardDisabled = isSelectedProjectMissing || isSubmittingPrompt || disabled && !isSendingTurn && !showStopButton;
|
|
19929
20048
|
const closeReviewPicker = useCallback10(() => {
|
|
19930
20049
|
setIsReviewPickerOpen(false);
|
|
19931
20050
|
}, []);
|
|
@@ -19980,6 +20099,18 @@ function AgentComposer({
|
|
|
19980
20099
|
setIsReviewPickerOpen(true);
|
|
19981
20100
|
return;
|
|
19982
20101
|
}
|
|
20102
|
+
if (effect.kind === "activateGoalMode") {
|
|
20103
|
+
draftPromptRef.current = GOAL_MODE_SLASH_COMMAND;
|
|
20104
|
+
setPaletteDraftPrompt("");
|
|
20105
|
+
setIsSlashStatusPanelOpen(false);
|
|
20106
|
+
setIsReviewPickerOpen(false);
|
|
20107
|
+
setIsPaletteOpen(false);
|
|
20108
|
+
onDraftContentChange({
|
|
20109
|
+
...draftContent,
|
|
20110
|
+
prompt: GOAL_MODE_SLASH_COMMAND
|
|
20111
|
+
});
|
|
20112
|
+
return;
|
|
20113
|
+
}
|
|
19983
20114
|
if (effect.kind === "togglePlanMode") {
|
|
19984
20115
|
clearSlashCommandDraft();
|
|
19985
20116
|
onSettingsChange({
|
|
@@ -20326,6 +20457,12 @@ function AgentComposer({
|
|
|
20326
20457
|
},
|
|
20327
20458
|
[createFileMentionPaletteAdapter]
|
|
20328
20459
|
);
|
|
20460
|
+
const navigateIntoFileMentionItem = useCallback10(
|
|
20461
|
+
(item) => {
|
|
20462
|
+
mentionControllerRef.current?.selectAgentGeneratedMentionItem(item);
|
|
20463
|
+
},
|
|
20464
|
+
[]
|
|
20465
|
+
);
|
|
20329
20466
|
const handleFileMentionKeyDown = useCallback10(
|
|
20330
20467
|
(event) => {
|
|
20331
20468
|
if (!showFileMentionPalette) {
|
|
@@ -20475,12 +20612,43 @@ function AgentComposer({
|
|
|
20475
20612
|
}, [closeOpenPalette, showFileMentionPalette]);
|
|
20476
20613
|
const handleDraftChange = useStableEventCallback(
|
|
20477
20614
|
(nextDraft) => {
|
|
20615
|
+
if (isGoalModeActive) {
|
|
20616
|
+
const nextGoalPrompt = buildGoalModePrompt(nextDraft);
|
|
20617
|
+
draftPromptRef.current = nextGoalPrompt;
|
|
20618
|
+
setPaletteDraftPrompt(nextDraft);
|
|
20619
|
+
setIsPaletteOpen(true);
|
|
20620
|
+
onDraftContentChange({ ...draftContent, prompt: nextGoalPrompt });
|
|
20621
|
+
return;
|
|
20622
|
+
}
|
|
20623
|
+
const nextGoalObjective = goalDraftObjectiveFromPrompt(nextDraft);
|
|
20624
|
+
if (nextGoalObjective !== null) {
|
|
20625
|
+
const nextGoalPrompt = buildGoalModePrompt(nextGoalObjective);
|
|
20626
|
+
draftPromptRef.current = nextGoalPrompt;
|
|
20627
|
+
setPaletteDraftPrompt(nextGoalObjective);
|
|
20628
|
+
setIsPaletteOpen(true);
|
|
20629
|
+
onDraftContentChange({ ...draftContent, prompt: nextGoalPrompt });
|
|
20630
|
+
return;
|
|
20631
|
+
}
|
|
20478
20632
|
draftPromptRef.current = nextDraft;
|
|
20479
20633
|
setPaletteDraftPrompt(nextDraft);
|
|
20480
20634
|
setIsPaletteOpen(true);
|
|
20481
20635
|
onDraftContentChange({ ...draftContent, prompt: nextDraft });
|
|
20482
20636
|
}
|
|
20483
20637
|
);
|
|
20638
|
+
const clearGoalModeBadge = useCallback10(() => {
|
|
20639
|
+
if (!isGoalModeActive) {
|
|
20640
|
+
return;
|
|
20641
|
+
}
|
|
20642
|
+
const nextPrompt = goalDraftObjective ?? "";
|
|
20643
|
+
draftPromptRef.current = nextPrompt;
|
|
20644
|
+
setPaletteDraftPrompt(nextPrompt);
|
|
20645
|
+
onDraftContentChange({ ...draftContent, prompt: nextPrompt });
|
|
20646
|
+
}, [
|
|
20647
|
+
draftContent,
|
|
20648
|
+
goalDraftObjective,
|
|
20649
|
+
isGoalModeActive,
|
|
20650
|
+
onDraftContentChange
|
|
20651
|
+
]);
|
|
20484
20652
|
const addDraftImages = useCallback10(
|
|
20485
20653
|
(images) => {
|
|
20486
20654
|
if (images.length === 0) {
|
|
@@ -20942,7 +21110,8 @@ function AgentComposer({
|
|
|
20942
21110
|
editor.scrollHeight + DOCK_COMPOSER_INPUT_TEXT_CHROME_HEIGHT
|
|
20943
21111
|
)
|
|
20944
21112
|
);
|
|
20945
|
-
const
|
|
21113
|
+
const attachmentChromeHeight = attachmentHeight > 0 ? DOCK_COMPOSER_INPUT_PADDING_BLOCK_HEIGHT : 0;
|
|
21114
|
+
const maxHeight = DOCK_COMPOSER_INPUT_MAX_HEIGHT + Math.max(0, attachmentHeight) + attachmentChromeHeight;
|
|
20946
21115
|
const previousHeight = inputArea.style.height;
|
|
20947
21116
|
const previousInputHeight = inputArea.style.getPropertyValue(
|
|
20948
21117
|
"--agent-gui-composer-input-height"
|
|
@@ -20996,7 +21165,7 @@ function AgentComposer({
|
|
|
20996
21165
|
}
|
|
20997
21166
|
const measuredHeight = Math.max(
|
|
20998
21167
|
contentHeight + DOCK_COMPOSER_INPUT_BORDER_HEIGHT,
|
|
20999
|
-
attachmentHeight + textHeight
|
|
21168
|
+
attachmentHeight + textHeight + attachmentChromeHeight
|
|
21000
21169
|
);
|
|
21001
21170
|
const nextHeight = Math.min(
|
|
21002
21171
|
maxHeight,
|
|
@@ -21098,7 +21267,7 @@ function AgentComposer({
|
|
|
21098
21267
|
title: isInterrupting ? labels.stopping : labels.stop,
|
|
21099
21268
|
onClick: onInterruptCurrentTurn,
|
|
21100
21269
|
children: [
|
|
21101
|
-
/* @__PURE__ */
|
|
21270
|
+
/* @__PURE__ */ jsx27(
|
|
21102
21271
|
Spinner,
|
|
21103
21272
|
{
|
|
21104
21273
|
className: "size-7 text-[var(--text-primary)]",
|
|
@@ -21108,7 +21277,7 @@ function AgentComposer({
|
|
|
21108
21277
|
testId: "agent-gui-composer-stop-spinner"
|
|
21109
21278
|
}
|
|
21110
21279
|
),
|
|
21111
|
-
/* @__PURE__ */
|
|
21280
|
+
/* @__PURE__ */ jsx27(
|
|
21112
21281
|
"span",
|
|
21113
21282
|
{
|
|
21114
21283
|
"aria-hidden": "true",
|
|
@@ -21118,7 +21287,7 @@ function AgentComposer({
|
|
|
21118
21287
|
)
|
|
21119
21288
|
]
|
|
21120
21289
|
}
|
|
21121
|
-
) : /* @__PURE__ */
|
|
21290
|
+
) : /* @__PURE__ */ jsx27(
|
|
21122
21291
|
"button",
|
|
21123
21292
|
{
|
|
21124
21293
|
type: "submit",
|
|
@@ -21128,7 +21297,7 @@ function AgentComposer({
|
|
|
21128
21297
|
"aria-label": labels.send,
|
|
21129
21298
|
title: labels.send,
|
|
21130
21299
|
"aria-busy": sendButtonBusy,
|
|
21131
|
-
children: sendButtonBusy ? /* @__PURE__ */
|
|
21300
|
+
children: sendButtonBusy ? /* @__PURE__ */ jsx27(
|
|
21132
21301
|
Spinner,
|
|
21133
21302
|
{
|
|
21134
21303
|
className: "text-[var(--text-primary)]",
|
|
@@ -21137,10 +21306,10 @@ function AgentComposer({
|
|
|
21137
21306
|
trackColor: "var(--transparency-hover)",
|
|
21138
21307
|
testId: "agent-gui-composer-send-spinner"
|
|
21139
21308
|
}
|
|
21140
|
-
) : /* @__PURE__ */
|
|
21309
|
+
) : /* @__PURE__ */ jsx27(SendFilledIcon, {})
|
|
21141
21310
|
}
|
|
21142
21311
|
);
|
|
21143
|
-
const promptTipNode = activePromptTip ? /* @__PURE__ */
|
|
21312
|
+
const promptTipNode = activePromptTip ? /* @__PURE__ */ jsx27(
|
|
21144
21313
|
"span",
|
|
21145
21314
|
{
|
|
21146
21315
|
ref: promptTipRef,
|
|
@@ -21148,14 +21317,14 @@ function AgentComposer({
|
|
|
21148
21317
|
"data-rotating": promptTips.length > 1 ? "true" : void 0,
|
|
21149
21318
|
"data-testid": "agent-gui-prompt-tip",
|
|
21150
21319
|
style: promptTipStyle,
|
|
21151
|
-
children: /* @__PURE__ */
|
|
21320
|
+
children: /* @__PURE__ */ jsx27("span", { className: AgentGUINode_styles_default.composerPromptTipTrack, children: rotatingPromptTips.map((tip, index) => /* @__PURE__ */ jsxs15(
|
|
21152
21321
|
"span",
|
|
21153
21322
|
{
|
|
21154
21323
|
className: AgentGUINode_styles_default.composerPromptTipItem,
|
|
21155
21324
|
"aria-hidden": index >= promptTips.length ? true : void 0,
|
|
21156
21325
|
children: [
|
|
21157
|
-
/* @__PURE__ */
|
|
21158
|
-
/* @__PURE__ */
|
|
21326
|
+
/* @__PURE__ */ jsx27("span", { className: AgentGUINode_styles_default.composerPromptTipPrefix, children: labels.promptTipsPrefix }),
|
|
21327
|
+
/* @__PURE__ */ jsx27("span", { className: AgentGUINode_styles_default.composerPromptTipLabel, children: tip.label }),
|
|
21159
21328
|
/* @__PURE__ */ jsxs15("span", { className: AgentGUINode_styles_default.composerPromptTipText, children: [
|
|
21160
21329
|
" \xB7 ",
|
|
21161
21330
|
tip.prompt
|
|
@@ -21175,12 +21344,12 @@ function AgentComposer({
|
|
|
21175
21344
|
"data-layout": layoutMode,
|
|
21176
21345
|
onSubmit: submit,
|
|
21177
21346
|
children: [
|
|
21178
|
-
visibleActivePrompt ? /* @__PURE__ */
|
|
21347
|
+
visibleActivePrompt ? /* @__PURE__ */ jsx27(
|
|
21179
21348
|
"div",
|
|
21180
21349
|
{
|
|
21181
21350
|
className: AgentGUINode_styles_default.composerFloatingPrompt,
|
|
21182
21351
|
"data-testid": "agent-gui-composer-floating-prompt",
|
|
21183
|
-
children: /* @__PURE__ */
|
|
21352
|
+
children: /* @__PURE__ */ jsx27(
|
|
21184
21353
|
AgentInteractivePromptSurface,
|
|
21185
21354
|
{
|
|
21186
21355
|
prompt: visibleActivePrompt,
|
|
@@ -21212,7 +21381,7 @@ function AgentComposer({
|
|
|
21212
21381
|
)
|
|
21213
21382
|
}
|
|
21214
21383
|
) : null,
|
|
21215
|
-
queuedPrompts.length > 0 ? /* @__PURE__ */
|
|
21384
|
+
queuedPrompts.length > 0 ? /* @__PURE__ */ jsx27(
|
|
21216
21385
|
"div",
|
|
21217
21386
|
{
|
|
21218
21387
|
className: cn(
|
|
@@ -21220,7 +21389,7 @@ function AgentComposer({
|
|
|
21220
21389
|
AgentGUINode_styles_default.composerQueuedPromptFloating
|
|
21221
21390
|
),
|
|
21222
21391
|
"data-testid": "agent-gui-composer-queued-prompts",
|
|
21223
|
-
children: /* @__PURE__ */
|
|
21392
|
+
children: /* @__PURE__ */ jsx27(
|
|
21224
21393
|
AgentQueuedPromptPanel,
|
|
21225
21394
|
{
|
|
21226
21395
|
queuedPrompts,
|
|
@@ -21241,7 +21410,7 @@ function AgentComposer({
|
|
|
21241
21410
|
)
|
|
21242
21411
|
}
|
|
21243
21412
|
) : null,
|
|
21244
|
-
showProjectMissingProbe ? /* @__PURE__ */
|
|
21413
|
+
showProjectMissingProbe ? /* @__PURE__ */ jsx27(
|
|
21245
21414
|
AgentProjectMissingStatusProbe,
|
|
21246
21415
|
{
|
|
21247
21416
|
composerSettings,
|
|
@@ -21257,7 +21426,7 @@ function AgentComposer({
|
|
|
21257
21426
|
),
|
|
21258
21427
|
"data-edge-glow": showEdgeGlow ? "true" : void 0,
|
|
21259
21428
|
children: [
|
|
21260
|
-
isSelectedProjectMissing ? /* @__PURE__ */
|
|
21429
|
+
isSelectedProjectMissing ? /* @__PURE__ */ jsx27(
|
|
21261
21430
|
AgentChromeNotice,
|
|
21262
21431
|
{
|
|
21263
21432
|
tone: "danger",
|
|
@@ -21286,7 +21455,7 @@ function AgentComposer({
|
|
|
21286
21455
|
onOpenChange: setIsPaletteOpen,
|
|
21287
21456
|
modal: false,
|
|
21288
21457
|
children: [
|
|
21289
|
-
/* @__PURE__ */
|
|
21458
|
+
/* @__PURE__ */ jsx27(PopoverAnchor, { asChild: true, children: /* @__PURE__ */ jsxs15(
|
|
21290
21459
|
"div",
|
|
21291
21460
|
{
|
|
21292
21461
|
ref: promptInputAreaRef,
|
|
@@ -21297,12 +21466,12 @@ function AgentComposer({
|
|
|
21297
21466
|
"data-has-draft-images": draftImages.length > 0 ? "true" : void 0,
|
|
21298
21467
|
style: promptInputAreaStyle,
|
|
21299
21468
|
children: [
|
|
21300
|
-
draftImages.length > 0 ? /* @__PURE__ */
|
|
21469
|
+
draftImages.length > 0 ? /* @__PURE__ */ jsx27(
|
|
21301
21470
|
"div",
|
|
21302
21471
|
{
|
|
21303
21472
|
className: "mb-2 flex w-full max-w-full flex-wrap items-start gap-2",
|
|
21304
21473
|
"data-testid": "agent-gui-composer-image-drafts",
|
|
21305
|
-
children: draftImages.map((image) => /* @__PURE__ */
|
|
21474
|
+
children: draftImages.map((image) => /* @__PURE__ */ jsx27(
|
|
21306
21475
|
AgentComposerDraftImagePreview,
|
|
21307
21476
|
{
|
|
21308
21477
|
image,
|
|
@@ -21313,7 +21482,7 @@ function AgentComposer({
|
|
|
21313
21482
|
))
|
|
21314
21483
|
}
|
|
21315
21484
|
) : null,
|
|
21316
|
-
visibleDraftFiles.length > 0 ? /* @__PURE__ */
|
|
21485
|
+
visibleDraftFiles.length > 0 ? /* @__PURE__ */ jsx27(
|
|
21317
21486
|
"div",
|
|
21318
21487
|
{
|
|
21319
21488
|
className: "mb-2 flex max-w-[520px] flex-wrap gap-2",
|
|
@@ -21329,7 +21498,7 @@ function AgentComposer({
|
|
|
21329
21498
|
"data-upload-error": file.uploadError ? "true" : void 0,
|
|
21330
21499
|
title: file.hostPath ?? file.path ?? file.name,
|
|
21331
21500
|
children: [
|
|
21332
|
-
file.uploading ? /* @__PURE__ */
|
|
21501
|
+
file.uploading ? /* @__PURE__ */ jsx27(
|
|
21333
21502
|
Spinner,
|
|
21334
21503
|
{
|
|
21335
21504
|
className: "shrink-0 text-[var(--text-primary)]",
|
|
@@ -21338,15 +21507,15 @@ function AgentComposer({
|
|
|
21338
21507
|
trackColor: "var(--transparency-hover)",
|
|
21339
21508
|
testId: "agent-gui-composer-file-upload-spinner"
|
|
21340
21509
|
}
|
|
21341
|
-
) : /* @__PURE__ */
|
|
21510
|
+
) : /* @__PURE__ */ jsx27(
|
|
21342
21511
|
"span",
|
|
21343
21512
|
{
|
|
21344
21513
|
className: "size-2 shrink-0 rounded-full bg-[var(--text-tertiary)]",
|
|
21345
21514
|
"aria-hidden": true
|
|
21346
21515
|
}
|
|
21347
21516
|
),
|
|
21348
|
-
/* @__PURE__ */
|
|
21349
|
-
/* @__PURE__ */
|
|
21517
|
+
/* @__PURE__ */ jsx27("span", { className: "min-w-0 max-w-[220px] truncate", children: file.name }),
|
|
21518
|
+
/* @__PURE__ */ jsx27(
|
|
21350
21519
|
"button",
|
|
21351
21520
|
{
|
|
21352
21521
|
type: "button",
|
|
@@ -21354,7 +21523,7 @@ function AgentComposer({
|
|
|
21354
21523
|
"aria-label": labels.removeMention,
|
|
21355
21524
|
title: labels.removeMention,
|
|
21356
21525
|
onClick: () => removeDraftFile(file.id),
|
|
21357
|
-
children: /* @__PURE__ */
|
|
21526
|
+
children: /* @__PURE__ */ jsx27(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
|
|
21358
21527
|
}
|
|
21359
21528
|
)
|
|
21360
21529
|
]
|
|
@@ -21371,7 +21540,7 @@ function AgentComposer({
|
|
|
21371
21540
|
!isHeroLayout && "agent-gui-node__composer-prompt-input-line"
|
|
21372
21541
|
),
|
|
21373
21542
|
children: [
|
|
21374
|
-
/* @__PURE__ */
|
|
21543
|
+
/* @__PURE__ */ jsx27(
|
|
21375
21544
|
AgentRichTextEditor,
|
|
21376
21545
|
{
|
|
21377
21546
|
ref: editorHandleRef,
|
|
@@ -21402,7 +21571,7 @@ function AgentComposer({
|
|
|
21402
21571
|
}
|
|
21403
21572
|
) }),
|
|
21404
21573
|
showFileMentionPalette && mentionPaletteFrame ? createPortal3(
|
|
21405
|
-
/* @__PURE__ */
|
|
21574
|
+
/* @__PURE__ */ jsx27(
|
|
21406
21575
|
"div",
|
|
21407
21576
|
{
|
|
21408
21577
|
"data-testid": "agent-gui-mention-palette-surface",
|
|
@@ -21412,7 +21581,7 @@ function AgentComposer({
|
|
|
21412
21581
|
"max-h-[320px] overflow-hidden border-[var(--line-1)] p-0"
|
|
21413
21582
|
),
|
|
21414
21583
|
style: mentionPaletteStyle,
|
|
21415
|
-
children: /* @__PURE__ */
|
|
21584
|
+
children: /* @__PURE__ */ jsx27(
|
|
21416
21585
|
AgentFileMentionPalette,
|
|
21417
21586
|
{
|
|
21418
21587
|
state: mentionSearchState,
|
|
@@ -21430,6 +21599,7 @@ function AgentComposer({
|
|
|
21430
21599
|
onSelectFilter: (filter) => mentionControllerRef.current?.setFilter(filter),
|
|
21431
21600
|
onExpandGroup: (groupId) => mentionControllerRef.current?.expandGroup(groupId),
|
|
21432
21601
|
onNavigateHierarchy: navigateFileMentionHierarchy,
|
|
21602
|
+
onNavigateIntoItem: navigateIntoFileMentionItem,
|
|
21433
21603
|
onOpenReferences: onRequestWorkspaceReferences ? handleOpenReferencesForEntity : void 0
|
|
21434
21604
|
}
|
|
21435
21605
|
)
|
|
@@ -21437,7 +21607,7 @@ function AgentComposer({
|
|
|
21437
21607
|
),
|
|
21438
21608
|
mentionPaletteFrame.portalTarget
|
|
21439
21609
|
) : null,
|
|
21440
|
-
/* @__PURE__ */
|
|
21610
|
+
/* @__PURE__ */ jsx27(
|
|
21441
21611
|
ComposerFloatingMenuSurface,
|
|
21442
21612
|
{
|
|
21443
21613
|
anchorRef: inputShellRef,
|
|
@@ -21450,7 +21620,7 @@ function AgentComposer({
|
|
|
21450
21620
|
placement: "fixed-height",
|
|
21451
21621
|
surfaceRef: paletteContentRef,
|
|
21452
21622
|
testId: "agent-gui-slash-palette-surface",
|
|
21453
|
-
children: /* @__PURE__ */
|
|
21623
|
+
children: /* @__PURE__ */ jsx27(
|
|
21454
21624
|
AgentSlashCommandPalette,
|
|
21455
21625
|
{
|
|
21456
21626
|
entries: slashPaletteEntries,
|
|
@@ -21471,7 +21641,7 @@ function AgentComposer({
|
|
|
21471
21641
|
)
|
|
21472
21642
|
}
|
|
21473
21643
|
),
|
|
21474
|
-
/* @__PURE__ */
|
|
21644
|
+
/* @__PURE__ */ jsx27(
|
|
21475
21645
|
ComposerFloatingMenuSurface,
|
|
21476
21646
|
{
|
|
21477
21647
|
anchorRef: inputShellRef,
|
|
@@ -21483,7 +21653,7 @@ function AgentComposer({
|
|
|
21483
21653
|
placement: "dynamic-above",
|
|
21484
21654
|
surfaceRef: paletteContentRef,
|
|
21485
21655
|
testId: "agent-gui-command-menu-surface",
|
|
21486
|
-
children: /* @__PURE__ */
|
|
21656
|
+
children: /* @__PURE__ */ jsx27(
|
|
21487
21657
|
AgentSlashStatusPanel,
|
|
21488
21658
|
{
|
|
21489
21659
|
status: slashStatus,
|
|
@@ -21503,7 +21673,7 @@ function AgentComposer({
|
|
|
21503
21673
|
)
|
|
21504
21674
|
}
|
|
21505
21675
|
),
|
|
21506
|
-
/* @__PURE__ */
|
|
21676
|
+
/* @__PURE__ */ jsx27(
|
|
21507
21677
|
ComposerFloatingMenuSurface,
|
|
21508
21678
|
{
|
|
21509
21679
|
anchorRef: inputShellRef,
|
|
@@ -21515,7 +21685,7 @@ function AgentComposer({
|
|
|
21515
21685
|
placement: "dynamic-above",
|
|
21516
21686
|
surfaceRef: paletteContentRef,
|
|
21517
21687
|
testId: "agent-gui-command-menu-surface",
|
|
21518
|
-
children: /* @__PURE__ */
|
|
21688
|
+
children: /* @__PURE__ */ jsx27(
|
|
21519
21689
|
AgentReviewPickerPanel,
|
|
21520
21690
|
{
|
|
21521
21691
|
labels: labels.reviewPicker,
|
|
@@ -21531,7 +21701,7 @@ function AgentComposer({
|
|
|
21531
21701
|
),
|
|
21532
21702
|
/* @__PURE__ */ jsxs15("div", { className: AgentGUINode_styles_default.composerFooter, children: [
|
|
21533
21703
|
/* @__PURE__ */ jsxs15("div", { className: composerStyles.footerGroup, children: [
|
|
21534
|
-
previewMode ? /* @__PURE__ */
|
|
21704
|
+
previewMode ? /* @__PURE__ */ jsx27(
|
|
21535
21705
|
"button",
|
|
21536
21706
|
{
|
|
21537
21707
|
type: "button",
|
|
@@ -21542,7 +21712,7 @@ function AgentComposer({
|
|
|
21542
21712
|
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
21543
21713
|
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [&_svg]:shrink-0"
|
|
21544
21714
|
),
|
|
21545
|
-
children: /* @__PURE__ */
|
|
21715
|
+
children: /* @__PURE__ */ jsx27(
|
|
21546
21716
|
AddIcon,
|
|
21547
21717
|
{
|
|
21548
21718
|
"aria-hidden": true,
|
|
@@ -21551,12 +21721,12 @@ function AgentComposer({
|
|
|
21551
21721
|
}
|
|
21552
21722
|
)
|
|
21553
21723
|
}
|
|
21554
|
-
) : /* @__PURE__ */
|
|
21724
|
+
) : /* @__PURE__ */ jsx27(
|
|
21555
21725
|
Select2,
|
|
21556
21726
|
{
|
|
21557
21727
|
open: false,
|
|
21558
21728
|
value: workspaceReferenceSelectValue,
|
|
21559
|
-
disabled:
|
|
21729
|
+
disabled: !onRequestWorkspaceReferences || composerControlsHardDisabled,
|
|
21560
21730
|
onOpenChange: (isOpen) => {
|
|
21561
21731
|
if (isOpen) {
|
|
21562
21732
|
void handleWorkspaceReferencePicker();
|
|
@@ -21567,7 +21737,7 @@ function AgentComposer({
|
|
|
21567
21737
|
void handleWorkspaceReferencePicker();
|
|
21568
21738
|
}
|
|
21569
21739
|
},
|
|
21570
|
-
children: /* @__PURE__ */
|
|
21740
|
+
children: /* @__PURE__ */ jsx27(
|
|
21571
21741
|
SelectTrigger2,
|
|
21572
21742
|
{
|
|
21573
21743
|
size: "sm",
|
|
@@ -21578,7 +21748,7 @@ function AgentComposer({
|
|
|
21578
21748
|
AgentGUINode_styles_default.composerReferenceTrigger,
|
|
21579
21749
|
"w-auto justify-center text-[var(--agent-gui-text-secondary)] [&>svg:last-child]:hidden [&_svg]:shrink-0"
|
|
21580
21750
|
),
|
|
21581
|
-
children: /* @__PURE__ */
|
|
21751
|
+
children: /* @__PURE__ */ jsx27(
|
|
21582
21752
|
AddIcon,
|
|
21583
21753
|
{
|
|
21584
21754
|
"aria-hidden": true,
|
|
@@ -21590,7 +21760,7 @@ function AgentComposer({
|
|
|
21590
21760
|
)
|
|
21591
21761
|
}
|
|
21592
21762
|
),
|
|
21593
|
-
composerSettings.supportsPlanMode && composerSettings.draftSettings.planMode ? /* @__PURE__ */
|
|
21763
|
+
composerSettings.supportsPlanMode && composerSettings.draftSettings.planMode ? /* @__PURE__ */ jsx27(
|
|
21594
21764
|
"button",
|
|
21595
21765
|
{
|
|
21596
21766
|
type: "button",
|
|
@@ -21600,19 +21770,83 @@ function AgentComposer({
|
|
|
21600
21770
|
"data-agent-plan-mode-badge": "true",
|
|
21601
21771
|
className: cn(
|
|
21602
21772
|
AgentGUINode_styles_default.composerMenuTrigger,
|
|
21603
|
-
"w-auto",
|
|
21773
|
+
"group w-auto",
|
|
21604
21774
|
"disabled:cursor-not-allowed disabled:opacity-60"
|
|
21605
21775
|
),
|
|
21606
21776
|
onClick: () => onSettingsChange({ planMode: false }),
|
|
21607
21777
|
children: /* @__PURE__ */ jsxs15("span", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
|
|
21608
|
-
/* @__PURE__ */
|
|
21609
|
-
|
|
21778
|
+
/* @__PURE__ */ jsxs15("span", { className: "relative flex size-3.5 shrink-0 items-center justify-center", children: [
|
|
21779
|
+
/* @__PURE__ */ jsx27(
|
|
21780
|
+
ListChecks2,
|
|
21781
|
+
{
|
|
21782
|
+
"aria-hidden": true,
|
|
21783
|
+
className: "size-3.5 transition-opacity duration-150 group-hover:opacity-0 group-focus-visible:opacity-0"
|
|
21784
|
+
}
|
|
21785
|
+
),
|
|
21786
|
+
/* @__PURE__ */ jsx27(
|
|
21787
|
+
"span",
|
|
21788
|
+
{
|
|
21789
|
+
"aria-hidden": true,
|
|
21790
|
+
className: "absolute inset-0 flex items-center justify-center rounded-full bg-[var(--text-secondary)] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 group-disabled:opacity-0",
|
|
21791
|
+
children: /* @__PURE__ */ jsx27(
|
|
21792
|
+
X,
|
|
21793
|
+
{
|
|
21794
|
+
className: "size-2.5 text-[var(--background-fronted)]",
|
|
21795
|
+
strokeWidth: 3
|
|
21796
|
+
}
|
|
21797
|
+
)
|
|
21798
|
+
}
|
|
21799
|
+
)
|
|
21800
|
+
] }),
|
|
21801
|
+
/* @__PURE__ */ jsx27("span", { className: "min-w-0 truncate", children: labels.planModeLabel })
|
|
21802
|
+
] })
|
|
21803
|
+
}
|
|
21804
|
+
) : null,
|
|
21805
|
+
isGoalModeActive ? /* @__PURE__ */ jsx27(
|
|
21806
|
+
"button",
|
|
21807
|
+
{
|
|
21808
|
+
type: "button",
|
|
21809
|
+
disabled: settingsControlsDisabled,
|
|
21810
|
+
"aria-label": labels.goalLabel,
|
|
21811
|
+
title: labels.goalLabel,
|
|
21812
|
+
"data-agent-goal-badge": "true",
|
|
21813
|
+
className: cn(
|
|
21814
|
+
AgentGUINode_styles_default.composerMenuTrigger,
|
|
21815
|
+
"group w-auto",
|
|
21816
|
+
"disabled:cursor-not-allowed disabled:opacity-60"
|
|
21817
|
+
),
|
|
21818
|
+
onClick: clearGoalModeBadge,
|
|
21819
|
+
children: /* @__PURE__ */ jsxs15("span", { className: "flex min-w-0 items-center gap-1.5 overflow-hidden", children: [
|
|
21820
|
+
/* @__PURE__ */ jsxs15("span", { className: "relative flex size-3.5 shrink-0 items-center justify-center", children: [
|
|
21821
|
+
/* @__PURE__ */ jsx27(
|
|
21822
|
+
Target3,
|
|
21823
|
+
{
|
|
21824
|
+
"aria-hidden": true,
|
|
21825
|
+
className: "size-3.5 transition-opacity duration-150 group-hover:opacity-0 group-focus-visible:opacity-0"
|
|
21826
|
+
}
|
|
21827
|
+
),
|
|
21828
|
+
/* @__PURE__ */ jsx27(
|
|
21829
|
+
"span",
|
|
21830
|
+
{
|
|
21831
|
+
"aria-hidden": true,
|
|
21832
|
+
className: "absolute inset-0 flex items-center justify-center rounded-full bg-[var(--text-secondary)] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-visible:opacity-100 group-disabled:opacity-0",
|
|
21833
|
+
children: /* @__PURE__ */ jsx27(
|
|
21834
|
+
X,
|
|
21835
|
+
{
|
|
21836
|
+
className: "size-2.5 text-[var(--background-fronted)]",
|
|
21837
|
+
strokeWidth: 3
|
|
21838
|
+
}
|
|
21839
|
+
)
|
|
21840
|
+
}
|
|
21841
|
+
)
|
|
21842
|
+
] }),
|
|
21843
|
+
/* @__PURE__ */ jsx27("span", { className: "min-w-0 truncate", children: labels.goalLabel })
|
|
21610
21844
|
] })
|
|
21611
21845
|
}
|
|
21612
21846
|
) : null
|
|
21613
21847
|
] }),
|
|
21614
21848
|
/* @__PURE__ */ jsxs15("div", { className: composerStyles.footerGroupRight, children: [
|
|
21615
|
-
usage && usage.percentUsed !== null ? /* @__PURE__ */
|
|
21849
|
+
usage && usage.percentUsed !== null ? /* @__PURE__ */ jsx27(
|
|
21616
21850
|
AgentUsageChip,
|
|
21617
21851
|
{
|
|
21618
21852
|
percentUsed: usage.percentUsed,
|
|
@@ -21620,7 +21854,7 @@ function AgentComposer({
|
|
|
21620
21854
|
totalTokens: usage.totalTokens,
|
|
21621
21855
|
tooltipsEnabled: !previewMode,
|
|
21622
21856
|
compactSupported: compactSupported ?? false,
|
|
21623
|
-
compactDisabled: !hasCompactableContext ||
|
|
21857
|
+
compactDisabled: !hasCompactableContext || composerControlsHardDisabled,
|
|
21624
21858
|
onCompact: () => onSubmit(textPromptContent("/compact")),
|
|
21625
21859
|
labels: {
|
|
21626
21860
|
usageChipLabel: labels.usageChipLabel,
|
|
@@ -21631,7 +21865,7 @@ function AgentComposer({
|
|
|
21631
21865
|
}
|
|
21632
21866
|
}
|
|
21633
21867
|
) : null,
|
|
21634
|
-
composerSettings.supportsPermissionMode ? /* @__PURE__ */
|
|
21868
|
+
composerSettings.supportsPermissionMode ? /* @__PURE__ */ jsx27(
|
|
21635
21869
|
AgentPermissionModeDropdown,
|
|
21636
21870
|
{
|
|
21637
21871
|
composerSettings,
|
|
@@ -21644,7 +21878,7 @@ function AgentComposer({
|
|
|
21644
21878
|
onSettingsChange: (patch) => onSettingsChange(patch)
|
|
21645
21879
|
}
|
|
21646
21880
|
) : null,
|
|
21647
|
-
composerSettings.supportsModel || composerSettings.supportsReasoningEffort ? /* @__PURE__ */
|
|
21881
|
+
composerSettings.supportsModel || composerSettings.supportsReasoningEffort ? /* @__PURE__ */ jsx27(
|
|
21648
21882
|
AgentModelReasoningDropdown,
|
|
21649
21883
|
{
|
|
21650
21884
|
composerSettings,
|
|
@@ -21692,7 +21926,7 @@ function AgentComposer({
|
|
|
21692
21926
|
className: AgentGUINode_styles_default.composerProjectRow,
|
|
21693
21927
|
"data-project-missing": isSelectedProjectMissing ? "true" : void 0,
|
|
21694
21928
|
children: [
|
|
21695
|
-
showHeroProjectSelector ? /* @__PURE__ */
|
|
21929
|
+
showHeroProjectSelector ? /* @__PURE__ */ jsx27(
|
|
21696
21930
|
AgentProjectDropdown,
|
|
21697
21931
|
{
|
|
21698
21932
|
composerSettings,
|
|
@@ -21707,14 +21941,14 @@ function AgentComposer({
|
|
|
21707
21941
|
onProjectPathChange
|
|
21708
21942
|
}
|
|
21709
21943
|
) : null,
|
|
21710
|
-
activePromptTip ? /* @__PURE__ */
|
|
21944
|
+
activePromptTip ? /* @__PURE__ */ jsx27(
|
|
21711
21945
|
"div",
|
|
21712
21946
|
{
|
|
21713
21947
|
className: AgentGUINode_styles_default.composerPromptTips,
|
|
21714
21948
|
"data-testid": "agent-gui-prompt-tips",
|
|
21715
|
-
children: !previewMode && isPromptTipOverflowing && promptTipNode ? /* @__PURE__ */
|
|
21716
|
-
/* @__PURE__ */
|
|
21717
|
-
/* @__PURE__ */
|
|
21949
|
+
children: !previewMode && isPromptTipOverflowing && promptTipNode ? /* @__PURE__ */ jsx27(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsxs15(Tooltip, { children: [
|
|
21950
|
+
/* @__PURE__ */ jsx27(TooltipTrigger, { asChild: true, children: promptTipNode }),
|
|
21951
|
+
/* @__PURE__ */ jsx27(
|
|
21718
21952
|
TooltipContent,
|
|
21719
21953
|
{
|
|
21720
21954
|
align: "end",
|
|
@@ -21769,7 +22003,7 @@ function AgentComposerDraftImagePreview({
|
|
|
21769
22003
|
"data-upload-error": image.uploadError ? "true" : void 0,
|
|
21770
22004
|
style: previewStyle,
|
|
21771
22005
|
children: [
|
|
21772
|
-
/* @__PURE__ */
|
|
22006
|
+
/* @__PURE__ */ jsx27(
|
|
21773
22007
|
ZoomableImage,
|
|
21774
22008
|
{
|
|
21775
22009
|
src: image.previewUrl,
|
|
@@ -21792,12 +22026,12 @@ function AgentComposerDraftImagePreview({
|
|
|
21792
22026
|
}
|
|
21793
22027
|
}
|
|
21794
22028
|
),
|
|
21795
|
-
image.uploading ? /* @__PURE__ */
|
|
22029
|
+
image.uploading ? /* @__PURE__ */ jsx27(
|
|
21796
22030
|
"div",
|
|
21797
22031
|
{
|
|
21798
22032
|
className: "absolute inset-0 grid place-items-center bg-[color-mix(in_srgb,var(--background-fronted)_62%,transparent)]",
|
|
21799
22033
|
"data-testid": "agent-gui-composer-image-uploading",
|
|
21800
|
-
children: /* @__PURE__ */
|
|
22034
|
+
children: /* @__PURE__ */ jsx27(
|
|
21801
22035
|
Spinner,
|
|
21802
22036
|
{
|
|
21803
22037
|
className: "text-[var(--text-primary)]",
|
|
@@ -21809,7 +22043,7 @@ function AgentComposerDraftImagePreview({
|
|
|
21809
22043
|
)
|
|
21810
22044
|
}
|
|
21811
22045
|
) : null,
|
|
21812
|
-
/* @__PURE__ */
|
|
22046
|
+
/* @__PURE__ */ jsx27(
|
|
21813
22047
|
"button",
|
|
21814
22048
|
{
|
|
21815
22049
|
type: "button",
|
|
@@ -21817,13 +22051,76 @@ function AgentComposerDraftImagePreview({
|
|
|
21817
22051
|
"aria-label": removeLabel,
|
|
21818
22052
|
title: removeLabel,
|
|
21819
22053
|
onClick: () => onRemove(image.id),
|
|
21820
|
-
children: /* @__PURE__ */
|
|
22054
|
+
children: /* @__PURE__ */ jsx27(X, { size: 12, strokeWidth: 2.4, "aria-hidden": true })
|
|
21821
22055
|
}
|
|
21822
22056
|
)
|
|
21823
22057
|
]
|
|
21824
22058
|
}
|
|
21825
22059
|
);
|
|
21826
22060
|
}
|
|
22061
|
+
function slashCommandDescriptionForDisplay(command, labels) {
|
|
22062
|
+
switch (command.name.trim().toLowerCase()) {
|
|
22063
|
+
case "compact":
|
|
22064
|
+
return labels.slashCommandCompactDescription;
|
|
22065
|
+
case "context":
|
|
22066
|
+
return labels.slashCommandContextDescription;
|
|
22067
|
+
case "fast":
|
|
22068
|
+
return labels.slashCommandFastDescription;
|
|
22069
|
+
case "goal":
|
|
22070
|
+
return labels.slashCommandGoalDescription;
|
|
22071
|
+
case "init":
|
|
22072
|
+
return labels.slashCommandInitDescription;
|
|
22073
|
+
case "plan":
|
|
22074
|
+
return labels.slashCommandPlanDescription;
|
|
22075
|
+
case "review":
|
|
22076
|
+
return labels.slashCommandReviewDescription;
|
|
22077
|
+
case "status":
|
|
22078
|
+
return labels.slashCommandStatusDescription;
|
|
22079
|
+
case "usage":
|
|
22080
|
+
return labels.slashCommandUsageDescription;
|
|
22081
|
+
default:
|
|
22082
|
+
return command.description;
|
|
22083
|
+
}
|
|
22084
|
+
}
|
|
22085
|
+
function slashCommandLabelForDisplay(command, labels, uiLanguage) {
|
|
22086
|
+
const canonicalLabel = labelForSlashCommand(command);
|
|
22087
|
+
const primaryLabel = localizedSlashCommandLabel(command, labels);
|
|
22088
|
+
return uiLanguage === "en" || primaryLabel === canonicalLabel ? { primaryLabel } : { primaryLabel, secondaryLabel: canonicalLabel };
|
|
22089
|
+
}
|
|
22090
|
+
function localizedSlashCommandLabel(command, labels) {
|
|
22091
|
+
switch (command.name.trim().toLowerCase()) {
|
|
22092
|
+
case "compact":
|
|
22093
|
+
return labels.slashCommandCompactLabel;
|
|
22094
|
+
case "context":
|
|
22095
|
+
return labels.slashCommandContextLabel;
|
|
22096
|
+
case "fast":
|
|
22097
|
+
return labels.slashCommandFastLabel;
|
|
22098
|
+
case "goal":
|
|
22099
|
+
return labels.slashCommandGoalLabel;
|
|
22100
|
+
case "init":
|
|
22101
|
+
return labels.slashCommandInitLabel;
|
|
22102
|
+
case "plan":
|
|
22103
|
+
return labels.slashCommandPlanLabel;
|
|
22104
|
+
case "review":
|
|
22105
|
+
return labels.slashCommandReviewLabel;
|
|
22106
|
+
case "status":
|
|
22107
|
+
return labels.slashCommandStatusLabel;
|
|
22108
|
+
case "usage":
|
|
22109
|
+
return labels.slashCommandUsageLabel;
|
|
22110
|
+
default:
|
|
22111
|
+
return labelForSlashCommand(command);
|
|
22112
|
+
}
|
|
22113
|
+
}
|
|
22114
|
+
function goalDraftObjectiveFromPrompt(prompt) {
|
|
22115
|
+
const match = /^\s*\/goal(?:\s+([\s\S]*))?\s*$/u.exec(prompt);
|
|
22116
|
+
if (!match) {
|
|
22117
|
+
return null;
|
|
22118
|
+
}
|
|
22119
|
+
return match[1] ?? "";
|
|
22120
|
+
}
|
|
22121
|
+
function buildGoalModePrompt(objective) {
|
|
22122
|
+
return objective.trim() === "" ? GOAL_MODE_SLASH_COMMAND : `${GOAL_MODE_SLASH_COMMAND} ${objective}`;
|
|
22123
|
+
}
|
|
21827
22124
|
function isSlashCommandCapability(command) {
|
|
21828
22125
|
return "kind" in command && command.kind === "capability";
|
|
21829
22126
|
}
|
|
@@ -21834,7 +22131,7 @@ function useStableEventCallback(callback) {
|
|
|
21834
22131
|
}
|
|
21835
22132
|
function SendFilledIcon() {
|
|
21836
22133
|
"use memo";
|
|
21837
|
-
return /* @__PURE__ */
|
|
22134
|
+
return /* @__PURE__ */ jsx27(
|
|
21838
22135
|
"svg",
|
|
21839
22136
|
{
|
|
21840
22137
|
width: "24",
|
|
@@ -21842,7 +22139,7 @@ function SendFilledIcon() {
|
|
|
21842
22139
|
viewBox: "0 0 24 24",
|
|
21843
22140
|
fill: "none",
|
|
21844
22141
|
"aria-hidden": "true",
|
|
21845
|
-
children: /* @__PURE__ */
|
|
22142
|
+
children: /* @__PURE__ */ jsx27(
|
|
21846
22143
|
"path",
|
|
21847
22144
|
{
|
|
21848
22145
|
d: "M2.74311 8.80587C2.84592 8.40096 3.14571 8.08844 3.54551 7.97033L18.5197 3.51569C18.9336 3.39383 19.3809 3.5054 19.6881 3.81262C19.9951 4.11984 20.1076 4.56798 19.9857 4.9817L15.5311 19.9559C15.413 20.3557 15.1005 20.6555 14.6956 20.7583C14.2895 20.8597 13.869 20.7438 13.5721 20.4469L10.455 15.1823C10.8585 14.6483 12.1563 12.9094 14.3475 9.96528C14.6086 9.70419 14.6382 9.31168 14.4138 9.08692C14.1891 8.86221 13.796 8.8913 13.5348 9.15252L8.31088 13.0423L3.05316 9.92799C2.7562 9.63104 2.64049 9.21071 2.74311 8.80587Z",
|
|
@@ -21869,7 +22166,7 @@ function agentGUIBottomDockStoreSnapshotsEqual(current, next) {
|
|
|
21869
22166
|
}
|
|
21870
22167
|
|
|
21871
22168
|
// agent-gui/agentGuiNode/AgentConversationListSkeleton.tsx
|
|
21872
|
-
import { jsx as
|
|
22169
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
21873
22170
|
var SKELETON_ROWS = [
|
|
21874
22171
|
{ id: "first", size: "long" },
|
|
21875
22172
|
{ id: "second", size: "medium" },
|
|
@@ -21881,7 +22178,7 @@ function AgentConversationListSkeleton({
|
|
|
21881
22178
|
label
|
|
21882
22179
|
}) {
|
|
21883
22180
|
"use memo";
|
|
21884
|
-
return /* @__PURE__ */
|
|
22181
|
+
return /* @__PURE__ */ jsx28(
|
|
21885
22182
|
"div",
|
|
21886
22183
|
{
|
|
21887
22184
|
className: "agent-gui-node__conversation-list-skeleton",
|
|
@@ -21895,9 +22192,9 @@ function AgentConversationListSkeleton({
|
|
|
21895
22192
|
"data-size": row.size,
|
|
21896
22193
|
"aria-hidden": "true",
|
|
21897
22194
|
children: [
|
|
21898
|
-
/* @__PURE__ */
|
|
21899
|
-
/* @__PURE__ */
|
|
21900
|
-
/* @__PURE__ */
|
|
22195
|
+
/* @__PURE__ */ jsx28("span", { className: "agent-gui-node__conversation-list-skeleton-spine" }),
|
|
22196
|
+
/* @__PURE__ */ jsx28("span", { className: "agent-gui-node__conversation-list-skeleton-rib agent-gui-node__conversation-list-skeleton-rib-primary" }),
|
|
22197
|
+
/* @__PURE__ */ jsx28("span", { className: "agent-gui-node__conversation-list-skeleton-rib agent-gui-node__conversation-list-skeleton-rib-secondary" })
|
|
21901
22198
|
]
|
|
21902
22199
|
},
|
|
21903
22200
|
row.id
|
|
@@ -21908,7 +22205,7 @@ function AgentConversationListSkeleton({
|
|
|
21908
22205
|
|
|
21909
22206
|
// agent-gui/agentGuiNode/agentGuiNodeViewConversation.tsx
|
|
21910
22207
|
import { AskLinedIcon } from "@tutti-os/ui-system/icons";
|
|
21911
|
-
import { jsx as
|
|
22208
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
21912
22209
|
function ConversationMeta({
|
|
21913
22210
|
item,
|
|
21914
22211
|
nowMs,
|
|
@@ -21917,24 +22214,24 @@ function ConversationMeta({
|
|
|
21917
22214
|
"use memo";
|
|
21918
22215
|
const kind = conversationMetaKind(item);
|
|
21919
22216
|
if (kind === "loading") {
|
|
21920
|
-
return /* @__PURE__ */
|
|
22217
|
+
return /* @__PURE__ */ jsx29(
|
|
21921
22218
|
"span",
|
|
21922
22219
|
{
|
|
21923
22220
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
21924
22221
|
"data-kind": kind,
|
|
21925
22222
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
21926
|
-
children: /* @__PURE__ */
|
|
22223
|
+
children: /* @__PURE__ */ jsx29(LoadingGlyph, {})
|
|
21927
22224
|
}
|
|
21928
22225
|
);
|
|
21929
22226
|
}
|
|
21930
22227
|
if (kind === "waiting") {
|
|
21931
|
-
return /* @__PURE__ */
|
|
22228
|
+
return /* @__PURE__ */ jsx29(
|
|
21932
22229
|
"span",
|
|
21933
22230
|
{
|
|
21934
22231
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
21935
22232
|
"data-kind": kind,
|
|
21936
22233
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
21937
|
-
children: /* @__PURE__ */
|
|
22234
|
+
children: /* @__PURE__ */ jsx29(
|
|
21938
22235
|
AskLinedIcon,
|
|
21939
22236
|
{
|
|
21940
22237
|
"aria-hidden": "true",
|
|
@@ -21945,34 +22242,34 @@ function ConversationMeta({
|
|
|
21945
22242
|
);
|
|
21946
22243
|
}
|
|
21947
22244
|
if (kind === "failed") {
|
|
21948
|
-
return /* @__PURE__ */
|
|
22245
|
+
return /* @__PURE__ */ jsx29(
|
|
21949
22246
|
"span",
|
|
21950
22247
|
{
|
|
21951
22248
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
21952
22249
|
"data-kind": kind,
|
|
21953
22250
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
21954
|
-
children: /* @__PURE__ */
|
|
22251
|
+
children: /* @__PURE__ */ jsx29(AttentionGlyph, {})
|
|
21955
22252
|
}
|
|
21956
22253
|
);
|
|
21957
22254
|
}
|
|
21958
22255
|
if (kind === "unread-complete") {
|
|
21959
|
-
return /* @__PURE__ */
|
|
22256
|
+
return /* @__PURE__ */ jsx29(
|
|
21960
22257
|
"span",
|
|
21961
22258
|
{
|
|
21962
22259
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
21963
22260
|
"data-kind": kind,
|
|
21964
22261
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
21965
|
-
children: /* @__PURE__ */
|
|
22262
|
+
children: /* @__PURE__ */ jsx29("span", { className: AgentGUINode_styles_default.conversationUnreadLamp, "aria-hidden": "true" })
|
|
21966
22263
|
}
|
|
21967
22264
|
);
|
|
21968
22265
|
}
|
|
21969
|
-
return /* @__PURE__ */
|
|
22266
|
+
return /* @__PURE__ */ jsx29(
|
|
21970
22267
|
"span",
|
|
21971
22268
|
{
|
|
21972
22269
|
className: AgentGUINode_styles_default.conversationMeta,
|
|
21973
22270
|
"data-kind": kind,
|
|
21974
22271
|
"data-testid": `agent-gui-conversation-meta-${item.id}`,
|
|
21975
|
-
children: /* @__PURE__ */
|
|
22272
|
+
children: /* @__PURE__ */ jsx29("span", { className: AgentGUINode_styles_default.conversationTime, children: formatConversationRelativeTime(
|
|
21976
22273
|
resolveAgentGUIConversationSortTimeUnixMs(item),
|
|
21977
22274
|
nowMs,
|
|
21978
22275
|
labels
|
|
@@ -22140,7 +22437,7 @@ function formatConversationRelativeTime(updatedAtUnixMs, nowMs, labels) {
|
|
|
22140
22437
|
}
|
|
22141
22438
|
function LoadingGlyph() {
|
|
22142
22439
|
"use memo";
|
|
22143
|
-
return /* @__PURE__ */
|
|
22440
|
+
return /* @__PURE__ */ jsx29(
|
|
22144
22441
|
Spinner,
|
|
22145
22442
|
{
|
|
22146
22443
|
className: AgentGUINode_styles_default.conversationStatusGlyph,
|
|
@@ -22154,14 +22451,14 @@ function LoadingGlyph() {
|
|
|
22154
22451
|
}
|
|
22155
22452
|
function AttentionGlyph() {
|
|
22156
22453
|
"use memo";
|
|
22157
|
-
return /* @__PURE__ */
|
|
22454
|
+
return /* @__PURE__ */ jsx29(
|
|
22158
22455
|
"svg",
|
|
22159
22456
|
{
|
|
22160
22457
|
viewBox: "0 0 24 24",
|
|
22161
22458
|
fill: "none",
|
|
22162
22459
|
"aria-hidden": "true",
|
|
22163
22460
|
className: AgentGUINode_styles_default.conversationStatusGlyph,
|
|
22164
|
-
children: /* @__PURE__ */
|
|
22461
|
+
children: /* @__PURE__ */ jsx29(
|
|
22165
22462
|
"path",
|
|
22166
22463
|
{
|
|
22167
22464
|
d: "M12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4ZM12.5 15C12.7761 15 13 15.2239 13 15.5V16.5C13 16.7761 12.7761 17 12.5 17H11.5C11.2239 17 11 16.7761 11 16.5V15.5C11 15.2239 11.2239 15 11.5 15H12.5ZM12.5 7C12.7761 7 13 7.22386 13 7.5V13.5C13 13.7761 12.7761 14 12.5 14H11.5C11.2239 14 11 13.7761 11 13.5V7.5C11 7.22386 11.2239 7 11.5 7H12.5Z",
|
|
@@ -22174,16 +22471,16 @@ function AttentionGlyph() {
|
|
|
22174
22471
|
|
|
22175
22472
|
// agent-gui/agentGuiNode/AgentGUINodeView.tsx
|
|
22176
22473
|
import { createRichTextMentionHref as createRichTextMentionHref2 } from "@tutti-os/ui-rich-text/core";
|
|
22177
|
-
import { Fragment as Fragment8, jsx as
|
|
22474
|
+
import { Fragment as Fragment8, jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
22178
22475
|
var AGENT_GUI_STICK_TO_BOTTOM_THRESHOLD_PX = 24;
|
|
22179
22476
|
var AGENT_GUI_TOP_HISTORY_PREFETCH_THRESHOLD_PX = 240;
|
|
22477
|
+
var AGENT_GUI_TOP_MASK_SCROLL_EPSILON_PX = 1;
|
|
22180
22478
|
var AGENT_GUI_CONVERSATION_RAIL_SECTION_PAGE_SIZE = 5;
|
|
22181
22479
|
var AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE = {
|
|
22182
22480
|
width: "100%",
|
|
22183
22481
|
minWidth: "100%",
|
|
22184
22482
|
display: "grid",
|
|
22185
|
-
gridTemplateColumns: "minmax(0,
|
|
22186
|
-
justifyContent: "center",
|
|
22483
|
+
gridTemplateColumns: "minmax(0, 1fr)",
|
|
22187
22484
|
gap: "24px"
|
|
22188
22485
|
};
|
|
22189
22486
|
var EMPTY_WORKSPACE_APP_ICONS3 = [];
|
|
@@ -22369,19 +22666,11 @@ function resolveActiveConversationBusyStatus(input) {
|
|
|
22369
22666
|
}
|
|
22370
22667
|
return null;
|
|
22371
22668
|
}
|
|
22372
|
-
function conversationDisplayTitle(conversation, labels) {
|
|
22373
|
-
return resolveAgentGUIConversationDisplayTitle(
|
|
22374
|
-
conversation,
|
|
22375
|
-
labels.fallbackAgentTitle
|
|
22376
|
-
);
|
|
22377
|
-
}
|
|
22378
22669
|
function conversationPlainTitle(conversation, labels, uiLanguage) {
|
|
22379
|
-
return
|
|
22380
|
-
|
|
22381
|
-
|
|
22382
|
-
|
|
22383
|
-
}
|
|
22384
|
-
);
|
|
22670
|
+
return formatAgentGUIConversationPlainTitle(conversation, {
|
|
22671
|
+
fallbackAgentLabel: labels.fallbackAgentTitle,
|
|
22672
|
+
language: uiLanguage
|
|
22673
|
+
});
|
|
22385
22674
|
}
|
|
22386
22675
|
function AgentGUINodeView({
|
|
22387
22676
|
viewModel,
|
|
@@ -22558,6 +22847,9 @@ function AgentGUINodeView({
|
|
|
22558
22847
|
const confirmDeleteProjectConversations = useStableEventCallback2(
|
|
22559
22848
|
actions.confirmDeleteProjectConversations
|
|
22560
22849
|
);
|
|
22850
|
+
const confirmDeleteConversations = useStableEventCallback2(
|
|
22851
|
+
actions.confirmDeleteConversations
|
|
22852
|
+
);
|
|
22561
22853
|
const requestDeleteConversation = useStableEventCallback2(
|
|
22562
22854
|
actions.requestDeleteConversation
|
|
22563
22855
|
);
|
|
@@ -22756,6 +23048,7 @@ function AgentGUINodeView({
|
|
|
22756
23048
|
onToggleConversationPinned: toggleConversationPinned,
|
|
22757
23049
|
onRemoveProject: removeProject,
|
|
22758
23050
|
onConfirmDeleteProjectConversations: confirmDeleteProjectConversations,
|
|
23051
|
+
onConfirmDeleteConversations: confirmDeleteConversations,
|
|
22759
23052
|
onRequestDeleteConversation: requestDeleteConversation,
|
|
22760
23053
|
onCancelDeleteConversation: cancelDeleteConversation,
|
|
22761
23054
|
onConfirmDeleteConversation: confirmDeleteConversation,
|
|
@@ -22766,6 +23059,7 @@ function AgentGUINodeView({
|
|
|
22766
23059
|
[
|
|
22767
23060
|
cancelDeleteConversation,
|
|
22768
23061
|
confirmDeleteConversation,
|
|
23062
|
+
confirmDeleteConversations,
|
|
22769
23063
|
confirmDeleteProjectConversations,
|
|
22770
23064
|
conversationRailCollapsed,
|
|
22771
23065
|
createConversationDisabled,
|
|
@@ -22816,14 +23110,14 @@ function AgentGUINodeView({
|
|
|
22816
23110
|
inert: previewMode ? true : void 0,
|
|
22817
23111
|
style: layoutStyle,
|
|
22818
23112
|
children: [
|
|
22819
|
-
/* @__PURE__ */
|
|
23113
|
+
/* @__PURE__ */ jsx30(
|
|
22820
23114
|
"aside",
|
|
22821
23115
|
{
|
|
22822
23116
|
id: "agent-gui-conversation-rail",
|
|
22823
23117
|
className: `${AgentGUINode_styles_default.railPanel}${conversationRailCollapsed ? ` ${AgentGUINode_styles_default.railPanelCollapsed}` : ""}`,
|
|
22824
23118
|
"aria-hidden": conversationRailCollapsed ? "true" : void 0,
|
|
22825
23119
|
inert: conversationRailCollapsed ? true : void 0,
|
|
22826
|
-
children: /* @__PURE__ */
|
|
23120
|
+
children: /* @__PURE__ */ jsx30(
|
|
22827
23121
|
AgentGUIConversationRailStorePane,
|
|
22828
23122
|
{
|
|
22829
23123
|
conversations: viewModel.conversations,
|
|
@@ -22834,7 +23128,7 @@ function AgentGUINodeView({
|
|
|
22834
23128
|
)
|
|
22835
23129
|
}
|
|
22836
23130
|
),
|
|
22837
|
-
/* @__PURE__ */
|
|
23131
|
+
/* @__PURE__ */ jsx30(
|
|
22838
23132
|
"div",
|
|
22839
23133
|
{
|
|
22840
23134
|
id: "agent-gui-conversation-rail-resize",
|
|
@@ -22858,7 +23152,7 @@ function AgentGUINodeView({
|
|
|
22858
23152
|
onPointerUp: endConversationRailResize
|
|
22859
23153
|
}
|
|
22860
23154
|
),
|
|
22861
|
-
/* @__PURE__ */
|
|
23155
|
+
/* @__PURE__ */ jsx30("section", { id: "agent-gui-detail", className: AgentGUINode_styles_default.detailPanel, children: /* @__PURE__ */ jsx30(
|
|
22862
23156
|
AgentGUIDetailPane,
|
|
22863
23157
|
{
|
|
22864
23158
|
viewModel,
|
|
@@ -22887,7 +23181,7 @@ function AgentGUINodeView({
|
|
|
22887
23181
|
]
|
|
22888
23182
|
}
|
|
22889
23183
|
),
|
|
22890
|
-
referenceSourceAggregator ? /* @__PURE__ */
|
|
23184
|
+
referenceSourceAggregator ? /* @__PURE__ */ jsx30(
|
|
22891
23185
|
ReferenceSourcePicker,
|
|
22892
23186
|
{
|
|
22893
23187
|
aggregator: referenceSourceAggregator,
|
|
@@ -22901,7 +23195,7 @@ function AgentGUINodeView({
|
|
|
22901
23195
|
onConfirm: confirmWorkspaceReferencePicker,
|
|
22902
23196
|
onConfirmBundles: confirmWorkspaceReferenceBundles
|
|
22903
23197
|
}
|
|
22904
|
-
) : /* @__PURE__ */
|
|
23198
|
+
) : /* @__PURE__ */ jsx30(
|
|
22905
23199
|
WorkspaceFileReferencePicker,
|
|
22906
23200
|
{
|
|
22907
23201
|
copy: workspaceFileReferenceCopy ?? fallbackWorkspaceFileReferenceCopy,
|
|
@@ -22915,7 +23209,7 @@ function AgentGUINodeView({
|
|
|
22915
23209
|
}
|
|
22916
23210
|
)
|
|
22917
23211
|
] });
|
|
22918
|
-
return previewMode ? content : /* @__PURE__ */
|
|
23212
|
+
return previewMode ? content : /* @__PURE__ */ jsx30(TooltipProvider2, { children: content });
|
|
22919
23213
|
}
|
|
22920
23214
|
function mergeWorkspaceAppIconsFromCommands(input) {
|
|
22921
23215
|
const seen = new Set(
|
|
@@ -23003,6 +23297,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23003
23297
|
const bottomDockRef = useRef13(null);
|
|
23004
23298
|
const timelineScrollAnchorRef = useRef13(null);
|
|
23005
23299
|
const pendingPrependScrollAnchorRef = useRef13(null);
|
|
23300
|
+
const [isTimelineScrolledToTop, setIsTimelineScrolledToTop] = useState12(true);
|
|
23006
23301
|
const [
|
|
23007
23302
|
bottomDockDismissedPromptRequestId,
|
|
23008
23303
|
setBottomDockDismissedPromptRequestId
|
|
@@ -23127,8 +23422,8 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23127
23422
|
className: AgentGUINode_styles_default.unavailableChatEmpty,
|
|
23128
23423
|
"data-testid": "agent-gui-unavailable-chat-empty",
|
|
23129
23424
|
children: [
|
|
23130
|
-
/* @__PURE__ */
|
|
23131
|
-
/* @__PURE__ */
|
|
23425
|
+
/* @__PURE__ */ jsx30(UnavailableChatIcon, { className: AgentGUINode_styles_default.unavailableChatEmptyIcon }),
|
|
23426
|
+
/* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.unavailableChatEmptyText, children: labels.conversationUnavailable })
|
|
23132
23427
|
]
|
|
23133
23428
|
}
|
|
23134
23429
|
),
|
|
@@ -23252,6 +23547,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23252
23547
|
planModeOnLabel: labels.planModeOnLabel,
|
|
23253
23548
|
planModeOffLabel: labels.planModeOffLabel,
|
|
23254
23549
|
planUnavailable: labels.planUnavailable,
|
|
23550
|
+
goalLabel: labels.goalLabel,
|
|
23255
23551
|
queuedLabel: labels.queuedLabel,
|
|
23256
23552
|
sendQueuedPromptNext: labels.sendQueuedPromptNext,
|
|
23257
23553
|
editQueuedPrompt: labels.editQueuedPrompt,
|
|
@@ -23267,6 +23563,24 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23267
23563
|
slashPalettePluginsGroup: labels.slashPalettePluginsGroup,
|
|
23268
23564
|
slashPaletteConnectorsGroup: labels.slashPaletteConnectorsGroup,
|
|
23269
23565
|
slashPaletteMcpGroup: labels.slashPaletteMcpGroup,
|
|
23566
|
+
slashCommandCompactLabel: labels.slashCommandCompactLabel,
|
|
23567
|
+
slashCommandContextLabel: labels.slashCommandContextLabel,
|
|
23568
|
+
slashCommandFastLabel: labels.slashCommandFastLabel,
|
|
23569
|
+
slashCommandGoalLabel: labels.slashCommandGoalLabel,
|
|
23570
|
+
slashCommandInitLabel: labels.slashCommandInitLabel,
|
|
23571
|
+
slashCommandPlanLabel: labels.slashCommandPlanLabel,
|
|
23572
|
+
slashCommandReviewLabel: labels.slashCommandReviewLabel,
|
|
23573
|
+
slashCommandStatusLabel: labels.slashCommandStatusLabel,
|
|
23574
|
+
slashCommandUsageLabel: labels.slashCommandUsageLabel,
|
|
23575
|
+
slashCommandCompactDescription: labels.slashCommandCompactDescription,
|
|
23576
|
+
slashCommandContextDescription: labels.slashCommandContextDescription,
|
|
23577
|
+
slashCommandFastDescription: labels.slashCommandFastDescription,
|
|
23578
|
+
slashCommandGoalDescription: labels.slashCommandGoalDescription,
|
|
23579
|
+
slashCommandInitDescription: labels.slashCommandInitDescription,
|
|
23580
|
+
slashCommandPlanDescription: labels.slashCommandPlanDescription,
|
|
23581
|
+
slashCommandReviewDescription: labels.slashCommandReviewDescription,
|
|
23582
|
+
slashCommandStatusDescription: labels.slashCommandStatusDescription,
|
|
23583
|
+
slashCommandUsageDescription: labels.slashCommandUsageDescription,
|
|
23270
23584
|
browserUseCapabilityLabel: labels.browserUseCapabilityLabel,
|
|
23271
23585
|
browserUseCapabilityDescription: labels.browserUseCapabilityDescription,
|
|
23272
23586
|
browserUseCapabilityDescriptionAutoConnect: labels.browserUseCapabilityDescriptionAutoConnect,
|
|
@@ -23337,6 +23651,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23337
23651
|
labels.planModeOffLabel,
|
|
23338
23652
|
labels.planModeOnLabel,
|
|
23339
23653
|
labels.planUnavailable,
|
|
23654
|
+
labels.goalLabel,
|
|
23340
23655
|
labels.projectLocked,
|
|
23341
23656
|
labels.projectMissingDescription,
|
|
23342
23657
|
labels.promptTipsPrefix,
|
|
@@ -23380,6 +23695,24 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23380
23695
|
labels.slashPaletteCapabilitiesGroup,
|
|
23381
23696
|
labels.slashPaletteCommandsGroup,
|
|
23382
23697
|
labels.slashPaletteConnectorsGroup,
|
|
23698
|
+
labels.slashCommandCompactLabel,
|
|
23699
|
+
labels.slashCommandContextLabel,
|
|
23700
|
+
labels.slashCommandFastLabel,
|
|
23701
|
+
labels.slashCommandGoalLabel,
|
|
23702
|
+
labels.slashCommandInitLabel,
|
|
23703
|
+
labels.slashCommandPlanLabel,
|
|
23704
|
+
labels.slashCommandReviewLabel,
|
|
23705
|
+
labels.slashCommandStatusLabel,
|
|
23706
|
+
labels.slashCommandUsageLabel,
|
|
23707
|
+
labels.slashCommandCompactDescription,
|
|
23708
|
+
labels.slashCommandContextDescription,
|
|
23709
|
+
labels.slashCommandFastDescription,
|
|
23710
|
+
labels.slashCommandGoalDescription,
|
|
23711
|
+
labels.slashCommandInitDescription,
|
|
23712
|
+
labels.slashCommandPlanDescription,
|
|
23713
|
+
labels.slashCommandReviewDescription,
|
|
23714
|
+
labels.slashCommandStatusDescription,
|
|
23715
|
+
labels.slashCommandUsageDescription,
|
|
23383
23716
|
labels.slashPaletteMcpGroup,
|
|
23384
23717
|
labels.slashPalettePluginsGroup,
|
|
23385
23718
|
labels.slashPaletteSkillsGroup,
|
|
@@ -23485,6 +23818,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23485
23818
|
isInterrupting: viewModel.isInterrupting,
|
|
23486
23819
|
isSendingTurn: isComposerSending,
|
|
23487
23820
|
isSubmittingPrompt: viewModel.isRespondingApproval,
|
|
23821
|
+
uiLanguage,
|
|
23488
23822
|
labels: composerLabels,
|
|
23489
23823
|
workspaceUserProjectI18n,
|
|
23490
23824
|
capabilityMenuState,
|
|
@@ -23533,6 +23867,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23533
23867
|
submitInteractivePrompt,
|
|
23534
23868
|
submitPrompt,
|
|
23535
23869
|
submitGuidancePrompt,
|
|
23870
|
+
uiLanguage,
|
|
23536
23871
|
stableLinkAction,
|
|
23537
23872
|
stableRequestGitBranches,
|
|
23538
23873
|
stableSelectProjectDirectory,
|
|
@@ -23614,6 +23949,8 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23614
23949
|
const activeConversationId = viewModel.activeConversationId;
|
|
23615
23950
|
if (!activeConversationId) {
|
|
23616
23951
|
timelineScrollAnchorRef.current = null;
|
|
23952
|
+
pendingPrependScrollAnchorRef.current = null;
|
|
23953
|
+
setIsTimelineScrolledToTop(true);
|
|
23617
23954
|
return;
|
|
23618
23955
|
}
|
|
23619
23956
|
const maxScrollTop = Math.max(
|
|
@@ -23656,6 +23993,9 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23656
23993
|
scrollTop: nextScrollTop,
|
|
23657
23994
|
clientHeight: timeline.clientHeight
|
|
23658
23995
|
};
|
|
23996
|
+
setIsTimelineScrolledToTop(
|
|
23997
|
+
nextScrollTop <= AGENT_GUI_TOP_MASK_SCROLL_EPSILON_PX
|
|
23998
|
+
);
|
|
23659
23999
|
}, [
|
|
23660
24000
|
conversation,
|
|
23661
24001
|
showTimelineSkeleton,
|
|
@@ -23714,6 +24054,9 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23714
24054
|
scrollTop: maxScrollTop,
|
|
23715
24055
|
clientHeight: timeline.clientHeight
|
|
23716
24056
|
};
|
|
24057
|
+
setIsTimelineScrolledToTop(
|
|
24058
|
+
maxScrollTop <= AGENT_GUI_TOP_MASK_SCROLL_EPSILON_PX
|
|
24059
|
+
);
|
|
23717
24060
|
});
|
|
23718
24061
|
};
|
|
23719
24062
|
syncBottomDockSpace();
|
|
@@ -23748,17 +24091,21 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23748
24091
|
return;
|
|
23749
24092
|
}
|
|
23750
24093
|
const captureScrollAnchor = () => {
|
|
24094
|
+
const scrollTop = timeline.scrollTop;
|
|
23751
24095
|
timelineScrollAnchorRef.current = {
|
|
23752
24096
|
conversationId: activeConversationId,
|
|
23753
24097
|
scrollHeight: timeline.scrollHeight,
|
|
23754
|
-
scrollTop
|
|
24098
|
+
scrollTop,
|
|
23755
24099
|
clientHeight: timeline.clientHeight
|
|
23756
24100
|
};
|
|
23757
|
-
|
|
24101
|
+
setIsTimelineScrolledToTop(
|
|
24102
|
+
scrollTop <= AGENT_GUI_TOP_MASK_SCROLL_EPSILON_PX
|
|
24103
|
+
);
|
|
24104
|
+
if (viewModel.hasOlderMessages && !viewModel.isLoadingOlderMessages && scrollTop <= AGENT_GUI_TOP_HISTORY_PREFETCH_THRESHOLD_PX) {
|
|
23758
24105
|
pendingPrependScrollAnchorRef.current = {
|
|
23759
24106
|
conversationId: activeConversationId,
|
|
23760
24107
|
scrollHeight: timeline.scrollHeight,
|
|
23761
|
-
scrollTop
|
|
24108
|
+
scrollTop
|
|
23762
24109
|
};
|
|
23763
24110
|
actions.loadOlderConversationMessages();
|
|
23764
24111
|
}
|
|
@@ -23775,7 +24122,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23775
24122
|
viewModel.isLoadingOlderMessages
|
|
23776
24123
|
]);
|
|
23777
24124
|
return /* @__PURE__ */ jsxs17("main", { className: AgentGUINode_styles_default.detail, children: [
|
|
23778
|
-
/* @__PURE__ */
|
|
24125
|
+
/* @__PURE__ */ jsx30(
|
|
23779
24126
|
AgentGUIDetailHeader,
|
|
23780
24127
|
{
|
|
23781
24128
|
activeConversation: viewModel.activeConversation,
|
|
@@ -23800,13 +24147,17 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23800
24147
|
"data-testid": "agent-gui-provider-setup-notice",
|
|
23801
24148
|
role: "status",
|
|
23802
24149
|
children: [
|
|
23803
|
-
/* @__PURE__ */
|
|
23804
|
-
/* @__PURE__ */
|
|
24150
|
+
/* @__PURE__ */ jsx30("span", { className: "inline-flex max-w-full items-center justify-center gap-[6px] text-center text-[13px] font-normal leading-normal", children: /* @__PURE__ */ jsx30("span", { className: "min-w-0 break-words", children: labels.installRequiredPlaceholder }) }),
|
|
24151
|
+
/* @__PURE__ */ jsx30(
|
|
23805
24152
|
"button",
|
|
23806
24153
|
{
|
|
23807
24154
|
type: "button",
|
|
23808
|
-
className:
|
|
24155
|
+
className: cn3(
|
|
24156
|
+
AgentGUINode_styles_default.providerSetupNoticeAction,
|
|
24157
|
+
"nodrag tsh-desktop-no-drag [-webkit-app-region:no-drag]"
|
|
24158
|
+
),
|
|
23809
24159
|
"data-testid": "agent-gui-provider-setup-notice-action",
|
|
24160
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
23810
24161
|
onClick: () => openAgentEnvPanel({
|
|
23811
24162
|
provider: viewModel.data.provider,
|
|
23812
24163
|
focus: "detect"
|
|
@@ -23817,16 +24168,16 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23817
24168
|
]
|
|
23818
24169
|
}
|
|
23819
24170
|
) : null,
|
|
23820
|
-
/* @__PURE__ */
|
|
24171
|
+
/* @__PURE__ */ jsx30(
|
|
23821
24172
|
ScrollArea,
|
|
23822
24173
|
{
|
|
23823
24174
|
scrollbarMode: "native",
|
|
23824
24175
|
className: "min-h-0 flex-1 [&_[data-orientation=vertical][data-slot=scroll-area-scrollbar]]:opacity-100",
|
|
23825
24176
|
viewportRef: timelineRef,
|
|
23826
24177
|
viewportTestId: "agent-gui-timeline",
|
|
23827
|
-
viewportClassName: `${AgentGUINode_styles_default.timeline} ${hasActiveConversation ? AgentGUINode_styles_default.timelineWithComposer : AgentGUINode_styles_default.timelineCentered} ${showUnavailableChatEmpty ? AgentGUINode_styles_default.timelineUnavailableChatEmpty : ""}`.trim(),
|
|
24178
|
+
viewportClassName: `${AgentGUINode_styles_default.timeline} ${hasActiveConversation ? AgentGUINode_styles_default.timelineWithComposer : AgentGUINode_styles_default.timelineCentered} ${!isTimelineScrolledToTop ? AgentGUINode_styles_default.timelineScrolledFromTop : ""} ${showUnavailableChatEmpty ? AgentGUINode_styles_default.timelineUnavailableChatEmpty : ""}`.trim(),
|
|
23828
24179
|
viewportContentStyle: AGENT_GUI_TIMELINE_SCROLL_AREA_CONTENT_STYLE,
|
|
23829
|
-
children: !hasActiveConversation ? /* @__PURE__ */
|
|
24180
|
+
children: !hasActiveConversation ? /* @__PURE__ */ jsx30(
|
|
23830
24181
|
AgentGUIEmptyHeroPane,
|
|
23831
24182
|
{
|
|
23832
24183
|
provider: viewModel.data.provider,
|
|
@@ -23841,7 +24192,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23841
24192
|
chromeLabels,
|
|
23842
24193
|
composerProps: emptyHeroComposerProps
|
|
23843
24194
|
}
|
|
23844
|
-
) : /* @__PURE__ */
|
|
24195
|
+
) : /* @__PURE__ */ jsx30(
|
|
23845
24196
|
AgentGUIConversationTimelinePane,
|
|
23846
24197
|
{
|
|
23847
24198
|
conversation,
|
|
@@ -23859,7 +24210,7 @@ var AgentGUIDetailPane = memo(function AgentGUIDetailPane2({
|
|
|
23859
24210
|
)
|
|
23860
24211
|
}
|
|
23861
24212
|
),
|
|
23862
|
-
hasActiveConversation ? /* @__PURE__ */
|
|
24213
|
+
hasActiveConversation ? /* @__PURE__ */ jsx30(
|
|
23863
24214
|
AgentGUIBottomDockPane,
|
|
23864
24215
|
{
|
|
23865
24216
|
bottomDockRef,
|
|
@@ -23899,8 +24250,8 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
|
|
|
23899
24250
|
const statusTitle = showSyncIndicator ? syncLabel : void 0;
|
|
23900
24251
|
return /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.detailHeader, children: [
|
|
23901
24252
|
/* @__PURE__ */ jsxs17("span", { className: AgentGUINode_styles_default.detailHeaderTitleGroup, children: [
|
|
23902
|
-
/* @__PURE__ */
|
|
23903
|
-
runPath ? /* @__PURE__ */
|
|
24253
|
+
/* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.detailHeaderTitle, children: conversationPlainTitle(activeConversation, labels, uiLanguage) }),
|
|
24254
|
+
runPath ? /* @__PURE__ */ jsx30(AgentRunPathInfo, { path: runPath, previewMode }) : null
|
|
23904
24255
|
] }),
|
|
23905
24256
|
/* @__PURE__ */ jsxs17(
|
|
23906
24257
|
"span",
|
|
@@ -23908,7 +24259,7 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
|
|
|
23908
24259
|
className: "inline-flex flex-none items-center gap-2 whitespace-nowrap",
|
|
23909
24260
|
title: statusTitle,
|
|
23910
24261
|
children: [
|
|
23911
|
-
showSyncIndicator ? /* @__PURE__ */
|
|
24262
|
+
showSyncIndicator ? /* @__PURE__ */ jsx30(
|
|
23912
24263
|
StatusDot,
|
|
23913
24264
|
{
|
|
23914
24265
|
tone: syncStateTone(syncStatus),
|
|
@@ -23918,7 +24269,7 @@ var AgentGUIDetailHeader = memo(function AgentGUIDetailHeader2({
|
|
|
23918
24269
|
title: syncLabel
|
|
23919
24270
|
}
|
|
23920
24271
|
) : null,
|
|
23921
|
-
showFailedSyncLabel ? /* @__PURE__ */
|
|
24272
|
+
showFailedSyncLabel ? /* @__PURE__ */ jsx30("span", { className: "text-[13px] font-semibold leading-[18px] text-shell-warning", children: syncLabel }) : null
|
|
23922
24273
|
]
|
|
23923
24274
|
}
|
|
23924
24275
|
)
|
|
@@ -23929,21 +24280,21 @@ function AgentRunPathInfo({
|
|
|
23929
24280
|
previewMode
|
|
23930
24281
|
}) {
|
|
23931
24282
|
"use memo";
|
|
23932
|
-
const trigger = /* @__PURE__ */
|
|
24283
|
+
const trigger = /* @__PURE__ */ jsx30(
|
|
23933
24284
|
"button",
|
|
23934
24285
|
{
|
|
23935
24286
|
type: "button",
|
|
23936
24287
|
className: AgentGUINode_styles_default.detailHeaderPathInfo,
|
|
23937
24288
|
"aria-label": path,
|
|
23938
|
-
children: /* @__PURE__ */
|
|
24289
|
+
children: /* @__PURE__ */ jsx30(Info2, { size: 14, strokeWidth: 2, "aria-hidden": "true" })
|
|
23939
24290
|
}
|
|
23940
24291
|
);
|
|
23941
24292
|
if (previewMode) {
|
|
23942
24293
|
return trigger;
|
|
23943
24294
|
}
|
|
23944
24295
|
return /* @__PURE__ */ jsxs17(Tooltip3, { children: [
|
|
23945
|
-
/* @__PURE__ */
|
|
23946
|
-
/* @__PURE__ */
|
|
24296
|
+
/* @__PURE__ */ jsx30(TooltipTrigger3, { asChild: true, children: trigger }),
|
|
24297
|
+
/* @__PURE__ */ jsx30(
|
|
23947
24298
|
TooltipContent3,
|
|
23948
24299
|
{
|
|
23949
24300
|
side: "top",
|
|
@@ -23988,8 +24339,8 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
|
|
|
23988
24339
|
}) {
|
|
23989
24340
|
"use memo";
|
|
23990
24341
|
const heroIconUrl = resolveAgentGUIHeroIconUrl(provider);
|
|
23991
|
-
return /* @__PURE__ */
|
|
23992
|
-
/* @__PURE__ */
|
|
24342
|
+
return /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.emptyHero, children: /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.emptyHeroBody, children: [
|
|
24343
|
+
/* @__PURE__ */ jsx30(
|
|
23993
24344
|
"img",
|
|
23994
24345
|
{
|
|
23995
24346
|
"aria-hidden": "true",
|
|
@@ -23999,8 +24350,8 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
|
|
|
23999
24350
|
alt: ""
|
|
24000
24351
|
}
|
|
24001
24352
|
),
|
|
24002
|
-
/* @__PURE__ */
|
|
24003
|
-
inlineNoticeChrome ? /* @__PURE__ */
|
|
24353
|
+
/* @__PURE__ */ jsx30("h2", { className: AgentGUINode_styles_default.emptyHeroTitle, children: /* @__PURE__ */ jsx30(EmptyHeroTitle, { label: emptyLabel, providerLabel: emptyProvider }) }),
|
|
24354
|
+
inlineNoticeChrome ? /* @__PURE__ */ jsx30(
|
|
24004
24355
|
AgentSessionChrome,
|
|
24005
24356
|
{
|
|
24006
24357
|
chrome: inlineNoticeChrome,
|
|
@@ -24012,7 +24363,7 @@ var AgentGUIEmptyHeroPane = memo(function AgentGUIEmptyHeroPane2({
|
|
|
24012
24363
|
labels: chromeLabels
|
|
24013
24364
|
}
|
|
24014
24365
|
) : null,
|
|
24015
|
-
/* @__PURE__ */
|
|
24366
|
+
/* @__PURE__ */ jsx30(AgentComposer, { ...composerProps })
|
|
24016
24367
|
] }) });
|
|
24017
24368
|
});
|
|
24018
24369
|
function EmptyHeroTitle({
|
|
@@ -24021,12 +24372,12 @@ function EmptyHeroTitle({
|
|
|
24021
24372
|
}) {
|
|
24022
24373
|
const providerStart = providerLabel ? label.indexOf(providerLabel) : -1;
|
|
24023
24374
|
if (!shouldEmphasizeEmptyHeroProvider(label) || providerStart < 0) {
|
|
24024
|
-
return /* @__PURE__ */
|
|
24375
|
+
return /* @__PURE__ */ jsx30(Fragment8, { children: label });
|
|
24025
24376
|
}
|
|
24026
24377
|
const providerEnd = providerStart + providerLabel.length;
|
|
24027
24378
|
return /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
24028
24379
|
label.slice(0, providerStart),
|
|
24029
|
-
/* @__PURE__ */
|
|
24380
|
+
/* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.emptyHeroProvider, children: label.slice(providerStart, providerEnd) }),
|
|
24030
24381
|
label.slice(providerEnd)
|
|
24031
24382
|
] });
|
|
24032
24383
|
}
|
|
@@ -24068,12 +24419,12 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24068
24419
|
className: AgentGUINode_styles_default.bottomDock,
|
|
24069
24420
|
"data-testid": "agent-gui-bottom-dock",
|
|
24070
24421
|
children: [
|
|
24071
|
-
bottomDockLiftedPrompt ? /* @__PURE__ */
|
|
24422
|
+
bottomDockLiftedPrompt ? /* @__PURE__ */ jsx30(
|
|
24072
24423
|
"div",
|
|
24073
24424
|
{
|
|
24074
24425
|
className: AgentGUINode_styles_default.bottomDockPrompt,
|
|
24075
24426
|
"data-testid": "agent-gui-bottom-dock-active-prompt",
|
|
24076
|
-
children: /* @__PURE__ */
|
|
24427
|
+
children: /* @__PURE__ */ jsx30(
|
|
24077
24428
|
AgentInteractivePromptSurface,
|
|
24078
24429
|
{
|
|
24079
24430
|
prompt: bottomDockLiftedPrompt,
|
|
@@ -24088,7 +24439,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24088
24439
|
)
|
|
24089
24440
|
}
|
|
24090
24441
|
) : null,
|
|
24091
|
-
inlineNoticeChrome ? /* @__PURE__ */
|
|
24442
|
+
inlineNoticeChrome ? /* @__PURE__ */ jsx30(
|
|
24092
24443
|
AgentSessionChrome,
|
|
24093
24444
|
{
|
|
24094
24445
|
chrome: inlineNoticeChrome,
|
|
@@ -24100,7 +24451,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24100
24451
|
labels: chromeLabels
|
|
24101
24452
|
}
|
|
24102
24453
|
) : null,
|
|
24103
|
-
/* @__PURE__ */
|
|
24454
|
+
/* @__PURE__ */ jsx30(
|
|
24104
24455
|
AgentSessionChrome,
|
|
24105
24456
|
{
|
|
24106
24457
|
chrome: sessionChrome,
|
|
@@ -24112,7 +24463,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24112
24463
|
labels: chromeLabels
|
|
24113
24464
|
}
|
|
24114
24465
|
),
|
|
24115
|
-
showGoalBanner ? /* @__PURE__ */
|
|
24466
|
+
showGoalBanner ? /* @__PURE__ */ jsx30(
|
|
24116
24467
|
AgentGoalBanner,
|
|
24117
24468
|
{
|
|
24118
24469
|
objective: goalObjective,
|
|
@@ -24122,12 +24473,12 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24122
24473
|
labels: goalBannerLabels
|
|
24123
24474
|
}
|
|
24124
24475
|
) : null,
|
|
24125
|
-
bottomDockReplacementPrompt ? /* @__PURE__ */
|
|
24476
|
+
bottomDockReplacementPrompt ? /* @__PURE__ */ jsx30(
|
|
24126
24477
|
"div",
|
|
24127
24478
|
{
|
|
24128
24479
|
className: AgentGUINode_styles_default.bottomDockPrompt,
|
|
24129
24480
|
"data-testid": "agent-gui-bottom-dock-active-prompt",
|
|
24130
|
-
children: /* @__PURE__ */
|
|
24481
|
+
children: /* @__PURE__ */ jsx30(
|
|
24131
24482
|
AgentInteractivePromptSurface,
|
|
24132
24483
|
{
|
|
24133
24484
|
prompt: bottomDockReplacementPrompt,
|
|
@@ -24141,7 +24492,7 @@ var AgentGUIBottomDockPane = memo(function AgentGUIBottomDockPane2({
|
|
|
24141
24492
|
}
|
|
24142
24493
|
)
|
|
24143
24494
|
}
|
|
24144
|
-
) : /* @__PURE__ */
|
|
24495
|
+
) : /* @__PURE__ */ jsx30(AgentComposer, { ...composerProps })
|
|
24145
24496
|
]
|
|
24146
24497
|
}
|
|
24147
24498
|
);
|
|
@@ -24167,7 +24518,7 @@ var AgentGUIConversationRailStorePane = memo(
|
|
|
24167
24518
|
}) {
|
|
24168
24519
|
"use memo";
|
|
24169
24520
|
const state = useSnapshot(store);
|
|
24170
|
-
return /* @__PURE__ */
|
|
24521
|
+
return /* @__PURE__ */ jsx30(
|
|
24171
24522
|
AgentGUIConversationRailPane,
|
|
24172
24523
|
{
|
|
24173
24524
|
...state,
|
|
@@ -24280,6 +24631,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24280
24631
|
selectProjectDirectory,
|
|
24281
24632
|
onRemoveProject,
|
|
24282
24633
|
onConfirmDeleteProjectConversations,
|
|
24634
|
+
onConfirmDeleteConversations,
|
|
24283
24635
|
onRequestDeleteConversation,
|
|
24284
24636
|
onCancelDeleteConversation,
|
|
24285
24637
|
onConfirmDeleteConversation
|
|
@@ -24388,7 +24740,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24388
24740
|
"aria-hidden": isCollapsed ? "true" : void 0,
|
|
24389
24741
|
children: [
|
|
24390
24742
|
/* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.railToolbar, children: [
|
|
24391
|
-
/* @__PURE__ */
|
|
24743
|
+
/* @__PURE__ */ jsx30(
|
|
24392
24744
|
TaskSearchField,
|
|
24393
24745
|
{
|
|
24394
24746
|
value: conversationQuery,
|
|
@@ -24407,14 +24759,14 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24407
24759
|
disabled: createConversationDisabled,
|
|
24408
24760
|
onClick: () => onCreateConversation(),
|
|
24409
24761
|
children: [
|
|
24410
|
-
/* @__PURE__ */
|
|
24411
|
-
/* @__PURE__ */
|
|
24762
|
+
/* @__PURE__ */ jsx30(CreateChatIcon, { "aria-hidden": "true" }),
|
|
24763
|
+
/* @__PURE__ */ jsx30("span", { children: labels.newConversation })
|
|
24412
24764
|
]
|
|
24413
24765
|
}
|
|
24414
24766
|
)
|
|
24415
24767
|
] }),
|
|
24416
24768
|
openclawGateway?.status === "starting" ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.gatewayStatus, "data-state": "starting", children: [
|
|
24417
|
-
/* @__PURE__ */
|
|
24769
|
+
/* @__PURE__ */ jsx30(
|
|
24418
24770
|
StatusDot,
|
|
24419
24771
|
{
|
|
24420
24772
|
tone: "blue",
|
|
@@ -24423,10 +24775,10 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24423
24775
|
ariaLabel: labels.openclawGatewayStarting
|
|
24424
24776
|
}
|
|
24425
24777
|
),
|
|
24426
|
-
/* @__PURE__ */
|
|
24778
|
+
/* @__PURE__ */ jsx30("span", { children: labels.openclawGatewayStarting })
|
|
24427
24779
|
] }) : openclawGateway?.status === "failed" ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.gatewayStatus, "data-state": "failed", children: [
|
|
24428
|
-
/* @__PURE__ */
|
|
24429
|
-
/* @__PURE__ */
|
|
24780
|
+
/* @__PURE__ */ jsx30("span", { children: openclawGateway.error || labels.openclawGatewayFailed }),
|
|
24781
|
+
/* @__PURE__ */ jsx30(
|
|
24430
24782
|
"button",
|
|
24431
24783
|
{
|
|
24432
24784
|
type: "button",
|
|
@@ -24436,19 +24788,19 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24436
24788
|
}
|
|
24437
24789
|
)
|
|
24438
24790
|
] }) : null,
|
|
24439
|
-
/* @__PURE__ */
|
|
24791
|
+
/* @__PURE__ */ jsx30(
|
|
24440
24792
|
ScrollArea,
|
|
24441
24793
|
{
|
|
24442
24794
|
scrollbarMode: "native",
|
|
24443
24795
|
className: "min-h-0 flex-1 [&_[data-orientation=vertical][data-slot=scroll-area-scrollbar]]:opacity-100",
|
|
24444
24796
|
viewportRef: conversationListRef,
|
|
24445
24797
|
viewportClassName: AgentGUINode_styles_default.conversationList,
|
|
24446
|
-
children: isLoadingConversations && conversations.length === 0 ? /* @__PURE__ */
|
|
24798
|
+
children: isLoadingConversations && conversations.length === 0 ? /* @__PURE__ */ jsx30(
|
|
24447
24799
|
AgentConversationListSkeleton,
|
|
24448
24800
|
{
|
|
24449
24801
|
label: labels.loadingConversations
|
|
24450
24802
|
}
|
|
24451
|
-
) : groupedConversations.length === 0 ? /* @__PURE__ */
|
|
24803
|
+
) : groupedConversations.length === 0 ? /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.emptyState, children: /* @__PURE__ */ jsx30("span", { children: conversations.length === 0 ? labels.noConversations : conversationQuery.trim() ? labels.searchNoConversations : labels.conversationUnavailable }) }) : groupedConversations.map((section, sectionIndex) => {
|
|
24452
24804
|
const projectPath = section.kind === "project" ? section.project?.path ?? "" : "";
|
|
24453
24805
|
const normalizedProjectPath = normalizeConversationRailProjectPath(projectPath);
|
|
24454
24806
|
const projectLabel = section.kind === "project" ? section.label : "";
|
|
@@ -24457,7 +24809,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24457
24809
|
const isSectionCollapsed = isProjectSection && collapsedProjectSectionIds.has(section.id);
|
|
24458
24810
|
const projectConversationCount = normalizedProjectPath ? projectConversationCountsByPath.get(normalizedProjectPath) ?? 0 : 0;
|
|
24459
24811
|
return /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
24460
|
-
showProjectRailHeader ? /* @__PURE__ */
|
|
24812
|
+
showProjectRailHeader ? /* @__PURE__ */ jsx30(
|
|
24461
24813
|
AgentGUIProjectRailHeader,
|
|
24462
24814
|
{
|
|
24463
24815
|
labels,
|
|
@@ -24465,7 +24817,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24465
24817
|
workspaceUserProjectI18n
|
|
24466
24818
|
}
|
|
24467
24819
|
) : null,
|
|
24468
|
-
/* @__PURE__ */
|
|
24820
|
+
/* @__PURE__ */ jsx30(
|
|
24469
24821
|
AgentGUIConversationRailSection,
|
|
24470
24822
|
{
|
|
24471
24823
|
activeConversationId,
|
|
@@ -24498,8 +24850,8 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24498
24850
|
})
|
|
24499
24851
|
}
|
|
24500
24852
|
),
|
|
24501
|
-
/* @__PURE__ */
|
|
24502
|
-
/* @__PURE__ */
|
|
24853
|
+
/* @__PURE__ */ jsx30("div", { className: "shrink-0 px-2 py-1.5", children: /* @__PURE__ */ jsxs17(Popover, { children: [
|
|
24854
|
+
/* @__PURE__ */ jsx30(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
|
|
24503
24855
|
Button,
|
|
24504
24856
|
{
|
|
24505
24857
|
type: "button",
|
|
@@ -24508,12 +24860,19 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24508
24860
|
title: labels.agentConfig,
|
|
24509
24861
|
disabled: previewMode,
|
|
24510
24862
|
children: [
|
|
24511
|
-
/* @__PURE__ */
|
|
24512
|
-
|
|
24863
|
+
/* @__PURE__ */ jsx30(
|
|
24864
|
+
EnvironmentLinedIcon,
|
|
24865
|
+
{
|
|
24866
|
+
"aria-hidden": "true",
|
|
24867
|
+
width: 16,
|
|
24868
|
+
height: 16
|
|
24869
|
+
}
|
|
24870
|
+
),
|
|
24871
|
+
/* @__PURE__ */ jsx30("span", { children: labels.agentConfig })
|
|
24513
24872
|
]
|
|
24514
24873
|
}
|
|
24515
24874
|
) }),
|
|
24516
|
-
/* @__PURE__ */
|
|
24875
|
+
/* @__PURE__ */ jsx30(
|
|
24517
24876
|
PopoverContent,
|
|
24518
24877
|
{
|
|
24519
24878
|
side: "top",
|
|
@@ -24523,8 +24882,8 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24523
24882
|
children: /* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-col gap-3", children: [
|
|
24524
24883
|
slashStatusLimits.length > 0 ? /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
24525
24884
|
/* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
24526
|
-
/* @__PURE__ */
|
|
24527
|
-
slashStatusLimits.map((limit) => /* @__PURE__ */
|
|
24885
|
+
/* @__PURE__ */ jsx30("span", { className: "text-[13px] font-semibold leading-4", children: labels.slashStatusLimits }),
|
|
24886
|
+
slashStatusLimits.map((limit) => /* @__PURE__ */ jsx30(
|
|
24528
24887
|
AgentUsageMeter,
|
|
24529
24888
|
{
|
|
24530
24889
|
label: limit.label,
|
|
@@ -24534,7 +24893,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24534
24893
|
limit.id
|
|
24535
24894
|
))
|
|
24536
24895
|
] }),
|
|
24537
|
-
/* @__PURE__ */
|
|
24896
|
+
/* @__PURE__ */ jsx30("span", { className: "h-px bg-[var(--border-1)]" })
|
|
24538
24897
|
] }) : null,
|
|
24539
24898
|
/* @__PURE__ */ jsxs17(
|
|
24540
24899
|
"button",
|
|
@@ -24545,8 +24904,8 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24545
24904
|
disabled: previewMode,
|
|
24546
24905
|
onClick: () => onOpenAgentEnvSetup(),
|
|
24547
24906
|
children: [
|
|
24548
|
-
/* @__PURE__ */
|
|
24549
|
-
/* @__PURE__ */
|
|
24907
|
+
/* @__PURE__ */ jsx30(Wrench, { "aria-hidden": "true", size: 16, strokeWidth: 1.8 }),
|
|
24908
|
+
/* @__PURE__ */ jsx30("span", { children: labels.agentEnvSetup })
|
|
24550
24909
|
]
|
|
24551
24910
|
}
|
|
24552
24911
|
)
|
|
@@ -24554,16 +24913,18 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24554
24913
|
}
|
|
24555
24914
|
)
|
|
24556
24915
|
] }) }),
|
|
24557
|
-
/* @__PURE__ */
|
|
24916
|
+
/* @__PURE__ */ jsx30(
|
|
24558
24917
|
ConfirmationDialog,
|
|
24559
24918
|
{
|
|
24560
24919
|
cancelLabel: labels.cancel,
|
|
24561
24920
|
className: AGENT_GUI_CONFIRMATION_DIALOG_CLASS_NAME,
|
|
24562
|
-
confirmBusy: pendingProjectAction?.kind === "batch-delete" && isDeletingProjectConversations,
|
|
24563
|
-
confirmLabel: pendingProjectAction?.kind === "batch-delete" ? labels.batchDeleteProjectSessionsConfirm : labels.removeProject,
|
|
24921
|
+
confirmBusy: (pendingProjectAction?.kind === "batch-delete" || pendingProjectAction?.kind === "batch-delete-conversations") && isDeletingProjectConversations,
|
|
24922
|
+
confirmLabel: pendingProjectAction?.kind === "batch-delete" ? labels.batchDeleteProjectSessionsConfirm : pendingProjectAction?.kind === "batch-delete-conversations" ? labels.batchDeleteConversationsConfirm : labels.removeProject,
|
|
24564
24923
|
description: pendingProjectAction?.kind === "batch-delete" ? labels.batchDeleteProjectSessionsBody(
|
|
24565
24924
|
pendingProjectAction.conversationCount,
|
|
24566
24925
|
pendingProjectAction.label
|
|
24926
|
+
) : pendingProjectAction?.kind === "batch-delete-conversations" ? labels.batchDeleteConversationsBody(
|
|
24927
|
+
pendingProjectAction.conversationCount
|
|
24567
24928
|
) : pendingProjectAction ? labels.removeProjectConfirmDescription(
|
|
24568
24929
|
pendingProjectAction.label
|
|
24569
24930
|
) : void 0,
|
|
@@ -24578,6 +24939,10 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24578
24939
|
onConfirmDeleteProjectConversations(action.path);
|
|
24579
24940
|
return;
|
|
24580
24941
|
}
|
|
24942
|
+
if (action.kind === "batch-delete-conversations") {
|
|
24943
|
+
onConfirmDeleteConversations(action.sessionIds);
|
|
24944
|
+
return;
|
|
24945
|
+
}
|
|
24581
24946
|
onRemoveProject(action.path);
|
|
24582
24947
|
},
|
|
24583
24948
|
onOpenChange: (open) => {
|
|
@@ -24587,7 +24952,7 @@ var AgentGUIConversationRailPane = memo(
|
|
|
24587
24952
|
},
|
|
24588
24953
|
open: pendingProjectAction !== null,
|
|
24589
24954
|
overlayClassName: AGENT_GUI_CONFIRMATION_DIALOG_OVERLAY_CLASS_NAME,
|
|
24590
|
-
title: pendingProjectAction?.kind === "batch-delete" ? labels.batchDeleteProjectSessionsTitle : labels.removeProjectConfirmTitle,
|
|
24955
|
+
title: pendingProjectAction?.kind === "batch-delete" ? labels.batchDeleteProjectSessionsTitle : pendingProjectAction?.kind === "batch-delete-conversations" ? labels.batchDeleteConversationsTitle : labels.removeProjectConfirmTitle,
|
|
24591
24956
|
tone: "destructive"
|
|
24592
24957
|
}
|
|
24593
24958
|
)
|
|
@@ -24671,7 +25036,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24671
25036
|
"aria-expanded": !isSectionCollapsed,
|
|
24672
25037
|
onClick: () => onToggleProjectSectionCollapsed(section.id),
|
|
24673
25038
|
children: [
|
|
24674
|
-
/* @__PURE__ */
|
|
25039
|
+
/* @__PURE__ */ jsx30(
|
|
24675
25040
|
ChevronRight2,
|
|
24676
25041
|
{
|
|
24677
25042
|
"aria-hidden": "true",
|
|
@@ -24679,20 +25044,20 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24679
25044
|
}
|
|
24680
25045
|
),
|
|
24681
25046
|
/* @__PURE__ */ jsxs17("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: [
|
|
24682
|
-
/* @__PURE__ */
|
|
25047
|
+
/* @__PURE__ */ jsx30(
|
|
24683
25048
|
FolderIcon2,
|
|
24684
25049
|
{
|
|
24685
25050
|
"aria-hidden": "true",
|
|
24686
25051
|
className: AgentGUINode_styles_default.conversationSectionLabelIcon
|
|
24687
25052
|
}
|
|
24688
25053
|
),
|
|
24689
|
-
/* @__PURE__ */
|
|
25054
|
+
/* @__PURE__ */ jsx30("span", { children: section.label })
|
|
24690
25055
|
] })
|
|
24691
25056
|
]
|
|
24692
25057
|
}
|
|
24693
|
-
) : /* @__PURE__ */
|
|
25058
|
+
) : /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.conversationSectionToggle, children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationSectionLabel, children: /* @__PURE__ */ jsx30("span", { children: section.label }) }) }),
|
|
24694
25059
|
canCreateConversationFromSection ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.conversationSectionActions, children: [
|
|
24695
|
-
previewMode ? /* @__PURE__ */
|
|
25060
|
+
previewMode ? /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap, children: /* @__PURE__ */ jsx30(
|
|
24696
25061
|
BareIconButton,
|
|
24697
25062
|
{
|
|
24698
25063
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
@@ -24700,14 +25065,14 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24700
25065
|
size: "sm",
|
|
24701
25066
|
disabled: createConversationDisabled,
|
|
24702
25067
|
onClick: handleCreateConversation,
|
|
24703
|
-
children: /* @__PURE__ */
|
|
25068
|
+
children: /* @__PURE__ */ jsx30(CreateChatIcon, { "aria-hidden": "true" })
|
|
24704
25069
|
}
|
|
24705
25070
|
) }) : /* @__PURE__ */ jsxs17(Tooltip3, { children: [
|
|
24706
|
-
/* @__PURE__ */
|
|
25071
|
+
/* @__PURE__ */ jsx30(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx30(
|
|
24707
25072
|
"span",
|
|
24708
25073
|
{
|
|
24709
25074
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
24710
|
-
children: /* @__PURE__ */
|
|
25075
|
+
children: /* @__PURE__ */ jsx30(
|
|
24711
25076
|
BareIconButton,
|
|
24712
25077
|
{
|
|
24713
25078
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
@@ -24715,12 +25080,12 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24715
25080
|
size: "sm",
|
|
24716
25081
|
disabled: createConversationDisabled,
|
|
24717
25082
|
onClick: handleCreateConversation,
|
|
24718
|
-
children: /* @__PURE__ */
|
|
25083
|
+
children: /* @__PURE__ */ jsx30(CreateChatIcon, { "aria-hidden": "true" })
|
|
24719
25084
|
}
|
|
24720
25085
|
)
|
|
24721
25086
|
}
|
|
24722
25087
|
) }),
|
|
24723
|
-
/* @__PURE__ */
|
|
25088
|
+
/* @__PURE__ */ jsx30(
|
|
24724
25089
|
TooltipContent3,
|
|
24725
25090
|
{
|
|
24726
25091
|
side: "top",
|
|
@@ -24731,37 +25096,37 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24731
25096
|
)
|
|
24732
25097
|
] }),
|
|
24733
25098
|
projectPath ? /* @__PURE__ */ jsxs17(DropdownMenu, { children: [
|
|
24734
|
-
previewMode ? /* @__PURE__ */
|
|
25099
|
+
previewMode ? /* @__PURE__ */ jsx30(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
|
|
24735
25100
|
"span",
|
|
24736
25101
|
{
|
|
24737
25102
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
24738
|
-
children: /* @__PURE__ */
|
|
25103
|
+
children: /* @__PURE__ */ jsx30(
|
|
24739
25104
|
BareIconButton,
|
|
24740
25105
|
{
|
|
24741
25106
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
24742
25107
|
"aria-label": labels.projectSectionMoreActions,
|
|
24743
25108
|
size: "sm",
|
|
24744
|
-
children: /* @__PURE__ */
|
|
25109
|
+
children: /* @__PURE__ */ jsx30(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
24745
25110
|
}
|
|
24746
25111
|
)
|
|
24747
25112
|
}
|
|
24748
25113
|
) }) : /* @__PURE__ */ jsxs17(Tooltip3, { children: [
|
|
24749
|
-
/* @__PURE__ */
|
|
25114
|
+
/* @__PURE__ */ jsx30(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx30(
|
|
24750
25115
|
"span",
|
|
24751
25116
|
{
|
|
24752
25117
|
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
24753
|
-
children: /* @__PURE__ */
|
|
25118
|
+
children: /* @__PURE__ */ jsx30(
|
|
24754
25119
|
BareIconButton,
|
|
24755
25120
|
{
|
|
24756
25121
|
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
24757
25122
|
"aria-label": labels.projectSectionMoreActions,
|
|
24758
25123
|
size: "sm",
|
|
24759
|
-
children: /* @__PURE__ */
|
|
25124
|
+
children: /* @__PURE__ */ jsx30(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
24760
25125
|
}
|
|
24761
25126
|
)
|
|
24762
25127
|
}
|
|
24763
25128
|
) }) }),
|
|
24764
|
-
/* @__PURE__ */
|
|
25129
|
+
/* @__PURE__ */ jsx30(
|
|
24765
25130
|
TooltipContent3,
|
|
24766
25131
|
{
|
|
24767
25132
|
side: "right",
|
|
@@ -24778,7 +25143,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24778
25143
|
className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
|
|
24779
25144
|
sideOffset: 6,
|
|
24780
25145
|
children: [
|
|
24781
|
-
/* @__PURE__ */
|
|
25146
|
+
/* @__PURE__ */ jsx30(
|
|
24782
25147
|
DropdownMenuItem,
|
|
24783
25148
|
{
|
|
24784
25149
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -24793,10 +25158,10 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24793
25158
|
workspaceRoot: projectPath
|
|
24794
25159
|
});
|
|
24795
25160
|
},
|
|
24796
|
-
children: /* @__PURE__ */
|
|
25161
|
+
children: /* @__PURE__ */ jsx30("span", { children: labels.projectSectionViewFiles })
|
|
24797
25162
|
}
|
|
24798
25163
|
),
|
|
24799
|
-
projectConversationCount > 0 ? /* @__PURE__ */
|
|
25164
|
+
projectConversationCount > 0 ? /* @__PURE__ */ jsx30(
|
|
24800
25165
|
DropdownMenuItem,
|
|
24801
25166
|
{
|
|
24802
25167
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -24809,10 +25174,10 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24809
25174
|
path: projectPath
|
|
24810
25175
|
});
|
|
24811
25176
|
},
|
|
24812
|
-
children: /* @__PURE__ */
|
|
25177
|
+
children: /* @__PURE__ */ jsx30("span", { children: labels.batchDeleteProjectSessions })
|
|
24813
25178
|
}
|
|
24814
25179
|
) : null,
|
|
24815
|
-
/* @__PURE__ */
|
|
25180
|
+
/* @__PURE__ */ jsx30(
|
|
24816
25181
|
DropdownMenuItem,
|
|
24817
25182
|
{
|
|
24818
25183
|
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
@@ -24824,23 +25189,88 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24824
25189
|
path: projectPath
|
|
24825
25190
|
});
|
|
24826
25191
|
},
|
|
24827
|
-
children: /* @__PURE__ */
|
|
25192
|
+
children: /* @__PURE__ */ jsx30("span", { children: labels.removeProject })
|
|
24828
25193
|
}
|
|
24829
25194
|
)
|
|
24830
25195
|
]
|
|
24831
25196
|
}
|
|
24832
25197
|
)
|
|
25198
|
+
] }) : null,
|
|
25199
|
+
!projectPath && section.kind === "conversations" && section.items.length > 0 ? /* @__PURE__ */ jsxs17(DropdownMenu, { children: [
|
|
25200
|
+
previewMode ? /* @__PURE__ */ jsx30(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(
|
|
25201
|
+
"span",
|
|
25202
|
+
{
|
|
25203
|
+
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
25204
|
+
children: /* @__PURE__ */ jsx30(
|
|
25205
|
+
BareIconButton,
|
|
25206
|
+
{
|
|
25207
|
+
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
25208
|
+
"aria-label": labels.conversationsSectionMoreActions,
|
|
25209
|
+
size: "sm",
|
|
25210
|
+
children: /* @__PURE__ */ jsx30(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
25211
|
+
}
|
|
25212
|
+
)
|
|
25213
|
+
}
|
|
25214
|
+
) }) : /* @__PURE__ */ jsxs17(Tooltip3, { children: [
|
|
25215
|
+
/* @__PURE__ */ jsx30(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx30(TooltipTrigger3, { asChild: true, children: /* @__PURE__ */ jsx30(
|
|
25216
|
+
"span",
|
|
25217
|
+
{
|
|
25218
|
+
className: AgentGUINode_styles_default.conversationSectionActionTooltipWrap,
|
|
25219
|
+
children: /* @__PURE__ */ jsx30(
|
|
25220
|
+
BareIconButton,
|
|
25221
|
+
{
|
|
25222
|
+
className: AgentGUINode_styles_default.conversationSectionMoreButton,
|
|
25223
|
+
"aria-label": labels.conversationsSectionMoreActions,
|
|
25224
|
+
size: "sm",
|
|
25225
|
+
children: /* @__PURE__ */ jsx30(MoreHorizontalIcon, { "aria-hidden": "true" })
|
|
25226
|
+
}
|
|
25227
|
+
)
|
|
25228
|
+
}
|
|
25229
|
+
) }) }),
|
|
25230
|
+
/* @__PURE__ */ jsx30(
|
|
25231
|
+
TooltipContent3,
|
|
25232
|
+
{
|
|
25233
|
+
side: "right",
|
|
25234
|
+
sideOffset: 6,
|
|
25235
|
+
className: AgentGUINode_styles_default.conversationSectionActionTooltip,
|
|
25236
|
+
children: labels.conversationsSectionMoreActions
|
|
25237
|
+
}
|
|
25238
|
+
)
|
|
25239
|
+
] }),
|
|
25240
|
+
/* @__PURE__ */ jsx30(
|
|
25241
|
+
DropdownMenuContent,
|
|
25242
|
+
{
|
|
25243
|
+
align: "end",
|
|
25244
|
+
className: `${AgentGUINode_styles_default.composerMenuContent} nodrag [-webkit-app-region:no-drag]`,
|
|
25245
|
+
sideOffset: 6,
|
|
25246
|
+
children: /* @__PURE__ */ jsx30(
|
|
25247
|
+
DropdownMenuItem,
|
|
25248
|
+
{
|
|
25249
|
+
className: `${AgentGUINode_styles_default.composerMenuItem} nodrag [-webkit-app-region:no-drag]`,
|
|
25250
|
+
onSelect: () => {
|
|
25251
|
+
setPendingProjectAction({
|
|
25252
|
+
kind: "batch-delete-conversations",
|
|
25253
|
+
conversationCount: section.items.length,
|
|
25254
|
+
label: section.label,
|
|
25255
|
+
sessionIds: section.items.map((item) => item.id)
|
|
25256
|
+
});
|
|
25257
|
+
},
|
|
25258
|
+
children: /* @__PURE__ */ jsx30("span", { children: labels.batchDeleteConversations })
|
|
25259
|
+
}
|
|
25260
|
+
)
|
|
25261
|
+
}
|
|
25262
|
+
)
|
|
24833
25263
|
] }) : null
|
|
24834
25264
|
] }) : null
|
|
24835
25265
|
] }),
|
|
24836
|
-
/* @__PURE__ */
|
|
25266
|
+
/* @__PURE__ */ jsx30(
|
|
24837
25267
|
"div",
|
|
24838
25268
|
{
|
|
24839
25269
|
className: AgentGUINode_styles_default.conversationSectionItems,
|
|
24840
25270
|
"aria-hidden": isSectionCollapsed ? "true" : void 0,
|
|
24841
25271
|
children: /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.conversationSectionItemsInner, children: [
|
|
24842
|
-
!isSectionCollapsed && section.items.length === 0 ? /* @__PURE__ */
|
|
24843
|
-
visibleItems.map((item) => /* @__PURE__ */
|
|
25272
|
+
!isSectionCollapsed && section.items.length === 0 ? /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.conversationSectionEmpty, children: labels.emptyProjectConversations }) : null,
|
|
25273
|
+
visibleItems.map((item) => /* @__PURE__ */ jsx30(
|
|
24844
25274
|
AgentGUIConversationRailItem,
|
|
24845
25275
|
{
|
|
24846
25276
|
active: item.id === activeConversationId,
|
|
@@ -24862,7 +25292,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24862
25292
|
item.id
|
|
24863
25293
|
)),
|
|
24864
25294
|
canShowMore || canShowLess ? /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.conversationSectionPagination, children: [
|
|
24865
|
-
canShowMore ? /* @__PURE__ */
|
|
25295
|
+
canShowMore ? /* @__PURE__ */ jsx30(
|
|
24866
25296
|
"button",
|
|
24867
25297
|
{
|
|
24868
25298
|
type: "button",
|
|
@@ -24871,7 +25301,7 @@ var AgentGUIConversationRailSection = memo(
|
|
|
24871
25301
|
children: labels.showMoreConversations
|
|
24872
25302
|
}
|
|
24873
25303
|
) : null,
|
|
24874
|
-
canShowLess ? /* @__PURE__ */
|
|
25304
|
+
canShowLess ? /* @__PURE__ */ jsx30(
|
|
24875
25305
|
"button",
|
|
24876
25306
|
{
|
|
24877
25307
|
type: "button",
|
|
@@ -24950,12 +25380,12 @@ var AgentGUIConversationRailItem = memo(
|
|
|
24950
25380
|
className: AgentGUINode_styles_default.conversationSelect,
|
|
24951
25381
|
onClick: handleSelect,
|
|
24952
25382
|
children: [
|
|
24953
|
-
/* @__PURE__ */
|
|
24954
|
-
/* @__PURE__ */
|
|
25383
|
+
/* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationTitle, children: conversationPlainTitle(item, labels, uiLanguage) }),
|
|
25384
|
+
/* @__PURE__ */ jsx30(ConversationMeta, { item, nowMs: currentTimeMs, labels })
|
|
24955
25385
|
]
|
|
24956
25386
|
}
|
|
24957
25387
|
),
|
|
24958
|
-
previewMode ? null : /* @__PURE__ */
|
|
25388
|
+
previewMode ? null : /* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.conversationActions, children: isPendingDeleteConversation ? /* @__PURE__ */ jsx30(
|
|
24959
25389
|
"button",
|
|
24960
25390
|
{
|
|
24961
25391
|
type: "button",
|
|
@@ -24967,10 +25397,10 @@ var AgentGUIConversationRailItem = memo(
|
|
|
24967
25397
|
event.stopPropagation();
|
|
24968
25398
|
onConfirmDeleteConversation();
|
|
24969
25399
|
},
|
|
24970
|
-
children: /* @__PURE__ */
|
|
25400
|
+
children: /* @__PURE__ */ jsx30("span", { className: AgentGUINode_styles_default.conversationDeleteConfirmText, children: labels.deleteSessionConfirm })
|
|
24971
25401
|
}
|
|
24972
25402
|
) : /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
24973
|
-
onOpenConversationWindow ? /* @__PURE__ */
|
|
25403
|
+
onOpenConversationWindow ? /* @__PURE__ */ jsx30(
|
|
24974
25404
|
BareIconButton,
|
|
24975
25405
|
{
|
|
24976
25406
|
className: AgentGUINode_styles_default.conversationOpenWindowButton,
|
|
@@ -24987,10 +25417,10 @@ var AgentGUIConversationRailItem = memo(
|
|
|
24987
25417
|
event.stopPropagation();
|
|
24988
25418
|
handleOpenConversationWindow();
|
|
24989
25419
|
},
|
|
24990
|
-
children: /* @__PURE__ */
|
|
25420
|
+
children: /* @__PURE__ */ jsx30(ExternalLink, { "aria-hidden": "true" })
|
|
24991
25421
|
}
|
|
24992
25422
|
) : null,
|
|
24993
|
-
/* @__PURE__ */
|
|
25423
|
+
/* @__PURE__ */ jsx30(
|
|
24994
25424
|
BareIconButton,
|
|
24995
25425
|
{
|
|
24996
25426
|
className: AgentGUINode_styles_default.conversationPinButton,
|
|
@@ -25007,10 +25437,10 @@ var AgentGUIConversationRailItem = memo(
|
|
|
25007
25437
|
event.stopPropagation();
|
|
25008
25438
|
handleTogglePinned();
|
|
25009
25439
|
},
|
|
25010
|
-
children: pinned ? /* @__PURE__ */
|
|
25440
|
+
children: pinned ? /* @__PURE__ */ jsx30(PinFilledIcon, { "aria-hidden": "true" }) : /* @__PURE__ */ jsx30(PinLinedIcon, { "aria-hidden": "true" })
|
|
25011
25441
|
}
|
|
25012
25442
|
),
|
|
25013
|
-
/* @__PURE__ */
|
|
25443
|
+
/* @__PURE__ */ jsx30(
|
|
25014
25444
|
BareIconButton,
|
|
25015
25445
|
{
|
|
25016
25446
|
className: AgentGUINode_styles_default.conversationDeleteButton,
|
|
@@ -25027,7 +25457,7 @@ var AgentGUIConversationRailItem = memo(
|
|
|
25027
25457
|
event.stopPropagation();
|
|
25028
25458
|
handleRequestDelete();
|
|
25029
25459
|
},
|
|
25030
|
-
children: /* @__PURE__ */
|
|
25460
|
+
children: /* @__PURE__ */ jsx30(CanvasNodeTrashLinedIcon, { "aria-hidden": "true" })
|
|
25031
25461
|
}
|
|
25032
25462
|
)
|
|
25033
25463
|
] }) })
|
|
@@ -25055,9 +25485,9 @@ function AgentGUIProjectRailHeader({
|
|
|
25055
25485
|
]
|
|
25056
25486
|
);
|
|
25057
25487
|
return /* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.projectRailHeader, children: [
|
|
25058
|
-
/* @__PURE__ */
|
|
25488
|
+
/* @__PURE__ */ jsx30("div", { className: AgentGUINode_styles_default.projectRailTitle, children: /* @__PURE__ */ jsx30("span", { children: workspaceUserProjectI18n.tFirst(["projectSelect.projectLabel"]) }) }),
|
|
25059
25489
|
/* @__PURE__ */ jsxs17("div", { className: AgentGUINode_styles_default.projectRailAddProject, children: [
|
|
25060
|
-
/* @__PURE__ */
|
|
25490
|
+
/* @__PURE__ */ jsx30(
|
|
25061
25491
|
WorkspaceUserProjectSelect2,
|
|
25062
25492
|
{
|
|
25063
25493
|
api: userProjectApi,
|
|
@@ -25087,7 +25517,7 @@ function AgentGUIProjectRailHeader({
|
|
|
25087
25517
|
"projectSelect.addProject"
|
|
25088
25518
|
])
|
|
25089
25519
|
},
|
|
25090
|
-
renderAddProjectIcon: () => /* @__PURE__ */
|
|
25520
|
+
renderAddProjectIcon: () => /* @__PURE__ */ jsx30(
|
|
25091
25521
|
NewWorkspaceLinedIcon2,
|
|
25092
25522
|
{
|
|
25093
25523
|
"aria-hidden": true,
|
|
@@ -25105,7 +25535,7 @@ function AgentGUIProjectRailHeader({
|
|
|
25105
25535
|
}
|
|
25106
25536
|
}
|
|
25107
25537
|
),
|
|
25108
|
-
/* @__PURE__ */
|
|
25538
|
+
/* @__PURE__ */ jsx30(
|
|
25109
25539
|
NewWorkspaceLinedIcon2,
|
|
25110
25540
|
{
|
|
25111
25541
|
"aria-hidden": true,
|
|
@@ -25131,16 +25561,16 @@ var AgentGUIConversationTimelinePane = memo(
|
|
|
25131
25561
|
}) {
|
|
25132
25562
|
"use memo";
|
|
25133
25563
|
return /* @__PURE__ */ jsxs17(Fragment8, { children: [
|
|
25134
|
-
isLoadingOlderMessages && !isLoading ? /* @__PURE__ */
|
|
25564
|
+
isLoadingOlderMessages && !isLoading ? /* @__PURE__ */ jsx30(
|
|
25135
25565
|
"div",
|
|
25136
25566
|
{
|
|
25137
25567
|
className: "mx-auto flex h-8 items-center justify-center text-[12px] text-[var(--text-secondary)]",
|
|
25138
25568
|
"data-testid": "agent-gui-older-messages-loading",
|
|
25139
25569
|
role: "status",
|
|
25140
|
-
children: /* @__PURE__ */
|
|
25570
|
+
children: /* @__PURE__ */ jsx30("span", { className: "tsh-inline-loading-ellipsis", children: loadingLabel })
|
|
25141
25571
|
}
|
|
25142
25572
|
) : null,
|
|
25143
|
-
/* @__PURE__ */
|
|
25573
|
+
/* @__PURE__ */ jsx30(
|
|
25144
25574
|
AgentConversationFlow,
|
|
25145
25575
|
{
|
|
25146
25576
|
conversation,
|
|
@@ -25352,7 +25782,7 @@ function appendDockProbeUsageLines(probe, lines, isLoadingUsage, t) {
|
|
|
25352
25782
|
}
|
|
25353
25783
|
|
|
25354
25784
|
// agent-gui/workspaceDesktop/view/AgentProbeInfoPopover.tsx
|
|
25355
|
-
import { Info as
|
|
25785
|
+
import { Info as Info3 } from "lucide-react";
|
|
25356
25786
|
import {
|
|
25357
25787
|
useCallback as useCallback12,
|
|
25358
25788
|
useEffect as useEffect13,
|
|
@@ -25361,7 +25791,7 @@ import {
|
|
|
25361
25791
|
useState as useState13
|
|
25362
25792
|
} from "react";
|
|
25363
25793
|
import { createPortal as createPortal4 } from "react-dom";
|
|
25364
|
-
import { Fragment as Fragment9, jsx as
|
|
25794
|
+
import { Fragment as Fragment9, jsx as jsx31, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
25365
25795
|
var POPOVER_MIN_VIEWPORT_INSET_PX = 16;
|
|
25366
25796
|
var POPOVER_DEFAULT_WIDTH_PX = 260;
|
|
25367
25797
|
function dockAgentProbeLineKey(line) {
|
|
@@ -25375,7 +25805,7 @@ function renderDockAgentProbeLine(line) {
|
|
|
25375
25805
|
line.primary,
|
|
25376
25806
|
line.secondary ? /* @__PURE__ */ jsxs18(Fragment9, { children: [
|
|
25377
25807
|
" ",
|
|
25378
|
-
/* @__PURE__ */
|
|
25808
|
+
/* @__PURE__ */ jsx31("span", { className: "desktop-dock-popup__agent-status-secondary", children: line.secondary })
|
|
25379
25809
|
] }) : null
|
|
25380
25810
|
] });
|
|
25381
25811
|
}
|
|
@@ -25452,7 +25882,7 @@ function AgentProbeInfoPopover({
|
|
|
25452
25882
|
if (lines.length === 0) {
|
|
25453
25883
|
return null;
|
|
25454
25884
|
}
|
|
25455
|
-
const popover = /* @__PURE__ */
|
|
25885
|
+
const popover = /* @__PURE__ */ jsx31(
|
|
25456
25886
|
"div",
|
|
25457
25887
|
{
|
|
25458
25888
|
ref: popoverRef,
|
|
@@ -25461,7 +25891,7 @@ function AgentProbeInfoPopover({
|
|
|
25461
25891
|
style: popoverStyle ?? void 0,
|
|
25462
25892
|
onMouseEnter: () => setIsOpen(true),
|
|
25463
25893
|
onMouseLeave: closeIfPointerLeavesPopover,
|
|
25464
|
-
children: /* @__PURE__ */
|
|
25894
|
+
children: /* @__PURE__ */ jsx31("ul", { className: "desktop-dock-popup__agent-info-list", children: lines.map((line) => {
|
|
25465
25895
|
const label = getDockAgentProbeLineLabel(line);
|
|
25466
25896
|
const valueText = formatDockAgentProbeLineText(line);
|
|
25467
25897
|
return /* @__PURE__ */ jsxs18(
|
|
@@ -25470,8 +25900,8 @@ function AgentProbeInfoPopover({
|
|
|
25470
25900
|
className: "desktop-dock-popup__agent-info-item",
|
|
25471
25901
|
"data-has-label": label ? "true" : "false",
|
|
25472
25902
|
children: [
|
|
25473
|
-
label ? /* @__PURE__ */
|
|
25474
|
-
/* @__PURE__ */
|
|
25903
|
+
label ? /* @__PURE__ */ jsx31("span", { className: "desktop-dock-popup__agent-info-label", children: label }) : null,
|
|
25904
|
+
/* @__PURE__ */ jsx31(
|
|
25475
25905
|
"span",
|
|
25476
25906
|
{
|
|
25477
25907
|
className: "desktop-dock-popup__agent-info-value",
|
|
@@ -25506,7 +25936,7 @@ function AgentProbeInfoPopover({
|
|
|
25506
25936
|
},
|
|
25507
25937
|
onBlur: () => setIsOpen(false),
|
|
25508
25938
|
children: [
|
|
25509
|
-
/* @__PURE__ */
|
|
25939
|
+
/* @__PURE__ */ jsx31(Info3, { size: 15, strokeWidth: 2.1, "aria-hidden": "true" }),
|
|
25510
25940
|
isOpen ? createPortal4(popover, document.body) : null
|
|
25511
25941
|
]
|
|
25512
25942
|
}
|
|
@@ -25649,7 +26079,7 @@ function getAgentHostManagedToolchainAgentByName(name) {
|
|
|
25649
26079
|
}
|
|
25650
26080
|
|
|
25651
26081
|
// agent-gui/agentGuiNode/AgentGUINode.tsx
|
|
25652
|
-
import { jsx as
|
|
26082
|
+
import { jsx as jsx32, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
25653
26083
|
var workspaceFileReferenceLocaleKeyByPickerKey = {
|
|
25654
26084
|
"actions.cancel": "common.cancel",
|
|
25655
26085
|
"referencePicker.confirm": "agentHost.agentGui.referencePicker.confirm",
|
|
@@ -26073,13 +26503,10 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26073
26503
|
const displayProviderLabel = viewModel.activeConversation ? resolveAgentGUIProviderDisplayLabel(activeProvider, fallbackAgentTitle) : selectedProviderTargetLabel;
|
|
26074
26504
|
const windowAgentTitle = viewModel.activeConversation ? getAgentHostManagedToolchainAgentByName(activeProvider)?.label ?? displayProviderLabel : displayProviderLabel;
|
|
26075
26505
|
const activeConversationDockTitle = viewModel.activeConversation ? resolveAgentGUIDockConversationTitle(viewModel.activeConversation) : null;
|
|
26076
|
-
const activeConversationWindowTitle = viewModel.activeConversation ?
|
|
26077
|
-
|
|
26078
|
-
|
|
26079
|
-
|
|
26080
|
-
),
|
|
26081
|
-
{ language: locale }
|
|
26082
|
-
) : null;
|
|
26506
|
+
const activeConversationWindowTitle = viewModel.activeConversation ? formatAgentGUIConversationPlainTitle(viewModel.activeConversation, {
|
|
26507
|
+
fallbackAgentLabel: fallbackAgentTitle,
|
|
26508
|
+
language: locale
|
|
26509
|
+
}) : null;
|
|
26083
26510
|
const labels = useMemo11(
|
|
26084
26511
|
() => ({
|
|
26085
26512
|
initialPlaceholder: t("agentHost.agentGui.initialPlaceholder", {
|
|
@@ -26254,6 +26681,21 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26254
26681
|
batchDeleteProjectSessionsConfirm: t(
|
|
26255
26682
|
"agentHost.agentGui.batchDeleteProjectSessionsConfirm"
|
|
26256
26683
|
),
|
|
26684
|
+
conversationsSectionMoreActions: t(
|
|
26685
|
+
"agentHost.agentGui.conversationsSectionMoreActions"
|
|
26686
|
+
),
|
|
26687
|
+
batchDeleteConversations: t(
|
|
26688
|
+
"agentHost.agentGui.batchDeleteConversations"
|
|
26689
|
+
),
|
|
26690
|
+
batchDeleteConversationsTitle: t(
|
|
26691
|
+
"agentHost.agentGui.batchDeleteConversationsTitle"
|
|
26692
|
+
),
|
|
26693
|
+
batchDeleteConversationsBody: (count) => t("agentHost.agentGui.batchDeleteConversationsBody", {
|
|
26694
|
+
count
|
|
26695
|
+
}),
|
|
26696
|
+
batchDeleteConversationsConfirm: t(
|
|
26697
|
+
"agentHost.agentGui.batchDeleteConversationsConfirm"
|
|
26698
|
+
),
|
|
26257
26699
|
approvalRequired: t("agentHost.agentGui.approvalRequired", {
|
|
26258
26700
|
provider: displayProviderLabel
|
|
26259
26701
|
}),
|
|
@@ -26411,6 +26853,46 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26411
26853
|
"agentHost.agentGui.slashPaletteConnectorsGroup"
|
|
26412
26854
|
),
|
|
26413
26855
|
slashPaletteMcpGroup: t("agentHost.agentGui.slashPaletteMcpGroup"),
|
|
26856
|
+
slashCommandCompactLabel: t(
|
|
26857
|
+
"agentHost.agentGui.slashCommandCompactLabel"
|
|
26858
|
+
),
|
|
26859
|
+
slashCommandContextLabel: t(
|
|
26860
|
+
"agentHost.agentGui.slashCommandContextLabel"
|
|
26861
|
+
),
|
|
26862
|
+
slashCommandFastLabel: t("agentHost.agentGui.slashCommandFastLabel"),
|
|
26863
|
+
slashCommandGoalLabel: t("agentHost.agentGui.slashCommandGoalLabel"),
|
|
26864
|
+
slashCommandInitLabel: t("agentHost.agentGui.slashCommandInitLabel"),
|
|
26865
|
+
slashCommandPlanLabel: t("agentHost.agentGui.slashCommandPlanLabel"),
|
|
26866
|
+
slashCommandReviewLabel: t("agentHost.agentGui.slashCommandReviewLabel"),
|
|
26867
|
+
slashCommandStatusLabel: t("agentHost.agentGui.slashCommandStatusLabel"),
|
|
26868
|
+
slashCommandUsageLabel: t("agentHost.agentGui.slashCommandUsageLabel"),
|
|
26869
|
+
slashCommandCompactDescription: t(
|
|
26870
|
+
"agentHost.agentGui.slashCommandCompactDescription"
|
|
26871
|
+
),
|
|
26872
|
+
slashCommandContextDescription: t(
|
|
26873
|
+
"agentHost.agentGui.slashCommandContextDescription"
|
|
26874
|
+
),
|
|
26875
|
+
slashCommandFastDescription: t(
|
|
26876
|
+
"agentHost.agentGui.slashCommandFastDescription"
|
|
26877
|
+
),
|
|
26878
|
+
slashCommandGoalDescription: t(
|
|
26879
|
+
"agentHost.agentGui.slashCommandGoalDescription"
|
|
26880
|
+
),
|
|
26881
|
+
slashCommandInitDescription: t(
|
|
26882
|
+
"agentHost.agentGui.slashCommandInitDescription"
|
|
26883
|
+
),
|
|
26884
|
+
slashCommandPlanDescription: t(
|
|
26885
|
+
"agentHost.agentGui.slashCommandPlanDescription"
|
|
26886
|
+
),
|
|
26887
|
+
slashCommandReviewDescription: t(
|
|
26888
|
+
"agentHost.agentGui.slashCommandReviewDescription"
|
|
26889
|
+
),
|
|
26890
|
+
slashCommandStatusDescription: t(
|
|
26891
|
+
"agentHost.agentGui.slashCommandStatusDescription"
|
|
26892
|
+
),
|
|
26893
|
+
slashCommandUsageDescription: t(
|
|
26894
|
+
"agentHost.agentGui.slashCommandUsageDescription"
|
|
26895
|
+
),
|
|
26414
26896
|
browserUseCapabilityLabel: t(
|
|
26415
26897
|
"agentHost.agentGui.browserUseCapabilityLabel"
|
|
26416
26898
|
),
|
|
@@ -26575,13 +27057,13 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26575
27057
|
onAgentProbeDemandChange(null, probeSourceId);
|
|
26576
27058
|
};
|
|
26577
27059
|
}, [activeProbeProvider, nodeId, onAgentProbeDemandChange, previewMode]);
|
|
26578
|
-
return /* @__PURE__ */
|
|
27060
|
+
return /* @__PURE__ */ jsx32(
|
|
26579
27061
|
WorkspaceNodeWindow,
|
|
26580
27062
|
{
|
|
26581
27063
|
nodeId,
|
|
26582
27064
|
kind: "agentGui",
|
|
26583
27065
|
title: windowTitle,
|
|
26584
|
-
titleIcon: windowTitleIconUrl ? /* @__PURE__ */
|
|
27066
|
+
titleIcon: windowTitleIconUrl ? /* @__PURE__ */ jsx32(
|
|
26585
27067
|
"img",
|
|
26586
27068
|
{
|
|
26587
27069
|
src: windowTitleIconUrl,
|
|
@@ -26602,7 +27084,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26602
27084
|
bodyClassName: `${AgentGUINode_styles_default.shell} nodrag size-full min-h-0 min-w-0 !bg-transparent p-0`,
|
|
26603
27085
|
hideHeader: embedded,
|
|
26604
27086
|
titleAccessory: /* @__PURE__ */ jsxs19("span", { className: "inline-flex flex-none items-center gap-1", children: [
|
|
26605
|
-
/* @__PURE__ */
|
|
27087
|
+
/* @__PURE__ */ jsx32(
|
|
26606
27088
|
AgentProbeInfoPopover,
|
|
26607
27089
|
{
|
|
26608
27090
|
lines: agentProbeLines,
|
|
@@ -26610,7 +27092,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26610
27092
|
className: AgentGUINode_styles_default.windowAgentInfo
|
|
26611
27093
|
}
|
|
26612
27094
|
),
|
|
26613
|
-
/* @__PURE__ */
|
|
27095
|
+
/* @__PURE__ */ jsx32(
|
|
26614
27096
|
CanvasNodeGhostIconButton,
|
|
26615
27097
|
{
|
|
26616
27098
|
"aria-label": isConversationRailCollapsed ? t("agentHost.agentGui.expandConversationRail") : t("agentHost.agentGui.collapseConversationRail"),
|
|
@@ -26622,7 +27104,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26622
27104
|
event.stopPropagation();
|
|
26623
27105
|
handleConversationRailToggle();
|
|
26624
27106
|
},
|
|
26625
|
-
children: /* @__PURE__ */
|
|
27107
|
+
children: /* @__PURE__ */ jsx32(
|
|
26626
27108
|
CanvasNodePanelLinedIcon,
|
|
26627
27109
|
{
|
|
26628
27110
|
width: 18,
|
|
@@ -26643,7 +27125,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26643
27125
|
children: (renderFrame) => {
|
|
26644
27126
|
const renderedWidth = renderFrame.size.width;
|
|
26645
27127
|
const isRenderedConversationRailCollapsed = isConversationRailCollapsed || shouldAutoCollapseAgentGUIConversationRail(renderedWidth);
|
|
26646
|
-
return /* @__PURE__ */
|
|
27128
|
+
return /* @__PURE__ */ jsx32(
|
|
26647
27129
|
AgentGUINodeView,
|
|
26648
27130
|
{
|
|
26649
27131
|
viewModel,
|
|
@@ -26693,7 +27175,7 @@ var AgentGUINode = memo2(function AgentGUINode2({
|
|
|
26693
27175
|
}, areAgentGUINodePropsEqual);
|
|
26694
27176
|
|
|
26695
27177
|
// AgentGUI.tsx
|
|
26696
|
-
import { jsx as
|
|
27178
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
26697
27179
|
var AgentGUI = memo3(function AgentGUI2({
|
|
26698
27180
|
agentActivityRuntime,
|
|
26699
27181
|
agentHostApi,
|
|
@@ -26701,15 +27183,15 @@ var AgentGUI = memo3(function AgentGUI2({
|
|
|
26701
27183
|
locale,
|
|
26702
27184
|
...props
|
|
26703
27185
|
}) {
|
|
26704
|
-
const content = /* @__PURE__ */
|
|
27186
|
+
const content = /* @__PURE__ */ jsx33(AgentGuiI18nProvider, { runtime: i18n, locale, children: /* @__PURE__ */ jsx33(
|
|
26705
27187
|
AgentActivityHostProvider,
|
|
26706
27188
|
{
|
|
26707
27189
|
agentActivityRuntime,
|
|
26708
27190
|
agentHostApi,
|
|
26709
|
-
children: /* @__PURE__ */
|
|
27191
|
+
children: /* @__PURE__ */ jsx33(AgentGUINode, { ...props })
|
|
26710
27192
|
}
|
|
26711
27193
|
) });
|
|
26712
|
-
return props.previewMode ? content : /* @__PURE__ */
|
|
27194
|
+
return props.previewMode ? content : /* @__PURE__ */ jsx33(TooltipProvider3, { delayDuration: 120, skipDelayDuration: 0, children: content });
|
|
26713
27195
|
});
|
|
26714
27196
|
|
|
26715
27197
|
// index.ts
|