diff --git a/apps/x/apps/renderer/src/App.tsx b/apps/x/apps/renderer/src/App.tsx index 78433229..7f195790 100644 --- a/apps/x/apps/renderer/src/App.tsx +++ b/apps/x/apps/renderer/src/App.tsx @@ -140,7 +140,8 @@ const getHeadingTitle = (markdown: string) => { for (const line of lines) { const match = line.match(/^#\s+(.+)$/) if (match) return match[1].trim() - if (line.trim() !== '') return null + const trimmed = line.trim() + if (trimmed !== '') return trimmed } return null } @@ -604,7 +605,7 @@ function App() { const handleChatInputSubmit = (text: string) => { setIsChatSidebarOpen(true) // Submit immediately - the sidebar will open and show the message - handlePromptSubmit({ text }) + handlePromptSubmit({ text, files: [] }) } const toggleExpand = (path: string, kind: 'file' | 'dir') => { @@ -986,7 +987,7 @@ function App() { onSelectFile={toggleExpand} knowledgeActions={knowledgeActions} /> - + {/* Header with sidebar trigger */}
@@ -1093,8 +1094,8 @@ function App() { -
-
+
+
diff --git a/apps/x/apps/renderer/src/components/chat-sidebar.tsx b/apps/x/apps/renderer/src/components/chat-sidebar.tsx index 7b3cfd12..41c6d373 100644 --- a/apps/x/apps/renderer/src/components/chat-sidebar.tsx +++ b/apps/x/apps/renderer/src/components/chat-sidebar.tsx @@ -106,7 +106,7 @@ interface ChatSidebarProps { isProcessing: boolean message: string onMessageChange: (message: string) => void - onSubmit: (message: { text: string }) => void + onSubmit: (message: { text: string; files: never[] }) => void contextUsage: LanguageModelUsage maxTokens: number usedTokens: number @@ -163,7 +163,7 @@ export function ChatSidebar({ const handleSubmit = () => { const trimmed = message.trim() if (trimmed && !isProcessing) { - onSubmit({ text: trimmed }) + onSubmit({ text: trimmed, files: [] }) } }