@@ -72,30 +72,30 @@ export function createCommandsMessage(commands: ProjectCommands): Message | null
7272
7373 if ( commands . setupCommand ) {
7474 commandString += `
75- <exampleAction type="shell">${ commands . setupCommand } </exampleAction >` ;
75+ <codinitAction type="shell">${ commands . setupCommand } </codinitAction >` ;
7676 }
7777
7878 if ( commands . startCommand ) {
7979 commandString += `
80- <exampleAction type="start">${ commands . startCommand } </exampleAction >
80+ <codinitAction type="start">${ commands . startCommand } </codinitAction >
8181` ;
8282 }
8383
8484 return {
8585 role : 'assistant' ,
8686 content : `
8787${ commands . followupMessage ? `\n\n${ commands . followupMessage } ` : '' }
88- <exampleArtifact id="project-setup" title="Project Setup">
88+ <codinitArtifact id="project-setup" title="Project Setup">
8989${ commandString }
90- </exampleArtifact >` ,
90+ </codinitArtifact >` ,
9191 id : generateId ( ) ,
9292 createdAt : new Date ( ) ,
9393 } ;
9494}
9595
96- export function escapeExampleArtifactTags ( input : string ) {
97- // Regular expression to match exampleArtifact tags and their content
98- const regex = / ( < e x a m p l e A r t i f a c t [ ^ > ] * > ) ( [ \s \S ] * ?) ( < \/ e x a m p l e A r t i f a c t > ) / g;
96+ export function escapeCodinitArtifactTags ( input : string ) {
97+ // Regular expression to match codinitArtifact tags and their content
98+ const regex = / ( < c o d i n i t A r t i f a c t [ ^ > ] * > ) ( [ \s \S ] * ?) ( < \/ c o d i n i t A r t i f a c t > ) / g;
9999
100100 return input . replace ( regex , ( match , openTag , content , closeTag ) => {
101101 // Escape the opening tag
@@ -109,9 +109,9 @@ export function escapeExampleArtifactTags(input: string) {
109109 } ) ;
110110}
111111
112- export function escapeExampleAActionTags ( input : string ) {
113- // Regular expression to match exampleArtifact tags and their content
114- const regex = / ( < e x a m p l e A c t i o n [ ^ > ] * > ) ( [ \s \S ] * ?) ( < \/ e x a m p l e A c t i o n > ) / g;
112+ export function escapeCodinitAActionTags ( input : string ) {
113+ // Regular expression to match codinitArtifact tags and their content
114+ const regex = / ( < c o d i n i t A c t i o n [ ^ > ] * > ) ( [ \s \S ] * ?) ( < \/ c o d i n i t A c t i o n > ) / g;
115115
116116 return input . replace ( regex , ( match , openTag , content , closeTag ) => {
117117 // Escape the opening tag
@@ -125,8 +125,8 @@ export function escapeExampleAActionTags(input: string) {
125125 } ) ;
126126}
127127
128- export function escapeExampleTags ( input : string ) {
129- return escapeExampleArtifactTags ( escapeExampleAActionTags ( input ) ) ;
128+ export function escapeCodinitTags ( input : string ) {
129+ return escapeCodinitArtifactTags ( escapeCodinitAActionTags ( input ) ) ;
130130}
131131
132132// We have this seperate function to simplify the restore snapshot process in to one single artifact.
@@ -140,12 +140,12 @@ export function createCommandActionsString(commands: ProjectCommands): string {
140140
141141 if ( commands . setupCommand ) {
142142 commandString += `
143- <exampleAction type="shell">${ commands . setupCommand } </exampleAction >` ;
143+ <codinitAction type="shell">${ commands . setupCommand } </codinitAction >` ;
144144 }
145145
146146 if ( commands . startCommand ) {
147147 commandString += `
148- <exampleAction type="start">${ commands . startCommand } </exampleAction >
148+ <codinitAction type="start">${ commands . startCommand } </codinitAction >
149149` ;
150150 }
151151
0 commit comments