@tutti-os/agent-gui 0.0.79 → 0.0.81
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 -5
- package/dist/agent-message-center/index.js +7 -7
- package/dist/{chunk-U6AZ3XQS.js → chunk-4SARLGMK.js} +3 -4
- package/dist/chunk-4SARLGMK.js.map +1 -0
- package/dist/{chunk-GZX2SGAG.js → chunk-5BFYTHJB.js} +2 -2
- package/dist/{chunk-4TNM6ZEC.js → chunk-5WZEOARY.js} +3 -1
- package/dist/chunk-5WZEOARY.js.map +1 -0
- package/dist/{chunk-3B3KPQ4Y.js → chunk-7BMLQJMI.js} +3 -3
- package/dist/{chunk-M6FZ2YIR.js → chunk-AIYGF64O.js} +2 -2
- package/dist/{chunk-5CLGEUWK.js → chunk-PGQ3RUPL.js} +2 -2
- package/dist/{chunk-MNESUMOS.js → chunk-PVLUSXH5.js} +2 -2
- package/dist/{chunk-WIRYWLAI.js → chunk-RAFZ2LKU.js} +4 -4
- package/dist/{chunk-YWQHNFYA.js → chunk-T56L2H2H.js} +2 -2
- package/dist/{chunk-KELYWKTC.js → chunk-YXFKEOEI.js} +2 -2
- package/dist/{chunk-QDKD6RNC.js → chunk-Z6YBAL2O.js} +4 -4
- package/dist/{chunk-52GTPN7X.js → chunk-Z7KHS6LK.js} +2 -2
- package/dist/context-mention-palette/index.js +6 -6
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.js +109 -49
- package/dist/index.js.map +1 -1
- package/dist/workbench/contribution.js +1 -1
- package/dist/workbench/index.js +4 -4
- package/dist/workbench/sessionTitle.js +3 -3
- package/dist/workspace-agent-generated-files.js +3 -3
- package/package.json +12 -12
- package/dist/chunk-4TNM6ZEC.js.map +0 -1
- package/dist/chunk-U6AZ3XQS.js.map +0 -1
- /package/dist/{chunk-GZX2SGAG.js.map → chunk-5BFYTHJB.js.map} +0 -0
- /package/dist/{chunk-3B3KPQ4Y.js.map → chunk-7BMLQJMI.js.map} +0 -0
- /package/dist/{chunk-M6FZ2YIR.js.map → chunk-AIYGF64O.js.map} +0 -0
- /package/dist/{chunk-5CLGEUWK.js.map → chunk-PGQ3RUPL.js.map} +0 -0
- /package/dist/{chunk-MNESUMOS.js.map → chunk-PVLUSXH5.js.map} +0 -0
- /package/dist/{chunk-WIRYWLAI.js.map → chunk-RAFZ2LKU.js.map} +0 -0
- /package/dist/{chunk-YWQHNFYA.js.map → chunk-T56L2H2H.js.map} +0 -0
- /package/dist/{chunk-KELYWKTC.js.map → chunk-YXFKEOEI.js.map} +0 -0
- /package/dist/{chunk-QDKD6RNC.js.map → chunk-Z6YBAL2O.js.map} +0 -0
- /package/dist/{chunk-52GTPN7X.js.map → chunk-Z7KHS6LK.js.map} +0 -0
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
AgentGUIConversation_styles_default,
|
|
8
8
|
MessageSquareMoreIcon,
|
|
9
9
|
extractAgentMcpToolTarget
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PGQ3RUPL.js";
|
|
11
11
|
import {
|
|
12
12
|
getOptionalAgentHostApi,
|
|
13
13
|
useOptionalAgentHostApi
|
|
14
14
|
} from "./chunk-RIRFNGPB.js";
|
|
15
15
|
import {
|
|
16
16
|
translate
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-T56L2H2H.js";
|
|
18
18
|
|
|
19
19
|
// shared/agentConversation/approvalOptionPresentation.ts
|
|
20
20
|
function approvalOptionDisplayLabel(option, intent = {}) {
|
|
@@ -1172,4 +1172,4 @@ export {
|
|
|
1172
1172
|
isPromptRequestIdTitle,
|
|
1173
1173
|
AgentInteractivePromptSurface
|
|
1174
1174
|
};
|
|
1175
|
-
//# sourceMappingURL=chunk-
|
|
1175
|
+
//# sourceMappingURL=chunk-7BMLQJMI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
translateInUiLanguage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5WZEOARY.js";
|
|
4
4
|
import {
|
|
5
5
|
normalizeAgentTitleText
|
|
6
6
|
} from "./chunk-GCBDIQDX.js";
|
|
@@ -322,4 +322,4 @@ export {
|
|
|
322
322
|
resolveAgentGUIProviderDisplayLabel,
|
|
323
323
|
firstAgentGUIUserMessageTitle
|
|
324
324
|
};
|
|
325
|
-
//# sourceMappingURL=chunk-
|
|
325
|
+
//# sourceMappingURL=chunk-AIYGF64O.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
translate,
|
|
9
9
|
useTranslation
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T56L2H2H.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveAgentWorkspaceFileVisualKind
|
|
13
13
|
} from "./chunk-PJP5BUU6.js";
|
|
@@ -3845,4 +3845,4 @@ export {
|
|
|
3845
3845
|
CustomScrollArea,
|
|
3846
3846
|
MessageSquareMoreIcon
|
|
3847
3847
|
};
|
|
3848
|
-
//# sourceMappingURL=chunk-
|
|
3848
|
+
//# sourceMappingURL=chunk-PGQ3RUPL.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
formatAgentSessionMentionText,
|
|
5
5
|
normalizeAgentGUIProviderIdentity,
|
|
6
6
|
resolveAgentGUIExplicitConversationTitle
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AIYGF64O.js";
|
|
8
8
|
|
|
9
9
|
// workbench/sessionTitle.ts
|
|
10
10
|
function formatAgentGuiSessionPlainTitle(title, options = {}) {
|
|
@@ -96,4 +96,4 @@ export {
|
|
|
96
96
|
formatAgentGuiConversationPlainTitle,
|
|
97
97
|
resolveAgentGuiWorkbenchSessionTitle
|
|
98
98
|
};
|
|
99
|
-
//# sourceMappingURL=chunk-
|
|
99
|
+
//# sourceMappingURL=chunk-PVLUSXH5.js.map
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
resolveWorkspaceFilePathCandidate,
|
|
16
16
|
resolveWorkspaceLinkAction,
|
|
17
17
|
useAgentTargetPresentations
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PGQ3RUPL.js";
|
|
19
19
|
import {
|
|
20
20
|
classifyFailedAgentMessage,
|
|
21
21
|
openAgentEnvPanel,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
formatAgentMentionMarkdown,
|
|
29
29
|
mentionItemToAttrs,
|
|
30
30
|
parseAgentMentionMarkdown
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-YXFKEOEI.js";
|
|
32
32
|
import {
|
|
33
33
|
fileChangeCountFromChanges,
|
|
34
34
|
fileChangeEntriesFromChanges,
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
import {
|
|
46
46
|
getActiveUiLanguage,
|
|
47
47
|
translate
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-T56L2H2H.js";
|
|
49
49
|
|
|
50
50
|
// agent-gui/agentGuiNode/model/agentGuiNodeTypes.ts
|
|
51
51
|
var AGENT_PASTED_TEXT_BLOCK_KIND = "pasted-text";
|
|
@@ -15479,4 +15479,4 @@ export {
|
|
|
15479
15479
|
AgentConversationFlow,
|
|
15480
15480
|
useProjectedAgentConversation
|
|
15481
15481
|
};
|
|
15482
|
-
//# sourceMappingURL=chunk-
|
|
15482
|
+
//# sourceMappingURL=chunk-RAFZ2LKU.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
setCurrentAgentGuiI18nRuntime,
|
|
7
7
|
translate,
|
|
8
8
|
translateInUiLanguage
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5WZEOARY.js";
|
|
10
10
|
|
|
11
11
|
// i18n/index.ts
|
|
12
12
|
import React, {
|
|
@@ -68,4 +68,4 @@ export {
|
|
|
68
68
|
AgentGuiI18nProvider,
|
|
69
69
|
useTranslation
|
|
70
70
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
71
|
+
//# sourceMappingURL=chunk-T56L2H2H.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
translate,
|
|
11
11
|
useTranslation
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-T56L2H2H.js";
|
|
13
13
|
|
|
14
14
|
// agent-gui/agentGuiNode/agentRichText/agentFileMentionExtension.ts
|
|
15
15
|
import { mergeAttributes, Node } from "@tiptap/core";
|
|
@@ -1568,4 +1568,4 @@ export {
|
|
|
1568
1568
|
mentionItemToAttrs,
|
|
1569
1569
|
attrsToMentionItem
|
|
1570
1570
|
};
|
|
1571
|
-
//# sourceMappingURL=chunk-
|
|
1571
|
+
//# sourceMappingURL=chunk-YXFKEOEI.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
userAvatarPlaceholderUrl,
|
|
3
3
|
workspaceAgentActivityStatusLabel
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5BFYTHJB.js";
|
|
5
5
|
import {
|
|
6
6
|
normalizeAgentSessionMentionTitle
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YXFKEOEI.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveAgentMentionFileThumbnailUrl,
|
|
10
10
|
resolveAgentMentionFileVisualKind
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-RIRFNGPB.js";
|
|
16
16
|
import {
|
|
17
17
|
translate
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-T56L2H2H.js";
|
|
19
19
|
import {
|
|
20
20
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
21
21
|
} from "./chunk-JM24HADP.js";
|
|
@@ -2195,4 +2195,4 @@ export {
|
|
|
2195
2195
|
AgentFileMentionPalette,
|
|
2196
2196
|
AgentContextMentionPalette
|
|
2197
2197
|
};
|
|
2198
|
-
//# sourceMappingURL=chunk-
|
|
2198
|
+
//# sourceMappingURL=chunk-Z6YBAL2O.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
translate,
|
|
14
14
|
translateInUiLanguage
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-T56L2H2H.js";
|
|
16
16
|
import {
|
|
17
17
|
normalizeAgentTitleText
|
|
18
18
|
} from "./chunk-GCBDIQDX.js";
|
|
@@ -826,4 +826,4 @@ export {
|
|
|
826
826
|
resolveWorkspaceAgentActivityStatus,
|
|
827
827
|
resolveWorkspaceAgentActivityTitle
|
|
828
828
|
};
|
|
829
|
-
//# sourceMappingURL=chunk-
|
|
829
|
+
//# sourceMappingURL=chunk-Z7KHS6LK.js.map
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
AgentMentionSearchController,
|
|
5
5
|
flattenAgentMentionPaletteEntries,
|
|
6
6
|
groupStartKeys
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-Z6YBAL2O.js";
|
|
8
|
+
import "../chunk-Z7KHS6LK.js";
|
|
9
|
+
import "../chunk-5BFYTHJB.js";
|
|
10
10
|
import "../chunk-IBIMGLCD.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-YXFKEOEI.js";
|
|
12
12
|
import "../chunk-Y35GDLP2.js";
|
|
13
13
|
import "../chunk-LUGELG5V.js";
|
|
14
14
|
import "../chunk-RIRFNGPB.js";
|
|
15
15
|
import "../chunk-4HP6V2YA.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-T56L2H2H.js";
|
|
17
17
|
import "../chunk-PJP5BUU6.js";
|
|
18
18
|
import "../chunk-SYWMKIRW.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-5WZEOARY.js";
|
|
20
20
|
import {
|
|
21
21
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
22
22
|
} from "../chunk-JM24HADP.js";
|
package/dist/i18n/index.d.ts
CHANGED
|
@@ -2459,6 +2459,7 @@ declare const agentGuiI18nResources: {
|
|
|
2459
2459
|
readonly agentLaunchFailed: "Agent launch failed: {{message}}";
|
|
2460
2460
|
readonly agentResumeFailed: "Agent resume failed: {{message}}";
|
|
2461
2461
|
readonly agentProviderSessionNotFound: "This session history is still available, but the underlying provider session can no longer be restored.";
|
|
2462
|
+
readonly agentTargetRemoved: "This agent no longer exists or has been removed. Its conversation history stays available to read.";
|
|
2462
2463
|
readonly agentResumeSessionNotLocal: "This session cannot be resumed on this device. Start a new session and @this session to keep going.";
|
|
2463
2464
|
readonly agentSettingsRequireNewSession: "This model can only be used in a new session to preserve context.";
|
|
2464
2465
|
readonly agentPermissionModeAppliesNextTurn: "Permission mode will apply starting with your next message.";
|
|
@@ -4923,6 +4924,7 @@ declare const agentGuiI18nResources: {
|
|
|
4923
4924
|
readonly agentLaunchFailed: "Agent 启动失败:{{message}}";
|
|
4924
4925
|
readonly agentResumeFailed: "Agent 继续失败:{{message}}";
|
|
4925
4926
|
readonly agentProviderSessionNotFound: "这条会话历史仍可查看,但底层 Provider 会话已经无法恢复。";
|
|
4927
|
+
readonly agentTargetRemoved: "该 agent 不存在或已被移除,历史会话记录仍可查看。";
|
|
4926
4928
|
readonly agentResumeSessionNotLocal: "这个会话没法在当前设备里直接恢复,你可以在新会话里 @这段对话,接着继续聊。";
|
|
4927
4929
|
readonly agentSettingsRequireNewSession: "为了保留上下文,这个模型只能在新会话中使用";
|
|
4928
4930
|
readonly agentPermissionModeAppliesNextTurn: "权限模式将从你的下一条消息开始生效。";
|
package/dist/i18n/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveAgentGuiSessionProviderFlatIconUrl,
|
|
12
12
|
resolveNextAgentGUIConversationRailWidthPx,
|
|
13
13
|
shouldAutoCollapseAgentGUIConversationRail
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4SARLGMK.js";
|
|
15
15
|
import {
|
|
16
16
|
agentGUIDefaultTargetProviders,
|
|
17
17
|
agentGUIProviderTargetRefsEqual,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
AgentInteractivePromptSurface,
|
|
34
34
|
approvalOptionDisplayLabel
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-7BMLQJMI.js";
|
|
36
36
|
import {
|
|
37
37
|
PLAN_IMPLEMENTATION_ACTION_FEEDBACK,
|
|
38
38
|
PLAN_IMPLEMENTATION_ACTION_IMPLEMENT,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
resolveAgentGUIExplicitConversationTitle,
|
|
52
52
|
resolveAgentGUIProviderDisplayLabel,
|
|
53
53
|
resolveAgentGUIProviderIdentity
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-AIYGF64O.js";
|
|
55
55
|
import {
|
|
56
56
|
AGENT_PASTED_TEXT_BLOCK_KIND,
|
|
57
57
|
AGENT_PASTED_TEXT_MENTION_KIND,
|
|
@@ -88,14 +88,14 @@ import {
|
|
|
88
88
|
textPromptContent,
|
|
89
89
|
toLocalShortDateTime,
|
|
90
90
|
useProjectedAgentConversation
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-RAFZ2LKU.js";
|
|
92
92
|
import {
|
|
93
93
|
AgentMessageMarkdown,
|
|
94
94
|
AgentTargetPresentationProvider,
|
|
95
95
|
ZoomableImage,
|
|
96
96
|
cn,
|
|
97
97
|
resolveWorkspaceLinkAction
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-PGQ3RUPL.js";
|
|
99
99
|
import {
|
|
100
100
|
openAgentEnvPanel
|
|
101
101
|
} from "./chunk-PSLAWU25.js";
|
|
@@ -106,12 +106,12 @@ import {
|
|
|
106
106
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
107
107
|
agentMentionItemKey,
|
|
108
108
|
preloadAgentMentionBrowse
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-Z6YBAL2O.js";
|
|
110
110
|
import {
|
|
111
111
|
buildWorkspaceAgentActivityListViewModel,
|
|
112
112
|
isWorkspaceAgentUntitledTask
|
|
113
|
-
} from "./chunk-
|
|
114
|
-
import "./chunk-
|
|
113
|
+
} from "./chunk-Z7KHS6LK.js";
|
|
114
|
+
import "./chunk-5BFYTHJB.js";
|
|
115
115
|
import {
|
|
116
116
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
117
117
|
} from "./chunk-IBIMGLCD.js";
|
|
@@ -125,7 +125,7 @@ import {
|
|
|
125
125
|
mentionItemToAttrs,
|
|
126
126
|
normalizeAgentSessionMentionTitle,
|
|
127
127
|
parseMentionItemFromHref
|
|
128
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-YXFKEOEI.js";
|
|
129
129
|
import "./chunk-Y35GDLP2.js";
|
|
130
130
|
import "./chunk-LUGELG5V.js";
|
|
131
131
|
import {
|
|
@@ -166,14 +166,14 @@ import {
|
|
|
166
166
|
agentGuiI18nResources,
|
|
167
167
|
translate,
|
|
168
168
|
useTranslation
|
|
169
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-T56L2H2H.js";
|
|
170
170
|
import "./chunk-PJP5BUU6.js";
|
|
171
171
|
import {
|
|
172
172
|
agentColorfulUrl,
|
|
173
173
|
cursorColorfulUrl,
|
|
174
174
|
normalizeManagedAgentProvider
|
|
175
175
|
} from "./chunk-SYWMKIRW.js";
|
|
176
|
-
import "./chunk-
|
|
176
|
+
import "./chunk-5WZEOARY.js";
|
|
177
177
|
import {
|
|
178
178
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
179
179
|
} from "./chunk-JM24HADP.js";
|
|
@@ -6758,36 +6758,27 @@ function composerDefaultsPatchFromSettings(touched, finalSettings) {
|
|
|
6758
6758
|
}
|
|
6759
6759
|
function composerTargetDataFromProviderTarget(input) {
|
|
6760
6760
|
const agentTargetId = normalizeOptionalText2(input.target.agentTargetId);
|
|
6761
|
-
const useLegacyProviderTargetRef = !agentTargetId && input.isExplicit;
|
|
6762
|
-
const providerTargetId = useLegacyProviderTargetRef ? input.target.targetId : null;
|
|
6763
|
-
const providerTargetRef = useLegacyProviderTargetRef ? input.target.ref : null;
|
|
6764
6761
|
const currentAgentTargetId = normalizeOptionalText2(
|
|
6765
6762
|
input.current.agentTargetId
|
|
6766
6763
|
);
|
|
6767
|
-
const
|
|
6768
|
-
input.current.providerTargetId
|
|
6769
|
-
);
|
|
6770
|
-
const canPromoteLegacyComposerOverrides = agentTargetId !== null && currentAgentTargetId === null && currentProviderTargetId === null && input.current.providerTargetRef == null && input.current.provider === input.target.provider && input.current.composerOverrides != null && !input.current.composerOverridesByAgentTargetId?.[agentTargetId];
|
|
6764
|
+
const canPromoteLegacyComposerOverrides = agentTargetId !== null && currentAgentTargetId === null && normalizeOptionalText2(input.current.providerTargetId) === null && input.current.providerTargetRef == null && input.current.provider === input.target.provider && input.current.composerOverrides != null && !input.current.composerOverridesByAgentTargetId?.[agentTargetId];
|
|
6771
6765
|
const composerOverridesByAgentTargetId = canPromoteLegacyComposerOverrides ? {
|
|
6772
6766
|
...input.current.composerOverridesByAgentTargetId ?? {},
|
|
6773
6767
|
[agentTargetId]: input.current.composerOverrides
|
|
6774
6768
|
} : input.current.composerOverridesByAgentTargetId;
|
|
6775
|
-
const currentTargetIdentityChanged = input.current.provider !== input.target.provider || currentAgentTargetId !== null && currentAgentTargetId !== agentTargetId
|
|
6776
|
-
input.current.providerTargetRef,
|
|
6777
|
-
providerTargetRef
|
|
6778
|
-
);
|
|
6769
|
+
const currentTargetIdentityChanged = input.current.provider !== input.target.provider || currentAgentTargetId !== null && currentAgentTargetId !== agentTargetId;
|
|
6779
6770
|
return {
|
|
6780
6771
|
agentTargetId,
|
|
6781
6772
|
provider: input.target.provider,
|
|
6782
|
-
providerTargetId,
|
|
6783
|
-
providerTargetRef,
|
|
6773
|
+
providerTargetId: null,
|
|
6774
|
+
providerTargetRef: null,
|
|
6784
6775
|
targetId: input.target.targetId,
|
|
6785
6776
|
data: {
|
|
6786
6777
|
...input.current,
|
|
6787
6778
|
provider: input.target.provider,
|
|
6788
6779
|
agentTargetId,
|
|
6789
|
-
providerTargetId,
|
|
6790
|
-
providerTargetRef,
|
|
6780
|
+
providerTargetId: null,
|
|
6781
|
+
providerTargetRef: null,
|
|
6791
6782
|
composerOverrides: canPromoteLegacyComposerOverrides ? null : currentTargetIdentityChanged ? null : input.current.composerOverrides,
|
|
6792
6783
|
composerOverridesByAgentTargetId
|
|
6793
6784
|
}
|
|
@@ -6798,30 +6789,56 @@ function isExplicitAgentGUIProviderTarget(target, explicitTargets) {
|
|
|
6798
6789
|
(candidate) => candidate.provider === target.provider && candidate.targetId === target.targetId && agentGUIProviderTargetRefsEqual(candidate.ref, target.ref)
|
|
6799
6790
|
);
|
|
6800
6791
|
}
|
|
6801
|
-
function
|
|
6802
|
-
|
|
6803
|
-
|
|
6792
|
+
function findAgentGUIDirectoryTarget(directory, agentTargetId) {
|
|
6793
|
+
if (!agentTargetId || !directory) {
|
|
6794
|
+
return void 0;
|
|
6795
|
+
}
|
|
6796
|
+
return directory.find(
|
|
6797
|
+
(target) => normalizeOptionalText2(target.agentTargetId) === agentTargetId
|
|
6798
|
+
);
|
|
6799
|
+
}
|
|
6800
|
+
function composerTargetDataFromNodeData(data, directory) {
|
|
6801
|
+
const foreignKeyAgentTargetId = normalizeOptionalText2(data.agentTargetId);
|
|
6802
|
+
const lookupAgentTargetId = foreignKeyAgentTargetId ?? localAgentGUIAgentTargetId(data.provider);
|
|
6803
|
+
const directoryTarget = findAgentGUIDirectoryTarget(
|
|
6804
|
+
directory,
|
|
6805
|
+
lookupAgentTargetId
|
|
6806
|
+
);
|
|
6807
|
+
const agentTargetId = normalizeOptionalText2(directoryTarget?.agentTargetId) ?? foreignKeyAgentTargetId;
|
|
6808
|
+
const provider = directoryTarget?.provider ?? data.provider;
|
|
6804
6809
|
return {
|
|
6805
6810
|
agentTargetId,
|
|
6806
|
-
provider
|
|
6807
|
-
providerTargetId,
|
|
6808
|
-
providerTargetRef:
|
|
6809
|
-
targetId:
|
|
6810
|
-
data
|
|
6811
|
+
provider,
|
|
6812
|
+
providerTargetId: null,
|
|
6813
|
+
providerTargetRef: null,
|
|
6814
|
+
targetId: directoryTarget?.targetId ?? agentTargetId ?? `local:${provider}`,
|
|
6815
|
+
data: directoryTarget && directoryTarget.provider !== data.provider ? { ...data, provider } : data
|
|
6811
6816
|
};
|
|
6812
6817
|
}
|
|
6818
|
+
function resolveActiveSessionComposerTarget(input) {
|
|
6819
|
+
const foreignKey = normalizeOptionalText2(input.foreignKeyAgentTargetId);
|
|
6820
|
+
const target = composerTargetDataFromNodeData(input.data, input.directory);
|
|
6821
|
+
if (input.directoryLoading) {
|
|
6822
|
+
return { status: "loading", target, missingAgentTargetId: null };
|
|
6823
|
+
}
|
|
6824
|
+
const resolveKey = foreignKey ?? localAgentGUIAgentTargetId(input.data.provider);
|
|
6825
|
+
const directoryTarget = findAgentGUIDirectoryTarget(
|
|
6826
|
+
input.directory,
|
|
6827
|
+
resolveKey
|
|
6828
|
+
);
|
|
6829
|
+
if (directoryTarget) {
|
|
6830
|
+
return { status: "resolved", target, missingAgentTargetId: null };
|
|
6831
|
+
}
|
|
6832
|
+
return { status: "missing", target, missingAgentTargetId: resolveKey };
|
|
6833
|
+
}
|
|
6813
6834
|
function agentGUINodeDataHasComposerTarget(data) {
|
|
6814
6835
|
return normalizeOptionalText2(data.agentTargetId) !== null || normalizeOptionalText2(data.providerTargetId) !== null || data.providerTargetRef != null;
|
|
6815
6836
|
}
|
|
6816
6837
|
function composerOptionsForTarget(input) {
|
|
6817
|
-
if (input.target.agentTargetId) {
|
|
6818
|
-
const targetOptions = input.snapshot.composerOptionsByAgentTargetId?.[input.target.agentTargetId] ?? null;
|
|
6819
|
-
if (targetOptions) {
|
|
6820
|
-
return targetOptions;
|
|
6821
|
-
}
|
|
6838
|
+
if (!input.target.agentTargetId) {
|
|
6822
6839
|
return null;
|
|
6823
6840
|
}
|
|
6824
|
-
return input.snapshot.
|
|
6841
|
+
return input.snapshot.composerOptionsByTargetKey?.[input.target.agentTargetId] ?? null;
|
|
6825
6842
|
}
|
|
6826
6843
|
function providerUsesModelImageInputSupport(provider) {
|
|
6827
6844
|
const normalized = provider?.trim().toLowerCase();
|
|
@@ -9052,7 +9069,7 @@ function useAgentGUINodeController({
|
|
|
9052
9069
|
current: data,
|
|
9053
9070
|
isExplicit: selectedProviderTargetIsExplicit,
|
|
9054
9071
|
target: selectedProviderTarget
|
|
9055
|
-
}) : agentGUINodeDataHasComposerTarget(data) ? composerTargetDataFromNodeData(data) : composerTargetDataFromProviderTarget({
|
|
9072
|
+
}) : agentGUINodeDataHasComposerTarget(data) ? composerTargetDataFromNodeData(data, normalizedProviderTargets) : composerTargetDataFromProviderTarget({
|
|
9056
9073
|
current: data,
|
|
9057
9074
|
isExplicit: selectedProviderTargetIsExplicit,
|
|
9058
9075
|
target: selectedProviderTarget
|
|
@@ -9062,6 +9079,7 @@ function useAgentGUINodeController({
|
|
|
9062
9079
|
homeComposerTargetOverride,
|
|
9063
9080
|
homeComposerTargetOverrideIsExplicit,
|
|
9064
9081
|
nodeComposerTargetResolvedByProviderTarget,
|
|
9082
|
+
normalizedProviderTargets,
|
|
9065
9083
|
selectedProviderTarget,
|
|
9066
9084
|
selectedProviderTargetIsExplicit
|
|
9067
9085
|
]
|
|
@@ -9214,7 +9232,7 @@ function useAgentGUINodeController({
|
|
|
9214
9232
|
sessionViewRef(activeConversationId)
|
|
9215
9233
|
);
|
|
9216
9234
|
const activeSessionState = activeSessionView?.controlState ?? null;
|
|
9217
|
-
const composerTargetData = activeConversationId === null ? selectedComposerTargetData : composerTargetDataFromNodeData(data);
|
|
9235
|
+
const composerTargetData = activeConversationId === null ? selectedComposerTargetData : composerTargetDataFromNodeData(data, normalizedProviderTargets);
|
|
9218
9236
|
const providerComposerOptions = composerOptionsForTarget({
|
|
9219
9237
|
snapshot: agentActivitySnapshot,
|
|
9220
9238
|
target: composerTargetData
|
|
@@ -9481,6 +9499,8 @@ function useAgentGUINodeController({
|
|
|
9481
9499
|
providerTargetsProvidedRef.current = providerTargets !== void 0;
|
|
9482
9500
|
const selectedComposerTargetDataRef = useRef4(selectedComposerTargetData);
|
|
9483
9501
|
selectedComposerTargetDataRef.current = selectedComposerTargetData;
|
|
9502
|
+
const normalizedProviderTargetsRef = useRef4(normalizedProviderTargets);
|
|
9503
|
+
normalizedProviderTargetsRef.current = normalizedProviderTargets;
|
|
9484
9504
|
const draftSettingsBySessionIdRef = useRef4(draftSettingsBySessionId);
|
|
9485
9505
|
const onDataChangeRef = useRef4(onDataChange);
|
|
9486
9506
|
const onRememberComposerDefaultsRef = useRef4(onRememberComposerDefaults);
|
|
@@ -11116,6 +11136,9 @@ function useAgentGUINodeController({
|
|
|
11116
11136
|
(targetData, options) => {
|
|
11117
11137
|
const provider = targetData.provider;
|
|
11118
11138
|
const agentTargetId = targetData.agentTargetId;
|
|
11139
|
+
if (!agentTargetId) {
|
|
11140
|
+
return;
|
|
11141
|
+
}
|
|
11119
11142
|
if (isCreatingConversationRef.current) {
|
|
11120
11143
|
return;
|
|
11121
11144
|
}
|
|
@@ -11140,7 +11163,10 @@ function useAgentGUINodeController({
|
|
|
11140
11163
|
);
|
|
11141
11164
|
const loadDraftComposerOptions = useCallback4(
|
|
11142
11165
|
(options) => {
|
|
11143
|
-
const targetData = activeConversationIdRef.current === null ? selectedComposerTargetDataRef.current : composerTargetDataFromNodeData(
|
|
11166
|
+
const targetData = activeConversationIdRef.current === null ? selectedComposerTargetDataRef.current : composerTargetDataFromNodeData(
|
|
11167
|
+
dataRef.current,
|
|
11168
|
+
normalizedProviderTargetsRef.current
|
|
11169
|
+
);
|
|
11144
11170
|
loadComposerOptionsForTarget(targetData, options);
|
|
11145
11171
|
},
|
|
11146
11172
|
[loadComposerOptionsForTarget]
|
|
@@ -14761,6 +14787,35 @@ function useAgentGUINodeController({
|
|
|
14761
14787
|
providerTargetsLoading,
|
|
14762
14788
|
shouldUseStaticProviderTargets
|
|
14763
14789
|
]);
|
|
14790
|
+
const activeSessionTargetResolution = useMemo3(() => {
|
|
14791
|
+
if (previewMode || activeConversationId === null) {
|
|
14792
|
+
return {
|
|
14793
|
+
status: "resolved",
|
|
14794
|
+
target: composerTargetDataFromNodeData(
|
|
14795
|
+
data,
|
|
14796
|
+
normalizedProviderTargets
|
|
14797
|
+
),
|
|
14798
|
+
missingAgentTargetId: null
|
|
14799
|
+
};
|
|
14800
|
+
}
|
|
14801
|
+
return resolveActiveSessionComposerTarget({
|
|
14802
|
+
data,
|
|
14803
|
+
// The session record's own agentTargetId is the authoritative foreign
|
|
14804
|
+
// key; the node's persisted agentTargetId can lag when the reconcile
|
|
14805
|
+
// effect declines to overwrite an explicit target with a fallback.
|
|
14806
|
+
foreignKeyAgentTargetId: activeConversation?.agentTargetId ?? data.agentTargetId ?? null,
|
|
14807
|
+
directory: normalizedProviderTargets,
|
|
14808
|
+
directoryLoading: providerTargetsLoading
|
|
14809
|
+
});
|
|
14810
|
+
}, [
|
|
14811
|
+
activeConversation?.agentTargetId,
|
|
14812
|
+
activeConversationId,
|
|
14813
|
+
data,
|
|
14814
|
+
normalizedProviderTargets,
|
|
14815
|
+
previewMode,
|
|
14816
|
+
providerTargetsLoading
|
|
14817
|
+
]);
|
|
14818
|
+
const activeSessionTargetMissing = activeSessionTargetResolution.status === "missing";
|
|
14764
14819
|
const visibleConversationsRef = useRef4(
|
|
14765
14820
|
null
|
|
14766
14821
|
);
|
|
@@ -15146,7 +15201,11 @@ function useAgentGUINodeController({
|
|
|
15146
15201
|
return {
|
|
15147
15202
|
auth: hasProviderSessionNotFoundError ? null : authState !== "" ? { message: authMessageFromRuntime ?? authState } : isAuthError ? { message: normalizedError } : null,
|
|
15148
15203
|
approval: pendingApproval,
|
|
15149
|
-
recovery:
|
|
15204
|
+
recovery: activeSessionTargetMissing ? {
|
|
15205
|
+
kind: "failed",
|
|
15206
|
+
message: translate("messages.agentTargetRemoved"),
|
|
15207
|
+
canRetry: false
|
|
15208
|
+
} : activeLiveState === "activating" && // Suppress the "reconnecting" banner during a first-message create:
|
|
15150
15209
|
// the user just submitted and is already seeing their optimistic
|
|
15151
15210
|
// message, so an activation-in-flight state on the conversation they
|
|
15152
15211
|
// just entered is not a recovery event.
|
|
@@ -15169,6 +15228,7 @@ function useAgentGUINodeController({
|
|
|
15169
15228
|
activeConversationId,
|
|
15170
15229
|
activeConversationResumeUnavailable,
|
|
15171
15230
|
activeSessionState,
|
|
15231
|
+
activeSessionTargetMissing,
|
|
15172
15232
|
hasProviderSessionNotFoundError,
|
|
15173
15233
|
pendingApproval
|
|
15174
15234
|
]);
|
|
@@ -15502,7 +15562,7 @@ function useAgentGUINodeController({
|
|
|
15502
15562
|
target: nextTarget
|
|
15503
15563
|
});
|
|
15504
15564
|
const nextAgentTargetId = currentNextTargetData.agentTargetId;
|
|
15505
|
-
const currentTargetId = current.agentTargetId
|
|
15565
|
+
const currentTargetId = normalizeOptionalText2(current.agentTargetId);
|
|
15506
15566
|
const nextTargetId = nextAgentTargetId ?? nextTarget.targetId;
|
|
15507
15567
|
const providerTargetChanged = current.provider !== nextProvider || (currentTargetId !== null || nextAgentTargetId !== null) && currentTargetId !== nextTargetId;
|
|
15508
15568
|
const nextData = {
|
|
@@ -29264,7 +29324,7 @@ function projectRuntimeSectionsToConversationSections(input) {
|
|
|
29264
29324
|
conversationFilter: input.conversationFilter,
|
|
29265
29325
|
provider: AGENT_GUI_CONVERSATION_RAIL_PROJECTION_PROVIDER,
|
|
29266
29326
|
snapshot: {
|
|
29267
|
-
|
|
29327
|
+
composerOptionsByTargetKey: {},
|
|
29268
29328
|
presences: [],
|
|
29269
29329
|
sessionMessagesById: {},
|
|
29270
29330
|
sessions: input.pinned.sessions,
|
|
@@ -29287,7 +29347,7 @@ function projectRuntimeSectionsToConversationSections(input) {
|
|
|
29287
29347
|
conversationFilter: input.conversationFilter,
|
|
29288
29348
|
provider: AGENT_GUI_CONVERSATION_RAIL_PROJECTION_PROVIDER,
|
|
29289
29349
|
snapshot: {
|
|
29290
|
-
|
|
29350
|
+
composerOptionsByTargetKey: {},
|
|
29291
29351
|
presences: [],
|
|
29292
29352
|
sessionMessagesById: {},
|
|
29293
29353
|
sessions: section.sessions,
|
|
@@ -30486,7 +30546,7 @@ function useAgentGUIConversationRail({
|
|
|
30486
30546
|
conversationFilter,
|
|
30487
30547
|
provider: AGENT_GUI_CONVERSATION_RAIL_PROJECTION_PROVIDER,
|
|
30488
30548
|
snapshot: {
|
|
30489
|
-
|
|
30549
|
+
composerOptionsByTargetKey: {},
|
|
30490
30550
|
presences: [],
|
|
30491
30551
|
sessionMessagesById: {},
|
|
30492
30552
|
sessions: page.sessions,
|
|
@@ -30557,7 +30617,7 @@ function useAgentGUIConversationRail({
|
|
|
30557
30617
|
conversationFilter,
|
|
30558
30618
|
provider: AGENT_GUI_CONVERSATION_RAIL_PROJECTION_PROVIDER,
|
|
30559
30619
|
snapshot: {
|
|
30560
|
-
|
|
30620
|
+
composerOptionsByTargetKey: {},
|
|
30561
30621
|
presences: [],
|
|
30562
30622
|
sessionMessagesById: {},
|
|
30563
30623
|
sessions: pageSection.sessions,
|