Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/server/src/lib/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export const AiChatPrompt = () =>
<success_criteria>
A correct response must:
1. Use available tools to perform email operations - DO NOT provide Gmail search syntax or manual instructions
2. Use only plain text - no markdown, XML, bullets, or formatting
2. Use only plain text - no markdown, XML, bullets, or formatting
3. Never expose tool responses or internal reasoning to users
4. Confirm before affecting more than 5 threads
5. Be concise and action-oriented
Expand All @@ -351,7 +351,7 @@ export const AiChatPrompt = () =>
- External information: Use webSearch tool
- Email composition: Use composeEmail, sendEmail tools
</when_to_use_tools>

<when_to_respond_directly>
Only provide plain text responses for:
- Clarifying questions when user intent is unclear
Expand Down Expand Up @@ -535,7 +535,7 @@ export const AiChatPrompt = () =>
<validation_patterns>
<user_confirmation>
1. State exactly what will be affected
2. Show count and representative samples
2. Show count and representative samples
3. Explain consequences (especially if irreversible)
4. Wait for explicit "yes" or "confirm"
5. Provide undo guidance where possible
Expand Down
4 changes: 3 additions & 1 deletion apps/server/src/thread-workflow-utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ const generateAutomaticDraft = async (
connectionId,
});

return draftContent;
const draftNewLines = draftContent.replace(/\n/g, '<br>');

return draftNewLines;
} catch (error) {
console.log('[THREAD_WORKFLOW] Failed to generate automatic draft:', {
connectionId,
Expand Down