feat: last run frontend (#21369)

The frontend of feat: Persist Variables for Enhanced Debugging Workflow (#20699).

Co-authored-by: jZonG <jzongcode@gmail.com>
This commit is contained in:
Joel 2025-06-24 09:10:30 +08:00 • committed by GitHub
commit 1a1bfd4048
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
122 changed files with 5888 additions and 2061 deletions

View file

@ -59,10 +59,6 @@ export const useWorkflow = () => {
const store = useStoreApi()
const workflowStore = useWorkflowStore()
const nodesExtraData = useNodesExtraData()
const setPanelWidth = useCallback((width: number) => {
localStorage.setItem('workflow-node-panel-width', `${width}`)
workflowStore.setState({ panelWidth: width })
}, [workflowStore])
const getTreeLeafNodes = useCallback((nodeId: string) => {
const {
@ -399,7 +395,6 @@ export const useWorkflow = () => {
}, [store])
return {
setPanelWidth,
getTreeLeafNodes,
getBeforeNodesInSameBranch,
getBeforeNodesInSameBranchIncludeParent,
@ -497,6 +492,8 @@ export const useToolIcon = (data: Node['data']) => {
const customTools = useStore(s => s.customTools)
const workflowTools = useStore(s => s.workflowTools)
const toolIcon = useMemo(() => {
if(!data)
return ''
if (data.type === BlockEnum.Tool) {
let targetTools = buildInTools
if (data.provider_type === CollectionType.builtIn)