- {/* Text content with markdown-like formatting */}
+ {/* Text content rendered as markdown */}
{textContent && (
-
- {textContent.split('\n').map((line, i) => {
- // Simple markdown parsing
- if (line.startsWith('**') && line.endsWith('**')) {
- return (
-
- {line.slice(2, -2)}
-
- );
- }
- if (line.startsWith('- ')) {
- return (
-
- {line.slice(2)}
-
- );
- }
- if (line.trim() === '') {
- return
;
- }
- return
{line};
- })}
+
+
+ {textContent}
+
)}
@@ -98,6 +189,26 @@ export function ChatMessage({ message, onOptionSelect, onPromptSave, externalUIC
)}
+ {/* Quick confirmation buttons */}
+ {shouldShowQuickConfirm && (
+
+
+
+
+ )}
+
{/* Interactive UI component - Ask tool (user_input_required) */}
{uiComponent && uiComponent.type === 'user_input_required' && onOptionSelect && (
@@ -128,6 +239,35 @@ export function ChatMessage({ message, onOptionSelect, onPromptSave, externalUIC
/>
)}
+
+ {/* Data table capture (bulk entry) */}
+ {uiComponent && uiComponent.type === 'data_table' && onTableSubmit && (
+
+
+
+ )}
+
+ {/* Process map builder */}
+ {uiComponent && uiComponent.type === 'process_map' && onProcessMapSubmit && (
+
+ )}
);
diff --git a/src/frontend/src/components/design-assistant/DataTableCapture.tsx b/src/frontend/src/components/design-assistant/DataTableCapture.tsx
new file mode 100644
index 0000000..7d99f02
--- /dev/null
+++ b/src/frontend/src/components/design-assistant/DataTableCapture.tsx
@@ -0,0 +1,262 @@
+/**
+ * Data table capture component for bulk structured input.
+ */
+
+import { useMemo, useState } from 'react';
+import type {
+ DataTableColumn,
+ DataTableRow,
+ DataTableSubmission,
+} from '../../types/design-session';
+
+interface DataTableCaptureProps {
+ title: string;
+ columns: DataTableColumn[];
+ minRows?: number;
+ starterRows?: number;
+ inputModes?: Array<'paste' | 'inline' | 'import'>;
+ summaryPrompt?: string;
+ onSubmit: (payload: DataTableSubmission) => void;
+}
+
+const MAX_ROWS = 50;
+
+function buildEmptyRow(columns: DataTableColumn[]): DataTableRow {
+ return columns.reduce