diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx index 5f23c89d48c..f971bb19cc2 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx @@ -2,20 +2,8 @@ import { useRef, useState } from 'react' import { AlertCircle, Loader2, X } from 'lucide-react' -import { - AlertDialog, - AlertDialogAction, - AlertDialogCancel, - AlertDialogContent, - AlertDialogDescription, - AlertDialogFooter, - AlertDialogHeader, - AlertDialogTitle, -} from '@/components/ui/alert-dialog' -import { Button } from '@/components/ui/button' -import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog' +import { Button, Modal, ModalContent, ModalTitle, Textarea } from '@/components/emcn' import { Label } from '@/components/ui/label' -import { Textarea } from '@/components/ui/textarea' import { createLogger } from '@/lib/logs/console/logger' import type { ChunkData, DocumentData } from '@/stores/knowledge/store' @@ -123,109 +111,135 @@ export function CreateChunkModal({ return ( <> - - + - + {/* Modal Header */} +
- Create Chunk -
- - -
-
-
- {/* Document Info Section - Fixed at top */} -
-
-
-

- {document?.filename || 'Unknown Document'} -

-

Adding chunk to this document

+
+ + {/* Modal Body */} +
+
+ {/* Scrollable Content */} +
+
+
+ {/* Document Info Section */} +
+
+
+

+ {document?.filename || 'Unknown Document'} +

+

+ Adding chunk to this document +

+
+
+ + {/* Error Display */} + {error && ( +
+ +

{error}

+
+ )}
-
- {/* Error Display */} - {error && ( -
- -

{error}

+ {/* Content Input Section - Expands to fill space */} +
+ +