The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(chat): no workflow install while ComfyUI cannot be asked (C60-S5)
purple02b8e8144a74
diff --git a/src/api/mcp/__tests__/workflow-tools.test.ts b/src/api/mcp/__tests__/workflow-tools.test.tsindex 6853768a..f4d084ac 100644--- a/src/api/mcp/__tests__/workflow-tools.test.ts+++ b/src/api/mcp/__tests__/workflow-tools.test.ts@@ -173,6 +173,13 @@ describe('workflow_install', () => {expect(await executeWorkflowInstall({ id: candidateId() }, run())).toMatch(/^Refused: the user did not ask/)})+ it('nothing is installed while ComfyUI cannot be asked', async () => {+ userSays('install it')+ h.check.mockResolvedValue(checked({ installed: null }))+ expect(await executeWorkflowInstall({ id: candidateId() }, run())).toMatch(/^Refused: ComfyUI is not running/)+ expect(queue()).toHaveLength(0)+ })+it('never installs red', async () => {userSays('Bau ihn ein')h.check.mockResolvedValue(checked({}, { ...GRAPH, '10': { class_type: 'RunPythonCode', inputs: { code: 'import os' } } }))diff --git a/src/api/mcp/workflow-tools.ts b/src/api/mcp/workflow-tools.tsindex 55d40411..0192d2fb 100644--- a/src/api/mcp/workflow-tools.ts+++ b/src/api/mcp/workflow-tools.ts@@ -311,6 +311,10 @@ export async function executeWorkflowInstall(args: ToolArgs, run?: AgentRunConteif (r.light === 'red') {return `${reportForAgent(r, c.id, c.title)}\nRefused: a red workflow is never installed from the chat. Nothing changed.`}+ if (!r.comfyChecked) {+ return 'Refused: ComfyUI is not running, so LU cannot check which nodes and models are there. '+ + 'Ask the user to start ComfyUI (Create, or Settings, AI Backends), then check again. Nothing changed.'+ }const foreign = foreignContent(run)if (r.light === 'yellow' && foreign) {return 'Refused: this run read content from elsewhere before (' + cleanName(foreign, 60) + '), and a yellow workflow 'diff --git a/src/lib/workflow-inspect.ts b/src/lib/workflow-inspect.tsindex 941e6a41..bca99c56 100644--- a/src/lib/workflow-inspect.ts+++ b/src/lib/workflow-inspect.ts@@ -145,6 +145,9 @@ export interface FieldFinding { node: string; type: string; what: 'code' | 'pathexport interface InspectReport {light: Light+ /** False when ComfyUI could not be asked: nodes and models are unchecked,+ * and nothing is installed from the chat until it can be. */+ comfyChecked: boolean/** Short reasons, most serious first, written by LU, never quoted from the file. */reasons: string[]nodes: NodeFinding[]@@ -448,6 +451,7 @@ export function inspectWorkflow(input: InspectInput): InspectReport {return {light,+ comfyChecked: input.installed !== null,reasons: ordered,nodes,models,