From e22d7f3edbb52ed00497e410bbbec9520b4601e0 Mon Sep 17 00:00:00 2001 From: centdix Date: Fri, 17 Apr 2026 11:39:08 +0200 Subject: [PATCH] refactor: remove dead flow rawscript helper --- .../src/lib/components/copilot/chat/flow/core.ts | 8 ++------ .../lib/components/copilot/chat/flow/helperUtils.ts | 12 ------------ 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/frontend/src/lib/components/copilot/chat/flow/core.ts b/frontend/src/lib/components/copilot/chat/flow/core.ts index b7bfbd8b74..6fd41c897b 100644 --- a/frontend/src/lib/components/copilot/chat/flow/core.ts +++ b/frontend/src/lib/components/copilot/chat/flow/core.ts @@ -1084,10 +1084,7 @@ export const flowTools: Tool[] = [ } toolCallbacks.setToolStatus(toolId, { - content: - parsedModule === null - ? 'Preprocessor module removed' - : 'Preprocessor module updated', + content: parsedModule === null ? 'Preprocessor module removed' : 'Preprocessor module updated', result: 'Success' }) return parsedModule === null @@ -1123,8 +1120,7 @@ export const flowTools: Tool[] = [ } toolCallbacks.setToolStatus(toolId, { - content: - parsedModule === null ? 'Failure module removed' : 'Failure module updated', + content: parsedModule === null ? 'Failure module removed' : 'Failure module updated', result: 'Success' }) return parsedModule === null diff --git a/frontend/src/lib/components/copilot/chat/flow/helperUtils.ts b/frontend/src/lib/components/copilot/chat/flow/helperUtils.ts index 1552db7465..0f09e9026a 100644 --- a/frontend/src/lib/components/copilot/chat/flow/helperUtils.ts +++ b/frontend/src/lib/components/copilot/chat/flow/helperUtils.ts @@ -35,18 +35,6 @@ export function getFlowModuleById(flow: FlowLike | undefined, id: string): FlowM return dfs(id, flow as OpenFlow, false)[0] } -export function getRawScriptModuleById( - flow: FlowLike | undefined, - id: string -): (FlowModule & { value: RawScript }) | undefined { - const module = getFlowModuleById(flow, id) - if (!module || module.value.type !== 'rawscript') { - return undefined - } - - return module as FlowModule & { value: RawScript } -} - export function getMutableRawScriptModuleById( flow: FlowLike | undefined, id: string