chore: revert some changes not related to collaboration

This commit is contained in:
hjlarry 2026-04-10 22:42:17 +08:00
parent 078ab83009
commit 70eafde45e
12 changed files with 45 additions and 81 deletions

View File

@ -73,6 +73,7 @@ const ImageInput: FC<UploaderProps> = ({
const handleShowImage = () => {
if (isAnimatedImage) {
return (
// eslint-disable-next-line next/no-img-element
<img src={inputImage?.url} alt="" data-testid="animated-image" />
)
}

View File

@ -1,3 +1,4 @@
/* eslint-disable next/no-img-element */
import type { FC } from 'react'
import type { ImageFile } from '@/types/app'
import { useState } from 'react'

View File

@ -45,7 +45,7 @@ const Header = () => {
const renderLogo = () => (
<h1>
<Link href="/apps" className="flex h-8 shrink-0 items-center justify-center overflow-hidden px-0.5 indent-[-9999px] whitespace-nowrap">
<Link href="/apps" className="flex h-8 shrink-0 items-center justify-center overflow-hidden whitespace-nowrap px-0.5 indent-[-9999px]">
{isBrandingEnabled && systemFeatures.branding.application_title ? systemFeatures.branding.application_title : 'Dify'}
{systemFeatures.branding.enabled && systemFeatures.branding.workspace_logo
? (
@ -91,7 +91,7 @@ const Header = () => {
return (
<div className="flex h-[56px] items-center">
<div className="flex min-w-0 flex-1 items-center pr-2 pl-3 min-[1280px]:pr-3">
<div className="flex min-w-0 flex-1 items-center pl-3 pr-2 min-[1280px]:pr-3">
{renderLogo()}
<div className="mx-1.5 shrink-0 font-light text-divider-deep">/</div>
<WorkspaceProvider>
@ -105,7 +105,7 @@ const Header = () => {
{(isCurrentWorkspaceEditor || isCurrentWorkspaceDatasetOperator) && <DatasetNav />}
{!isCurrentWorkspaceDatasetOperator && <ToolsNav className={navClassName} />}
</div>
<div className="flex min-w-0 flex-1 items-center justify-end pr-3 pl-2 min-[1280px]:pl-3">
<div className="flex min-w-0 flex-1 items-center justify-end pl-2 pr-3 min-[1280px]:pl-3">
<EnvNav />
<div className="mr-2">
<PluginsNav />

View File

@ -71,7 +71,7 @@ const ActionList = ({
className='w-full'
onClick={() => setShowSettingAuth(true)}
disabled={!isCurrentWorkspaceManager}
>{t('nodes.tool.authorize', { ns: 'workflow' })}</Button>
>{t('workflow.nodes.tool.authorize')}</Button>
)} */}
</div>
{/* <div className='flex flex-col gap-2'>

View File

@ -24,7 +24,7 @@ export const useAvailableNodesMetaData = () => {
},
knowledgeBaseDefault,
dataSourceEmptyDefault,
] as AvailableNodesMetaData['nodes'], [])
], [])
const helpLinkUri = useMemo(() => docLink(
'/use-dify/knowledge/knowledge-pipeline/knowledge-pipeline-orchestration',

View File

@ -3,14 +3,8 @@ import { useWorkflowStore } from '@/app/components/workflow/store'
export const useGetRunAndTraceUrl = () => {
const workflowStore = useWorkflowStore()
const getWorkflowRunAndTraceUrl = useCallback((runId?: string) => {
const getWorkflowRunAndTraceUrl = useCallback((runId: string) => {
const { pipelineId } = workflowStore.getState()
if (!pipelineId || !runId) {
return {
runUrl: '',
traceUrl: '',
}
}
return {
runUrl: `/rag/pipelines/${pipelineId}/workflow-runs/${runId}`,

View File

@ -39,7 +39,7 @@ export const useAvailableNodesMetaData = () => {
TriggerPluginDefault,
]
),
] as AvailableNodesMetaData['nodes'], [isChatMode, startNodeMetaData])
], [isChatMode, startNodeMetaData])
const availableNodesMetaData = useMemo(() => mergedNodesMetaData.map((node) => {
const { metaData } = node
@ -60,7 +60,7 @@ export const useAvailableNodesMetaData = () => {
title,
},
}
}) as AvailableNodesMetaData['nodes'], [mergedNodesMetaData, t, docLink])
}), [mergedNodesMetaData, t, docLink])
const availableNodesMetaDataMap = useMemo(() => availableNodesMetaData.reduce((acc, node) => {
acc![node.metaData.type] = node

View File

@ -3,14 +3,8 @@ import { useWorkflowStore } from '@/app/components/workflow/store'
export const useGetRunAndTraceUrl = () => {
const workflowStore = useWorkflowStore()
const getWorkflowRunAndTraceUrl = useCallback((runId?: string) => {
const getWorkflowRunAndTraceUrl = useCallback((runId: string) => {
const { appId } = workflowStore.getState()
if (!appId || !runId) {
return {
runUrl: '',
traceUrl: '',
}
}
return {
runUrl: `/apps/${appId}/workflow-runs/${runId}`,

View File

@ -35,7 +35,7 @@ const NodeSelectorWrapper = (props: NodeSelectorProps) => {
return true
})
}, [availableNodesMetaData?.nodes]) as NodeSelectorProps['blocks']
}, [availableNodesMetaData?.nodes])
return (
<NodeSelector

View File

@ -68,7 +68,7 @@ const AdvancedOptions: FC<AdvancedOptionsProps> = ({
>
<RiArrowDownDoubleLine className='h-3 w-3 text-text-tertiary' />
<span className='system-xs-regular text-text-tertiary'>
{t('nodes.llm.jsonSchema.showAdvancedOptions', { ns: 'workflow' })}
{t('workflow.nodes.llm.jsonSchema.showAdvancedOptions')}
</span>
</button>
)} */}

View File

@ -78,11 +78,6 @@
"count": 1
}
},
"app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/card-view.tsx": {
"style/no-trailing-spaces": {
"count": 1
}
},
"app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chart-view.tsx": {
"tailwindcss/enforce-consistent-class-order": {
"count": 1
@ -589,6 +584,9 @@
},
"tailwindcss/enforce-consistent-class-order": {
"count": 1
},
"ts/no-explicit-any": {
"count": 5
}
},
"app/components/app/app-publisher/publish-with-multiple-model.tsx": {
@ -1371,18 +1369,10 @@
"count": 1
}
},
"app/components/apps/__tests__/list.spec.tsx": {
"unused-imports/no-unused-vars": {
"count": 1
}
},
"app/components/apps/app-card.tsx": {
"no-restricted-imports": {
"count": 3
},
"perfectionist/sort-imports": {
"count": 1
},
"react/component-hook-factories": {
"count": 1
},
@ -1570,11 +1560,6 @@
"count": 1
}
},
"app/components/base/avatar/index.tsx": {
"tailwindcss/enforce-consistent-class-order": {
"count": 2
}
},
"app/components/base/badge.tsx": {
"tailwindcss/enforce-consistent-class-order": {
"count": 2
@ -2657,7 +2642,7 @@
},
"app/components/base/icons/src/public/other/index.ts": {
"no-barrel-files/no-barrel-files": {
"count": 6
"count": 5
}
},
"app/components/base/icons/src/public/thought/index.ts": {
@ -7930,6 +7915,11 @@
"count": 3
}
},
"app/components/workflow-app/components/workflow-main.tsx": {
"ts/no-explicit-any": {
"count": 2
}
},
"app/components/workflow-app/components/workflow-onboarding-modal/index.tsx": {
"tailwindcss/enforce-consistent-class-order": {
"count": 3
@ -8330,6 +8320,11 @@
"count": 1
}
},
"app/components/workflow/hooks-store/store.ts": {
"ts/no-explicit-any": {
"count": 6
}
},
"app/components/workflow/hooks/__tests__/use-checklist.spec.ts": {
"react/error-boundaries": {
"count": 1
@ -8337,7 +8332,7 @@
},
"app/components/workflow/hooks/index.ts": {
"no-barrel-files/no-barrel-files": {
"count": 29
"count": 25
}
},
"app/components/workflow/hooks/use-checklist.ts": {
@ -8353,11 +8348,6 @@
"count": 3
}
},
"app/components/workflow/hooks/use-edges-interactions.ts": {
"perfectionist/sort-imports": {
"count": 1
}
},
"app/components/workflow/hooks/use-helpline.ts": {
"ts/no-explicit-any": {
"count": 1
@ -8368,6 +8358,11 @@
"count": 1
}
},
"app/components/workflow/hooks/use-node-data-update.ts": {
"ts/no-explicit-any": {
"count": 1
}
},
"app/components/workflow/hooks/use-nodes-interactions.ts": {
"ts/no-explicit-any": {
"count": 8
@ -8409,8 +8404,11 @@
}
},
"app/components/workflow/index.tsx": {
"ts/no-explicit-any": {
"tailwindcss/enforce-consistent-class-order": {
"count": 1
},
"ts/no-explicit-any": {
"count": 2
}
},
"app/components/workflow/nodes/_base/components/add-variable-popup-with-position.tsx": {
@ -9867,11 +9865,6 @@
"count": 1
}
},
"app/components/workflow/nodes/knowledge-retrieval/use-config.ts": {
"ts/no-explicit-any": {
"count": 3
}
},
"app/components/workflow/nodes/knowledge-retrieval/use-single-run-form-params.ts": {
"ts/no-explicit-any": {
"count": 5
@ -10088,11 +10081,8 @@
}
},
"app/components/workflow/nodes/llm/panel.tsx": {
"no-restricted-imports": {
"count": 1
},
"tailwindcss/enforce-consistent-class-order": {
"count": 9
"count": 1
}
},
"app/components/workflow/nodes/llm/types.ts": {
@ -10105,7 +10095,7 @@
"count": 2
},
"ts/no-explicit-any": {
"count": 2
"count": 1
}
},
"app/components/workflow/nodes/llm/use-single-run-form-params.ts": {
@ -10956,6 +10946,11 @@
"count": 1
}
},
"app/components/workflow/panel/version-history-panel/index.tsx": {
"tailwindcss/enforce-consistent-class-order": {
"count": 2
}
},
"app/components/workflow/panel/version-history-panel/loading/index.tsx": {
"tailwindcss/enforce-consistent-class-order": {
"count": 1
@ -11070,11 +11065,6 @@
"count": 1
}
},
"app/components/workflow/run/loop-log/loop-result-panel.tsx": {
"tailwindcss/enforce-consistent-class-order": {
"count": 3
}
},
"app/components/workflow/run/loop-result-panel.tsx": {
"tailwindcss/enforce-consistent-class-order": {
"count": 4
@ -11664,17 +11654,6 @@
"count": 1
}
},
"contract/console/apps.ts": {
"style/eol-last": {
"count": 1
},
"style/no-multiple-empty-lines": {
"count": 1
},
"style/no-trailing-spaces": {
"count": 1
}
},
"hooks/use-async-window-open.spec.ts": {
"ts/no-explicit-any": {
"count": 6

View File

@ -226,12 +226,7 @@ const createMockLocalStorage = () => {
}
}
let mockLocalStorage: ReturnType<typeof createMockLocalStorage> = createMockLocalStorage()
Object.defineProperty(globalThis, 'localStorage', {
value: mockLocalStorage,
writable: true,
configurable: true,
})
let mockLocalStorage: ReturnType<typeof createMockLocalStorage>
beforeEach(() => {
vi.clearAllMocks()