Merge branch 'main' into 12-24-json-for-translation

This commit is contained in:
Stephen Zhou 2025-12-25 16:44:26 +08:00 committed by GitHub
commit fd5d9327de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 4 deletions

View File

@ -286,12 +286,12 @@ class BuiltinToolManageService:
session.add(db_provider)
session.commit()
# Invalidate tool providers cache
ToolProviderListCache.invalidate_cache(tenant_id)
except Exception as e:
session.rollback()
raise ValueError(str(e))
# Invalidate tool providers cache
ToolProviderListCache.invalidate_cache(tenant_id, "builtin")
return {"result": "success"}
@staticmethod

View File

@ -63,6 +63,11 @@ export const useShortcuts = (): void => {
return !isEventTargetInputArea(e.target as HTMLElement)
}, [])
const shouldHandleCopy = useCallback(() => {
const selection = document.getSelection()
return !selection || selection.isCollapsed
}, [])
useKeyPress(['delete', 'backspace'], (e) => {
if (shouldHandleShortcut(e)) {
e.preventDefault()
@ -73,7 +78,7 @@ export const useShortcuts = (): void => {
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => {
const { showDebugAndPreviewPanel } = workflowStore.getState()
if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel) {
if (shouldHandleShortcut(e) && shouldHandleCopy() && !showDebugAndPreviewPanel) {
e.preventDefault()
handleNodesCopy()
}

View File

@ -371,6 +371,8 @@ export const useTriggerPluginDynamicOptions = (payload: {
},
enabled: enabled && !!payload.plugin_id && !!payload.provider && !!payload.action && !!payload.parameter && !!payload.credential_id,
retry: 0,
staleTime: 0,
gcTime: 0,
})
}