diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/document-selector/document-selector.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/document-selector/document-selector.tsx index 3d1fb63be3..cf6fe7d2c0 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/document-selector/document-selector.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/document-selector/document-selector.tsx @@ -68,8 +68,6 @@ export function DocumentSelector({ // Use preview value when in preview mode, otherwise use store value const value = isPreview ? previewValue : storeValue - - // Fetch documents for the selected knowledge base const fetchDocuments = useCallback(async () => { if (!knowledgeBaseId) { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx index 5e723799c1..c0f5c27b19 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx @@ -148,8 +148,6 @@ export function KnowledgeBaseSelector({ onKnowledgeBaseSelect?.(selectedIds) } - - // Use cached data if available useEffect(() => { if (knowledgeBasesList.length > 0 && !initialFetchDone) { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/hooks/use-sub-block-value.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/hooks/use-sub-block-value.ts index 2811c40b14..cee2f17a2d 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/hooks/use-sub-block-value.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/hooks/use-sub-block-value.ts @@ -1,10 +1,10 @@ import { useCallback, useEffect, useRef } from 'react' import { isEqual } from 'lodash' +import { useCollaborativeWorkflow } from '@/hooks/use-collaborative-workflow' import { getProviderFromModel } from '@/providers/utils' import { useGeneralStore } from '@/stores/settings/general/store' import { useSubBlockStore } from '@/stores/workflows/subblock/store' import { useWorkflowStore } from '@/stores/workflows/workflow/store' -import { useCollaborativeWorkflow } from '@/hooks/use-collaborative-workflow' // Helper function to dispatch collaborative subblock updates const dispatchSubblockUpdate = (blockId: string, subBlockId: string, value: any) => { @@ -239,7 +239,16 @@ export function useSubBlockValue( } } }, - [blockId, subBlockId, blockType, isApiKey, storeValue, triggerWorkflowUpdate, modelValue, collaborativeSetSubblockValue] + [ + blockId, + subBlockId, + blockType, + isApiKey, + storeValue, + triggerWorkflowUpdate, + modelValue, + collaborativeSetSubblockValue, + ] ) // Initialize valueRef on first render