windmill-labs/windmill · error
Instructions are required
Error message
Instructions are required
What it means
Thrown by sendInlineRequest in AIChatManager when the inline-edit instruction is empty or whitespace-only. Inline requests send a prompt plus a code selection to the model; with no instructions there is no request to make, so the input is rejected before creating an abort controller or any request state.
Source
Thrown at frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts:2780
value: result.tokenUsage.total,
workspace: this.operatingWorkspace
})
}
return result
} catch (err) {
console.log('chatRequest error', err)
console.error('chatRequest error', err)
callbacks.onMessageEnd()
this.cancelLoadingTools('Error')
if (!abortController.signal.aborted) {
throw err
}
}
}
sendInlineRequest = async (instructions: string, selectedCode: string, selection: Selection) => {
// Validate inputs
if (!instructions.trim()) {
throw new Error('Instructions are required')
}
// Use a separate abort controller for inline requests to avoid interfering with main chat
this.inlineAbortController = new AbortController()
const lang = this.scriptEditorOptions?.lang ?? 'bun'
const selectedContext: ContextElement[] = [...this.contextManager.getSelectedContext()]
const startLine = selection.startLineNumber
const endLine = selection.endLineNumber
selectedContext.push({
type: 'code_piece',
lang,
title: `L${startLine}-L${endLine}`,
startLine,
endLine,
content: selectedCode
})
const systemMessage: ChatCompletionSystemMessageParam = {View on GitHub (pinned to e474e8803c)
Solutions
- Type a non-empty instruction in the inline prompt before submitting
- Disable the submit action while the input is empty to prevent the call
- Trim user input client-side and treat whitespace-only as empty
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at frontend/src/lib/components/copilot/chat/AIChatManager.svelte.ts:2780 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/c4e39b257db37828.
Report an issue: GitHub.