Merge branch 'feat/model-plugins-implementing' into deploy/dev

This commit is contained in:
CodingOnStar
2026-03-17 16:47:55 +08:00
204 changed files with 56660 additions and 380950 deletions

View File

@ -146,16 +146,6 @@ describe('isEventTargetInputArea', () => {
expect(isEventTargetInputArea(el)).toBe(true)
})
it('should return true for monaco editor descendants', () => {
const wrapper = document.createElement('div')
wrapper.className = 'monaco-editor'
const child = document.createElement('div')
wrapper.appendChild(child)
document.body.appendChild(wrapper)
expect(isEventTargetInputArea(child)).toBe(true)
wrapper.remove()
})
it('should return undefined for non-input elements', () => {
const el = document.createElement('div')
expect(isEventTargetInputArea(el)).toBeUndefined()

View File

@ -32,9 +32,6 @@ export const isEventTargetInputArea = (target: HTMLElement) => {
if (target.contentEditable === 'true')
return true
if (target.closest?.('.monaco-editor, .monaco-diff-editor'))
return true
}
/**

View File

@ -7,6 +7,7 @@ import type { StructuredOutput } from '@/app/components/workflow/nodes/llm/types
import { CollectionType } from '@/app/components/tools/types'
import { toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema'
import { Type } from '@/app/components/workflow/nodes/llm/types'
import { isToolAuthorizationRequired } from '@/app/components/workflow/nodes/tool/auth'
import { canFindTool } from '@/utils'
export const getToolCheckParams = (
@ -17,7 +18,6 @@ export const getToolCheckParams = (
language: string,
) => {
const { provider_id, provider_type, tool_name } = toolData
const isBuiltIn = provider_type === CollectionType.builtIn
const currentTools = provider_type === CollectionType.builtIn ? buildInTools : provider_type === CollectionType.custom ? customTools : workflowTools
const currCollection = currentTools.find(item => canFindTool(item.id, provider_id))
const currTool = currCollection?.tools.find(tool => tool.name === tool_name)
@ -38,7 +38,7 @@ export const getToolCheckParams = (
})
return formInputs
})(),
notAuthed: isBuiltIn && !!currCollection?.allow_delete && !currCollection?.is_team_authorization,
notAuthed: isToolAuthorizationRequired(provider_type, currCollection),
toolSettingSchema,
language,
}