Conversation
📝 WalkthroughWalkthroughThe pull request migrates the Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
kits/agentic/NeuroPersona/app/page.tsx (1)
922-923: Uselucide-reactfor the remaining UI glyphs.The close affordance and suggestion arrow are still hard-coded as
✕/↗, so this page mixes raw glyphs with the shared icon set already used elsewhere in the kit.As per coding guidelines, "Use lucide-react for icons throughout kits".
Also applies to: 1007-1008
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 3865ebda-c68b-4ebb-8186-b907af232e00
⛔ Files ignored due to path filters (3)
kits/agentic/NeuroPersona/app/icon.pngis excluded by!**/*.pngkits/agentic/NeuroPersona/public/lamatic-logo.pngis excluded by!**/*.pngkits/agentic/NeuroPersona/public/placeholder.svgis excluded by!**/*.svg
📒 Files selected for processing (122)
kits/agentic/NeuroPersona/.env.examplekits/agentic/NeuroPersona/.gitignorekits/agentic/NeuroPersona/.npmrckits/agentic/NeuroPersona/LICENSEkits/agentic/NeuroPersona/README.mdkits/agentic/NeuroPersona/actions/orchestrate.tskits/agentic/NeuroPersona/app/globals.csskits/agentic/NeuroPersona/app/layout.tsxkits/agentic/NeuroPersona/app/page.tsxkits/agentic/NeuroPersona/components.jsonkits/agentic/NeuroPersona/components/theme-provider.tsxkits/agentic/NeuroPersona/components/ui/accordion.tsxkits/agentic/NeuroPersona/components/ui/alert-dialog.tsxkits/agentic/NeuroPersona/components/ui/alert.tsxkits/agentic/NeuroPersona/components/ui/aspect-ratio.tsxkits/agentic/NeuroPersona/components/ui/avatar.tsxkits/agentic/NeuroPersona/components/ui/badge.tsxkits/agentic/NeuroPersona/components/ui/breadcrumb.tsxkits/agentic/NeuroPersona/components/ui/button.tsxkits/agentic/NeuroPersona/components/ui/calendar.tsxkits/agentic/NeuroPersona/components/ui/card.tsxkits/agentic/NeuroPersona/components/ui/carousel.tsxkits/agentic/NeuroPersona/components/ui/chart.tsxkits/agentic/NeuroPersona/components/ui/checkbox.tsxkits/agentic/NeuroPersona/components/ui/collapsible.tsxkits/agentic/NeuroPersona/components/ui/command.tsxkits/agentic/NeuroPersona/components/ui/context-menu.tsxkits/agentic/NeuroPersona/components/ui/dialog.tsxkits/agentic/NeuroPersona/components/ui/drawer.tsxkits/agentic/NeuroPersona/components/ui/dropdown-menu.tsxkits/agentic/NeuroPersona/components/ui/form.tsxkits/agentic/NeuroPersona/components/ui/hover-card.tsxkits/agentic/NeuroPersona/components/ui/input-otp.tsxkits/agentic/NeuroPersona/components/ui/input.tsxkits/agentic/NeuroPersona/components/ui/label.tsxkits/agentic/NeuroPersona/components/ui/menubar.tsxkits/agentic/NeuroPersona/components/ui/navigation-menu.tsxkits/agentic/NeuroPersona/components/ui/pagination.tsxkits/agentic/NeuroPersona/components/ui/popover.tsxkits/agentic/NeuroPersona/components/ui/progress.tsxkits/agentic/NeuroPersona/components/ui/radio-group.tsxkits/agentic/NeuroPersona/components/ui/resizable.tsxkits/agentic/NeuroPersona/components/ui/scroll-area.tsxkits/agentic/NeuroPersona/components/ui/select.tsxkits/agentic/NeuroPersona/components/ui/separator.tsxkits/agentic/NeuroPersona/components/ui/sheet.tsxkits/agentic/NeuroPersona/components/ui/sidebar.tsxkits/agentic/NeuroPersona/components/ui/skeleton.tsxkits/agentic/NeuroPersona/components/ui/slider.tsxkits/agentic/NeuroPersona/components/ui/sonner.tsxkits/agentic/NeuroPersona/components/ui/switch.tsxkits/agentic/NeuroPersona/components/ui/table.tsxkits/agentic/NeuroPersona/components/ui/tabs.tsxkits/agentic/NeuroPersona/components/ui/textarea.tsxkits/agentic/NeuroPersona/components/ui/toast.tsxkits/agentic/NeuroPersona/components/ui/toaster.tsxkits/agentic/NeuroPersona/components/ui/toggle-group.tsxkits/agentic/NeuroPersona/components/ui/toggle.tsxkits/agentic/NeuroPersona/components/ui/tooltip.tsxkits/agentic/NeuroPersona/components/ui/use-mobile.tsxkits/agentic/NeuroPersona/components/ui/use-toast.tskits/agentic/NeuroPersona/config.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/README.mdkits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/config.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/inputs.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/meta.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-final/README.mdkits/agentic/NeuroPersona/flows/agentic-reasoning-final/config.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-final/inputs.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-final/meta.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/README.mdkits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/config.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/inputs.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/meta.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/README.mdkits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/config.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/inputs.jsonkits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/meta.jsonkits/agentic/NeuroPersona/flows/crawling-indexation/README.mdkits/agentic/NeuroPersona/flows/crawling-indexation/config.jsonkits/agentic/NeuroPersona/flows/crawling-indexation/inputs.jsonkits/agentic/NeuroPersona/flows/crawling-indexation/meta.jsonkits/agentic/NeuroPersona/flows/gdrive/README.mdkits/agentic/NeuroPersona/flows/gdrive/config.jsonkits/agentic/NeuroPersona/flows/gdrive/inputs.jsonkits/agentic/NeuroPersona/flows/gdrive/meta.jsonkits/agentic/NeuroPersona/flows/gsheet/README.mdkits/agentic/NeuroPersona/flows/gsheet/config.jsonkits/agentic/NeuroPersona/flows/gsheet/inputs.jsonkits/agentic/NeuroPersona/flows/gsheet/meta.jsonkits/agentic/NeuroPersona/flows/onedrive/README.mdkits/agentic/NeuroPersona/flows/onedrive/config.jsonkits/agentic/NeuroPersona/flows/onedrive/inputs.jsonkits/agentic/NeuroPersona/flows/onedrive/meta.jsonkits/agentic/NeuroPersona/flows/postgres/README.mdkits/agentic/NeuroPersona/flows/postgres/config.jsonkits/agentic/NeuroPersona/flows/postgres/inputs.jsonkits/agentic/NeuroPersona/flows/postgres/meta.jsonkits/agentic/NeuroPersona/flows/s3/README.mdkits/agentic/NeuroPersona/flows/s3/config.jsonkits/agentic/NeuroPersona/flows/s3/inputs.jsonkits/agentic/NeuroPersona/flows/s3/meta.jsonkits/agentic/NeuroPersona/flows/scraping-indexation/README.mdkits/agentic/NeuroPersona/flows/scraping-indexation/config.jsonkits/agentic/NeuroPersona/flows/scraping-indexation/inputs.jsonkits/agentic/NeuroPersona/flows/scraping-indexation/meta.jsonkits/agentic/NeuroPersona/flows/sharepoint/README.mdkits/agentic/NeuroPersona/flows/sharepoint/config.jsonkits/agentic/NeuroPersona/flows/sharepoint/inputs.jsonkits/agentic/NeuroPersona/flows/sharepoint/meta.jsonkits/agentic/NeuroPersona/hooks/use-mobile.tskits/agentic/NeuroPersona/hooks/use-toast.tskits/agentic/NeuroPersona/lib/lamatic-client.tskits/agentic/NeuroPersona/lib/utils.tskits/agentic/NeuroPersona/next.config.mjskits/agentic/NeuroPersona/orchestrate.jskits/agentic/NeuroPersona/package.jsonkits/agentic/NeuroPersona/postcss.config.mjskits/agentic/NeuroPersona/scripts/deploy.shkits/agentic/NeuroPersona/styles/globals.csskits/agentic/NeuroPersona/tsconfig.jsonkits/agentic/deep-search/app/page.tsx
💤 Files with no reviewable changes (1)
- kits/agentic/deep-search/app/page.tsx
| const [showAuthModal, setShowAuthModal] = useState(false) | ||
| const [pendingQuery, setPendingQuery] = useState<string>("") | ||
| const hasTrackedRef = useRef(false) |
There was a problem hiding this comment.
Invalidate in-flight runs when the persona changes.
handlePersonalityReset() only clears local state. The awaited branches in handleSubmit() still update whichever assistant message is last, so an older run can repopulate a cleared chat or show the previous persona's answer under a newly selected one.
Suggested guard
+ const activeRequestIdRef = useRef(0)
+
const handlePersonalityReset = () => {
+ activeRequestIdRef.current += 1
setSelectedPersonality("")
setPersonalityInput("")
setPersonalityConfirmed(false)
setMessages([])
setInput("")
}
const handleSubmit = async (query: string) => {
if (!query.trim() || isLoading) return
+ const requestId = ++activeRequestIdRef.current
...
- setMessages((prev) => {
+ setMessages((prev) => {
+ if (activeRequestIdRef.current !== requestId) return prev
const updated = [...prev]
...
return updated
})
...
} finally {
- setIsLoading(false)
+ if (activeRequestIdRef.current === requestId) {
+ setIsLoading(false)
+ }
}Also applies to: 157-163, 170-315
| useEffect(() => { | ||
| if (typeof window === "undefined") return | ||
| const url = new URL(window.location.href) | ||
| const autostart = url.searchParams.get("autostart") | ||
| const q = url.searchParams.get("query") | ||
| if (autostart === "1" && q && !isLoading && messages.length === 0) { | ||
| handleSubmit(q) | ||
| url.searchParams.delete("autostart") | ||
| url.searchParams.delete("query") | ||
| window.history.replaceState({}, "", url.toString()) | ||
| } | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps | ||
| }, []) |
There was a problem hiding this comment.
Gate URL autostart on a confirmed persona.
This effect calls handleSubmit(q) before any persona has been selected. Because the active chat is also gated on personalityConfirmed, the request runs in the background while the picker stays visible, and the URL params are removed immediately so the user cannot retry after choosing a persona.
| const step2CResult = await orchestratePipelineStep(augmentedQuery, history, "step2C", results) | ||
| if (step2CResult.success && step2CResult.data && Object.keys(step2CResult.data).length > 0) { | ||
| results.step2C = step2CResult.data | ||
| if (step2CResult.data?.links) allLinks.push(...step2CResult.data.links) | ||
| } |
There was a problem hiding this comment.
step2C is wired here, but the backend flow config does not define it.
kits/agentic/NeuroPersona/orchestrate.js currently defines step1, step2A, step2B, and step3, not step2C. This branch therefore never contributes data, and the missing research leg is silently treated as healthy even though step3 still depends on it.
| {searchLinks.map((link, li) => ( | ||
| <button | ||
| key={li} | ||
| onClick={() => window.open(link, "_blank")} | ||
| className="link-pill" | ||
| > | ||
| <img | ||
| src={getFaviconUrl(link) || "/placeholder.svg"} | ||
| alt="" | ||
| onError={(e) => { e.currentTarget.src = "/placeholder.svg?height=12&width=12" }} | ||
| /> | ||
| <span style={{ maxWidth: '96px', overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> | ||
| {extractDomain(link)} | ||
| </span> | ||
| </button> |
There was a problem hiding this comment.
Validate orchestration-provided URLs before rendering them as links.
These values come from model/search output, but they are exposed directly as clickable pills/cards. A malicious javascript: or data: URL would still be surfaced to the user, and the pill path currently skips the safer anchor semantics you already use for the reference cards.
Suggested hardening
- {searchLinks.map((link, li) => (
- <button
- key={li}
- onClick={() => window.open(link, "_blank")}
- className="link-pill"
- >
+ {searchLinks.filter(isSafeExternalUrl).map((link, li) => (
+ <a
+ key={li}
+ href={link}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="link-pill"
+ >
...
- </button>
+ </a>
))}
...
- {nextMessage.references.map((ref, ri) => (
+ {nextMessage.references.filter(isSafeExternalUrl).map((ref, ri) => (
<a key={ri} href={ref} target="_blank" rel="noopener noreferrer" className="ref-card">Add a small isSafeExternalUrl() helper nearby that only allows http: and https:.
Also applies to: 1144-1156
What This Kit Does
Neuro Persona is a multi-personality AI chatbot that allows users to interact with famous personalities from history, politics, business, and pop culture. Instead of generic responses, the agent adapts tone, thinking style, and opinions based on the selected personality.
Users simply choose or type a personality (e.g., Elon Musk, Steve Jobs, Krishna, Chanakya), ask a question, and the agent responds as if that person is answering—using their mindset, communication style, and known beliefs.
The system uses structured prompts, contextual grounding, and memory to ensure responses feel authentic, opinionated, and consistent.
Core Functionality
Accepts user query + selected personality
Applies persona conditioning layer (tone, beliefs, communication style)
Generates responses aligned with that personality’s thinking
Maintains conversational memory for continuity
Allows dynamic switching between personalities in real-time
Architecture Overview
Persona Engine
Maps each personality to:
Thinking style
Communication tone
Core beliefs & biases
Uses prompt engineering to enforce behavioral consistency
Response Generation
Uses LLM (via OpenRouter / Gemini)
Injects:
Personality context
User query
Conversation history
Memory Layer (Optional)
Stores past conversations
Enables contextual follow-ups
Can be backed by vector DB (e.g., Weaviate via Lamatic)
Flows
Chat Flow
Input: { personality, user_query }
Steps:
Load persona profile
Inject system prompt with personality traits
Retrieve past conversation (if enabled)
Generate response
Store interaction in memory
Frontend Features
Dark-themed, immersive UI
Personality input / selector
Chat interface styled like “talking to a real person”
Typing + thinking states
Local session persistence
Optional voice / sound effects
Providers & Prerequisites
Lamatic.ai → orchestration + optional memory
OpenRouter / Gemini → LLM responses
(Optional) Weaviate → vector memory for conversations
How to Run Locally
cd kits/agentic/neura-persona
npm install
cp .env.example .env.local
Add API keys
npm run dev
Project Structure
kits/
└── agentic/
└── NeuroPersona/
├── app/
├── components/
├── flows/
├── lib/
├── public/
├── .env.example
├── config.json
└── README.md
Key Features
Multi-personality simulation
Real-time conversational switching
Personality-consistent responses
Scalable persona system (add unlimited personalities)
RAG-ready architecture for deeper realism
Use Cases
Learn from historical figures
Simulate mentorship from industry leaders
Explore different perspectives on one problem
Fun & engaging AI conversations
Deployment
Fully compatible with Vercel deployment
Works end-to-end with environment configuration
Summary
Neura Persona transforms traditional chatbots into interactive personality simulations, letting users think, learn, and explore ideas through the lens of the world’s most influential figures.


Changes
Added Neuro Persona Kit: New multi-personality AI chatbot allowing users to interact with simulated famous personalities (e.g., Elon Musk, Einstein, Shakespeare, Steve Jobs)
Core Components:
step1,step2A,step2B,step2C,step3)Infrastructure:
Removed:
kits/agentic/deep-search/app/page.tsx(586 lines) — functionality integrated into NeuroPersona architectureFile changes: +1196 / -586 (net: +610)