diff --git a/components/decision-summary.tsx b/components/decision-summary.tsx index aac81a6..9d730b7 100644 --- a/components/decision-summary.tsx +++ b/components/decision-summary.tsx @@ -92,6 +92,15 @@ export function DecisionSummary({ )} + {decision.decisionNotes && !compact && ( +
+

Notes

+
+ +
+
+ )} + {!compact && (
diff --git a/components/tiptap-editor.tsx b/components/tiptap-editor.tsx index ef2441f..cbb54ab 100644 --- a/components/tiptap-editor.tsx +++ b/components/tiptap-editor.tsx @@ -14,14 +14,21 @@ import { TooltipProvider, TooltipTrigger, } from '@/components/ui/tooltip' +import { cn } from "@/lib/utils" interface TipTapEditorProps { content: string onChange: (content: string) => void className?: string + minimal?: boolean } -export function TipTapEditor({ content, onChange, className = '' }: TipTapEditorProps) { +const getEditorClassNames = (minimal: boolean) => cn( + 'prose prose-sm dark:prose-invert focus:outline-none max-w-none', + minimal ? 'p-2' : 'p-4 min-h-[200px]' +); + +export function TipTapEditor({ content, onChange, className = '', minimal = false }: TipTapEditorProps) { const [isFocused, setIsFocused] = React.useState(false); const [isRawMode, setIsRawMode] = React.useState(false); const [rawMarkdown, setRawMarkdown] = React.useState(content || ''); @@ -53,7 +60,7 @@ export function TipTapEditor({ content, onChange, className = '' }: TipTapEditor }, editorProps: { attributes: { - class: 'prose prose-sm dark:prose-invert focus:outline-none max-w-none p-4 min-h-[200px]' + class: getEditorClassNames(minimal) } }, onFocus: () => setIsFocused(true), @@ -173,35 +180,42 @@ export function TipTapEditor({ content, onChange, className = '' }: TipTapEditor ]; return ( - -
- - {tools - .filter(tool => isRawMode ? tool.showInRawMode : true) - .map((Tool) => ( - - - - - {Tool.title} - - ))} - -
+ + {!minimal && ( +
+ + {tools + .filter(tool => isRawMode ? tool.showInRawMode : true) + .map((Tool) => ( + + + + + {Tool.title} + + ))} + +
+ )} {isRawMode ? (