File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { Message } from 'ai' ;
22import { generateId } from './fileUtils' ;
3- import { detectProjectCommands , createCommandsMessage , escapeExampleTags } from './projectCommands' ;
3+ import { detectProjectCommands , createCommandsMessage , escapeCodinitTags } from './projectCommands' ;
44
55export const createChatFromFolder = async (
66 files : File [ ] ,
@@ -38,15 +38,15 @@ export const createChatFromFolder = async (
3838 role : 'assistant' ,
3939 content : `I've imported the contents of the "${ folderName } " folder.${ binaryFilesMessage }
4040
41- <exampleArtifact id="imported-files" title="Imported Files" type="bundled" >
41+ <codinitArtifact id="imported-files" title="Imported Files" type="bundled" >
4242${ fileArtifacts
4343 . map (
44- ( file ) => `<exampleAction type="file" filePath="${ file . path } ">
45- ${ escapeExampleTags ( file . content ) }
46- </exampleAction >` ,
44+ ( file ) => `<codinitAction type="file" filePath="${ file . path } ">
45+ ${ escapeCodinitTags ( file . content ) }
46+ </codinitAction >` ,
4747 )
4848 . join ( '\n\n' ) }
49- </exampleArtifact >` ,
49+ </codinitArtifact >` ,
5050 id : generateId ( ) ,
5151 createdAt : new Date ( ) ,
5252 } ;
You can’t perform that action at this time.
0 commit comments