diff --git a/components/agents/AgentGenerationWorkspaceDarkV2.tsx b/components/agents/AgentGenerationWorkspaceDarkV2.tsx index ac951876a..2cb4892d9 100644 --- a/components/agents/AgentGenerationWorkspaceDarkV2.tsx +++ b/components/agents/AgentGenerationWorkspaceDarkV2.tsx @@ -1079,10 +1079,16 @@ export function AgentGenerationWorkspaceDarkV2({ id: rawChatId, message: request.messages.at(-1), hiddenPrompt: hiddenPromptRef.current || undefined, - agentPresetId: transportState.selectedAgentPresetId || undefined, + agentPresetId: + transportState.selectedAgentPresetId || selectedAgentPresetId || undefined, selectedChatModel: transportState.selectedModelId, + composerMode: "agent" as const, selectedVisibilityType: "private", imageParams: transportState.imageParams, + contextPayload: { + source: "chat" as const, + projectId, + }, agentModePayload: replacementModePayload, }, }; diff --git a/components/agents/AgentGenerationWorkspaceNew.tsx b/components/agents/AgentGenerationWorkspaceNew.tsx index 34d5e1dee..815595ef3 100644 --- a/components/agents/AgentGenerationWorkspaceNew.tsx +++ b/components/agents/AgentGenerationWorkspaceNew.tsx @@ -363,10 +363,16 @@ export function AgentGenerationWorkspaceNew({ id: rawChatId, message: request.messages.at(-1), hiddenPrompt: hiddenPromptRef.current || undefined, - agentPresetId: transportState.selectedAgentPresetId || undefined, + agentPresetId: + transportState.selectedAgentPresetId || selectedAgentPresetId || undefined, selectedChatModel: transportState.selectedModelId, + composerMode: "agent" as const, selectedVisibilityType: "private", imageParams: transportState.imageParams, + contextPayload: { + source: "chat" as const, + projectId, + }, }, }; },