windmill-labs/windmill · error
No flow helpers found
Error message
No flow helpers found
What it means
sendRequest throws this when mode is AIMode.FLOW but the manager's flowAiChatHelpers were never injected. Flow-mode AI editing needs helpers provided by the flow editor (step selection, flow mutation); without them the manager cannot read or modify the flow, so it refuses early.
Source
Thrown at frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts:3417
entityId: chatId,
workspace: this.operatingWorkspace
})
}
if (this.isSessionChat && this.sessionId) {
logFeatureUsage('ai_session', 'message', {
key: this.mode,
entityId: this.sessionId,
workspace: this.operatingWorkspace
})
logFeatureUsage('ai_session', 'autonomy', {
key: this.autonomyMode,
entityId: this.sessionId,
workspace: this.operatingWorkspace
})
}
if (this.mode === AIMode.FLOW && !this.flowAiChatHelpers) {
throw new Error('No flow helpers found')
}
let snapshot:
| { type: 'flow'; value: ExtendedOpenFlow }
| { type: 'app'; value: number }
| undefined = undefined
if (this.mode === AIMode.FLOW) {
snapshot = { type: 'flow', value: this.flowAiChatHelpers!.getFlowAndSelectedId().flow }
this.flowAiChatHelpers!.setSnapshot(snapshot.value)
} else if (this.mode === AIMode.APP) {
snapshot = { type: 'app', value: this.appAiChatHelpers!.snapshot() }
}
// Attach the enrichments that are only known after beforeSend (selected
// context + snapshot) to the optimistic user message pushed before it.
this.displayMessages = this.displayMessages.map((m, i) =>
i === optimisticIndex
? {View on GitHub (pinned to e474e8803c)
Solutions
- Open the AI chat from within the flow editor so the flow helpers are injected.
- Ensure the flow editor assigns flowAiChatHelpers on the manager before any send.
- Send with mode SCRIPT or APP if you are not editing a flow.
- If embedding the chat yourself, pass the FlowAIChatHelpers implementation to the manager.
Example fix
// before
manager.sendRequest({ instructions: 'add a step', mode: AIMode.FLOW }) // throws outside flow editor
// after
if (isInFlowEditor) {
await manager.sendRequest({ instructions: 'add a step', mode: AIMode.FLOW })
} else {
await manager.sendRequest({ instructions: 'generate a script', mode: AIMode.SCRIPT, lang: 'bun' })
} Defensive patterns
Strategy: validation
Validate before calling
if (manager.mode === AIMode.FLOW && !manager.flowAiChatHelpers) {
throw new Error('Flow AI requires the flow editor context')
} Try / catch
try {
await manager.sendRequest({ instructions, mode: AIMode.FLOW })
} catch (e) {
if (e.message === 'No flow helpers found') {
openInFlowEditor(); return
}
throw e
} Prevention
- Mount the AI chat only inside the flow editor for FLOW mode.
- Assert flowAiChatHelpers is set during app initialization in flow pages.
- Fall back to SCRIPT mode when no flow editor is present.
When it happens
Trigger: Calling sendRequest (or the AI chat) with mode=FLOW while AIChatManager was constructed outside the flow editor context — e.g. mounted in a script/app page, or the flow editor component did not set flowAiChatHelpers before the first send.
Common situations: Embedding the AI chat panel in a custom page without wiring the flow helpers; opening the chat before the flow editor finished initializing; a bug where the helper binding is cleared on editor remount.
Related errors
- AI response was empty
- AI response contained empty code block
- AI response did not contain valid code. Please try rephrasin
- An unexpected error occurred. Please try again.
- No script options passed
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/55908e86136b8a50.
Report an issue: GitHub.