fix: remove unused use-workflow-reasoning.ts to satisfy knip dead code check

The PR removed all imports and usages of useWorkflowReasoning from
use-workflow-run-event.ts but left the source file behind. knip's
production dead code check flags this as an unused file. Delete it.
This commit is contained in:
goingforstudying-ctrl 2026-06-25 18:12:04 -04:00
parent 8a5a53c4af
commit 4a9f945ffa

View File

@ -1,30 +0,0 @@
import type { ReasoningChunkResponse } from '@/types/workflow'
import { produce } from 'immer'
import { useCallback } from 'react'
import { useWorkflowStore } from '@/app/components/workflow/store'
export const useWorkflowReasoning = () => {
const workflowStore = useWorkflowStore()
const handleWorkflowReasoning = useCallback((params: ReasoningChunkResponse) => {
const { data: { reasoning, node_id, is_final } } = params
const {
workflowRunningData,
setWorkflowRunningData,
} = workflowStore.getState()
setWorkflowRunningData(produce(workflowRunningData!, (draft) => {
const reasoningContent = (draft.reasoningContent ||= {})
// key by LLM node so multiple nodes' reasoning stays separated
const key = node_id || '_'
if (reasoning)
reasoningContent[key] = (reasoningContent[key] || '') + reasoning
if (is_final)
draft.reasoningFinished = true
}))
}, [workflowStore])
return {
handleWorkflowReasoning,
}
}