Merge branch 'main' into feat/trigger

This commit is contained in:
Yeuoly
2025-09-01 18:05:31 +08:00
480 changed files with 10562 additions and 4040 deletions

View File

@ -101,7 +101,6 @@ const AllTools = ({
category: PluginType.tool,
})
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchText, tags, enable_marketplace])
const pluginRef = useRef<ListRef>(null)

View File

@ -60,7 +60,6 @@ const OperationDropdown: FC<Props> = ({
downloadFile({ data: blob, fileName })
setNeedDownload(false)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [blob])
return (
<PortalToFollowElem

View File

@ -56,7 +56,6 @@ const List = forwardRef<ListRef, ListProps>(({
useEffect(() => {
handleScroll()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [list])
const handleHeadClick = () => {

View File

@ -122,7 +122,6 @@ const Tool: FC<Props> = ({
}
if (!hasSearchText && !isFold)
setFold(true)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [hasSearchText])
const FoldIcon = isFold ? RiArrowRightSLine : RiArrowDownSLine

View File

@ -40,7 +40,6 @@ const DatasetsDetailProvider: FC<DatasetsDetailProviderProps> = ({
}, [])
if (allDatasetIds.length === 0) return
updateDatasetsDetail(allDatasetIds)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
return (

View File

@ -82,26 +82,26 @@ const HeaderInRestoring = ({
<RestoringTitle />
</div>
<div className=' flex items-center justify-end gap-x-2'>
<Button
onClick={handleRestore}
disabled={!currentVersion || currentVersion.version === WorkflowVersion.Draft}
variant='primary'
className={cn(
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
)}
>
{t('workflow.common.restore')}
</Button>
<Button
onClick={handleCancelRestore}
className={cn(
'text-components-button-secondary-accent-text',
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
)}
>
<div className='flex items-center gap-x-0.5'>
<RiHistoryLine className='h-4 w-4' />
<span className='px-0.5'>{t('workflow.common.exitVersions')}</span>
<Button
onClick={handleRestore}
disabled={!currentVersion || currentVersion.version === WorkflowVersion.Draft}
variant='primary'
className={cn(
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
)}
>
{t('workflow.common.restore')}
</Button>
<Button
onClick={handleCancelRestore}
className={cn(
'text-components-button-secondary-accent-text',
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
)}
>
<div className='flex items-center gap-x-0.5'>
<RiHistoryLine className='h-4 w-4' />
<span className='px-0.5'>{t('workflow.common.exitVersions')}</span>
</div>
</Button>
</div>

View File

@ -49,7 +49,7 @@ const VersionHistoryButton: FC<VersionHistoryButtonProps> = ({
e.preventDefault()
handleViewVersionHistory()
},
{ exactMatch: true, useCapture: true })
{ exactMatch: true, useCapture: true })
return <Tooltip
popupContent={<PopupContent />}
@ -57,15 +57,15 @@ const VersionHistoryButton: FC<VersionHistoryButtonProps> = ({
popupClassName='rounded-lg border-[0.5px] border-components-panel-border bg-components-tooltip-bg
shadow-lg shadow-shadow-shadow-5 backdrop-blur-[5px] p-1.5'
>
<Button
className={cn(
'p-2',
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
)}
onClick={handleViewVersionHistory}
>
<RiHistoryLine className='h-4 w-4 text-components-button-secondary-text' />
</Button>
<Button
className={cn(
'p-2',
theme === 'dark' && 'rounded-lg border border-black/5 bg-white/10 backdrop-blur-sm',
)}
onClick={handleViewVersionHistory}
>
<RiHistoryLine className='h-4 w-4 text-components-button-secondary-text' />
</Button>
</Tooltip>
}

View File

@ -22,7 +22,6 @@ export const HooksStoreContextProvider = ({ children, ...restProps }: HooksStore
useEffect(() => {
if (storeRef.current && d3Selection && d3Zoom)
storeRef.current.getState().refreshAll(restProps)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [d3Selection, d3Zoom])
if (!storeRef.current)

View File

@ -54,9 +54,9 @@ export const useInspectVarsCrudCommon = ({
if (!node)
return undefined
const varId = node.vars.find((varItem) => {
return varItem.selector[1] === varName
})?.id
return varId
return varItem.selector[1] === varName
})?.id
return varId
}, [getNodeInspectVars])
const getInspectVar = useCallback((nodeId: string, name: string): VarInInspect | undefined => {
@ -71,16 +71,16 @@ export const useInspectVarsCrudCommon = ({
}, [getNodeInspectVars])
const hasSetInspectVar = useCallback((nodeId: string, name: string, sysVars: VarInInspect[], conversationVars: VarInInspect[]) => {
const isEnv = isENV([nodeId])
if (isEnv) // always have value
return true
const isSys = isSystemVar([nodeId])
if (isSys)
return sysVars.some(varItem => varItem.selector?.[1]?.replace('sys.', '') === name)
const isChatVar = isConversationVar([nodeId])
if (isChatVar)
return conversationVars.some(varItem => varItem.selector?.[1] === name)
return getInspectVar(nodeId, name) !== undefined
const isEnv = isENV([nodeId])
if (isEnv) // always have value
return true
const isSys = isSystemVar([nodeId])
if (isSys)
return sysVars.some(varItem => varItem.selector?.[1]?.replace('sys.', '') === name)
const isChatVar = isConversationVar([nodeId])
if (isChatVar)
return conversationVars.some(varItem => varItem.selector?.[1] === name)
return getInspectVar(nodeId, name) !== undefined
}, [getInspectVar])
const hasNodeInspectVars = useCallback((nodeId: string) => {
@ -115,23 +115,23 @@ export const useInspectVarsCrudCommon = ({
} = workflowStore.getState()
const nodes = produce(nodesWithInspectVars, (draft) => {
const nodeInfo = allNodes.find(node => node.id === nodeId)
if (nodeInfo) {
const index = draft.findIndex(node => node.nodeId === nodeId)
if (index === -1) {
draft.unshift({
nodeId,
nodeType: nodeInfo.data.type,
title: nodeInfo.data.title,
vars: payload,
nodePayload: nodeInfo.data,
})
}
else {
draft[index].vars = payload
// put the node to the topAdd commentMore actions
draft.unshift(draft.splice(index, 1)[0])
}
if (nodeInfo) {
const index = draft.findIndex(node => node.nodeId === nodeId)
if (index === -1) {
draft.unshift({
nodeId,
nodeType: nodeInfo.data.type,
title: nodeInfo.data.title,
vars: payload,
nodePayload: nodeInfo.data,
})
}
else {
draft[index].vars = payload
// put the node to the topAdd commentMore actions
draft.unshift(draft.splice(index, 1)[0])
}
}
})
setNodesWithInspectVars(nodes)
handleCancelNodeSuccessStatus(nodeId)

View File

@ -35,9 +35,9 @@ const useNodesAvailableVarList = (nodes: Node[], {
hideChatVar = false,
passedInAvailableNodes,
}: Params = {
onlyLeafNodeVar: false,
filterVar: () => true,
}) => {
onlyLeafNodeVar: false,
filterVar: () => true,
}) => {
const { getTreeLeafNodes, getBeforeNodesInSameBranchIncludeParent } = useWorkflow()
const { getNodeAvailableVars } = useWorkflowVariables()
const isChatMode = useIsChatMode()

View File

@ -68,7 +68,7 @@ export const useWorkflowNodeStarted = () => {
incomeEdges.forEach((edge) => {
const incomeNode = nodes.find(node => node.id === edge.source)!
if (!incomeNode || !('data' in incomeNode))
return
return
if (
(!incomeNode.data._runningBranchId && edge.sourceHandle === 'source')

View File

@ -64,7 +64,7 @@ const AddVariablePopupWithPosition = ({
} as any,
],
hideEnv: true,
hideChatVar: true,
hideChatVar: !isChatMode,
isChatMode,
filterVar: filterVar(outputType as VarType),
})

View File

@ -27,6 +27,7 @@ export const AddVariablePopup = ({
hideSearch
vars={availableVars}
onChange={onSelect}
isSupportFileVar
/>
</div>
</div>

View File

@ -93,7 +93,7 @@ export type AgentStrategySelectorProps = {
}
export const AgentStrategySelector = memo((props: AgentStrategySelectorProps) => {
const { enable_marketplace } = useGlobalPublicStore(s => s.systemFeatures)
const { enable_marketplace } = useGlobalPublicStore(s => s.systemFeatures)
const { value, onChange, canChooseMCPTool } = props
const [open, setOpen] = useState(false)

View File

@ -236,7 +236,7 @@ export const AgentStrategy = memo((props: AgentStrategyProps) => {
'zh-Hans': '/guides/workflow/node/agent#选择-agent-策略',
'ja-JP': '/guides/workflow/node/agent#エージェント戦略の選択',
})}
className='text-text-accent-secondary' target='_blank'>
className='text-text-accent-secondary' target='_blank'>
{t('workflow.nodes.agent.learnMore')}
</Link>
</div>}

View File

@ -187,16 +187,16 @@ const FormItem: FC<Props> = ({
/>
)
}
{ type === InputVarType.jsonObject && (
{type === InputVarType.jsonObject && (
<CodeEditor
value={value}
language={CodeLanguage.json}
onChange={onChange}
noWrapper
className='bg h-[80px] overflow-y-auto rounded-[10px] bg-components-input-bg-normal p-1'
placeholder={
<div className='whitespace-pre'>{payload.json_schema}</div>
}
className='bg h-[80px] overflow-y-auto rounded-[10px] bg-components-input-bg-normal p-1'
placeholder={
<div className='whitespace-pre'>{payload.json_schema}</div>
}
/>
)}
{(type === InputVarType.singleFile) && (

View File

@ -38,7 +38,7 @@ const Field: FC<Props> = ({
<div className={cn(className, inline && 'flex w-full items-center justify-between')}>
<div
onClick={() => supportFold && toggleFold()}
className={cn('flex items-center justify-between', supportFold && 'cursor-pointer')}>
className={cn('sticky top-0 z-10 flex items-center justify-between bg-components-panel-bg', supportFold && 'cursor-pointer')}>
<div className='flex h-6 items-center'>
<div className={cn(isSubTitle ? 'system-xs-medium-uppercase text-text-tertiary' : 'system-sm-semibold-uppercase text-text-secondary')}>
{title} {required && <span className='text-text-destructive'>*</span>}

View File

@ -53,7 +53,6 @@ const Editor: FC<Props> = ({
useEffect(() => {
onFocusChange?.(isFocus)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isFocus])
return (

View File

@ -11,7 +11,7 @@ const McpToolNotSupportTooltip: FC = () => {
<Tooltip
popupContent={
<div className='w-[256px]'>
{t('plugin.detailPanel.toolSelector.unsupportedMCPTool')}
{t('plugin.detailPanel.toolSelector.unsupportedMCPTool')}
</div>
}
>

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React from 'react'
import cn from '@/utils/classnames'
import { varHighlightHTML } from '@/app/components/app/configuration/base/var-highlight'
import VarHighlight from '@/app/components/app/configuration/base/var-highlight'
type Props = {
isFocus?: boolean
onFocus?: () => void
@ -22,11 +22,24 @@ const SupportVarInput: FC<Props> = ({
textClassName,
readonly,
}) => {
const withHightContent = (value || '')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/\{\{([^}]+)\}\}/g, varHighlightHTML({ name: '$1', className: '!mb-0' })) // `<span class="${highLightClassName}">{{$1}}</span>`
.replace(/\n/g, '<br />')
const renderSafeContent = (inputValue: string) => {
const parts = inputValue.split(/(\{\{[^}]+\}\}|\n)/g)
return parts.map((part, index) => {
const variableMatch = part.match(/^\{\{([^}]+)\}\}$/)
if (variableMatch) {
return (
<VarHighlight
key={`var-${index}`}
name={variableMatch[1]}
/>
)
}
if (part === '\n')
return <br key={`br-${index}`} />
return <span key={`text-${index}`}>{part}</span>
})
}
return (
<div
@ -42,9 +55,9 @@ const SupportVarInput: FC<Props> = ({
<div
className={cn(textClassName, 'h-full w-0 grow truncate whitespace-nowrap')}
title={value}
dangerouslySetInnerHTML={{
__html: withHightContent,
}}></div>
>
{renderSafeContent(value || '')}
</div>
)}
</div>
)

View File

@ -725,9 +725,9 @@ const getIterationItemType = ({
curr = Array.isArray(curr) ? curr.find(v => v.variable === key) : []
if (isLast)
arrayType = curr?.type
arrayType = curr?.type
else if (curr?.type === VarType.object || curr?.type === VarType.file)
curr = curr.children || []
curr = curr.children || []
}
}

View File

@ -55,11 +55,11 @@ const VarList: FC<Props> = ({
const { isValid, errorKey, errorMessageKey } = checkKeys([newKey], true)
if (!isValid) {
setToastHandle(Toast.notify({
type: 'error',
message: t(`appDebug.varKeyError.${errorMessageKey}`, { key: errorKey }),
}))
return
}
type: 'error',
message: t(`appDebug.varKeyError.${errorMessageKey}`, { key: errorKey }),
}))
return
}
if (list.some(item => item.variable?.trim() === newKey.trim())) {
console.log('new key', newKey.trim())
setToastHandle(Toast.notify({

View File

@ -339,7 +339,7 @@ const VarReferencePicker: FC<Props> = ({
const data = await fetchDynamicOptions()
setDynamicOptions(data?.options || [])
}
finally {
finally {
setIsLoading(false)
}
}

View File

@ -249,7 +249,7 @@ const BasePanel: FC<BasePanelProps> = ({
if(logParams.showSpecialResultPanel) {
return (
<div className={cn(
<div className={cn(
'relative mr-1 h-full',
)}>
<div
@ -355,7 +355,7 @@ const BasePanel: FC<BasePanelProps> = ({
>
{
isSingleRunning ? <Stop className='h-4 w-4 text-text-tertiary' />
: <RiPlayLargeLine className='h-4 w-4 text-text-tertiary' />
: <RiPlayLargeLine className='h-4 w-4 text-text-tertiary' />
}
</div>
</Tooltip>
@ -416,9 +416,8 @@ const BasePanel: FC<BasePanelProps> = ({
}
<Split />
</div>
{tabType === TabType.settings && (
<>
<div className='flex-1 overflow-y-auto'>
<div>
{cloneElement(children as any, {
id,
@ -463,7 +462,7 @@ const BasePanel: FC<BasePanelProps> = ({
</div>
)
}
</>
</div>
)}
{tabType === TabType.lastRun && (

View File

@ -79,11 +79,11 @@ const LastRun: FC<Props> = ({
}, [nodeId])
const handlePageVisibilityChange = useCallback(() => {
if (document.visibilityState === 'hidden')
setPageHasHide(true)
else
setPageShowed(true)
}, [])
if (document.visibilityState === 'hidden')
setPageHasHide(true)
else
setPageShowed(true)
}, [])
useEffect(() => {
document.addEventListener('visibilitychange', handlePageVisibilityChange)

View File

@ -118,8 +118,8 @@ function useOutputVarList<T>({
const [removedVar, setRemovedVar] = useState<ValueSelector>([])
const removeVarInNode = useCallback(() => {
const varId = nodesWithInspectVars.find(node => node.nodeId === id)?.vars.find((varItem) => {
return varItem.name === removedVar[1]
})?.id
return varItem.name === removedVar[1]
})?.id
if(varId)
deleteInspectVar(id, varId)
removeUsedVarInNodes(removedVar)
@ -143,8 +143,8 @@ function useOutputVarList<T>({
setInputs(newInputs)
onOutputKeyOrdersChange(outputKeyOrders.filter((_, i) => i !== index))
const varId = nodesWithInspectVars.find(node => node.nodeId === id)?.vars.find((varItem) => {
return varItem.name === key
})?.id
return varItem.name === key
})?.id
if(varId)
deleteInspectVar(id, varId)
}, [outputKeyOrders, isVarUsedInNodes, id, inputs, setInputs, onOutputKeyOrdersChange, nodesWithInspectVars, deleteInspectVar, showRemoveVarConfirm, varKey])

View File

@ -45,10 +45,10 @@ const AgentPanel: FC<NodePanelProps<AgentNodeType>> = (props) => {
const resetEditor = useStore(s => s.setControlPromptEditorRerenderKey)
return <div className='my-2'>
<Field
required
title={t('workflow.nodes.agent.strategy.label')}
className='px-4 py-2'
tooltip={t('workflow.nodes.agent.strategy.tooltip')} >
required
title={t('workflow.nodes.agent.strategy.label')}
className='px-4 py-2'
tooltip={t('workflow.nodes.agent.strategy.tooltip')} >
<AgentStrategy
strategy={inputs.agent_strategy_name ? {
agent_strategy_provider_name: inputs.agent_strategy_provider_name!,

View File

@ -76,7 +76,7 @@ const useSingleRunFormParams = ({
return formatTracing([runResult], t)[0]
}, [runResult, t])
const getDependentVars = () => {
const getDependentVars = () => {
return varInputs.map((item) => {
// Guard against null/undefined variable to prevent app crash
if (!item.variable || typeof item.variable !== 'string')

View File

@ -68,8 +68,8 @@ const VarList: FC<Props> = ({
draft[index].value = '' // Clear value when operation changes
if (item.value === WriteMode.set || item.value === WriteMode.increment || item.value === WriteMode.decrement
|| item.value === WriteMode.multiply || item.value === WriteMode.divide) {
if(varType === VarType.boolean)
draft[index].value = false
if (varType === VarType.boolean)
draft[index].value = false
draft[index].input_type = AssignerNodeInputType.constant
}
else {

View File

@ -31,8 +31,6 @@ const useKeyValueList = (value: string, onChange: (value: string) => void, noFil
const newValue = list.filter(item => item.key && item.value).map(item => `${item.key}:${item.value}`).join('\n')
if (newValue !== value)
onChange(newValue)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [list, noFilter])
const addItem = useCallback(() => {
setList([...list, {

View File

@ -51,7 +51,6 @@ const useConfig = (id: string, payload: HttpNodeType) => {
setInputs(newInputs)
setIsDataReady(true)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [defaultConfig])
const handleMethodChange = useCallback((method: Method) => {

View File

@ -31,7 +31,6 @@ const MetadataTrigger = ({
handleRemoveCondition(condition.id)
})
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [metadataList, handleRemoveCondition, selectedDatasetsLoaded])
return (

View File

@ -172,7 +172,6 @@ const useConfig = (id: string, payload: KnowledgeRetrievalNodeType) => {
}
})
setInputs(newInput)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currentProvider?.provider, currentModel, currentRerankModel, rerankDefaultModel])
const [selectedDatasets, setSelectedDatasets] = useState<DataSet[]>([])
const [rerankModelOpen, setRerankModelOpen] = useState(false)
@ -229,7 +228,6 @@ const useConfig = (id: string, payload: KnowledgeRetrievalNodeType) => {
setInputs(newInputs)
setSelectedDatasetsLoaded(true)
})()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
useEffect(() => {
@ -241,7 +239,6 @@ const useConfig = (id: string, payload: KnowledgeRetrievalNodeType) => {
setInputs(produce(inputs, (draft) => {
draft.query_variable_selector = query_variable_selector
}))
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
const handleOnDatasetsChange = useCallback((newDatasets: DataSet[]) => {

View File

@ -34,7 +34,6 @@ const JsonImporter: FC<JsonImporterProps> = ({
const rect = importBtnRef.current.getBoundingClientRect()
updateBtnWidth(rect.width)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
const handleTrigger = useCallback((e: React.MouseEvent<HTMLElement, MouseEvent>) => {

View File

@ -155,7 +155,6 @@ const useConfig = (id: string, payload: ParameterExtractorNodeType) => {
return
setModelChanged(false)
handleVisionConfigAfterModelChanged()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isVisionModel, modelChanged])
const {

View File

@ -84,10 +84,10 @@ const ClassList: FC<Props> = ({
})()
return (
<div key={item.id}
className={cn(
'group relative rounded-[10px] bg-components-panel-bg',
`-ml-${handleSideWidth} min-h-[40px] px-0 py-0`,
)}>
className={cn(
'group relative rounded-[10px] bg-components-panel-bg',
`-ml-${handleSideWidth} min-h-[40px] px-0 py-0`,
)}>
<div >
<Item
className={cn(canDrag && 'handle')}

View File

@ -88,7 +88,6 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
return
setModelChanged(false)
handleVisionConfigAfterModelChanged()
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isVisionModel, modelChanged])
const handleQueryVarChange = useCallback((newVar: ValueSelector | string) => {
@ -110,7 +109,6 @@ const useConfig = (id: string, payload: QuestionClassifierNodeType) => {
query_variable_selector: inputs.query_variable_selector.length > 0 ? inputs.query_variable_selector : query_variable_selector,
})
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [defaultConfig])
const handleClassesChange = useCallback((newClasses: any) => {

View File

@ -140,7 +140,6 @@ const useConfig = (id: string, payload: ToolNodeType) => {
return
const inputsWithDefaultValue = formattingParameters()
setInputs(inputsWithDefaultValue)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [currTool])
// setting when call

View File

@ -61,7 +61,7 @@ const useSingleRunFormParams = ({
Object.keys(inputs.tool_parameters).forEach((key: string) => {
const { type, value } = inputs.tool_parameters[key]
if (type === VarType.constant && (value === undefined || value === null)) {
if(!draft.tool_parameters || !draft.tool_parameters[key])
if(!draft.tool_parameters || !draft.tool_parameters[key])
return
draft[key] = value
}

View File

@ -114,6 +114,7 @@ const MoreActions: FC = () => {
}, 500)
}
else {
// Current viewport export (existing functionality)
switch (type) {
case 'png':
dataUrl = await toPng(flowElement, { filter })
@ -141,6 +142,7 @@ const MoreActions: FC = () => {
document.body.removeChild(link)
}
else {
// For current view, just download
const link = document.createElement('a')
link.href = dataUrl
link.download = `${filename}.${type}`

View File

@ -51,7 +51,7 @@ const InputsPanel = ({ onRun }: Props) => {
if (startVariables) {
startVariables.forEach((variable) => {
if (variable.default)
initialInputs[variable.variable] = variable.default
initialInputs[variable.variable] = variable.default
})
}

View File

@ -88,7 +88,7 @@ const WorkflowPreview = () => {
<div className={
'relative flex h-full flex-col rounded-l-2xl border-[0.5px] border-components-panel-border bg-components-panel-bg shadow-xl'
}
style={{ width: `${panelWidth}px` }}
style={{ width: `${panelWidth}px` }}
>
<div
className="absolute bottom-0 left-[3px] top-1/2 z-50 h-6 w-[3px] cursor-col-resize rounded bg-gray-300"

View File

@ -131,7 +131,7 @@ const RunPanel: FC<RunProps> = ({ hideResult, activeTab = 'RESULT', runID, getRe
>{t('runLog.tracing')}</div>
</div>
{/* panel detail */}
<div ref={ref} className={cn('relative h-0 grow overflow-y-auto rounded-b-2xl bg-components-panel-bg')}>
<div ref={ref} className={cn('relative h-0 grow overflow-y-auto rounded-b-xl bg-components-panel-bg')}>
{loading && (
<div className='flex h-full items-center justify-center bg-components-panel-bg'>
<Loading />

View File

@ -416,7 +416,7 @@ const SelectionContextmenu = () => {
</div>
<div className='h-px bg-divider-regular'></div>
<div className='p-1'>
<div className='system-xs-medium px-2 py-2 text-text-tertiary'>
<div className='system-xs-medium px-2 py-2 text-text-tertiary'>
{t('workflow.operator.horizontal')}
</div>
<div

View File

@ -18,7 +18,7 @@ const Empty: FC = () => {
href='https://docs.dify.ai/en/guides/workflow/debug-and-preview/variable-inspect'
target='_blank'
rel='noopener noreferrer'>
{t('workflow.debug.variableInspect.emptyLink')}
{t('workflow.debug.variableInspect.emptyLink')}
</a>
</div>
</div>

View File

@ -16,15 +16,15 @@ const VariableInspectPanel: FC = () => {
const setVariableInspectPanelHeight = useStore(s => s.setVariableInspectPanelHeight)
const maxHeight = useMemo(() => {
if (!workflowCanvasHeight)
return 480
return workflowCanvasHeight - 60
}, [workflowCanvasHeight])
if (!workflowCanvasHeight)
return 480
return workflowCanvasHeight - 60
}, [workflowCanvasHeight])
const handleResize = useCallback((width: number, height: number) => {
localStorage.setItem('workflow-variable-inpsect-panel-height', `${height}`)
setVariableInspectPanelHeight(height)
}, [setVariableInspectPanelHeight])
}, [setVariableInspectPanelHeight])
const {
triggerRef,