Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 53s
- Redesign agents page with architectural-grid (8) design system: rounded-2xl cards, serif headings, motion tabs, dashed templates section - Replace agent form popup with full-page detail view (SettingsView style) with dark planning card, section tooltips, and help button - Hide advanced mode for slide/excalidraw generators - Add 'describe images' action to contextual AI assistant - Add copy button to action/resource preview with HTTP fallback - Add delete history button to agent run log panel - Increase AI word limit from 2000 to 5000 (reformulate + transform-markdown) - Increase max steps slider from 25 to 50 - Fix image description error with clear model compatibility message - Fix doubled execution count display in agent detail view - Remove dead files: notes-list-view.tsx, notes-view-toggle.tsx - Remove 'list' view mode from NotesViewMode type - Add missing i18n keys (back, configuration, options, copy, cleared)
73 lines
1.8 KiB
TypeScript
73 lines
1.8 KiB
TypeScript
'use client'
|
|
|
|
import dynamic from 'next/dynamic'
|
|
import { Note } from '@/lib/types'
|
|
import { NotesTabsView } from '@/components/notes-tabs-view'
|
|
|
|
const MasonryGridLazy = dynamic(
|
|
() => import('@/components/masonry-grid').then((m) => m.MasonryGrid),
|
|
{
|
|
ssr: false,
|
|
loading: () => (
|
|
<div
|
|
className="min-h-[200px] rounded-xl border border-dashed border-muted-foreground/20 bg-muted/30 animate-pulse"
|
|
aria-hidden
|
|
/>
|
|
),
|
|
}
|
|
)
|
|
|
|
export type NotesViewMode = 'masonry' | 'tabs'
|
|
|
|
interface NotesMainSectionProps {
|
|
notes: Note[]
|
|
viewMode: NotesViewMode
|
|
onEdit?: (note: Note, readOnly?: boolean) => void
|
|
onSizeChange?: (noteId: string, size: 'small' | 'medium' | 'large') => void
|
|
currentNotebookId?: string | null
|
|
noteHistoryMode?: 'manual' | 'auto'
|
|
onOpenHistory?: (note: Note) => void
|
|
onEnableHistory?: (noteId: string) => Promise<void>
|
|
onNoteCreated?: (note: Note) => void
|
|
}
|
|
|
|
export function NotesMainSection({
|
|
notes,
|
|
viewMode,
|
|
onEdit,
|
|
onSizeChange,
|
|
currentNotebookId,
|
|
noteHistoryMode = 'manual',
|
|
onOpenHistory,
|
|
onEnableHistory,
|
|
onNoteCreated,
|
|
}: NotesMainSectionProps) {
|
|
if (viewMode === 'tabs') {
|
|
return (
|
|
<div className="flex min-h-0 flex-1 flex-col" data-testid="notes-grid-tabs-wrap">
|
|
<NotesTabsView
|
|
notes={notes}
|
|
onEdit={onEdit}
|
|
currentNotebookId={currentNotebookId}
|
|
noteHistoryMode={noteHistoryMode}
|
|
onOpenHistory={onOpenHistory}
|
|
onEnableHistory={onEnableHistory}
|
|
onNoteCreated={onNoteCreated}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
return (
|
|
<div data-testid="notes-grid">
|
|
<MasonryGridLazy
|
|
notes={notes}
|
|
onEdit={onEdit}
|
|
onSizeChange={onSizeChange}
|
|
noteHistoryMode={noteHistoryMode}
|
|
onOpenHistory={onOpenHistory}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|