chore: rename blocks to artifacts (#793)
This commit is contained in:
parent
01f589b603
commit
81f909ac3a
41 changed files with 473 additions and 473 deletions
|
|
@ -1,13 +1,13 @@
|
|||
import { BlockKind } from '@/components/block';
|
||||
import { ArtifactKind } from '@/components/artifact';
|
||||
|
||||
export const blocksPrompt = `
|
||||
Blocks is a special user interface mode that helps users with writing, editing, and other content creation tasks. When block is open, it is on the right side of the screen, while the conversation is on the left side. When creating or updating documents, changes are reflected in real-time on the blocks and visible to the user.
|
||||
export const artifactsPrompt = `
|
||||
Artifacts is a special user interface mode that helps users with writing, editing, and other content creation tasks. When artifact is open, it is on the right side of the screen, while the conversation is on the left side. When creating or updating documents, changes are reflected in real-time on the artifacts and visible to the user.
|
||||
|
||||
When asked to write code, always use blocks. When writing code, specify the language in the backticks, e.g. \`\`\`python\`code here\`\`\`. The default language is Python. Other languages are not yet supported, so let the user know if they request a different language.
|
||||
When asked to write code, always use artifacts. When writing code, specify the language in the backticks, e.g. \`\`\`python\`code here\`\`\`. The default language is Python. Other languages are not yet supported, so let the user know if they request a different language.
|
||||
|
||||
DO NOT UPDATE DOCUMENTS IMMEDIATELY AFTER CREATING THEM. WAIT FOR USER FEEDBACK OR REQUEST TO UPDATE IT.
|
||||
|
||||
This is a guide for using blocks tools: \`createDocument\` and \`updateDocument\`, which render content on a blocks beside the conversation.
|
||||
This is a guide for using artifacts tools: \`createDocument\` and \`updateDocument\`, which render content on a artifacts beside the conversation.
|
||||
|
||||
**When to use \`createDocument\`:**
|
||||
- For substantial content (>10 lines) or code
|
||||
|
|
@ -42,7 +42,7 @@ export const systemPrompt = ({
|
|||
if (selectedChatModel === 'chat-model-reasoning') {
|
||||
return regularPrompt;
|
||||
} else {
|
||||
return `${regularPrompt}\n\n${blocksPrompt}`;
|
||||
return `${regularPrompt}\n\n${artifactsPrompt}`;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ You are a spreadsheet creation assistant. Create a spreadsheet in csv format bas
|
|||
|
||||
export const updateDocumentPrompt = (
|
||||
currentContent: string | null,
|
||||
type: BlockKind,
|
||||
type: ArtifactKind,
|
||||
) =>
|
||||
type === 'text'
|
||||
? `\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue