This commit is contained in:
Vikhyath Mondreti
2025-06-30 17:53:59 -07:00
parent 7a5aeadbb7
commit 5d7fc5382c
3 changed files with 11 additions and 6 deletions

View File

@@ -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) {

View File

@@ -148,8 +148,6 @@ export function KnowledgeBaseSelector({
onKnowledgeBaseSelect?.(selectedIds)
}
// Use cached data if available
useEffect(() => {
if (knowledgeBasesList.length > 0 && !initialFetchDone) {

View File

@@ -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<T = any>(
}
}
},
[blockId, subBlockId, blockType, isApiKey, storeValue, triggerWorkflowUpdate, modelValue, collaborativeSetSubblockValue]
[
blockId,
subBlockId,
blockType,
isApiKey,
storeValue,
triggerWorkflowUpdate,
modelValue,
collaborativeSetSubblockValue,
]
)
// Initialize valueRef on first render