{"record":{"id":"1f48a0d6a73031f1","repo":"windmill-labs/windmill","slug":"no-workspace-is-selected","errorCode":null,"errorMessage":"No workspace is selected.","messagePattern":"No workspace is selected\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/assets/AssetGraph/pipelineAiHelpers.ts","lineNumber":318,"sourceCode":"\t\t},\n\t\teditNode: async (path, content) => {\n\t\t\tdeps.ensureEditable?.()\n\t\t\tassertInFolder(path)\n\t\t\tassertPipelineAnnotation(content)\n\t\t\tconst drafts = deps.getDrafts()\n\t\t\tconst existing = drafts.get(path)\n\t\t\t// Base the edit on the existing draft's / deployed script object and replace\n\t\t\t// ONLY the content — preserving hash, summary, description, tag, schema, and\n\t\t\t// settings. Rebuilding a fresh script would wipe that metadata: deploying\n\t\t\t// from the pane (auto_parent) would update the script while clearing it, and\n\t\t\t// the route \"Save all\" path (no parent_hash) could hit the path-conflict\n\t\t\t// branch on the occupied path.\n\t\t\tlet baseScript: Script\n\t\t\tif (existing) {\n\t\t\t\tbaseScript = existing.script\n\t\t\t} else {\n\t\t\t\tconst workspace = deps.getWorkspace()\n\t\t\t\tif (!workspace) throw new Error('No workspace is selected.')\n\t\t\t\tbaseScript = await ScriptService.getScriptByPath({ workspace, path })\n\t\t\t}\n\t\t\tconst inferred = await inferDraftAssets(baseScript.language, content)\n\t\t\tconst outputAssets = inferred.writes.length > 0 ? inferred.writes : existing?.outputAssets\n\t\t\tconst next = new Map(drafts)\n\t\t\tnext.set(path, {\n\t\t\t\tlocalId: existing?.localId ?? deps.newDraftLocalId(),\n\t\t\t\tscript: { ...baseScript, content },\n\t\t\t\toutputAssets,\n\t\t\t\tinputAssets: inferred.reads\n\t\t\t})\n\t\t\tdeps.setDrafts(next)\n\t\t\tdeps.onShowDrafts?.()\n\t\t\tdeps.onProposeNode?.(path)\n\t\t\t// Deployable lineage only (see proposeNode): body writes + materialize target.\n\t\t\treturn {\n\t\t\t\tdetectedReads: inferred.reads.map(assetUri),\n\t\t\t\tdetectedWrites: dedupeAssets([...inferred.writes, ...materializeWrites(content)]).map(","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/assets/AssetGraph/pipelineAiHelpers.ts#L300-L336","documentation":"pipelineAiHelpers editNode requires a workspace context to resolve drafts and deploy targets; no workspace is currently selected in the UI, so the tool cannot proceed and asks the user to select one first.","triggerScenarios":"Thrown at frontend/src/lib/components/assets/AssetGraph/pipelineAiHelpers.ts:318 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Select a workspace in the Windmill UI workspace picker, then retry the tool call."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}