Skip to content

Comments

Ai generate security#706

Merged
MrgSub merged 15 commits intoMail-0:stagingfrom
ripgrim:ai-generate-security
Apr 21, 2025
Merged

Ai generate security#706
MrgSub merged 15 commits intoMail-0:stagingfrom
ripgrim:ai-generate-security

Conversation

@ripgrim
Copy link
Contributor

@ripgrim ripgrim commented Apr 17, 2025

Description

  • enhanced ai-reply to protect from vibe coders, so now you can ONLY generate emails
  • converted prompts to use xml-like formatting for better performance with any chosen LLM
  • stored prompts in /apps/mail/lib/prompts.ts

Screenshots/Recordings

  • Successful Generation:
NVIDIA_Overlay_AeJDugPtF2.mp4
  • Unsuccessful Generation:
NVIDIA_Overlay_GaPuyUZyUx.mp4

image


By submitting this pull request, I confirm that my contribution is made under the terms of the project's license.

Summary by CodeRabbit

  • New Features
    • Introduced separate AI-powered generation for email body and subject, allowing more precise and flexible email composition.
    • Added dedicated system prompts to improve the quality and consistency of AI-generated email content and subjects.
  • Improvements
    • Enhanced error handling and user feedback when AI generation fails or returns ambiguous results.
    • Improved UI state management and clearer messaging in the AI assistant during email drafting.
    • Upgraded AI model for better email content generation and added structured context for improved relevance.
    • Refined AI-generated content post-processing to remove unwanted prefixes and detect refusal responses.
    • Streamlined AI assistant flow into distinct body and subject generation steps with improved state tracking.
  • Bug Fixes
    • Addressed issues with subject extraction and content formatting in generated emails.

@vercel
Copy link

vercel bot commented Apr 17, 2025

@ripgrim is attempting to deploy a commit to the Zero Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 17, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The changes refactor the AI-powered email composition workflow by separating the generation of email body and subject into distinct functions and components. New system prompt templates are introduced to guide the AI in producing professional and concise email content and subject lines. Error handling, logging, and state management are improved throughout the workflow. The main AI assistant component is updated to handle the new two-step process, with enhanced UI logic and clearer separation of generated body and subject. Helper functions and interfaces are modified or added to support these changes, and the AI model and prompt construction are updated for more robust and context-aware outputs.

Changes

File(s) Change Summary
apps/mail/actions/ai.ts Refactored to separate email body and subject generation into generateAIEmailBody and generateAISubject functions; improved error handling, response processing, and logging; updated JSON content creation logic.
apps/mail/components/create/ai-assistant.tsx Refactored AI assistant to use new body and subject generation functions; split state management for body and subject; improved error handling, UI logic, and callback usage; removed obsolete subject extraction utility.
apps/mail/lib/ai.ts Modularized AI email generation logic; split body and subject generation into generateEmailBody and generateSubjectForEmail; improved prompt construction, response post-processing, safety checks, and logging; updated interfaces and helper functions.
apps/mail/lib/prompts.ts New module introducing system prompt templates for email body, subject, and reply generation, with strict formatting and output constraints.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AIAssistant
    participant AIService

    User->>AIAssistant: Submit email prompt
    AIAssistant->>AIService: generateAIEmailBody(prompt, context)
    AIService-->>AIAssistant: AIBodyResponse (body or question)
    alt Body generated
        AIAssistant->>AIService: generateAISubject(body)
        AIService-->>AIAssistant: Subject string
        AIAssistant->>User: Show generated body & subject
    else Clarification needed
        AIAssistant->>User: Ask for clarification
    end
Loading

Possibly related PRs

  • Staging #702: Modifies unauthorized error handling in apps/mail/actions/ai.ts by replacing thrown errors with graceful handling, related by file and function but focusing on error management rather than core AI generation logic.

Suggested reviewers

  • MrgSub

Poem

In the warren of code, where the emails grow,
The AI now crafts both subject and flow.
With prompts so precise and bodies so neat,
Subjects are snappy, replies are sweet.
Bugs are now fewer, errors more rare,
As rabbits refine with meticulous care.
🐇✨ Compose and hop—your inbox is now elite!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🧹 Nitpick comments (5)
apps/mail/lib/prompts.ts (1)

26-37: Redundant <strict_guidelines> sections introduce ambiguity

The prompt contains two separate <strict_guidelines> blocks: one nested inside <omit> (lines 26‑31) and another top‑level block (lines 52‑61).
Duplicating the same element name with different semantics may confuse both maintainers and the LLM. Consider removing the inner block or renaming the wrapper (e.g. <examples_to_omit>).

Also applies to: 52-61

apps/mail/actions/ai.ts (1)

128-141: Preserve paragraph structure when converting to ProseMirror JSON

createJsonContentFromBody wraps the entire body string inside a single paragraph node.
Any double line breaks (\n\n) that represent new paragraphs will be rendered as raw newlines instead of separate ProseMirror paragraphs, so formatting is lost.

-    return {
-        type: 'doc',
-        content: [
-            {
-                type: 'paragraph',
-                content: [{ type: 'text', text: bodyText.trim() }], 
-            }
-        ],
-    };
+    const paragraphs = bodyText.trim().split(/\n{2,}/);
+    return {
+      type: 'doc',
+      content: paragraphs.map((p) => ({
+        type: 'paragraph',
+        content: [{ type: 'text', text: p }],
+      })),
+    };

This keeps the document WYSIWYG‑consistent with the AI’s output.

apps/mail/lib/ai.ts (3)

31-39: userContext parameter is unused

generateEmailBody accepts userContext?: UserContext but never references it.
Remove the parameter or integrate it into the prompt construction to avoid dead code and confusion.

-export async function generateEmailBody(
-  prompt: string,
-  currentContent?: string,
-  recipients?: string[],
-  subject?: string,
-  conversationId?: string,
-  userContext?: UserContext,
-): Promise<AIBodyResponse[]> {
+export async function generateEmailBody(
+  prompt: string,
+  currentContent?: string,
+  recipients?: string[],
+  subject?: string,
+  conversationId?: string,
+): Promise<AIBodyResponse[]> {

40-42: await headers() is unnecessary

headers() from next/headers returns a Headers object synchronously.
The await adds overhead and may confuse readers.

-const headersList = await headers();
+const headersList = headers();

61-74: dynamicContext.length > 30 guard hides context for short subjects/recipient lists

If the subject & recipients are short (e.g. “Hi” / one address) the entire <dynamic_context> block is discarded, removing valuable information from the system prompt.

Consider an explicit boolean instead:

-const fullSystemPrompt = baseSystemPrompt + (dynamicContext.length > 30 ? dynamicContext : '');
+const fullSystemPrompt = baseSystemPrompt + dynamicContext;

or compute the block only when fields are present.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13d7923 and f5d132d.

📒 Files selected for processing (4)
  • apps/mail/actions/ai.ts (2 hunks)
  • apps/mail/components/create/ai-assistant.tsx (7 hunks)
  • apps/mail/lib/ai.ts (1 hunks)
  • apps/mail/lib/prompts.ts (1 hunks)
🔇 Additional comments (1)
apps/mail/components/create/ai-assistant.tsx (1)

302-318: Potential duplication of subject in chat preview

When a subject is successfully generated, the assistant message concatenates Subject: ${finalSubject}\n\n${bodyResult.content}.
Later, when the message is accepted, onContentGenerated receives generatedSubject separately.
Down‑stream consumers might prepend the subject again, resulting in duplicates.

Ensure that only the designated subject parameter is used and the body string remains free of the “Subject:” stub, or strip the stub before storage.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
apps/mail/lib/prompts.ts (3)

74-74: ⚠️ Potential issue

Unescaped XML tags in rule description.

The XML tags inside this rule are not properly escaped, which could break the prompt template syntax.

-        <rule>Do not include a Subject line or any XML tags like <SUBJECT> or <BODY>.</rule>
+        <rule>Do not include a Subject line or any XML tags like &lt;SUBJECT&gt; or &lt;BODY&gt;.</rule>
🧰 Tools
🪛 Biome (1.9.4)

[error] 74-74: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: An instantiation expression cannot be followed by a property access.

You can either wrap the instantiation expression in parentheses, or delete the type arguments.

(parse)


[error] 74-74: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


69-70: ⚠️ Potential issue

Missing XML escaping for userName.

You're using raw ${userName} in the example output instead of the escaped ${safeName}. This creates a security vulnerability for prompt injection if the user's name contains XML special characters.

-${userName}</expected_output>
+${safeName}</expected_output>
🧰 Tools
🪛 Biome (1.9.4)

[error] 70-70: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 70-70: Expected a type but instead found '/'.

Expected a type here.

(parse)


[error] 70-70: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)


136-165: ⚠️ Potential issue

Missing XML escaping in EmailReplySystemPrompt.

The userName parameter is not being escaped, creating a security vulnerability. Apply the same escaping pattern as used in the EmailAssistantSystemPrompt function.

-export const EmailReplySystemPrompt = (userName: string = 'the user'): string => `
+export const EmailReplySystemPrompt = (userName: string = 'the user'): string => {
+  const safeName = escapeXml(userName);
+  return `
 <system_prompt>
-    <role>You are an AI assistant helping ${userName} write professional and concise email replies.</role>
+    <role>You are an AI assistant helping ${safeName} write professional and concise email replies.</role>
     
     <instructions>
       <goal>Generate a ready-to-send email reply based on the provided email thread context and the original sender.</goal>
-      <style>Write in the first person as if you are ${userName}. Be concise but thorough (2-3 paragraphs maximum is ideal).</style>
+      <style>Write in the first person as if you are ${safeName}. Be concise but thorough (2-3 paragraphs maximum is ideal).</style>
       <persona>Maintain a professional and helpful tone.</persona>
     </instructions>
     
     <formatting_rules>
         <rule>Start directly with the greeting (e.g., "Hi John,").</rule>
         <rule>Double space between paragraphs (two newlines).</rule>
         <rule>Include a simple sign-off (like "Best," or "Thanks,") followed by the user's name on a new line.</rule>
-        <rule>End the entire response with the name: ${userName}</rule>
+        <rule>End the entire response with the name: ${safeName}</rule>
     </formatting_rules>

     <critical_constraints>
         <constraint>Return ONLY the email content itself. Absolutely NO explanatory text, meta-text, or any other content before the greeting or after the final sign-off name.</constraint>
         <constraint>DO NOT include "Subject:" lines.</constraint>
         <constraint>DO NOT include placeholders like [Recipient], [Your Name], [Discount Percentage]. Use specific information derived from the context or make reasonable assumptions if necessary.</constraint>
         <constraint>DO NOT include instructions or explanations about the format.</constraint>
         <constraint>Write as if the email is ready to be sent immediately.</constraint>
         <constraint>Stay on topic and relevant to the provided email thread context.</constraint>
         <constraint>UNDER NO CIRCUMSTANCES INCLUDE ANY OTHER TEXT THAN THE EMAIL REPLY CONTENT ITSELF.</constraint>
     </critical_constraints>

-    <sign_off_name>${userName}</sign_off_name> 
+    <sign_off_name>${safeName}</sign_off_name> 
 </system_prompt>
-`; 
+`;
+}
🧰 Tools
🪛 Biome (1.9.4)

[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 139-139: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 142-142: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-147: Expected a statement but instead found '. Be concise but thorough (2-3 paragraphs maximum is ideal).</style>
Maintain a professional and helpful tone.

<formatting_rules>
    <rule>Start directly'.

Expected a statement here.

(parse)


[error] 147-147: expected ( but instead found the

Remove the

(parse)


[error] 147-147: expected ) but instead found greeting

Remove greeting

(parse)


[error] 147-147: Expected an identifier but instead found ','.

Expected an identifier here.

(parse)


[error] 147-147: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 148-148: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 148-148: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 147-148: with statements are not allowed in strict mode

(parse)


[error] 148-148: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 148-148: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 148-148: expected , but instead found newlines

Remove newlines

(parse)


[error] 148-148: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 149-149: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: expected , but instead found "Best,"

Remove "Best,"

(parse)


[error] 149-149: expected , but instead found or

Remove or

(parse)


[error] 149-149: expected , but instead found "Thanks,"

Remove "Thanks,"

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-150: unterminated string literal

The closing quote must be on the same line.

(parse)


[error] 150-150: expected ( but instead found the

Remove the

(parse)


[error] 150-150: expected ) but instead found name

Remove name

(parse)


[error] 150-150: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 150-150: with statements are not allowed in strict mode

(parse)


[error] 150-150: Expected a type but instead found '/'.

Expected a type here.

(parse)


[error] 151-151: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 152-152: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 155-155: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 155-155: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 155-155: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 155-155: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 155-155: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 155-155: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 156-156: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: expected , but instead found Name

Remove Name

(parse)


[error] 156-156: expected , but instead found Percentage

Remove Percentage

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: expected ( but instead found necessary

Remove necessary

(parse)


[error] 156-156: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 157-157: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 157-157: expected ) but instead found NOT

Remove NOT

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 158-158: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 159-159: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 160-160: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 161-161: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 162-162: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 163-163: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 163-163: Expected a type but instead found '/'.

Expected a type here.

(parse)


[error] 164-164: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 165-165: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 165-165: unterminated template literal

(parse)


[error] 150-150: Unexpected label.

Only loops should be labeled.
The use of labels for other statements is suspicious and unfamiliar.

(lint/suspicious/noConfusingLabels)


[error] 138-138: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)


[error] 142-142: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)


[error] 150-150: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)


[error] 163-163: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5d132d and a6557b1.

📒 Files selected for processing (1)
  • apps/mail/lib/prompts.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/mail/lib/prompts.ts (1)
apps/mail/types/index.ts (1)
  • User (1-5)
🪛 Biome (1.9.4)
apps/mail/lib/prompts.ts

[error] 44-44: Expected a type but instead found '/'.

Expected a type here.

(parse)


[error] 45-45: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 48-48: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 48-48: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 49-49: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 50-50: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 51-51: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 53-53: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 65-65: expected ( but instead found tomorrow

Remove tomorrow

(parse)


[error] 65-65: expected ; but instead found at

Remove at

(parse)


[error] 65-65: expected ; but instead found 10

Remove 10

(parse)


[error] 65-65: expected ) but instead found AM

Remove AM

(parse)


[error] 67-67: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 67-67: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 67-67: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 67-67: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 67-67: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 67-67: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 67-67: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 70-70: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 70-70: Expected a type but instead found '/'.

Expected a type here.

(parse)


[error] 71-71: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 73-73: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 73-73: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 73-73: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 73-73: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 74-74: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 74-74: An instantiation expression cannot be followed by a property access.

You can either wrap the instantiation expression in parentheses, or delete the type arguments.

(parse)


[error] 74-74: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 75-75: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: expected , but instead found "Hello!"

Remove "Hello!"

(parse)


[error] 75-75: expected , but instead found or

Remove or

(parse)


[error] 75-75: expected , but instead found "Sure, here is the email body:"

Remove "Sure, here is the email body:"

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 75-75: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 76-76: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 76-76: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 76-76: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 76-76: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 76-76: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 76-76: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 76-76: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 76-76: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 77-77: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected an identifier but instead found ')'.

Expected an identifier here.

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 77-77: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 78-78: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 78-78: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 78-78: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 78-78: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 78-78: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 78-78: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 78-78: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 78-78: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 78-78: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 78-78: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 79-79: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected an expression but instead found ','.

Expected an expression here.

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 79-79: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 80-80: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 80-80: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 80-80: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 80-80: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 80-80: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 80-80: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 80-80: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 80-80: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 80-80: Expected an expression but instead found 'with'.

Expected an expression here.

(parse)


[error] 80-80: expected ( but instead found the

Remove the

(parse)


[error] 80-80: expected ) but instead found refusal

Remove refusal

(parse)


[error] 80-80: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 80-80: with statements are not allowed in strict mode

(parse)


[error] 80-80: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 80-80: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 81-81: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 82-82: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 83-83: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 83-83: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 83-83: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 83-83: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 83-83: expected ( but instead found email

Remove email

(parse)


[error] 83-83: expected ) but instead found body

Remove body

(parse)


[error] 83-83: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 83-83: with statements are not allowed in strict mode

(parse)


[error] 83-83: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 83-83: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 84-84: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 86-86: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 94-94: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: expected ( but instead found the

Remove the

(parse)


[error] 96-96: expected ; but instead found provided

Remove provided

(parse)


[error] 96-96: expected ; but instead found email

Remove email

(parse)


[error] 96-96: expected ) but instead found body

Remove body

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 97-97: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 98-98: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-100: unterminated string literal

The closing quote must be on the same line.

(parse)


[error] 102-102: expected ( but instead found precision

Remove precision

(parse)


[error] 102-102: expected ) but instead found context

Remove context

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: with statements are not allowed in strict mode

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 103-103: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 104-104: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 105-105: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 107-107: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 115-115: expected ( but instead found tomorrow

Remove tomorrow

(parse)


[error] 115-115: expected ; but instead found at

Remove at

(parse)


[error] 115-115: expected ; but instead found 10

Remove 10

(parse)


[error] 115-115: expected ) but instead found AM

Remove AM

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 120-120: expected , but instead found Name

Remove Name

(parse)


[error] 121-121: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 123-123: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 125-125: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 125-125: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 125-125: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 125-125: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 126-126: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 127-127: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 128-128: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 129-129: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 129-129: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 129-129: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 129-129: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 130-130: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 131-131: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 138-138: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 139-139: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 141-141: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 142-142: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-142: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 142-147: Expected a statement but instead found '. Be concise but thorough (2-3 paragraphs maximum is ideal).</style>
Maintain a professional and helpful tone.

<formatting_rules>
    <rule>Start directly'.

Expected a statement here.

(parse)


[error] 147-147: expected ( but instead found the

Remove the

(parse)


[error] 147-147: expected ) but instead found greeting

Remove greeting

(parse)


[error] 147-147: Expected an identifier but instead found ','.

Expected an identifier here.

(parse)


[error] 147-147: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 148-148: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 148-148: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 147-148: with statements are not allowed in strict mode

(parse)


[error] 148-148: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 148-148: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 148-148: expected , but instead found newlines

Remove newlines

(parse)


[error] 148-148: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 149-149: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: expected , but instead found "Best,"

Remove "Best,"

(parse)


[error] 149-149: expected , but instead found or

Remove or

(parse)


[error] 149-149: expected , but instead found "Thanks,"

Remove "Thanks,"

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-149: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 149-150: unterminated string literal

The closing quote must be on the same line.

(parse)


[error] 150-150: expected ( but instead found the

Remove the

(parse)


[error] 150-150: expected ) but instead found name

Remove name

(parse)


[error] 150-150: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 150-150: with statements are not allowed in strict mode

(parse)


[error] 150-150: Expected a type but instead found '/'.

Expected a type here.

(parse)


[error] 151-151: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 152-152: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 154-154: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 155-155: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 155-155: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 155-155: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 155-155: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 155-155: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 155-155: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 156-156: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: expected , but instead found Name

Remove Name

(parse)


[error] 156-156: expected , but instead found Percentage

Remove Percentage

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 156-156: expected ( but instead found necessary

Remove necessary

(parse)


[error] 156-156: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 157-157: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 157-157: expected ) but instead found NOT

Remove NOT

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 157-157: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 158-158: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 158-158: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 159-159: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 159-159: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 160-160: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 160-160: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 161-161: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 162-162: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 163-163: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 163-163: Expected a type but instead found '/'.

Expected a type here.

(parse)


[error] 164-164: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 165-165: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 165-165: unterminated template literal

(parse)


[error] 150-150: Unexpected label.

Only loops should be labeled.
The use of labels for other statements is suspicious and unfamiliar.

(lint/suspicious/noConfusingLabels)


[error] 70-70: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)


[error] 138-138: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)


[error] 142-142: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)


[error] 150-150: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)


[error] 163-163: This block statement doesn't serve any purpose and can be safely removed.

Standalone block statements without any block-level declarations are redundant in JavaScript and can be removed to simplify the code.

(lint/complexity/noUselessLoneBlockStatements)

🔇 Additional comments (2)
apps/mail/lib/prompts.ts (2)

9-14: Good security implementation with XML escaping.

This helper function properly escapes special XML characters, which is essential for preventing prompt injection attacks when user-provided data is inserted into the prompt templates.


91-131: Subject generation prompt looks well-structured.

The subject generation prompt is well-defined with clear constraints on output format, length, and style. It properly enforces the necessary boundaries to ensure only subject lines are generated.

🧰 Tools
🪛 Biome (1.9.4)

[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 93-93: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 94-94: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: expected ( but instead found the

Remove the

(parse)


[error] 96-96: expected ; but instead found provided

Remove provided

(parse)


[error] 96-96: expected ; but instead found email

Remove email

(parse)


[error] 96-96: expected ) but instead found body

Remove body

(parse)


[error] 96-96: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 96-96: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 97-97: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 97-97: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 98-98: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-99: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 99-100: unterminated string literal

The closing quote must be on the same line.

(parse)


[error] 102-102: expected ( but instead found precision

Remove precision

(parse)


[error] 102-102: expected ) but instead found context

Remove context

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: with statements are not allowed in strict mode

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 102-102: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 103-103: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 104-104: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 105-105: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 107-107: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 115-115: expected ( but instead found tomorrow

Remove tomorrow

(parse)


[error] 115-115: expected ; but instead found at

Remove at

(parse)


[error] 115-115: expected ; but instead found 10

Remove 10

(parse)


[error] 115-115: expected ) but instead found AM

Remove AM

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 117-117: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 120-120: expected , but instead found Name

Remove Name

(parse)


[error] 121-121: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 122-122: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 123-123: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 125-125: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 125-125: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 125-125: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 125-125: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 126-126: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 126-126: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 127-127: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 128-128: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 129-129: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 129-129: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 129-129: Expected a semicolon or an implicit semicolon after a statement, but found none

An explicit or implicit semicolon is expected here...

...Which is required to end this statement

(parse)


[error] 129-129: Expected an identifier but instead found '<'.

Expected an identifier here.

(parse)


[error] 130-130: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)


[error] 131-131: unterminated regex literal

...but the line ends here

a regex literal starts there...

(parse)

@ripgrim ripgrim marked this pull request as draft April 18, 2025 06:17
ripgrim added 6 commits April 20, 2025 23:44
…ale inside finally React state setters (setErrorOccurred) are asynchronous; the errorOccurred value captured at render time will not yet reflect changes made earlier in the same event loop. Consequently, the logic deciding whether to collapse/expand may run with an outdated flag. - } finally { - setIsLoading(false); - if (!errorOccurred || isAskingQuestion) { - setIsExpanded(true); - } else { - setIsExpanded(false); // Collapse on errors - } - } + } finally { + setIsLoading(false); + // Use a local flag to track errors deterministically + const hadError = isAskingQuestion ? false : !!errorFlagRef.current; + setIsExpanded(!hadError); + } You can create const errorFlagRef = useRef(false); and update errorFlagRef.current = true every time an error is detected, ensuring reliable behaviour irrespective of React batching. Committable suggestion skipped: line range outside the PR's diff.
@ripgrim ripgrim marked this pull request as ready for review April 21, 2025 06:53
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
apps/mail/lib/ai.ts (2)

143-158: Consider regex patterns for refusal detection

The current approach uses string inclusion checks for detecting AI refusals. While functional, this could potentially lead to false positives if these phrases appear in legitimate email content.

Consider using regex patterns with word boundaries or more context-aware checks:

-    const isRefusal = 
-        lowerBody.includes("i cannot") || 
-        lowerBody.includes("i'm unable to") || 
-        lowerBody.includes("i am unable to") ||
-        lowerBody.includes("as an ai") ||
-        lowerBody.includes("my purpose is to assist") ||
-        lowerBody.includes("violates my safety guidelines") ||
-        lowerBody.includes("sorry, i can only assist with email body"); 
+    const refusalPatterns = [
+        /\bi cannot\b/i,
+        /\bi['']m unable to\b/i, 
+        /\bi am unable to\b/i,
+        /\bas an ai\b/i,
+        /\bmy purpose is to assist\b/i,
+        /\bviolates my safety guidelines\b/i,
+        /\bsorry, i can only assist with email body\b/i
+    ];
+    const isRefusal = refusalPatterns.some(pattern => pattern.test(lowerBody));

104-111: Consider adding model configuration options

The code now uses 'gpt-4' which is more capable but potentially more expensive and slower than the previously used model.

Consider making the model configurable via environment variables to allow for cost/performance tuning:

-      model: 'gpt-4', // Using the more capable model
+      model: process.env.EMAIL_BODY_AI_MODEL || 'gpt-4', // Using the more capable model

Same for the subject generation at line 209.

apps/mail/components/create/ai-assistant.tsx (1)

312-327: Consider allowing subject fallback from existing subject

When subject generation fails, you might want to fall back to the existing subject prop if available.

-          console.warn('AI Assistant: Subject generation failed or returned empty.');
-          addMessage('assistant', bodyResult.content, 'email');
-          toast.warning("Generated email body, but failed to generate subject.");
+          console.warn('AI Assistant: Subject generation failed or returned empty.');
+          if (subject) {
+            // Fall back to existing subject if available
+            finalSubject = subject;
+            setGeneratedSubject(finalSubject);
+            addMessage('assistant', `Subject: ${finalSubject}\n\n${bodyResult.content}`, 'email');
+          } else {
+            addMessage('assistant', bodyResult.content, 'email');
+            toast.warning("Generated email body, but failed to generate subject.");
+          }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d68d05 and ee59d03.

📒 Files selected for processing (3)
  • apps/mail/actions/ai.ts (2 hunks)
  • apps/mail/components/create/ai-assistant.tsx (7 hunks)
  • apps/mail/lib/ai.ts (1 hunks)
🔇 Additional comments (10)
apps/mail/lib/ai.ts (3)

25-32: Great security improvement for conversation history scoping!

The conversation history is now properly scoped by userId and then by conversationId, addressing the previous vulnerability related to cross-tenant data leakage and unbounded memory growth. This implementation follows best practices for data isolation in multi-user environments.


134-141: Strong security enhancement for content sanitization

The updated regex pattern provides comprehensive protection against various forms of unsafe content, including:

  • Code blocks with triple backticks or tildes
  • HTML tags (both regular and encoded)
  • Script and style tags
  • JavaScript URI schemes
  • Data URIs

This is a significant improvement over the previous approach that only checked for triple backticks or HTML tags.


190-249: Well-structured subject generation function

The generateSubjectForEmail function is well-implemented with:

  • Good error handling and logging
  • Empty input validation
  • Proper prefix removal for consistent output
  • Refusal detection

This modular approach of separating body and subject generation follows good separation of concerns principles.

apps/mail/actions/ai.ts (3)

74-84: Excellent error handling for response body

The code now properly checks for null/undefined response body with appropriate fallback and error handling. This addresses the previous vulnerability mentioned in past comments and provides clear error messages when unexpected formats are encountered.


105-136: Well-implemented subject generation

The generateAISubject function properly handles:

  • Session validation
  • Empty input validation
  • Clear logging
  • Proper error handling with clean fallback

This is a good implementation that maintains consistency with the body generation approach.


138-152: Simplified JSON content creation

The createJsonContentFromBody function provides a cleaner approach to converting body text to JSON content, with proper handling of empty input. This is more maintainable than the previous approach and provides consistent behavior.

apps/mail/components/create/ai-assistant.tsx (4)

261-352: Robust implementation of the two-step generation process

The handleSubmit function now effectively orchestrates a two-step process:

  1. Generate the email body
  2. Generate a subject based on the body

The error handling is comprehensive with:

  • Clear error messages and toast notifications
  • Proper state updates
  • Usage of both state and ref for error tracking
  • Appropriate UI transitions based on error state

The implementation of errorFlagRef properly addresses the previous issue with stale state in the finally block.


375-387: Improved refresh handling with prompt override

The refresh handling now correctly uses the last user message content as an override prompt, preventing issues with asynchronous state updates mentioned in past comments.


198-207: Well-structured state separation for body and subject

Breaking out the generatedBody and generatedSubject into separate state variables provides better separation of concerns and makes the component more maintainable. The addition of errorOccurred state and errorFlagRef also improves error handling reliability.


355-366: Properly updated acceptance handler

The handleAccept function now correctly passes both the generated JSON content and subject to the parent callback, maintaining consistency with the updated API.

@ahmetskilinc ahmetskilinc changed the base branch from main to staging April 21, 2025 11:47
@vercel
Copy link

vercel bot commented Apr 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
0 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 9:49pm

@MrgSub MrgSub merged commit 1d37659 into Mail-0:staging Apr 21, 2025
4 checks passed
MrgSub added a commit that referenced this pull request Apr 22, 2025
* draft fixes:
- added cc and bcc when saving drafts
- save drafts less aggresively

* some fixes for saving attachments to draft

* fix for empty draft loading

* fix draft list recipient name/address

* also show 'No Recipient' if empty

* remove comments

* switch to mimetext for draft saving to keep formatting consistent

* add message title to draft list

* feat: single api for oauth connections

* fix: add extra error handling

* chore: simplify and fix the dev env

* Ai generate security (#706)

* Create prompts with XML formatting

* Include XML formatted prompts in generate func

* remove unused regex and add helper functions/warnings

* error handling

* Update apps/mail/lib/prompts.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* lint issues

* Update prompts.ts

* #706 (comment)

Coderabbit fix 1

* erabbitai bot 3 days ago ⚠️ Potential issue  errorOccurred state is stale inside finally  React state setters (setErrorOccurred) are asynchronous; the errorOccurred value captured at render time will not yet reflect changes made earlier in the same event loop. Consequently, the logic deciding whether to collapse/expand may run with an outdated flag.  -  } finally { -      setIsLoading(false); -      if (!errorOccurred || isAskingQuestion) { -        setIsExpanded(true); -      } else { -        setIsExpanded(false); // Collapse on errors -      } -  } +  } finally { +      setIsLoading(false); +      // Use a local flag to track errors deterministically +      const hadError = isAskingQuestion ? false : !!errorFlagRef.current; +      setIsExpanded(!hadError); +  } You can create const errorFlagRef = useRef(false); and update errorFlagRef.current = true every time an error is detected, ensuring reliable behaviour irrespective of React batching.  Committable suggestion skipped: line range outside the PR's diff.

* #706 (comment)

* #706 (comment)

* #706 (comment)

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add a new Vietnamese translation file to support Vietnamese language users (#726)

* feat(i18n): add Vietnamese language support

Add Vietnamese ('vi') to the list of supported languages in the
i18n configuration and JSON file to expand language options.

* Add a new Vietnamese translation file to support Vietnamese language users.

* Clear Vietnamese translation strings

* Update es.json (#710)

Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>

* Update app manifest and add new icons for PWA (#739)

* feat: allow sending from email aliases added through gmail (#743)

* Refactor IP handling in early-access routes

* Add unauthorized error handling in sign out function

---------

Co-authored-by: Ahmet Kilinc <akx9@icloud.com>
Co-authored-by: BlankParticle <blankparticle@gmail.com>
Co-authored-by: grim <75869731+ripgrim@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Chánh Đại <dai@chanhdai.com>
Co-authored-by: Dani B. <danibaldomirm@gmail.com>
Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>
Co-authored-by: Humber Nieto <56887259+humbernieto@users.noreply.github.com>
Co-authored-by: Atharva Deosthale <atharva.deosthale17@gmail.com>
@coderabbitai coderabbitai bot mentioned this pull request Apr 22, 2025
MrgSub added a commit that referenced this pull request Apr 23, 2025
* draft fixes:
- added cc and bcc when saving drafts
- save drafts less aggresively

* some fixes for saving attachments to draft

* fix for empty draft loading

* fix draft list recipient name/address

* also show 'No Recipient' if empty

* remove comments

* switch to mimetext for draft saving to keep formatting consistent

* add message title to draft list

* feat: single api for oauth connections

* fix: add extra error handling

* chore: simplify and fix the dev env

* Ai generate security (#706)

* Create prompts with XML formatting

* Include XML formatted prompts in generate func

* remove unused regex and add helper functions/warnings

* error handling

* Update apps/mail/lib/prompts.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* lint issues

* Update prompts.ts

* #706 (comment)

Coderabbit fix 1

* erabbitai bot 3 days ago ⚠️ Potential issue  errorOccurred state is stale inside finally  React state setters (setErrorOccurred) are asynchronous; the errorOccurred value captured at render time will not yet reflect changes made earlier in the same event loop. Consequently, the logic deciding whether to collapse/expand may run with an outdated flag.  -  } finally { -      setIsLoading(false); -      if (!errorOccurred || isAskingQuestion) { -        setIsExpanded(true); -      } else { -        setIsExpanded(false); // Collapse on errors -      } -  } +  } finally { +      setIsLoading(false); +      // Use a local flag to track errors deterministically +      const hadError = isAskingQuestion ? false : !!errorFlagRef.current; +      setIsExpanded(!hadError); +  } You can create const errorFlagRef = useRef(false); and update errorFlagRef.current = true every time an error is detected, ensuring reliable behaviour irrespective of React batching.  Committable suggestion skipped: line range outside the PR's diff.

* #706 (comment)

* #706 (comment)

* #706 (comment)

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add a new Vietnamese translation file to support Vietnamese language users (#726)

* feat(i18n): add Vietnamese language support

Add Vietnamese ('vi') to the list of supported languages in the
i18n configuration and JSON file to expand language options.

* Add a new Vietnamese translation file to support Vietnamese language users.

* Clear Vietnamese translation strings

* Update es.json (#710)

Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>

* Update app manifest and add new icons for PWA (#739)

* feat: allow sending from email aliases added through gmail (#743)

* Refactor IP handling in early-access routes

* Add unauthorized error handling in sign out function

* Redirect from Home Page on Session (#701)

* Updated lockfile

* Updated home page session validation

---------

Co-authored-by: Adam <x_1337@outlook.com>

* Refactor settings handling and golden ticket logic

* Feat: og:image Generation on /compose route (#730)

* Create route og image

* resolve coderabbit nitpicks

---------

Co-authored-by: Adam <x_1337@outlook.com>

* Update session check to include user id before redirecting

* Fix unauthorized error handling in multiple actions

* Enable shortcuts settings in navigation

* Refactor error handling to return unauthorized gracefully

* Update Hero component with new imports and link adjustments

* Update redirect URL to use hostname from req object

* Fix redirect URL formatting and add log for missing user ID

* Fix error handling in API routes for unauthorized requests

* Refactor throwUnauthorizedGracefully function for readability

* Fix error handling in driver routes

* Handle unauthorized gracefully when getting connections

* Refactor mail actions for better error handling

* Refactor deleteActiveConnection function for readability

* fixed (#752)

* Refactor error handling in mail actions to return null or specific error messages instead of throwing unauthorized errors. This improves readability and maintains functionality across various actions.

* Update Google auth provider configuration

* Delete connection and update hero text

* Refactor error handling to use StandardizedError class

* Refactor error handling for Google API driver

---------

Co-authored-by: Ahmet Kilinc <akx9@icloud.com>
Co-authored-by: BlankParticle <blankparticle@gmail.com>
Co-authored-by: grim <75869731+ripgrim@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Chánh Đại <dai@chanhdai.com>
Co-authored-by: Dani B. <danibaldomirm@gmail.com>
Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>
Co-authored-by: Humber Nieto <56887259+humbernieto@users.noreply.github.com>
Co-authored-by: Atharva Deosthale <atharva.deosthale17@gmail.com>
Co-authored-by: Nikita Drokin <86173808+nikitadrokin@users.noreply.github.com>
MrgSub added a commit that referenced this pull request Apr 25, 2025
* draft fixes:
- added cc and bcc when saving drafts
- save drafts less aggresively

* some fixes for saving attachments to draft

* fix for empty draft loading

* fix draft list recipient name/address

* also show 'No Recipient' if empty

* remove comments

* switch to mimetext for draft saving to keep formatting consistent

* add message title to draft list

* feat: single api for oauth connections

* fix: add extra error handling

* chore: simplify and fix the dev env

* Ai generate security (#706)

* Create prompts with XML formatting

* Include XML formatted prompts in generate func

* remove unused regex and add helper functions/warnings

* error handling

* Update apps/mail/lib/prompts.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* lint issues

* Update prompts.ts

* #706 (comment)

Coderabbit fix 1

* erabbitai bot 3 days ago ⚠️ Potential issue  errorOccurred state is stale inside finally  React state setters (setErrorOccurred) are asynchronous; the errorOccurred value captured at render time will not yet reflect changes made earlier in the same event loop. Consequently, the logic deciding whether to collapse/expand may run with an outdated flag.  -  } finally { -      setIsLoading(false); -      if (!errorOccurred || isAskingQuestion) { -        setIsExpanded(true); -      } else { -        setIsExpanded(false); // Collapse on errors -      } -  } +  } finally { +      setIsLoading(false); +      // Use a local flag to track errors deterministically +      const hadError = isAskingQuestion ? false : !!errorFlagRef.current; +      setIsExpanded(!hadError); +  } You can create const errorFlagRef = useRef(false); and update errorFlagRef.current = true every time an error is detected, ensuring reliable behaviour irrespective of React batching.  Committable suggestion skipped: line range outside the PR's diff.

* #706 (comment)

* #706 (comment)

* #706 (comment)

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add a new Vietnamese translation file to support Vietnamese language users (#726)

* feat(i18n): add Vietnamese language support

Add Vietnamese ('vi') to the list of supported languages in the
i18n configuration and JSON file to expand language options.

* Add a new Vietnamese translation file to support Vietnamese language users.

* Clear Vietnamese translation strings

* Update es.json (#710)

Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>

* Update app manifest and add new icons for PWA (#739)

* feat: allow sending from email aliases added through gmail (#743)

* Refactor IP handling in early-access routes

* Add unauthorized error handling in sign out function

* Redirect from Home Page on Session (#701)

* Updated lockfile

* Updated home page session validation

---------

Co-authored-by: Adam <x_1337@outlook.com>

* Refactor settings handling and golden ticket logic

* Feat: og:image Generation on /compose route (#730)

* Create route og image

* resolve coderabbit nitpicks

---------

Co-authored-by: Adam <x_1337@outlook.com>

* Update session check to include user id before redirecting

* Fix unauthorized error handling in multiple actions

* Enable shortcuts settings in navigation

* Refactor error handling to return unauthorized gracefully

* Update Hero component with new imports and link adjustments

* Update redirect URL to use hostname from req object

* Fix redirect URL formatting and add log for missing user ID

* Fix error handling in API routes for unauthorized requests

* Refactor throwUnauthorizedGracefully function for readability

* Fix error handling in driver routes

* Handle unauthorized gracefully when getting connections

* Refactor mail actions for better error handling

* Refactor deleteActiveConnection function for readability

* fixed (#752)

* Refactor error handling in mail actions to return null or specific error messages instead of throwing unauthorized errors. This improves readability and maintains functionality across various actions.

* Update Google auth provider configuration

* Delete connection and update hero text

* Refactor error handling to use StandardizedError class

* Refactor error handling for Google API driver

* Add labels to sidebar, labels settings and useLabels hook (#746)

* Adds labels from the provider:
- labels page in settings
- labels page translations
- added labels for google provider

* useLabels and labels in sidebar

* fix rate limit parts of labels route

* Added labels to mail-list

* - add rate limiting
- move useThreadsLabel

---------

Co-authored-by: Adam <x_1337@outlook.com>

* bin count of unread messages

* dixes drafts not saving persistently

* dont show from field is no aliases

* limited height of attachment dialog

* added delete page

* correct way to delete accounts

* - adds new revokeRefreshToken method to Google driver
- updates lib/auth.ts to use the new method
- updates actions/user.ts
- updates app/(routes)/settings/danger-zone/page.tsx

* Add posthog-js dependency and implement label filtering in NavMain component

- Added posthog-js version 1.236.6 to package.json and bun.lock.
- Introduced search functionality by implementing handleFilterByLabel in NavMain component.
- Updated NavItem to trigger label filtering on click.

* Enhance NavItem component to support onClick event handling

- Updated NavItem to include an onClick prop for the Link component, allowing for custom click behavior.
- Maintained existing functionality with prefetch and target attributes.

---------

Co-authored-by: Ahmet Kilinc <akx9@icloud.com>
Co-authored-by: BlankParticle <blankparticle@gmail.com>
Co-authored-by: grim <75869731+ripgrim@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Chánh Đại <dai@chanhdai.com>
Co-authored-by: Dani B. <danibaldomirm@gmail.com>
Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>
Co-authored-by: Humber Nieto <56887259+humbernieto@users.noreply.github.com>
Co-authored-by: Atharva Deosthale <atharva.deosthale17@gmail.com>
Co-authored-by: Nikita Drokin <86173808+nikitadrokin@users.noreply.github.com>
Co-authored-by: Adarsh Tiwari <adarshtiwari797023@gmail.com>
@coderabbitai coderabbitai bot mentioned this pull request Apr 25, 2025
41 tasks
MrgSub added a commit that referenced this pull request Apr 25, 2025
* draft fixes:
- added cc and bcc when saving drafts
- save drafts less aggresively

* some fixes for saving attachments to draft

* fix for empty draft loading

* fix draft list recipient name/address

* also show 'No Recipient' if empty

* remove comments

* switch to mimetext for draft saving to keep formatting consistent

* add message title to draft list

* feat: single api for oauth connections

* fix: add extra error handling

* chore: simplify and fix the dev env

* Ai generate security (#706)

* Create prompts with XML formatting

* Include XML formatted prompts in generate func

* remove unused regex and add helper functions/warnings

* error handling

* Update apps/mail/lib/prompts.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* lint issues

* Update prompts.ts

* #706 (comment)

Coderabbit fix 1

* erabbitai bot 3 days ago ⚠️ Potential issue  errorOccurred state is stale inside finally  React state setters (setErrorOccurred) are asynchronous; the errorOccurred value captured at render time will not yet reflect changes made earlier in the same event loop. Consequently, the logic deciding whether to collapse/expand may run with an outdated flag.  -  } finally { -      setIsLoading(false); -      if (!errorOccurred || isAskingQuestion) { -        setIsExpanded(true); -      } else { -        setIsExpanded(false); // Collapse on errors -      } -  } +  } finally { +      setIsLoading(false); +      // Use a local flag to track errors deterministically +      const hadError = isAskingQuestion ? false : !!errorFlagRef.current; +      setIsExpanded(!hadError); +  } You can create const errorFlagRef = useRef(false); and update errorFlagRef.current = true every time an error is detected, ensuring reliable behaviour irrespective of React batching.  Committable suggestion skipped: line range outside the PR's diff.

* #706 (comment)

* #706 (comment)

* #706 (comment)

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Add a new Vietnamese translation file to support Vietnamese language users (#726)

* feat(i18n): add Vietnamese language support

Add Vietnamese ('vi') to the list of supported languages in the
i18n configuration and JSON file to expand language options.

* Add a new Vietnamese translation file to support Vietnamese language users.

* Clear Vietnamese translation strings

* Update es.json (#710)

Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>

* Update app manifest and add new icons for PWA (#739)

* feat: allow sending from email aliases added through gmail (#743)

* Refactor IP handling in early-access routes

* Add unauthorized error handling in sign out function

* Redirect from Home Page on Session (#701)

* Updated lockfile

* Updated home page session validation

---------

Co-authored-by: Adam <x_1337@outlook.com>

* Refactor settings handling and golden ticket logic

* Feat: og:image Generation on /compose route (#730)

* Create route og image

* resolve coderabbit nitpicks

---------

Co-authored-by: Adam <x_1337@outlook.com>

* Update session check to include user id before redirecting

* Fix unauthorized error handling in multiple actions

* Enable shortcuts settings in navigation

* Refactor error handling to return unauthorized gracefully

* Update Hero component with new imports and link adjustments

* Update redirect URL to use hostname from req object

* Fix redirect URL formatting and add log for missing user ID

* Fix error handling in API routes for unauthorized requests

* Refactor throwUnauthorizedGracefully function for readability

* Fix error handling in driver routes

* Handle unauthorized gracefully when getting connections

* Refactor mail actions for better error handling

* Refactor deleteActiveConnection function for readability

* fixed (#752)

* Refactor error handling in mail actions to return null or specific error messages instead of throwing unauthorized errors. This improves readability and maintains functionality across various actions.

* Update Google auth provider configuration

* Delete connection and update hero text

* Refactor error handling to use StandardizedError class

* Refactor error handling for Google API driver

* Add labels to sidebar, labels settings and useLabels hook (#746)

* Adds labels from the provider:
- labels page in settings
- labels page translations
- added labels for google provider

* useLabels and labels in sidebar

* fix rate limit parts of labels route

* Added labels to mail-list

* - add rate limiting
- move useThreadsLabel

---------

Co-authored-by: Adam <x_1337@outlook.com>

* bin count of unread messages

* dixes drafts not saving persistently

* dont show from field is no aliases

* limited height of attachment dialog

* added delete page

* correct way to delete accounts

* - adds new revokeRefreshToken method to Google driver
- updates lib/auth.ts to use the new method
- updates actions/user.ts
- updates app/(routes)/settings/danger-zone/page.tsx

* Add posthog-js dependency and implement label filtering in NavMain component

- Added posthog-js version 1.236.6 to package.json and bun.lock.
- Introduced search functionality by implementing handleFilterByLabel in NavMain component.
- Updated NavItem to trigger label filtering on click.

* Enhance NavItem component to support onClick event handling

- Updated NavItem to include an onClick prop for the Link component, allowing for custom click behavior.
- Maintained existing functionality with prefetch and target attributes.

* fix: add missing dompurify dep (#765)

* user can edit enail after selecting (#760)

* User can able to delete from bin  (#670)

* delete mails permanently from bin

* add English translations for delete mail actions

* update the call handleDelete

* fixed handle delete function

* handleDelete call

* enhance handledelete to reset bulk selection after deletion

* removed the scope

* delete mails permanently from bin

* add English translations for delete mail actions

* update the call handleDelete

* handleDelete call

* enhance handledelete to reset bulk selection after deletion

* removed the scope

---------

Co-authored-by: Ahmet Kilinc <akx9@icloud.com>
Co-authored-by: Adam <x_1337@outlook.com>

* send draft instead of new message (#767)

* Add sendDraft method to Gmail driver and MailManager interface

* fix sendDraft method

* Add support for sending draft emails and clear draftId after sending

---------

Co-authored-by: Adam <x_1337@outlook.com>

* Add Chinese language support for mail app

* Update email addresses in send function

* Add import statement for deleteActiveConnection function

---------

Co-authored-by: Ahmet Kilinc <akx9@icloud.com>
Co-authored-by: BlankParticle <blankparticle@gmail.com>
Co-authored-by: grim <75869731+ripgrim@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Chánh Đại <dai@chanhdai.com>
Co-authored-by: Dani B. <danibaldomirm@gmail.com>
Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>
Co-authored-by: Humber Nieto <56887259+humbernieto@users.noreply.github.com>
Co-authored-by: Atharva Deosthale <atharva.deosthale17@gmail.com>
Co-authored-by: Nikita Drokin <86173808+nikitadrokin@users.noreply.github.com>
Co-authored-by: Adarsh Tiwari <adarshtiwari797023@gmail.com>
Co-authored-by: Adarsh Tiwari <134617221+Adarsh9977@users.noreply.github.com>
@coderabbitai coderabbitai bot mentioned this pull request May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants