refactor(datasets): extract hooks and components with comprehensive tests (#31707)

Co-authored-by: CodingOnStar <hanxujiang@dify.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Coding On Star
2026-02-04 18:12:17 +08:00
committed by GitHub
parent cc5705cb71
commit 297dd832aa
38 changed files with 9328 additions and 1653 deletions

View File

@ -11,7 +11,12 @@ vi.mock('@/app/components/base/modal', () => ({
onClose,
children,
closable,
}: any) {
}: {
isShow: boolean
onClose: () => void
children: React.ReactNode
closable?: boolean
}) {
if (!isShow)
return null
@ -39,7 +44,10 @@ vi.mock('./start-node-selection-panel', () => ({
default: function MockStartNodeSelectionPanel({
onSelectUserInput,
onSelectTrigger,
}: any) {
}: {
onSelectUserInput: () => void
onSelectTrigger: (type: BlockEnum, config?: Record<string, unknown>) => void
}) {
return (
<div data-testid="start-node-selection-panel">
<button data-testid="select-user-input" onClick={onSelectUserInput}>