Skip to content

Commit

Permalink
tweak prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyphilemon committed Dec 19, 2024
1 parent d03e4b0 commit 0eb2851
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion components/document-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const PureDocumentHeader = ({
<FileIcon />
)}
</div>
<div className="-translate-y-1 sm:translate-y-0">{title}</div>
<div className="-translate-y-1 sm:translate-y-0 font-medium">{title}</div>
</div>
<div>
<FullscreenIcon />
Expand Down
2 changes: 1 addition & 1 deletion components/messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function PureMessages({
ref={messagesContainerRef}
className="flex flex-col min-w-0 gap-6 flex-1 overflow-y-scroll pt-4"
>
{messages.length === 0 && <Overview />}
{/* {messages.length === 0 && <Overview />} */}

{messages.map((message, index) => (
<PreviewMessage
Expand Down
36 changes: 18 additions & 18 deletions lib/ai/prompts.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
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.
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.
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 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.
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 blocks tools: \`createDocument\` and \`updateDocument\`, which render content on a blocks beside the conversation.
**When to use \`createDocument\`:**
- For substantial content (>10 lines) or code
- For content users will likely save/reuse (emails, code, essays, etc.)
- When explicitly requested to create a document
- For when content contains a single code snippet
**When to use \`createDocument\`:**
- For substantial content (>10 lines) or code
- For content users will likely save/reuse (emails, code, essays, etc.)
- When explicitly requested to create a document
- For when content contains a single code snippet
**When NOT to use \`createDocument\`:**
- For informational/explanatory content
- For conversational responses
- When asked to keep it in chat
**When NOT to use \`createDocument\`:**
- For informational/explanatory content
- For conversational responses
- When asked to keep it in chat
**Using \`updateDocument\`:**
- Default to full document rewrites for major changes
- Use targeted updates only for specific, isolated changes
- Follow user instructions for which parts to modify
**Using \`updateDocument\`:**
- Default to full document rewrites for major changes
- Use targeted updates only for specific, isolated changes
- Follow user instructions for which parts to modify
Do not update document right after creating it. Wait for user feedback or request to update it.
`;
Do not update document right after creating it. Wait for user feedback or request to update it.
`;

export const regularPrompt =
'You are a friendly assistant! Keep your responses concise and helpful.';
Expand Down

0 comments on commit 0eb2851

Please sign in to comment.