refactor: remove file upload migration tip (#35409)

This commit is contained in:
非法操作
2026-04-20 10:29:30 +08:00
committed by GitHub
parent ba5d8c1b29
commit 3627c1e720
2 changed files with 1 additions and 34 deletions

View File

@@ -157,18 +157,6 @@ describe('NewFeaturePanel', () => {
expect(screen.queryByText(/feature\.fileUpload\.title/)).not.toBeInTheDocument()
expect(screen.queryByText(/feature\.imageUpload\.title/)).not.toBeInTheDocument()
})
it('should show file upload tip in chat mode with showFileUpload', () => {
renderPanel({ isChatMode: true, showFileUpload: true })
expect(screen.getByText(/common\.fileUploadTip/)).toBeInTheDocument()
})
it('should show image upload legacy tip in non-chat mode with showFileUpload', () => {
renderPanel({ isChatMode: false, showFileUpload: true })
expect(screen.getByText(/common\.ImageUploadLegacyTip/)).toBeInTheDocument()
})
})
describe('MoreLikeThis Feature', () => {
@@ -204,12 +192,4 @@ describe('NewFeaturePanel', () => {
expect(screen.queryByText(/feature\.annotation\.title/)).not.toBeInTheDocument()
})
})
describe('Edge Cases', () => {
it('should not show file upload tip when showFileUpload is false', () => {
renderPanel({ isChatMode: true, showFileUpload: false })
expect(screen.queryByText(/common\.fileUploadTip/)).not.toBeInTheDocument()
})
})
})

View File

@@ -1,7 +1,7 @@
import type { OnFeaturesChange } from '@/app/components/base/features/types'
import type { InputVar } from '@/app/components/workflow/types'
import type { PromptVariable } from '@/models/debug'
import { RiCloseLine, RiInformation2Fill } from '@remixicon/react'
import { RiCloseLine } from '@remixicon/react'
import { useTranslation } from 'react-i18next'
import AnnotationReply from '@/app/components/base/features/new-feature-panel/annotation-reply'
@@ -64,19 +64,6 @@ const NewFeaturePanel = ({
</div>
{/* list */}
<div className="grow basis-0 overflow-y-auto px-4 pb-4">
{showFileUpload && (
<div className="relative mb-1 rounded-xl border border-components-panel-border p-2 shadow-xs">
<div className="absolute top-0 left-0 h-full w-full rounded-xl opacity-40" style={{ background: 'linear-gradient(92deg, rgba(11, 165, 236, 0.25) 18.12%, rgba(255, 255, 255, 0.00) 167.31%)' }}></div>
<div className="relative flex h-full w-full items-start">
<div className="mr-0.5 shrink-0 p-0.5">
<RiInformation2Fill className="h-5 w-5 text-text-accent" />
</div>
<div className="p-1 system-xs-medium text-text-primary">
<span>{isChatMode ? t('common.fileUploadTip', { ns: 'workflow' }) : t('common.ImageUploadLegacyTip', { ns: 'workflow' })}</span>
</div>
</div>
</div>
)}
{!isChatMode && !inWorkflow && (
<MoreLikeThis disabled={disabled} onChange={onChange} />
)}