Skip to content

feat(embed/chat): AI Meeting Copilot — Transform Transcripts into Actionable Insights with Slack Automation#92

Open
vijayshreepathak wants to merge 7 commits intoLamatic:mainfrom
vijayshreepathak:feat/meeting-intelligence-agent
Open

feat(embed/chat): AI Meeting Copilot — Transform Transcripts into Actionable Insights with Slack Automation#92
vijayshreepathak wants to merge 7 commits intoLamatic:mainfrom
vijayshreepathak:feat/meeting-intelligence-agent

Conversation

@vijayshreepathak
Copy link
Copy Markdown

@vijayshreepathak vijayshreepathak commented Mar 22, 2026

AI Meeting Intelligence Copilot

Transforms raw meeting transcripts into structured, actionable insights and automatically delivers them to Slack.

What this PR adds

  • AI-powered extraction: Summary, Action Items, Risks, Next Steps, Follow-up Email
  • Real-time Slack integration via webhook
  • Embedded Lamatic chat widget in a Next.js 14 app
  • End-to-end pipeline: transcript → insights → Slack + UI

🔄 Flow

Chat Trigger → Generate Text → Generate JSON → Slack API + Chat Response

Tech

Next.js · Lamatic · Slack API · Tailwind

Impact

Eliminates manual meeting notes, ensures clear ownership, and improves team alignment with instant structured updates.


  • AI Meeting Intelligence Copilot: end-to-end flow converting meeting transcripts into structured insights (summary, action items with owners/priorities, risks/blockers, next steps, follow-up email) and posting results to Slack via Incoming Webhook.
  • New kit: kits/embed/meeting-intelligence — full Next.js 14 app + Lamatic flow (Chat Trigger → Generate Text (LLM) → Generate JSON (Instructor) → Slack API → Chat Response).
  • Frontend: LamaticChat (widget bootstrap), TranscriptPlayground (sample + automated send), HeroActions (CTAs), RootLayout/page, analytics, and UI primitives (Badge, Button, Card, Textarea).
  • Configuration & deployment: env vars NEXT_PUBLIC_LAMATIC_PROJECT_ID, NEXT_PUBLIC_LAMATIC_FLOW_ID, NEXT_PUBLIC_LAMATIC_API_URL; flow inputs for generative models (default gemini/gemini-2.5-flash) and Slack webhook; README/docs include setup, domain whitelisting, and Vercel deploy guidance.
  • Tooling & build: Tailwind v4/postcss, tsconfig, next.config.mjs (eslint/typescript checks ignored in build, images unoptimized), package.json and postcss config.
  • Misc: updated top-level README and kits/embed/chat README, .gitignore updates, globals.css tweaks, and added cn() utility.
  • Scope: many new files under kits/embed/meeting-intelligence (app, components, flows, configs, package.json, tsconfig, postcss, next.config.mjs) plus README/.gitignore/globals.css changes in embed/chat.

vijayshree-9646 and others added 2 commits March 23, 2026 04:31
Transforms raw meeting transcripts into structured insights (summary, action items, risks, next steps, follow-up email) and delivers them to Slack via a Lamatic chat widget embedded in Next.js.

- Next.js 14 App Router frontend (page.js, layout.js, globals.css)
- LamaticChat.js: widget bootstraps on mount so chatConfig + IndexedDB session are ready before first message
- HeroActions.jsx and TranscriptPlayground.jsx as client components
- 4 demo screenshots (web app, Lamatic Studio, Slack)
- Full README with Mermaid architecture diagram, Vercel deploy button, flow config guide

Lamatic flow: Chat Trigger -> Generate Text -> Generate JSON -> Slack API + Chat Response

Made-with: Cursor
Updated the README to clarify authorship.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 22, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new "AI Meeting Intelligence Copilot" Next.js embed kit (Lamatic chat) that transforms meeting transcripts into structured insights and posts them to Slack. Also adds the new kit's UI, flows, configs, and docs; updates root README and repository .gitignore; and tweaks existing embed chat README and globals.css.

Changes

Cohort / File(s) Summary
Repository root
/.gitignore, /README.md
Update gitignore to ignore .env.local, **/.next/, and **/node_modules/; replace root README with project-specific AI Meeting Intelligence Copilot documentation and quick-start instructions.
Existing chat kit docs & styles
kits/embed/chat/README.md, kits/embed/chat/app/globals.css
Replace chat kit README with copilot-focused content; add CSS normalizations (box-sizing, smooth scrolling, anchor/button resets).
New kit — config & tooling
kits/embed/meeting-intelligence/.env.example, kits/embed/meeting-intelligence/.gitignore, kits/embed/meeting-intelligence/components.json, kits/embed/meeting-intelligence/next.config.mjs, kits/embed/meeting-intelligence/package.json, kits/embed/meeting-intelligence/postcss.config.mjs, kits/embed/meeting-intelligence/tsconfig.json
Add Next.js kit config, env template, Shadcn/Tailwind/PostCSS setup, package.json, and Next config (disable image optimization; ignore build lint/TS errors).
New kit — docs & styles
kits/embed/meeting-intelligence/README.md, kits/embed/meeting-intelligence/app/globals.css
Add kit README with architecture, Lamatic flow setup, Vercel steps; add Tailwind globals, theme tokens, and base layer styles.
New kit — UI primitives & utils
kits/embed/meeting-intelligence/lib/utils.ts, kits/embed/meeting-intelligence/components/ui/badge.tsx, .../button.tsx, .../card.tsx, .../textarea.tsx
Add cn class-merge util and Shadcn-style UI components (Badge, Button, Card, Textarea) with cva/variant support.
New kit — app shell & page
kits/embed/meeting-intelligence/app/layout.tsx, kits/embed/meeting-intelligence/app/page.tsx
Add RootLayout (metadata, fonts, Analytics) and Home page that reads Lamatic env vars, shows readiness state, demo transcript UI, and mounts chat widget.
New kit — interactive components
kits/embed/meeting-intelligence/components/HeroActions.tsx, kits/embed/meeting-intelligence/components/LamaticChat.tsx, kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx
Add HeroActions (CTAs), LamaticChat (one-time widget bootstrap, event handling, open/close), and TranscriptPlayground (sample transcript input and programmatic widget submission with retry logic).
New kit — Lamatic flow & metadata
kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.json, .../inputs.json, .../meta.json, .../README.md
Add Lamatic flow config: Chat Trigger → Generate Text (LLM) → Generate JSON (Instructor) → Slack API POST → Chat Response, plus inputs and flow metadata/documentation.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant NextApp as Next.js App
    participant Widget as Lamatic Chat Widget
    participant Lamatic as Lamatic Flow Engine
    participant LLM as LLM Provider
    participant Slack as Slack Webhook

    User->>NextApp: Open meeting intelligence page
    NextApp->>Widget: Bootstrap widget (project/flow/api URL)
    User->>Widget: Paste/send transcript
    Widget->>Lamatic: Chat Trigger (transcript)
    Lamatic->>LLM: Generate Text (analysis prompt)
    LLM-->>Lamatic: Return analysis (markdown)
    Lamatic->>LLM: Generate JSON (Instructor node)
    LLM-->>Lamatic: Return structured JSON
    Lamatic->>Slack: POST formatted message via webhook
    Lamatic-->>Widget: Stream full analysis response
    Widget-->>User: Display analysis
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 13.79% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding an AI Meeting Copilot that transforms meeting transcripts into actionable insights with Slack automation. It directly relates to the primary feature being introduced across the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
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: 8

🧹 Nitpick comments (2)
kits/embed/chat/app/globals.css (1)

124-126: Respect reduced-motion for global smooth scrolling.

Applying smooth scrolling globally can conflict with users who prefer reduced motion.

Accessibility-friendly refinement
  html {
    scroll-behavior: smooth;
  }
+
+ `@media` (prefers-reduced-motion: reduce) {
+   html {
+     scroll-behavior: auto;
+   }
+ }
kits/embed/chat/app/page.js (1)

39-45: Optional: treat whitespace-only env values as missing.

Using raw truthiness allows " " to pass readiness checks.

Small robustness tweak
-  })
-    .filter(([, value]) => !value)
+  })
+    .filter(([, value]) => !String(value).trim())
     .map(([key]) => key);

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 99dc7076-135f-4c87-aa03-56602266af5d

📥 Commits

Reviewing files that changed from the base of the PR and between e1ceb47 and d84c819.

⛔ Files ignored due to path filters (4)
  • kits/embed/chat/app/Screenshots/1.png is excluded by !**/*.png
  • kits/embed/chat/app/Screenshots/FromwebPage-With Followup mail-Running.png is excluded by !**/*.png
  • kits/embed/chat/app/Screenshots/Slack_integrated-Summarizer.png is excluded by !**/*.png
  • kits/embed/chat/app/Screenshots/fromLamatic-Running.png is excluded by !**/*.png
📒 Files selected for processing (9)
  • .gitignore
  • README.md
  • kits/embed/chat/README.md
  • kits/embed/chat/app/globals.css
  • kits/embed/chat/app/layout.js
  • kits/embed/chat/app/page.js
  • kits/embed/chat/components/HeroActions.jsx
  • kits/embed/chat/components/LamaticChat.js
  • kits/embed/chat/components/TranscriptPlayground.jsx

Comment on lines 119 to 122
* {
@apply border-border outline-ring/50;
box-sizing: border-box;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix Stylelint violations in base rules.

The added declarations trigger declaration-empty-line-before and will keep style checks red.

Proposed lint-safe patch
  * {
    `@apply` border-border outline-ring/50;
+
    box-sizing: border-box;
  }

  body {
    `@apply` bg-background text-foreground;
+
    margin: 0;
  }

Also applies to: 128-131

🧰 Tools
🪛 Stylelint (17.4.0)

[error] 121-121: Expected empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

Comment on lines +135 to +137
<div className="mt-10">
<TranscriptPlayground />
</div>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Analyze path remains active even when Lamatic is not ready.

LamaticChat is disabled by readiness, but TranscriptPlayground stays interactive and still dispatches lamatic:submit. In non-configured environments this becomes a silent dead-end for users.

Suggested integration fix
-            <div className="mt-10">
-              <TranscriptPlayground />
-            </div>
+            <div className="mt-10">
+              <TranscriptPlayground isLamaticReady={isLamaticReady} />
+            </div>

Then in kits/embed/chat/components/TranscriptPlayground.jsx, include readiness in the button gate:

-export default function TranscriptPlayground() {
+export default function TranscriptPlayground({ isLamaticReady = true }) {
...
-  const canAnalyze = useMemo(() => transcript.trim().length > 12, [transcript]);
+  const canAnalyze = useMemo(
+    () => isLamaticReady && transcript.trim().length > 12,
+    [isLamaticReady, transcript],
+  );

Also applies to: 208-209

Comment on lines +27 to +29
function bootstrapWidget() {
if (didBootstrap) return;
didBootstrap = true;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n kits/embed/chat/components/LamaticChat.js | head -100

Repository: Lamatic/AgentKit

Length of output: 4762


🏁 Script executed:

cat -n kits/embed/chat/components/LamaticChat.js | tail -80

Repository: Lamatic/AgentKit

Length of output: 3276


Script injection must survive transient load failures.

Lines 28–29 lock the bootstrap state before the remote script succeeds. If the widget script fails to load (lines 62–63), didBootstrap remains true permanently, preventing any retry. On subsequent mounts or re-initialization attempts, line 28 returns early, so the widget stays unavailable until a full page refresh.

Move didBootstrap = true into the onload handler, reset it in onerror, and remove the failed script element to allow recovery:

Suggested fix
 function bootstrapWidget() {
-  if (didBootstrap) return;
-  didBootstrap = true;
+  if (didBootstrap || document.getElementById(SCRIPT_ID)) return;

   if (!PROJECT_ID || !FLOW_ID || !API_URL) {
     console.warn("[LamaticChat] Missing env vars — widget disabled.", {
       PROJECT_ID: PROJECT_ID || "MISSING",
       FLOW_ID:    FLOW_ID    || "MISSING",
@@
   if (!document.getElementById(SCRIPT_ID)) {
     const script    = document.createElement("script");
     script.id       = SCRIPT_ID;
     script.type     = "module";
     script.async    = true;
     script.src      = `https://widget.lamatic.ai/chat-v2?projectId=${encodeURIComponent(PROJECT_ID)}`;
-    script.onload   = () => console.log("[LamaticChat] widget script loaded ✓");
-    script.onerror  = () => console.error("[LamaticChat] widget script failed to load");
+    script.onload   = () => {
+      didBootstrap = true;
+      console.log("[LamaticChat] widget script loaded ✓");
+    };
+    script.onerror  = () => {
+      script.remove();
+      didBootstrap = false;
+      console.error("[LamaticChat] widget script failed to load");
+    };
     document.body.appendChild(script);
   }
 }
📝 Committable suggestion

‼️ 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.

Suggested change
function bootstrapWidget() {
if (didBootstrap) return;
didBootstrap = true;
function bootstrapWidget() {
if (didBootstrap || document.getElementById(SCRIPT_ID)) return;
if (!PROJECT_ID || !FLOW_ID || !API_URL) {
console.warn("[LamaticChat] Missing env vars — widget disabled.", {
PROJECT_ID: PROJECT_ID || "MISSING",
FLOW_ID: FLOW_ID || "MISSING",
API_URL: API_URL || "MISSING",
});
return;
}
if (!document.getElementById(SCRIPT_ID)) {
const script = document.createElement("script");
script.id = SCRIPT_ID;
script.type = "module";
script.async = true;
script.src = `https://widget.lamatic.ai/chat-v2?projectId=${encodeURIComponent(PROJECT_ID)}`;
script.onload = () => {
didBootstrap = true;
console.log("[LamaticChat] widget script loaded ✓");
};
script.onerror = () => {
script.remove();
didBootstrap = false;
console.error("[LamaticChat] widget script failed to load");
};
document.body.appendChild(script);
}
}

Comment on lines +85 to +91
const handleReady = () => {
console.log("[LamaticChat] lamaticChatWidgetReady ✓");
setReady(true);
};

window.addEventListener("lamaticChatWidgetReady", handleReady, { once: true });
return () => window.removeEventListener("lamaticChatWidgetReady", handleReady);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "LamaticChat.js" | head -20

Repository: Lamatic/AgentKit

Length of output: 103


🏁 Script executed:

cat -n ./kits/embed/chat/components/LamaticChat.js

Repository: Lamatic/AgentKit

Length of output: 6686


Replay pending opens when the widget becomes ready.

If the user clicks Open before window.LamaticChatWidget exists, the sync effect (lines 95-106) executes but no-ops because the widget isn't available yet. When lamaticChatWidgetReady later fires and sets ready to true, the sync effect doesn't rerun since ready is not in its dependency array. The button then shows "Close Copilot" while the widget was never actually opened, creating a state mismatch.

Suggested fix
  useEffect(() => {
    if (disabled || !isConfigured) return;

    bootstrapWidget();

    const handleReady = () => {
      console.log("[LamaticChat] lamaticChatWidgetReady ✓");
      setReady(true);
    };

+    if (window.LamaticChatWidget) {
+      handleReady();
+    }
     window.addEventListener("lamaticChatWidgetReady", handleReady, { once: true });
     return () => window.removeEventListener("lamaticChatWidgetReady", handleReady);
   }, [disabled, isConfigured]);

   useEffect(() => {
-    if (!isConfigured || disabled) return;
+    if (!isConfigured || disabled || !ready) return;
     try {
       if (isOpen) {
         window.LamaticChatWidget?.open?.();
       } else {
         window.LamaticChatWidget?.close?.();
       }
     } catch (e) {
       console.warn("[LamaticChat] toggle error", e);
     }
-  }, [disabled, isConfigured, isOpen]);
+  }, [disabled, isConfigured, isOpen, ready]);

   return (
     <div className="fixed bottom-6 right-6 z-[70]">
       <Button
         type="button"
         className="rounded-full px-5 shadow-lg"
         aria-pressed={isOpen}
+        disabled={!ready}
         onClick={() => setIsOpen(v => !v)}
       >
-        {isOpen ? "Close Copilot" : "Open Copilot"}
+        {!ready ? "Loading Copilot…" : isOpen ? "Close Copilot" : "Open Copilot"}
       </Button>
     </div>
   );

> Part of the [Lamatic AgentKit](https://github.com/Lamatic/AgentKit) · `kits/embed/chat`

**Agent Kit Embedded Chat** is an AI-powered document chat system built with [Lamatic.ai](https://lamatic.ai). It uses intelligent workflows to index PDFs and webpages, then provides an interactive chat interface where users can ask questions about their documents through a modern Next.js interface.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vijayshreepathak/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Deploy button targets a personal fork instead of canonical upstream.

This can deploy a divergent codebase from the project’s main repository.

Suggested link fix
-[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vijayshreepathak/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials)
+[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Lamatic/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials)
📝 Committable suggestion

‼️ 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.

Suggested change
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/vijayshreepathak/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/Lamatic/AgentKit&root-directory=kits/embed/chat&env=NEXT_PUBLIC_LAMATIC_PROJECT_ID,NEXT_PUBLIC_LAMATIC_FLOW_ID,NEXT_PUBLIC_LAMATIC_API_URL&envDescription=Lamatic%20project%20credentials)

Comment on lines +13 to +33
```
kits/embed/chat/
├── app/
│ ├── page.js # Landing page — Server Component
│ ├── layout.js # Root layout (Geist font + Vercel Analytics)
│ ├── globals.css # Tailwind v4 theme + CSS variables
│ └── Screenshots/ # Demo screenshots
│ ├── 1.png
│ ├── fromLamatic-Running.png
│ ├── FromwebPage-With Followup mail-Running.png
│ └── Slack_integrated-Summarizer.png
├── components/
│ ├── LamaticChat.js # Widget lifecycle — mounts root div + script
│ ├── HeroActions.jsx # Interactive hero buttons (Client Component)
│ ├── TranscriptPlayground.jsx # Textarea + Analyze button
│ └── ui/ # shadcn/ui primitives
├── flows/
│ └── embedded-chatbot-chatbot/ # Exported Lamatic flow JSON
├── .env.local # ← create this (see below)
└── package.json
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add code fence languages to satisfy markdownlint (MD040).

Both structural blocks are unlabeled fenced code sections.

Suggested lint fix
-```
+```text
 kits/embed/chat/
 ...
-```
+```

-```
+```text
 page.js (Server Component)
 ...
-```
+```

Also applies to: 118-134

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 13-13: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

Comment on lines +66 to +73
```
Chat Widget ──▶ Generate Text (LLM) ──▶ Generate JSON
┌────────────────┤
▼ ▼
Slack API Chat Response
(Webhook) (back to user)
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Add language identifiers to unlabeled fenced blocks.

These blocks currently violate MD040 and may fail markdown lint in strict pipelines.

Suggested lint fix
-```
+```text
 Chat Widget ──▶ Generate Text (LLM) ──▶ Generate JSON
 ...
-```
+```

-```
+```text
 kits/embed/chat/
 ...
-```
+```

Also applies to: 206-222

Comment on lines +111 to 114
```bash
git clone https://github.com/vijayshreepathak/AgentKit.git
cd AgentKit/kits/embed/chat
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use the canonical repository URL in Quick Start.

The clone command points to a personal fork. In this repo’s primary docs, that can send users to the wrong upstream and stale default branch history.

Suggested doc fix
-git clone https://github.com/vijayshreepathak/AgentKit.git
+git clone https://github.com/Lamatic/AgentKit.git
 cd AgentKit/kits/embed/chat
📝 Committable suggestion

‼️ 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.

Suggested change
```bash
git clone https://github.com/vijayshreepathak/AgentKit.git
cd AgentKit/kits/embed/chat
```
git clone https://github.com/Lamatic/AgentKit.git
cd AgentKit/kits/embed/chat

Copy link
Copy Markdown
Member

@amanintech amanintech left a comment

Choose a reason for hiding this comment

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

invalid contribution.

  1. Create a new folder for contributions
  2. should contain lamatic flows

…ew kit folder

Creates a brand new self-contained kit kits/embed/meeting-intelligence/ per reviewer feedback.

Includes:
- Next.js 14 App Router frontend (page.js, layout.js, globals.css)
- LamaticChat.js: widget bootstraps on mount for reliable first-message delivery
- HeroActions.jsx and TranscriptPlayground.jsx as client components
- components/ui: button, badge, card, textarea (shadcn/ui)
- flows/meeting-intelligence-chatbot/: full Lamatic flow config (config.json, meta.json, inputs.json, README.md)
- 4 demo screenshots
- Complete README with architecture diagram and Vercel deploy button

Flow: Chat Trigger -> Generate Text (Gemini) -> Generate JSON -> Slack API + Chat Response

Also reverts all changes to kits/embed/chat/ (restores original .tsx files, removes added files)

Made-with: Cursor
Copy link
Copy Markdown
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: 5

🧹 Nitpick comments (3)
kits/embed/meeting-intelligence/components/TranscriptPlayground.jsx (1)

1-1: Convert to TypeScript (.tsx).

Per coding guidelines, kit components should use TypeScript. This file uses .jsx but should be .tsx with proper type annotations. As per coding guidelines: "Use TypeScript for all kit components and server actions."

kits/embed/meeting-intelligence/app/page.js (1)

1-6: Convert to TypeScript (.tsx).

Per coding guidelines, kit components should use TypeScript. This page component uses .js but should be .tsx with proper type annotations. As per coding guidelines: "Use TypeScript for all kit components and server actions."

kits/embed/meeting-intelligence/components/LamaticChat.js (1)

1-5: Convert to TypeScript (.tsx).

Per coding guidelines, kit components should use TypeScript. This file uses .js but should be .tsx with proper type annotations for the component props and event handlers. As per coding guidelines: "Use TypeScript for all kit components and server actions."


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2c95a9fb-2d8c-418e-af72-91cefc9ebc56

📥 Commits

Reviewing files that changed from the base of the PR and between d84c819 and 17476b2.

⛔ Files ignored due to path filters (4)
  • kits/embed/meeting-intelligence/app/Screenshots/1.png is excluded by !**/*.png
  • kits/embed/meeting-intelligence/app/Screenshots/FromwebPage-With Followup mail-Running.png is excluded by !**/*.png
  • kits/embed/meeting-intelligence/app/Screenshots/Slack_integrated-Summarizer.png is excluded by !**/*.png
  • kits/embed/meeting-intelligence/app/Screenshots/fromLamatic-Running.png is excluded by !**/*.png
📒 Files selected for processing (23)
  • kits/embed/meeting-intelligence/.env.example
  • kits/embed/meeting-intelligence/.gitignore
  • kits/embed/meeting-intelligence/README.md
  • kits/embed/meeting-intelligence/app/globals.css
  • kits/embed/meeting-intelligence/app/layout.js
  • kits/embed/meeting-intelligence/app/page.js
  • kits/embed/meeting-intelligence/components.json
  • kits/embed/meeting-intelligence/components/HeroActions.jsx
  • kits/embed/meeting-intelligence/components/LamaticChat.js
  • kits/embed/meeting-intelligence/components/TranscriptPlayground.jsx
  • kits/embed/meeting-intelligence/components/ui/badge.tsx
  • kits/embed/meeting-intelligence/components/ui/button.tsx
  • kits/embed/meeting-intelligence/components/ui/card.tsx
  • kits/embed/meeting-intelligence/components/ui/textarea.tsx
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.md
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.json
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/inputs.json
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/meta.json
  • kits/embed/meeting-intelligence/lib/utils.ts
  • kits/embed/meeting-intelligence/next.config.mjs
  • kits/embed/meeting-intelligence/package.json
  • kits/embed/meeting-intelligence/postcss.config.mjs
  • kits/embed/meeting-intelligence/tsconfig.json
✅ Files skipped from review due to trivial changes (9)
  • kits/embed/meeting-intelligence/.gitignore
  • kits/embed/meeting-intelligence/postcss.config.mjs
  • kits/embed/meeting-intelligence/components/ui/textarea.tsx
  • kits/embed/meeting-intelligence/components.json
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/meta.json
  • kits/embed/meeting-intelligence/README.md
  • kits/embed/meeting-intelligence/tsconfig.json
  • kits/embed/meeting-intelligence/package.json
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/inputs.json

Comment on lines +24 to +37
setTimeout(() => {
const input = document.getElementById("lam-chat-message-input");
if (input) {
const nativeSetter =
Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, "value")?.set ||
Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
if (nativeSetter) nativeSetter.call(input, value);
else input.value = value;
input.dispatchEvent(new Event("input", { bubbles: true }));

const sendBtn = document.getElementById("lam-chat-send-button");
if (sendBtn) sendBtn.click();
}
}, 600);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Race condition: 600ms timeout may not be sufficient for widget readiness.

The hardcoded 600ms delay assumes the external Lamatic widget script has loaded and rendered its DOM elements (lam-chat-message-input, lam-chat-send-button). Per context snippet from LamaticChat.js (lines 50-61), the widget script loads asynchronously with no coordination mechanism to signal when DOM elements are ready.

If the script hasn't finished loading or rendering, getElementById returns null and the user's transcript is silently lost.

Consider polling for element presence or using the lamaticChatWidgetReady event:

Suggested approach
-    setTimeout(() => {
-      const input = document.getElementById("lam-chat-message-input");
-      if (input) {
+    const maxAttempts = 20;
+    let attempts = 0;
+    const tryFillAndSend = () => {
+      const input = document.getElementById("lam-chat-message-input");
+      if (!input) {
+        if (++attempts < maxAttempts) {
+          setTimeout(tryFillAndSend, 100);
+        } else {
+          console.warn("[TranscriptPlayground] Widget input not found after retries");
+        }
+        return;
+      }
       const nativeSetter =
         Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, "value")?.set ||
         Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
       if (nativeSetter) nativeSetter.call(input, value);
       else input.value = value;
       input.dispatchEvent(new Event("input", { bubbles: true }));

       const sendBtn = document.getElementById("lam-chat-send-button");
       if (sendBtn) sendBtn.click();
-      }
-    }, 600);
+    };
+    setTimeout(tryFillAndSend, 300);

"values": {
"id": "triggerNode_1",
"chat": "",
"domains": ["*"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's verify the file exists and read the config.json around line 10
cat -n kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.json | head -20

Repository: Lamatic/AgentKit

Length of output: 882


🏁 Script executed:

# Check the app/page.js to see how the flow is being invoked
cat -n kits/embed/meeting-intelligence/app/page.js | head -60

Repository: Lamatic/AgentKit

Length of output: 3254


🏁 Script executed:

# Search for any documentation or comments about domains configuration
rg -i "domains" kits/embed/meeting-intelligence/ -A 2 -B 2

Repository: Lamatic/AgentKit

Length of output: 2694


Configure allowed domains in Lamatic Studio before deploying to production.

The flow ships with domains: ["*"] as a development placeholder. Since the widget bootstraps from public NEXT_PUBLIC_LAMATIC_* environment variables, any origin will be able to invoke the flow and post to the Slack webhook until you explicitly configure your production domain in Lamatic Studio (as documented in the README). Verify after import and redeployment that Lamatic enforces the restricted origin list.

"nodeId": "apiNode",
"values": {
"id": "apiNode_145",
"url": "YOUR_SLACK_WEBHOOK_URL",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -name "config.json" -path "*/meeting-intelligence-chatbot/*" | head -5

Repository: Lamatic/AgentKit

Length of output: 140


🏁 Script executed:

wc -l ./kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.json ./kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/inputs.json

Repository: Lamatic/AgentKit

Length of output: 245


🏁 Script executed:

sed -n '130,150p' ./kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.json

Repository: Lamatic/AgentKit

Length of output: 837


🏁 Script executed:

sed -n '52,62p' ./kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/inputs.json

Repository: Lamatic/AgentKit

Length of output: 360


Wire the Slack webhook URL to the flow input and re-export the flow.

The node apiNode_145 in config.json hardcodes YOUR_SLACK_WEBHOOK_URL instead of referencing the flow input. However, inputs.json correctly declares apiNode_145.url as a required private input (lines 52-62). The hardcoded placeholder will override the input definition at runtime, preventing users from providing the actual webhook URL at deployment time and causing Slack posts to fail. Re-export the flow from Lamatic Studio with proper input wiring to resolve this.

…fix CSS token, fix race condition, fix webhook URL, update flow README

Made-with: Cursor
Copy link
Copy Markdown
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.

♻️ Duplicate comments (2)
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx (1)

41-43: ⚠️ Potential issue | 🟠 Major

TranscriptPlayground remains interactive when Lamatic is unavailable.

The component does not receive or check isLamaticReady. When the widget is disabled (missing env vars), clicking "Analyze in Copilot" dispatches events into the void, creating a silent dead-end for users.

🛠️ Proposed fix

Accept and check the readiness prop:

-export default function TranscriptPlayground() {
+interface TranscriptPlaygroundProps {
+  isLamaticReady?: boolean;
+}
+
+export default function TranscriptPlayground({ isLamaticReady = true }: TranscriptPlaygroundProps) {
   const [transcript, setTranscript] = useState(SAMPLE_TRANSCRIPT);
-  const canAnalyze = useMemo(() => transcript.trim().length > 12, [transcript]);
+  const canAnalyze = useMemo(
+    () => isLamaticReady && transcript.trim().length > 12,
+    [isLamaticReady, transcript],
+  );

Then update page.tsx to pass the prop:

<TranscriptPlayground isLamaticReady={isLamaticReady} />
kits/embed/meeting-intelligence/app/page.tsx (1)

139-141: ⚠️ Potential issue | 🟠 Major

Pass isLamaticReady to TranscriptPlayground.

As noted in a previous review, TranscriptPlayground should be gated by readiness to prevent users from clicking "Analyze in Copilot" when the widget is unavailable.

🛠️ Proposed fix
             <div className="mt-10">
-              <TranscriptPlayground />
+              <TranscriptPlayground isLamaticReady={isLamaticReady} />
             </div>
🧹 Nitpick comments (4)
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx (1)

12-14: Hardcoded widget DOM IDs are fragile.

The IDs lam-chat-message-input and lam-chat-send-button depend on the third-party Lamatic widget's internal implementation. If the widget updates its DOM structure, this integration will silently break. Consider documenting this coupling or adding a comment noting the dependency.

📝 Suggested comment
+// These IDs must match the Lamatic chat widget's internal DOM structure.
+// If the widget updates, verify these selectors still work.
 const INPUT_ID = "lam-chat-message-input";
 const SEND_BTN_ID = "lam-chat-send-button";
kits/embed/meeting-intelligence/app/page.tsx (1)

127-127: Demo section uses hardcoded light-mode colors.

The bg-slate-50 text-slate-900 classes on the demo section won't adapt to dark mode. If the kit should support theming, consider using semantic tokens (bg-muted, text-foreground) or scoping this as an intentionally light section.

kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.md (1)

7-18: Add language specifier to the ASCII diagram code block.

The fenced code block lacks a language specifier. Use text or plaintext to silence the markdownlint warning.

📝 Proposed fix
-```
+```text
 Chat Widget (Chat Trigger)
         ↓
kits/embed/meeting-intelligence/components/LamaticChat.tsx (1)

84-90: Consider extracting the LamaticChatWidget type.

The inline type assertion for window.LamaticChatWidget is repeated on lines 85-86. Consider extracting it to improve readability.

♻️ Proposed refactor
+type LamaticWindow = Window & {
+  LamaticChatWidget?: { open?: () => void; close?: () => void };
+};
+
 // Sync open / close with the Lamatic widget JS API.
 useEffect(() => {
   if (!isConfigured || disabled) return;
   try {
-    if (isOpen) (window as Window & { LamaticChatWidget?: { open?: () => void; close?: () => void } }).LamaticChatWidget?.open?.();
-    else        (window as Window & { LamaticChatWidget?: { open?: () => void; close?: () => void } }).LamaticChatWidget?.close?.();
+    const w = window as LamaticWindow;
+    if (isOpen) w.LamaticChatWidget?.open?.();
+    else        w.LamaticChatWidget?.close?.();
   } catch (e) {
     console.warn("[LamaticChat] toggle error", e);
   }
 }, [disabled, isConfigured, isOpen]);

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 49547407-569f-4025-a21d-a81d619f975d

📥 Commits

Reviewing files that changed from the base of the PR and between 17476b2 and a517388.

📒 Files selected for processing (8)
  • kits/embed/meeting-intelligence/app/globals.css
  • kits/embed/meeting-intelligence/app/layout.tsx
  • kits/embed/meeting-intelligence/app/page.tsx
  • kits/embed/meeting-intelligence/components/HeroActions.tsx
  • kits/embed/meeting-intelligence/components/LamaticChat.tsx
  • kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.md
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/config.json

Copy link
Copy Markdown
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: 2

🧹 Nitpick comments (2)
kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx (1)

49-52: Extract magic number to a named constant.

The minimum length threshold 12 lacks context. Consider extracting it to a named constant with a descriptive name.

✨ Suggested refactor
+const MIN_TRANSCRIPT_LENGTH = 12;
+
 const canAnalyze = useMemo(
-  () => isLamaticReady && transcript.trim().length > 12,
+  () => isLamaticReady && transcript.trim().length > MIN_TRANSCRIPT_LENGTH,
   [isLamaticReady, transcript],
 );
kits/embed/meeting-intelligence/components/LamaticChat.tsx (1)

34-41: Consider reducing console logging verbosity in production.

Logging full configuration values (API_URL, FLOW_ID, PROJECT_ID) to the browser console aids debugging but exposes internal configuration to anyone with DevTools open. While these are NEXT_PUBLIC_ vars (already client-visible), verbose logging in production can be noisy.

Consider gating these logs behind a development check or reducing their verbosity:

✨ Suggested approach
-    console.warn("[LamaticChat] Missing env vars — widget disabled.", {
-      PROJECT_ID: PROJECT_ID || "MISSING",
-      FLOW_ID:    FLOW_ID    || "MISSING",
-      API_URL:    API_URL    || "MISSING",
-    });
+    if (process.env.NODE_ENV === "development") {
+      console.warn("[LamaticChat] Missing env vars — widget disabled.", {
+        PROJECT_ID: PROJECT_ID || "MISSING",
+        FLOW_ID:    FLOW_ID    || "MISSING",
+        API_URL:    API_URL    || "MISSING",
+      });
+    }

Also applies to: 51-51


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 71000f6c-c418-43aa-ab74-ec991c858838

📥 Commits

Reviewing files that changed from the base of the PR and between a517388 and 978b256.

📒 Files selected for processing (4)
  • kits/embed/meeting-intelligence/app/page.tsx
  • kits/embed/meeting-intelligence/components/LamaticChat.tsx
  • kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.md
✅ Files skipped from review due to trivial changes (1)
  • kits/embed/meeting-intelligence/flows/meeting-intelligence-chatbot/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • kits/embed/meeting-intelligence/app/page.tsx

Copy link
Copy Markdown
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: 5


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 79a90f34-812c-4a1a-8c49-a936d1b1b5d3

📥 Commits

Reviewing files that changed from the base of the PR and between 978b256 and 40113bc.

📒 Files selected for processing (2)
  • kits/embed/meeting-intelligence/components/LamaticChat.tsx
  • kits/embed/meeting-intelligence/components/TranscriptPlayground.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants