Repository: Hemocione/hemocione-digital-event
Pull request #15: Add signos
Author: login: guim4dev
Created: 2025-04-29T18:40:58Z | Merged: 2025-04-29T18:50:43Z



<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **New Features**
  - Integrated the Signos chat widget, enabling users to access chat support on event ticket pages.
  - The chat widget automatically opens a few seconds after visiting the ticket page, provided certain conditions are met.
- **Configuration**
  - Added a new runtime configuration option for the Signos organization ID, allowing customization via environment variables.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/app.vue b/app.vue
index bd18f60..e709f7a 100644
--- a/app.vue
+++ b/app.vue
@@ -15,4 +15,9 @@ useServerSeoMeta({
   twitterCard: "summary_large_image",
   viewport: "width=device-width, initial-scale=1.0, maximum-scale=5.0",
 });
+
+// signos widget
+useHead({
+  script: [{ src: "https://widget.getsignos.com/widget.js", defer: true }],
+});
 </script>
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 888714b..99a4883 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -42,6 +42,7 @@ export default defineNuxtConfig({
         "https://hemocione-id-dev.cpt.hemocione.com.br",
       hemocioneIdUrl:
         process.env.HEMOCIONE_ID_URL ?? "https://id.d.hemocione.com.br",
+      signosOrganizationId: process.env.SIGNOS_ORGANIZATION_ID ?? "",
     },
     cdn: {
       bucket: process.env.CDN_BUCKET ?? "hemocione-assets",
diff --git a/pages/event/[eventSlug]/ticket/index.vue b/pages/event/[eventSlug]/ticket/index.vue
index 7cd058f..fc6270b 100644
--- a/pages/event/[eventSlug]/ticket/index.vue
+++ b/pages/event/[eventSlug]/ticket/index.vue
@@ -44,6 +44,7 @@
 import { reactive } from "vue";
 import dayjs from "dayjs";
 import { formatTimeDuration, formatAddress } from "~/helpers/formatter";
+import { openSignosChat } from "~/plugins/signos.client";
 
 definePageMeta({
   middleware: ["auth"],
@@ -119,6 +120,14 @@ async function cancelSubscription() {
 function goBack() {
   navigateTo(`/event/${eventSlug}`);
 }
+
+const SIGNOS_FEEDBACK_DELAY = 3000; // 3 seconds
+
+onMounted(() => {
+  setTimeout(() => {
+    openSignosChat();
+  }, SIGNOS_FEEDBACK_DELAY);
+});
 </script>
 
 <style scoped>
diff --git a/plugins/signos.client.ts b/plugins/signos.client.ts
new file mode 100644
index 0000000..7cd4da2
--- /dev/null
+++ b/plugins/signos.client.ts
@@ -0,0 +1,49 @@
+let signosInitialized = false;
+const LAST_SIGNOS_CHAT_OPENED_TIMESTAMP = "lastSignosChatOpenedDate";
+const SIGNOS_CHAT_OPENED_INTERVAL = 1000 * 60 * 60 * 24 * 30; // 30 days to ask again for feedback
+
+export const openSignosChat = () => {
+  const lastOpenedTimestamp = localStorage.getItem(
+    LAST_SIGNOS_CHAT_OPENED_TIMESTAMP,
+  );
+  const currentDateTimestamp = new Date().getTime();
+
+  if (
+    lastOpenedTimestamp &&
+    currentDateTimestamp - Number(lastOpenedTimestamp) <
+      SIGNOS_CHAT_OPENED_INTERVAL
+  ) {
+    return;
+  }
+
+  const { user } = useUserStore();
+  if (!user) {
+    // do nothing if user is not logged in
+    return;
+  }
+
+  if (!signosInitialized) {
+    const config = useRuntimeConfig();
+    const { signosOrganizationId } = config.public;
+
+    // @ts-ignore
+    window?.signos?.init({
+      customerName: user.givenName,
+      customerEmail: user.email,
+      orgId: signosOrganizationId,
+    });
+    console.log("Signos chat initialized");
+
+    signosInitialized = true;
+  }
+  (window as any)?.signos?.toggle();
+
+  localStorage.setItem(
+    LAST_SIGNOS_CHAT_OPENED_TIMESTAMP,
+    String(currentDateTimestamp),
+  );
+};
+
+export default defineNuxtPlugin((_nuxtApp) => {
+  console.log("Signos plugin loaded!");
+});


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 2**

<details>
<summary>🧹 Nitpick comments (4)</summary><blockquote>

<details>
<summary>app.vue (1)</summary><blockquote>

`19-22`: **Script injection for Signos widget looks good**

The use of `useHead` to inject the Signos script tag is the correct approach in Nuxt 3. The `defer` attribute is appropriately used to prevent blocking page rendering.



Consider adding a version parameter to the script URL for better cache control:
```diff
-  script: [{ src: "https://widget.getsignos.com/widget.js", defer: true }],
+  script: [{ src: "https://widget.getsignos.com/widget.js?v=1.0.0", defer: true }],
```

</blockquote></details>
<details>
<summary>pages/event/[eventSlug]/ticket/index.vue (1)</summary><blockquote>

`124-130`: **Consider user choice before automatically opening chat**

While the implementation technically works well, automatically opening a chat widget after 3 seconds might interrupt the user's flow when reviewing their ticket information.


Consider making the chat widget opt-in rather than automatic:

```diff
-const SIGNOS_FEEDBACK_DELAY = 3000; // 3 seconds
-
-onMounted(() => {
-  setTimeout(() => {
-    openSignosChat();
-  }, SIGNOS_FEEDBACK_DELAY);
-});
+onMounted(() => {
+  // Trigger chat after a delay only for first-time visitors
+  if (!localStorage.getItem('hasVisitedTicketPage')) {
+    setTimeout(() => {
+      openSignosChat();
+      localStorage.setItem('hasVisitedTicketPage', 'true');
+    }, 3000);
+  }
+});
```

Alternatively, add a button that users can click to provide feedback instead of automatically opening the chat.

</blockquote></details>
<details>
<summary>plugins/signos.client.ts (2)</summary><blockquote>

`39-39`: **Improve type safety when toggling Signos chat**

The type assertion `(window as any)` is unnecessary with proper type definitions.


```diff
-(window as any)?.signos?.toggle();
+window.signos?.toggle();
```

---

`47-49`: **Empty plugin definition**

The Nuxt plugin is defined but only logs a message without adding any functionality to the application context.


Consider exposing the `openSignosChat` function through the plugin for better integration:

```diff
-export default defineNuxtPlugin((_nuxtApp) => {
-  console.log("Signos plugin loaded!");
-});
+export default defineNuxtPlugin((nuxtApp) => {
+  console.log("Signos plugin loaded!");
+  return {
+    provide: {
+      openSignosChat
+    }
+  };
+});
```

Then in your components, you could use it as:
```typescript
const { $openSignosChat } = useNuxtApp();
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

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

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 80e5ebe9e4a8c3848c2d66e6c183e17dff022efd and 646fd7089084ccec0ec3b7bb0ff3f242e4a66a43.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `app.vue` (1 hunks)
* `nuxt.config.ts` (1 hunks)
* `pages/event/[eventSlug]/ticket/index.vue` (2 hunks)
* `plugins/signos.client.ts` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code Graph Analysis (1)</summary>

<details>
<summary>plugins/signos.client.ts (1)</summary><blockquote>

<details>
<summary>stores/user.ts (1)</summary>

* `useUserStore` (15-135)

</details>

</blockquote></details>

</details>

</details>

<details>
<summary>🔇 Additional comments (4)</summary><blockquote>

<details>
<summary>nuxt.config.ts (1)</summary>

`45-45`: **Correctly added new Signos configuration property**

The addition of the `signosOrganizationId` property to the public runtime config follows the project's pattern for environment-based configuration. This allows the Signos chat widget to access the organization ID on the client side.

</details>
<details>
<summary>pages/event/[eventSlug]/ticket/index.vue (1)</summary>

`47-47`: **Clean import of Signos chat functionality**

The import statement correctly references the new plugin.

</details>
<details>
<summary>plugins/signos.client.ts (2)</summary>

`1-4`: **Good use of constants and initialization flag**

The module variables and constants are well-defined with clear naming. The 30-day interval constant is appropriately commented for clarity.

---

`5-24`: **Well-structured conditional checks before opening chat**

The function correctly checks for:
1. Recent chat history to prevent showing the widget too frequently
2. User login status to ensure relevant user data is available

These checks help provide a better user experience.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: NONE
submitted_at: 2025-04-29T18:43:59Z

Review comments:
diff_hunk: @@ -0,0 +1,49 @@
+let signosInitialized = false;
+const LAST_SIGNOS_CHAT_OPENED_TIMESTAMP = "lastSignosChatOpenedDate";
+const SIGNOS_CHAT_OPENED_INTERVAL = 1000 * 60 * 60 * 24 * 30; // 30 days to ask again for feedback
+
+export const openSignosChat = () => {
+  const lastOpenedTimestamp = localStorage.getItem(
+    LAST_SIGNOS_CHAT_OPENED_TIMESTAMP,
+  );
+  const currentDateTimestamp = new Date().getTime();
+
+  if (
+    lastOpenedTimestamp &&
+    currentDateTimestamp - Number(lastOpenedTimestamp) <
+      SIGNOS_CHAT_OPENED_INTERVAL
+  ) {
+    return;
+  }
+
+  const { user } = useUserStore();
+  if (!user) {
+    // do nothing if user is not logged in
+    return;
+  }
+
+  if (!signosInitialized) {
+    const config = useRuntimeConfig();
+    const { signosOrganizationId } = config.public;
+
+    // @ts-ignore
+    window?.signos?.init({
+      customerName: user.givenName,
+      customerEmail: user.email,
+      orgId: signosOrganizationId,
+    });
+    console.log("Signos chat initialized");
+
+    signosInitialized = true;
+  }
+  (window as any)?.signos?.toggle();
path: plugins/signos.client.ts
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Add error handling for missing Signos initialization**

The code assumes the Signos widget is available after the script loads but doesn't handle cases where it might not be properly loaded.


Add proper error handling:

```diff
if (!signosInitialized) {
  const config = useRuntimeConfig();
  const { signosOrganizationId } = config.public;

+  if (!window.signos) {
+    console.error("Signos widget not available. Please check if the script was loaded correctly.");
+    return;
+  }

  // @ts-ignore
  window?.signos?.init({
    customerName: user.givenName,
    customerEmail: user.email,
    orgId: signosOrganizationId,
  });
  console.log("Signos chat initialized");

  signosInitialized = true;
}
(window as any)?.signos?.toggle();
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
  if (!signosInitialized) {
    const config = useRuntimeConfig();
    const { signosOrganizationId } = config.public;

    if (!window.signos) {
      console.error("Signos widget not available. Please check if the script was loaded correctly.");
      return;
    }

    // @ts-ignore
    window?.signos?.init({
      customerName: user.givenName,
      customerEmail: user.email,
      orgId: signosOrganizationId,
    });
    console.log("Signos chat initialized");

    signosInitialized = true;
  }
  (window as any)?.signos?.toggle();
`````

</details>

<!-- suggestion_end -->

<details>
<summary>🤖 Prompt for AI Agents (early access)</summary>

```
In plugins/signos.client.ts around lines 25 to 39, the code assumes the Signos widget is always available after initialization but lacks error handling if the widget fails to load or is undefined. Add checks to verify that window.signos and its init method exist before calling them, and wrap the initialization and toggle calls in try-catch blocks to handle potential errors gracefully, logging appropriate error messages if Signos is not properly loaded.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-29T18:43:59Z
author_association: NONE
diff_hunk: @@ -0,0 +1,49 @@
+let signosInitialized = false;
+const LAST_SIGNOS_CHAT_OPENED_TIMESTAMP = "lastSignosChatOpenedDate";
+const SIGNOS_CHAT_OPENED_INTERVAL = 1000 * 60 * 60 * 24 * 30; // 30 days to ask again for feedback
+
+export const openSignosChat = () => {
+  const lastOpenedTimestamp = localStorage.getItem(
+    LAST_SIGNOS_CHAT_OPENED_TIMESTAMP,
+  );
+  const currentDateTimestamp = new Date().getTime();
+
+  if (
+    lastOpenedTimestamp &&
+    currentDateTimestamp - Number(lastOpenedTimestamp) <
+      SIGNOS_CHAT_OPENED_INTERVAL
+  ) {
+    return;
+  }
+
+  const { user } = useUserStore();
+  if (!user) {
+    // do nothing if user is not logged in
+    return;
+  }
+
+  if (!signosInitialized) {
+    const config = useRuntimeConfig();
+    const { signosOrganizationId } = config.public;
+
+    // @ts-ignore
+    window?.signos?.init({
+      customerName: user.givenName,
+      customerEmail: user.email,
+      orgId: signosOrganizationId,
+    });
+    console.log("Signos chat initialized");
+
+    signosInitialized = true;
+  }
path: plugins/signos.client.ts
user: login: coderabbitai[bot]
body: _🛠️ Refactor suggestion_

**Improve type safety in Signos initialization**

The code uses `@ts-ignore` and accesses the `window.signos` object without proper type checking.


Replace the type ignoring approach with proper type definitions:

```diff
+// Define types for the Signos widget
+interface SignosWidget {
+  init(config: {
+    customerName: string;
+    customerEmail: string;
+    orgId: string;
+  }): void;
+  toggle(): void;
+}
+
+interface Window {
+  signos?: SignosWidget;
+}

if (!signosInitialized) {
  const config = useRuntimeConfig();
  const { signosOrganizationId } = config.public;

-  // @ts-ignore
-  window?.signos?.init({
+  window.signos?.init({
    customerName: user.givenName,
    customerEmail: user.email,
    orgId: signosOrganizationId,
  });
  console.log("Signos chat initialized");

  signosInitialized = true;
}
```


<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
// Define types for the Signos widget
interface SignosWidget {
  init(config: {
    customerName: string;
    customerEmail: string;
    orgId: string;
  }): void;
  toggle(): void;
}

interface Window {
  signos?: SignosWidget;
}

if (!signosInitialized) {
  const config = useRuntimeConfig();
  const { signosOrganizationId } = config.public;

  window.signos?.init({
    customerName: user.givenName,
    customerEmail: user.email,
    orgId: signosOrganizationId,
  });
  console.log("Signos chat initialized");

  signosInitialized = true;
}
`````

</details>

<!-- suggestion_end -->

<details>
<summary>🤖 Prompt for AI Agents (early access)</summary>

```
In plugins/signos.client.ts around lines 25 to 38, the code disables TypeScript checks using @ts-ignore for window.signos initialization, which reduces type safety. To fix this, define a proper TypeScript interface for the signos object and extend the Window interface accordingly. Then replace the @ts-ignore with a type-safe check and initialization call using the defined types to ensure proper type checking without ignoring errors.
```

</details>

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-04-29T18:43:59Z
author_association: NONE

PR comments:
user: login: vercel[bot]
created_at: 2025-04-29T18:41:02Z
body: [vc]: #CKMoGkab2M04YJpw2Gtgnn1ghqvJDzIrtQjTmcnUago=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJoZW1vY2lvbmUtZGlnaXRhbC1ldmVudCIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9oZW1vY2lvbmUvaGVtb2Npb25lLWRpZ2l0YWwtZXZlbnQvRXluQ0g1SDdKZHFWaHpqd0Z2d3lWbnRpOEVnTiIsInByZXZpZXdVcmwiOiJoZW1vY2lvbmUtZGlnaXRhbC1ldmVudC1naXQtYWRkLXNpZ25vcy1oZW1vY2lvbmUudmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJERVBMT1lFRCIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJoZW1vY2lvbmUtZGlnaXRhbC1ldmVudC1naXQtYWRkLXNpZ25vcy1oZW1vY2lvbmUudmVyY2VsLmFwcCJ9LCJyb290RGlyZWN0b3J5IjpudWxsfV19
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **hemocione-digital-event** | ✅ Ready ([Inspect](https://vercel.com/hemocione/hemocione-digital-event/EynCH5H7JdqVhzjwFvwyVnti8EgN)) | [Visit Preview](https://hemocione-digital-event-git-add-signos-hemocione.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/hemocione-digital-event-git-add-signos-hemocione.vercel.app?via=pr-comment-feedback-link) | Apr 29, 2025 6:42pm |


author_association: NONE
user: login: coderabbitai[bot]
created_at: 2025-04-29T18:41:04Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough

The changes introduce integration with the Signos chat widget across the application. A script tag for the Signos widget is injected into the document head via `useHead` in `app.vue`. A new public runtime configuration property, `signosOrganizationId`, is added to the Nuxt configuration, sourced from an environment variable. A plugin (`signos.client.ts`) is created to manage the initialization and toggling of the Signos chat widget, including logic to prevent repeated openings within 30 days and to ensure a user is logged in. The event ticket page now triggers the chat widget to open three seconds after mounting.

## Changes

| File(s)                                                         | Change Summary                                                                                                                           |
|-----------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
| app.vue                                                         | Injects Signos widget script into document head using `useHead`.                                                                         |
| nuxt.config.ts                                                  | Adds `signosOrganizationId` to public runtime config, sourced from `SIGNOS_ORGANIZATION_ID` env variable.                                |
| pages/event/[eventSlug]/ticket/index.vue                        | Imports and calls `openSignosChat` after a 3-second delay on mount.                                                                      |
| plugins/signos.client.ts                                        | Introduces plugin to manage Signos chat widget initialization, user check, open throttling, and exports `openSignosChat` function.       |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant TicketPage
    participant SignosPlugin
    participant SignosWidget

    User->>TicketPage: Navigates to event ticket page
    TicketPage->>SignosPlugin: onMounted (after 3s) calls openSignosChat()
    SignosPlugin->>SignosPlugin: Check localStorage for recent chat open
    SignosPlugin->>SignosPlugin: Check if user is logged in
    alt First time or 30 days passed
        SignosPlugin->>SignosWidget: Initialize with user and org ID
        SignosPlugin->>SignosWidget: Toggle chat widget
        SignosPlugin->>localStorage: Update last open timestamp
    else
        SignosPlugin-->>TicketPage: Do nothing
    end
```

## Poem

> 🐇  
> A widget hops into the head,  
> With Signos chat, new code is spread.  
> Three seconds wait, a chat appears,  
> But only once in thirty days, no fears!  
> Config set, plugin in play—  
> Bugs beware, the rabbits say!  
>

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEejqANiS4BBWvUTwiGfIgMA5bMwGUuARgBWAwBVRF9IImx4ZgAWJQkjfWNwKDJ6fAAzHAJiMmUaeiZWdi5efmFRcSkZeSYlKlV1LR0kkyg4VFRMbMJScioChWKMTkgqAHdIRC9mNAp5OQV6lTVNbV0wQ2TTAzRubg0JbGsDACJzgwBiS8gbAElc/uo6KZm5+UzGWExSNwM4EhfH6AtD2ZBoSDkSYMNAWCyQAiQAAG2DCAAkSKCkZBxuoEFhcLBAUjgIgGBR4NxcFMSLhsNw9NiBBZ8AwANb8LJIvYHI4kJEaGAIZ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/dcCZXdIgTKjTwo8ToJlTO7kNhYZSJAAAbDEUTGRaAAHYu4AA4ACc8mYjktEF3UQHcBDSdUF3DIGQO4ZAAEwxEMyQGIaBROibQDEDuQnthQBY+odj3kuPy2nHdWgmU0hCaAA=== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=Hemocione/hemocione-digital-event&utm_content=15):

- 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](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: NONE