feat: Add clickable file paths in AI chat responses

- Detect file paths with dots in directory names (e.g. next/styles/SignIn.module.css)
- Create new files when path ends with "(new file)"
- Use existing socket connection and file management system
This commit is contained in:
Akhileshrangani4
2024-12-01 18:52:02 -05:00
parent 0ae89341d2
commit 4e1c5cac27
6 changed files with 66 additions and 12 deletions

View File

@ -19,6 +19,7 @@ export default function ChatMessage({
editorRef,
mergeDecorationsCollection,
setMergeDecorationsCollection,
selectFile,
}: MessageProps) {
// State for expanded message index
const [expandedMessageIndex, setExpandedMessageIndex] = useState<
@ -115,8 +116,9 @@ export default function ChatMessage({
activeFileContent,
editorRef,
handleApplyCode,
selectFile,
mergeDecorationsCollection,
setMergeDecorationsCollection
setMergeDecorationsCollection,
)
return (