Skip to content

Commit fa2a3c7

Browse files
Update projectCommands utility
1 parent e4e0810 commit fa2a3c7

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

app/utils/projectCommands.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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 = /(<exampleArtifact[^>]*>)([\s\S]*?)(<\/exampleArtifact>)/g;
96+
export function escapeCodinitArtifactTags(input: string) {
97+
// Regular expression to match codinitArtifact tags and their content
98+
const regex = /(<codinitArtifact[^>]*>)([\s\S]*?)(<\/codinitArtifact>)/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 = /(<exampleAction[^>]*>)([\s\S]*?)(<\/exampleAction>)/g;
112+
export function escapeCodinitAActionTags(input: string) {
113+
// Regular expression to match codinitArtifact tags and their content
114+
const regex = /(<codinitAction[^>]*>)([\s\S]*?)(<\/codinitAction>)/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

Comments
 (0)