11 lines
491 B
TypeScript
11 lines
491 B
TypeScript
/** Agent/Auto Agent/presets always use native ZCode. Claw and direct media modes retain their routes. */
|
|
export function shouldUseCanvasAgentRuntime(body: {
|
|
composerMode?: string;
|
|
agentPresetId?: string;
|
|
resumeRunId?: string;
|
|
contextPayload?: { source?: string; projectId?: string };
|
|
message?: { parts?: Array<{ type?: string; text?: string }> };
|
|
}) {
|
|
return body.composerMode === "agent" && body.contextPayload?.source === "canvas" && Boolean(body.contextPayload.projectId);
|
|
}
|