better createFile
This commit is contained in:
parent
5659afc96f
commit
54b7b22e3f
1 changed files with 4 additions and 6 deletions
|
|
@ -7,11 +7,9 @@ interface CreateFileToolCallProps {
|
|||
}
|
||||
|
||||
export function CreateFile(props: CreateFileToolCallProps) {
|
||||
const src = `\`\`\`${getMarkdownLanguageTagForFile(props.filepath ?? "javascript")} ${props.filepath}\n${props.fileContents ?? ""}\n\`\`\``;
|
||||
const src = `\`\`\`${getMarkdownLanguageTagForFile(props.filepath ?? "test.txt")} ${props.filepath}\n${props.fileContents ?? ""}\n\`\`\``;
|
||||
|
||||
return (
|
||||
<>
|
||||
<StyledMarkdownPreview isRenderingInStepContainer={true} source={src} />
|
||||
</>
|
||||
);
|
||||
return props.filepath ? (
|
||||
<StyledMarkdownPreview isRenderingInStepContainer={true} source={src} />
|
||||
) : null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue