feat: ai chat now has context of the active tab

This commit is contained in:
Akhileshrangani4
2024-10-14 23:01:25 -04:00
parent cc4a5307cd
commit 751d9a3005
4 changed files with 17 additions and 7 deletions

View File

@ -1145,7 +1145,10 @@ export default function CodeEditor({
<>
<ResizableHandle />
<ResizablePanel defaultSize={30} minSize={15}>
<AIChat />
<AIChat
activeFileContent={activeFileContent}
activeFileName={tabs.find(tab => tab.id === activeFileId)?.name || 'No file selected'}
/>
</ResizablePanel>
</>
)}