Skip to content

Commit

Permalink
fix(apps): use a normal message for error fixing (#155)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Pokorný <[email protected]>
  • Loading branch information
JanPokorny authored Dec 17, 2024
1 parent bbfd730 commit 8c3cbac
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/modules/apps/builder/AppBuilder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,11 @@ function AppBuilderContent() {

const handleReportError = useCallback(
async (errorText: string) => {
await createMessage(organization.id, project.id, thread!.id, {
role: 'user',
content: `I have encountered the following error:\n\n\`\`\`error\n${errorText}\n\`\`\``,
metadata: encodeMetadata<MessageMetadata>({ type: 'report-error' }),
});
await sendMessage(`Help me fix the attached error.`);
await sendMessage(
`I have encountered the following error:\n\n\`\`\`error\n${errorText}\n\`\`\`\n\nFix this error please.`,
);
},
[organization, project, thread, sendMessage],
[sendMessage],
);

return (
Expand Down

0 comments on commit 8c3cbac

Please sign in to comment.