fix: send explicit agent composer context
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-03-24 16:18:57 +08:00
parent bd0928c135
commit 406bc6418e
2 changed files with 14 additions and 2 deletions

View File

@ -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,
},
};

View File

@ -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,
},
},
};
},