diff --git a/app/components/git/GitUrlImport.client.tsx b/app/components/git/GitUrlImport.client.tsx index 90853701..6053acdc 100644 --- a/app/components/git/GitUrlImport.client.tsx +++ b/app/components/git/GitUrlImport.client.tsx @@ -91,6 +91,11 @@ ${escapeBoltTags(file.content)} const messages = [filesMessage]; if (commandsMessage) { + messages.push({ + role: 'user', + id: generateId(), + content: 'Setup the codebase and Start the application', + }); messages.push(commandsMessage); } diff --git a/app/utils/folderImport.ts b/app/utils/folderImport.ts index 98bbe316..11449cf3 100644 --- a/app/utils/folderImport.ts +++ b/app/utils/folderImport.ts @@ -38,7 +38,7 @@ export const createChatFromFolder = async ( role: 'assistant', content: `I've imported the contents of the "${folderName}" folder.${binaryFilesMessage} - + ${fileArtifacts .map( (file) => ` @@ -61,6 +61,11 @@ ${escapeBoltTags(file.content)} const messages = [userMessage, filesMessage]; if (commandsMessage) { + messages.push({ + role: 'user', + id: generateId(), + content: 'Setup the codebase and Start the application', + }); messages.push(commandsMessage); } diff --git a/app/utils/projectCommands.ts b/app/utils/projectCommands.ts index e734dffb..34abc0a0 100644 --- a/app/utils/projectCommands.ts +++ b/app/utils/projectCommands.ts @@ -3,7 +3,8 @@ import { generateId } from './fileUtils'; export interface ProjectCommands { type: string; - setupCommand: string; + setupCommand?: string; + startCommand?: string; followupMessage: string; } @@ -33,7 +34,8 @@ export async function detectProjectCommands(files: FileContent[]): Promise${commands.setupCommand}`; + } + + if (commands.startCommand) { + commandString += ` +${commands.startCommand} +`; + } + return { role: 'assistant', content: ` - -${commands.setupCommand} - +${commandString} ${commands.followupMessage ? `\n\n${commands.followupMessage}` : ''}`, id: generateId(), createdAt: new Date(),