mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-29 08:06:46 +00:00
fix: drop superseded home ai-hidden responses
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ee38a8f983
commit
19739d89d3
@@ -84,14 +84,17 @@
|
||||
// the whole block, and the picker that could undo it, off Home.
|
||||
const homeAiHidden = resource(
|
||||
() => $workspaceStore ?? undefined,
|
||||
async (workspace) => {
|
||||
async (workspace, _, { signal }) => {
|
||||
if (!workspace) return false
|
||||
let hidden = false
|
||||
try {
|
||||
return (await WorkspaceService.getCopilotInfo({ workspace })).copilot_disabled === true
|
||||
hidden = (await WorkspaceService.getCopilotInfo({ workspace })).copilot_disabled === true
|
||||
} catch (e) {
|
||||
console.error(`Failed to read the AI config of workspace ${workspace}:`, e)
|
||||
return false
|
||||
}
|
||||
// runed keeps a superseded fetch's result, and the generated client takes no signal.
|
||||
if (signal.aborted) throw new DOMException('superseded', 'AbortError')
|
||||
return hidden
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user