diff --git a/kits/agentic/deep-search/.env.example b/kits/agentic/NeuroPersona/.env.example similarity index 100% rename from kits/agentic/deep-search/.env.example rename to kits/agentic/NeuroPersona/.env.example diff --git a/kits/agentic/deep-search/.gitignore b/kits/agentic/NeuroPersona/.gitignore similarity index 100% rename from kits/agentic/deep-search/.gitignore rename to kits/agentic/NeuroPersona/.gitignore diff --git a/kits/agentic/deep-search/.npmrc b/kits/agentic/NeuroPersona/.npmrc similarity index 100% rename from kits/agentic/deep-search/.npmrc rename to kits/agentic/NeuroPersona/.npmrc diff --git a/kits/agentic/deep-search/LICENSE b/kits/agentic/NeuroPersona/LICENSE similarity index 100% rename from kits/agentic/deep-search/LICENSE rename to kits/agentic/NeuroPersona/LICENSE diff --git a/kits/agentic/deep-search/README.md b/kits/agentic/NeuroPersona/README.md similarity index 100% rename from kits/agentic/deep-search/README.md rename to kits/agentic/NeuroPersona/README.md diff --git a/kits/agentic/deep-search/actions/orchestrate.ts b/kits/agentic/NeuroPersona/actions/orchestrate.ts similarity index 100% rename from kits/agentic/deep-search/actions/orchestrate.ts rename to kits/agentic/NeuroPersona/actions/orchestrate.ts diff --git a/kits/agentic/deep-search/app/globals.css b/kits/agentic/NeuroPersona/app/globals.css similarity index 100% rename from kits/agentic/deep-search/app/globals.css rename to kits/agentic/NeuroPersona/app/globals.css diff --git a/kits/agentic/deep-search/app/icon.png b/kits/agentic/NeuroPersona/app/icon.png similarity index 100% rename from kits/agentic/deep-search/app/icon.png rename to kits/agentic/NeuroPersona/app/icon.png diff --git a/kits/agentic/deep-search/app/layout.tsx b/kits/agentic/NeuroPersona/app/layout.tsx similarity index 100% rename from kits/agentic/deep-search/app/layout.tsx rename to kits/agentic/NeuroPersona/app/layout.tsx diff --git a/kits/agentic/NeuroPersona/app/page.tsx b/kits/agentic/NeuroPersona/app/page.tsx new file mode 100644 index 00000000..8f6da964 --- /dev/null +++ b/kits/agentic/NeuroPersona/app/page.tsx @@ -0,0 +1,1196 @@ +"use client" + +import type React from "react" +import { useState, useRef, useEffect } from "react" +import { Button } from "@/components/ui/button" +import { Input } from "@/components/ui/input" +import { Card } from "@/components/ui/card" +import { ScrollArea } from "@/components/ui/scroll-area" +import { Send, ArrowUp, ExternalLink, FileText, Github } from "lucide-react" +import ReactMarkdown from "react-markdown" +import Link from "next/link" +import { orchestratePipelineStep } from "@/actions/orchestrate" +import { Typewriter } from "react-simple-typewriter" +import { + Dialog, + DialogContent, + DialogHeader, + DialogTitle, + DialogDescription, + DialogFooter, +} from "@/components/ui/dialog" + +interface Message { + role: "user" | "assistant" + message: string + references?: string[] + steps?: string + isTyping?: boolean + links?: string[] + isProcessing?: boolean +} + +interface FlowResponse { + success: boolean + flowId: string + flowName: string + data: Record + error?: string + links?: string[] +} + +const PERSONALITIES = [ + { name: "Elon Musk", emoji: "πŸš€" }, + { name: "Einstein", emoji: "🧠" }, + { name: "Shakespeare", emoji: "🎭" }, + { name: "Steve Jobs", emoji: "🍎" }, +] + +const getPersonalityEmoji = (name: string): string => { + const match = PERSONALITIES.find( + (p) => p.name.toLowerCase() === name.toLowerCase() + ) + return match ? match.emoji : "🌟" +} + +const getPersonalitySuggestions = (name: string): string[] => { + const lower = name.toLowerCase() + if (lower.includes("elon") || lower.includes("musk")) { + return [ + "What's your vision for colonising Mars?", + "How do you think about first principles?", + "What's the future of electric vehicles?", + ] + } + if (lower.includes("einstein")) { + return [ + "Can you explain the theory of relativity simply?", + "What is the relationship between energy and mass?", + "How do you approach unsolvable problems?", + ] + } + if (lower.includes("shakespeare")) { + return [ + "Write me a sonnet about modern technology", + "What makes a truly tragic hero?", + "How do you craft compelling dialogue?", + ] + } + if (lower.includes("jobs") || lower.includes("steve")) { + return [ + "How do you define great product design?", + "What does it mean to think differently?", + "How do you build a company culture of excellence?", + ] + } + return [ + `What are your most important ideas?`, + `What lessons from your life should everyone know?`, + `How do you approach difficult decisions?`, + ] +} + +export default function LamaticThinkMode() { + const [messages, setMessages] = useState([]) + const [input, setInput] = useState("") + const [isLoading, setIsLoading] = useState(false) + const [currentQuery, setCurrentQuery] = useState("") + const [currentStep, setCurrentStep] = useState<"steps" | "research" | "write" | null>(null) + const [isSearching, setIsSearching] = useState(false) + const [searchLinks, setSearchLinks] = useState([]) + const [isTypewriterDone, setIsTypewriterDone] = useState(false) + const scrollAreaRef = useRef(null) + const [showAuthModal, setShowAuthModal] = useState(false) + const [pendingQuery, setPendingQuery] = useState("") + const hasTrackedRef = useRef(false) + + const [selectedPersonality, setSelectedPersonality] = useState("") + const [personalityInput, setPersonalityInput] = useState("") + const [personalityConfirmed, setPersonalityConfirmed] = useState(false) + + const KIT_ID = "reasoning" + + const suggestions = personalityConfirmed + ? getPersonalitySuggestions(selectedPersonality) + : [ + "Help me pack for my trip to Jaipur next week", + "Compare leather sofas vs fabric sofas", + "How to identify if the pashmina shawl I am buying is genuine?", + ] + + const scrollToBottom = () => { + if (scrollAreaRef.current) { + const scrollContainer = scrollAreaRef.current.querySelector("[data-radix-scroll-area-viewport]") + if (scrollContainer) { + setTimeout(() => { + scrollContainer.scrollTop = scrollContainer.scrollHeight + }, 100) + } + } + } + + useEffect(() => { + scrollToBottom() + }, [messages, isLoading]) + + 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 + }, []) + + const handlePersonalityConfirm = (name?: string) => { + const finalName = name ?? personalityInput.trim() + if (!finalName) return + setSelectedPersonality(finalName) + setPersonalityConfirmed(true) + } + + const handlePersonalityReset = () => { + setSelectedPersonality("") + setPersonalityInput("") + setPersonalityConfirmed(false) + setMessages([]) + setInput("") + } + + const buildPersonalityPrefix = (): string => { + if (!personalityConfirmed || !selectedPersonality) return "" + return `You are ${selectedPersonality}. Respond exactly as ${selectedPersonality} would β€” use their tone, vocabulary, philosophy, and mannerisms. Stay fully in character throughout. ` + } + + const handleSubmit = async (query: string) => { + if (!query.trim() || isLoading) return + + setInput("") + setCurrentQuery(query) + setIsSearching(false) + setSearchLinks([]) + setIsTypewriterDone(false) + + const userMessage: Message = { role: "user", message: query } + setMessages((prev) => [...prev, userMessage]) + setIsLoading(true) + setCurrentStep("steps") + + setTimeout(scrollToBottom, 100) + + try { + const history = messages.map((msg) => ({ + role: msg.role, + message: msg.message, + })) + + const personalityPrefix = buildPersonalityPrefix() + const augmentedQuery = personalityPrefix ? `${personalityPrefix}\n\nUser asks: ${query}` : query + + const assistantMessage: Message = { + role: "assistant", + message: "", + isProcessing: true, + } + + setMessages((prev) => [...prev, assistantMessage]) + + const results: Record = {} + + const step1Result = await orchestratePipelineStep(augmentedQuery, history, "step1") + + if (!step1Result.success) { + throw new Error(step1Result.error || "Failed to execute step1") + } + + if (step1Result.data?.steps) { + results.step1 = step1Result.data + setMessages((prev) => { + const updated = [...prev] + const lastIndex = updated.length - 1 + if (updated[lastIndex]?.role === "assistant") { + updated[lastIndex] = { + ...updated[lastIndex], + steps: step1Result.data.steps, + isProcessing: true, + } + } + return updated + }) + setCurrentStep("research") + + setTimeout(() => { + setIsSearching(true) + }, 500) + } + + const allLinks: string[] = [] + + const step2AResult = await orchestratePipelineStep(augmentedQuery, history, "step2A", results) + if (step2AResult.success && step2AResult.data && Object.keys(step2AResult.data).length > 0) { + results.step2A = step2AResult.data + if (step2AResult.data?.links) allLinks.push(...step2AResult.data.links) + } + + const step2BResult = await orchestratePipelineStep(augmentedQuery, history, "step2B", results) + if (step2BResult.success && step2BResult.data && Object.keys(step2BResult.data).length > 0) { + results.step2B = step2BResult.data + if (step2BResult.data?.links) allLinks.push(...step2BResult.data.links) + } + + 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) + } + + setSearchLinks(allLinks) + setCurrentStep("write") + + setMessages((prev) => { + const updated = [...prev] + const lastIndex = updated.length - 1 + if (updated[lastIndex]?.role === "assistant") { + updated[lastIndex] = { + ...updated[lastIndex], + links: allLinks, + isProcessing: true, + } + } + return updated + }) + + setTimeout(() => { + setIsSearching(false) + }, 1000) + + const step3Result = await orchestratePipelineStep(augmentedQuery, history, "step3", results) + + if (!step3Result.success) { + throw new Error(step3Result.error || "Failed to execute step3") + } + + if (step3Result.data?.answer) { + setMessages((prev) => { + const updated = [...prev] + const lastIndex = updated.length - 1 + if (updated[lastIndex]?.role === "assistant") { + updated[lastIndex] = { + role: "assistant", + message: step3Result.data.answer, + references: updated[lastIndex].links || allLinks, + steps: undefined, + isTyping: false, + isProcessing: false, + } + } + return updated + }) + setCurrentStep(null) + } + } catch (error) { + console.error("Error in step-by-step orchestration:", error) + setMessages((prev) => { + const updated = [...prev] + const lastIndex = updated.length - 1 + if (updated[lastIndex]?.role === "assistant") { + updated[lastIndex] = { + role: "assistant", + message: "Sorry, I encountered an error while processing your request. Please try again.", + isProcessing: false, + } + } + return updated + }) + setCurrentStep(null) + setIsSearching(false) + } finally { + setIsLoading(false) + } + } + + const handleSuggestionClick = (suggestion: string) => { + handleSubmit(suggestion) + } + + const handleFormSubmit = (e: React.FormEvent) => { + e.preventDefault() + handleSubmit(input) + } + + const extractDomain = (url: string) => { + try { + return new URL(url).hostname.replace("www.", "") + } catch { + return url + } + } + + const getFaviconUrl = (url: string) => { + try { + const domain = new URL(url).origin + return `${domain}/favicon.ico` + } catch { + return "/placeholder.svg?height=16&width=16" + } + } + + const showPersonalityPicker = !personalityConfirmed + const showInitialInterface = personalityConfirmed && messages.length === 0 && !isLoading + + return ( + <> + {/* ── Global Styles ── */} + + +
+
+ + {/* ── Header ── */} +
+
+
+ +

+ Neuro + Persona +

+ + + {personalityConfirmed && ( +
+ {getPersonalityEmoji(selectedPersonality)} + {selectedPersonality} + +
+ )} +
+ +
+ + + Docs + + + + GitHub + +
+
+
+ + {/* ── Personality Picker ── */} + {showPersonalityPicker && ( +
+
+ 🎭 +

Who would you like
to speak with?

+

Type any famous personality's name and converse with them

+ +
+
{ e.preventDefault(); handlePersonalityConfirm(); }}> + setPersonalityInput(e.target.value)} + placeholder="e.g. Albert Einstein, Cleopatra, Tesla…" + className="elite-input" + autoFocus + /> + +
+
+ +

Or choose one

+
+ {PERSONALITIES.map((p) => ( + + ))} +
+
+
+ )} + + {/* ── Initial Chat Interface ── */} + {showInitialInterface && ( +
+
+ {getPersonalityEmoji(selectedPersonality)} +

Chat with {selectedPersonality}

+

Ask anything β€” they'll answer in their own words

+ +
+
+ setInput(e.target.value)} + placeholder={`Ask ${selectedPersonality} anything…`} + className="elite-input" + disabled={isLoading} + /> + +
+
+ +
+ {suggestions.map((suggestion, index) => ( + + ))} +
+
+
+ )} + + {/* ── Active Chat ── */} + {personalityConfirmed && (messages.length > 0 || isLoading) && ( +
+
+ +
+ {messages.map((message, index) => { + const nextMessage = messages[index + 1] + const isLastUserMessage = + index === messages.length - 1 || + (index === messages.length - 2 && messages[index + 1]?.role === "assistant") + + return ( +
+ {/* User query */} + {message.role === "user" && ( +
+

{message.message}

+
+
+ )} + + {/* Thinking indicator */} + {isLastUserMessage && isLoading && !nextMessage && ( +
+
+
+
+
+
+ {getPersonalityEmoji(selectedPersonality)} {selectedPersonality} is contemplating… +
+ )} + + {/* Answer + References */} + {nextMessage && nextMessage.role === "assistant" && ( +
+ {/* Answer Column */} +
+ {!nextMessage.isProcessing && nextMessage.message && ( +
+ {getPersonalityEmoji(selectedPersonality)} + {selectedPersonality} +
+ )} + + {nextMessage.isProcessing && nextMessage.steps && ( +
+
+ {!isTypewriterDone ? ( + setIsTypewriterDone(true)} + /> + ) : nextMessage.steps} +
+ + {isSearching && ( +
+
+ Searching the archives… +
+ )} + + {searchLinks.length > 0 && ( +
+
Consulting
+
+ {searchLinks.map((link, li) => ( + + ))} +
+
+ )} +
+ )} + + {!nextMessage.isProcessing && nextMessage.message && ( +
+ ( + + {children} + + + ), + h1: ({ children }) =>

{children}

, + h2: ({ children }) =>

{children}

, + h3: ({ children }) =>

{children}

, + p: ({ children }) =>

{children}

, + ul: ({ children }) =>
    {children}
, + li: ({ children }) =>
  • {children}
  • , + strong: ({ children }) => {children}, + }} + > + {nextMessage.message} +
    +
    + )} +
    + + {/* References Column */} +
    + {!nextMessage.isProcessing && nextMessage.references && nextMessage.references.length > 0 && ( +
    +
    + Sources + {nextMessage.references.length} references +
    + + + +
    + )} +
    +
    + )} +
    + ) + })} +
    + +
    + + {/* Fixed Input Bar */} +
    +
    +
    + setInput(e.target.value)} + placeholder={`Ask ${selectedPersonality} anything…`} + className="elite-input" + disabled={isLoading} + /> + +
    +
    +
    +
    + )} + +
    +
    + + ) +} diff --git a/kits/agentic/deep-search/components.json b/kits/agentic/NeuroPersona/components.json similarity index 100% rename from kits/agentic/deep-search/components.json rename to kits/agentic/NeuroPersona/components.json diff --git a/kits/agentic/deep-search/components/theme-provider.tsx b/kits/agentic/NeuroPersona/components/theme-provider.tsx similarity index 100% rename from kits/agentic/deep-search/components/theme-provider.tsx rename to kits/agentic/NeuroPersona/components/theme-provider.tsx diff --git a/kits/agentic/deep-search/components/ui/accordion.tsx b/kits/agentic/NeuroPersona/components/ui/accordion.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/accordion.tsx rename to kits/agentic/NeuroPersona/components/ui/accordion.tsx diff --git a/kits/agentic/deep-search/components/ui/alert-dialog.tsx b/kits/agentic/NeuroPersona/components/ui/alert-dialog.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/alert-dialog.tsx rename to kits/agentic/NeuroPersona/components/ui/alert-dialog.tsx diff --git a/kits/agentic/deep-search/components/ui/alert.tsx b/kits/agentic/NeuroPersona/components/ui/alert.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/alert.tsx rename to kits/agentic/NeuroPersona/components/ui/alert.tsx diff --git a/kits/agentic/deep-search/components/ui/aspect-ratio.tsx b/kits/agentic/NeuroPersona/components/ui/aspect-ratio.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/aspect-ratio.tsx rename to kits/agentic/NeuroPersona/components/ui/aspect-ratio.tsx diff --git a/kits/agentic/deep-search/components/ui/avatar.tsx b/kits/agentic/NeuroPersona/components/ui/avatar.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/avatar.tsx rename to kits/agentic/NeuroPersona/components/ui/avatar.tsx diff --git a/kits/agentic/deep-search/components/ui/badge.tsx b/kits/agentic/NeuroPersona/components/ui/badge.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/badge.tsx rename to kits/agentic/NeuroPersona/components/ui/badge.tsx diff --git a/kits/agentic/deep-search/components/ui/breadcrumb.tsx b/kits/agentic/NeuroPersona/components/ui/breadcrumb.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/breadcrumb.tsx rename to kits/agentic/NeuroPersona/components/ui/breadcrumb.tsx diff --git a/kits/agentic/deep-search/components/ui/button.tsx b/kits/agentic/NeuroPersona/components/ui/button.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/button.tsx rename to kits/agentic/NeuroPersona/components/ui/button.tsx diff --git a/kits/agentic/deep-search/components/ui/calendar.tsx b/kits/agentic/NeuroPersona/components/ui/calendar.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/calendar.tsx rename to kits/agentic/NeuroPersona/components/ui/calendar.tsx diff --git a/kits/agentic/deep-search/components/ui/card.tsx b/kits/agentic/NeuroPersona/components/ui/card.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/card.tsx rename to kits/agentic/NeuroPersona/components/ui/card.tsx diff --git a/kits/agentic/deep-search/components/ui/carousel.tsx b/kits/agentic/NeuroPersona/components/ui/carousel.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/carousel.tsx rename to kits/agentic/NeuroPersona/components/ui/carousel.tsx diff --git a/kits/agentic/deep-search/components/ui/chart.tsx b/kits/agentic/NeuroPersona/components/ui/chart.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/chart.tsx rename to kits/agentic/NeuroPersona/components/ui/chart.tsx diff --git a/kits/agentic/deep-search/components/ui/checkbox.tsx b/kits/agentic/NeuroPersona/components/ui/checkbox.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/checkbox.tsx rename to kits/agentic/NeuroPersona/components/ui/checkbox.tsx diff --git a/kits/agentic/deep-search/components/ui/collapsible.tsx b/kits/agentic/NeuroPersona/components/ui/collapsible.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/collapsible.tsx rename to kits/agentic/NeuroPersona/components/ui/collapsible.tsx diff --git a/kits/agentic/deep-search/components/ui/command.tsx b/kits/agentic/NeuroPersona/components/ui/command.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/command.tsx rename to kits/agentic/NeuroPersona/components/ui/command.tsx diff --git a/kits/agentic/deep-search/components/ui/context-menu.tsx b/kits/agentic/NeuroPersona/components/ui/context-menu.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/context-menu.tsx rename to kits/agentic/NeuroPersona/components/ui/context-menu.tsx diff --git a/kits/agentic/deep-search/components/ui/dialog.tsx b/kits/agentic/NeuroPersona/components/ui/dialog.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/dialog.tsx rename to kits/agentic/NeuroPersona/components/ui/dialog.tsx diff --git a/kits/agentic/deep-search/components/ui/drawer.tsx b/kits/agentic/NeuroPersona/components/ui/drawer.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/drawer.tsx rename to kits/agentic/NeuroPersona/components/ui/drawer.tsx diff --git a/kits/agentic/deep-search/components/ui/dropdown-menu.tsx b/kits/agentic/NeuroPersona/components/ui/dropdown-menu.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/dropdown-menu.tsx rename to kits/agentic/NeuroPersona/components/ui/dropdown-menu.tsx diff --git a/kits/agentic/deep-search/components/ui/form.tsx b/kits/agentic/NeuroPersona/components/ui/form.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/form.tsx rename to kits/agentic/NeuroPersona/components/ui/form.tsx diff --git a/kits/agentic/deep-search/components/ui/hover-card.tsx b/kits/agentic/NeuroPersona/components/ui/hover-card.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/hover-card.tsx rename to kits/agentic/NeuroPersona/components/ui/hover-card.tsx diff --git a/kits/agentic/deep-search/components/ui/input-otp.tsx b/kits/agentic/NeuroPersona/components/ui/input-otp.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/input-otp.tsx rename to kits/agentic/NeuroPersona/components/ui/input-otp.tsx diff --git a/kits/agentic/deep-search/components/ui/input.tsx b/kits/agentic/NeuroPersona/components/ui/input.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/input.tsx rename to kits/agentic/NeuroPersona/components/ui/input.tsx diff --git a/kits/agentic/deep-search/components/ui/label.tsx b/kits/agentic/NeuroPersona/components/ui/label.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/label.tsx rename to kits/agentic/NeuroPersona/components/ui/label.tsx diff --git a/kits/agentic/deep-search/components/ui/menubar.tsx b/kits/agentic/NeuroPersona/components/ui/menubar.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/menubar.tsx rename to kits/agentic/NeuroPersona/components/ui/menubar.tsx diff --git a/kits/agentic/deep-search/components/ui/navigation-menu.tsx b/kits/agentic/NeuroPersona/components/ui/navigation-menu.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/navigation-menu.tsx rename to kits/agentic/NeuroPersona/components/ui/navigation-menu.tsx diff --git a/kits/agentic/deep-search/components/ui/pagination.tsx b/kits/agentic/NeuroPersona/components/ui/pagination.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/pagination.tsx rename to kits/agentic/NeuroPersona/components/ui/pagination.tsx diff --git a/kits/agentic/deep-search/components/ui/popover.tsx b/kits/agentic/NeuroPersona/components/ui/popover.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/popover.tsx rename to kits/agentic/NeuroPersona/components/ui/popover.tsx diff --git a/kits/agentic/deep-search/components/ui/progress.tsx b/kits/agentic/NeuroPersona/components/ui/progress.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/progress.tsx rename to kits/agentic/NeuroPersona/components/ui/progress.tsx diff --git a/kits/agentic/deep-search/components/ui/radio-group.tsx b/kits/agentic/NeuroPersona/components/ui/radio-group.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/radio-group.tsx rename to kits/agentic/NeuroPersona/components/ui/radio-group.tsx diff --git a/kits/agentic/deep-search/components/ui/resizable.tsx b/kits/agentic/NeuroPersona/components/ui/resizable.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/resizable.tsx rename to kits/agentic/NeuroPersona/components/ui/resizable.tsx diff --git a/kits/agentic/deep-search/components/ui/scroll-area.tsx b/kits/agentic/NeuroPersona/components/ui/scroll-area.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/scroll-area.tsx rename to kits/agentic/NeuroPersona/components/ui/scroll-area.tsx diff --git a/kits/agentic/deep-search/components/ui/select.tsx b/kits/agentic/NeuroPersona/components/ui/select.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/select.tsx rename to kits/agentic/NeuroPersona/components/ui/select.tsx diff --git a/kits/agentic/deep-search/components/ui/separator.tsx b/kits/agentic/NeuroPersona/components/ui/separator.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/separator.tsx rename to kits/agentic/NeuroPersona/components/ui/separator.tsx diff --git a/kits/agentic/deep-search/components/ui/sheet.tsx b/kits/agentic/NeuroPersona/components/ui/sheet.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/sheet.tsx rename to kits/agentic/NeuroPersona/components/ui/sheet.tsx diff --git a/kits/agentic/deep-search/components/ui/sidebar.tsx b/kits/agentic/NeuroPersona/components/ui/sidebar.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/sidebar.tsx rename to kits/agentic/NeuroPersona/components/ui/sidebar.tsx diff --git a/kits/agentic/deep-search/components/ui/skeleton.tsx b/kits/agentic/NeuroPersona/components/ui/skeleton.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/skeleton.tsx rename to kits/agentic/NeuroPersona/components/ui/skeleton.tsx diff --git a/kits/agentic/deep-search/components/ui/slider.tsx b/kits/agentic/NeuroPersona/components/ui/slider.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/slider.tsx rename to kits/agentic/NeuroPersona/components/ui/slider.tsx diff --git a/kits/agentic/deep-search/components/ui/sonner.tsx b/kits/agentic/NeuroPersona/components/ui/sonner.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/sonner.tsx rename to kits/agentic/NeuroPersona/components/ui/sonner.tsx diff --git a/kits/agentic/deep-search/components/ui/switch.tsx b/kits/agentic/NeuroPersona/components/ui/switch.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/switch.tsx rename to kits/agentic/NeuroPersona/components/ui/switch.tsx diff --git a/kits/agentic/deep-search/components/ui/table.tsx b/kits/agentic/NeuroPersona/components/ui/table.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/table.tsx rename to kits/agentic/NeuroPersona/components/ui/table.tsx diff --git a/kits/agentic/deep-search/components/ui/tabs.tsx b/kits/agentic/NeuroPersona/components/ui/tabs.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/tabs.tsx rename to kits/agentic/NeuroPersona/components/ui/tabs.tsx diff --git a/kits/agentic/deep-search/components/ui/textarea.tsx b/kits/agentic/NeuroPersona/components/ui/textarea.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/textarea.tsx rename to kits/agentic/NeuroPersona/components/ui/textarea.tsx diff --git a/kits/agentic/deep-search/components/ui/toast.tsx b/kits/agentic/NeuroPersona/components/ui/toast.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/toast.tsx rename to kits/agentic/NeuroPersona/components/ui/toast.tsx diff --git a/kits/agentic/deep-search/components/ui/toaster.tsx b/kits/agentic/NeuroPersona/components/ui/toaster.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/toaster.tsx rename to kits/agentic/NeuroPersona/components/ui/toaster.tsx diff --git a/kits/agentic/deep-search/components/ui/toggle-group.tsx b/kits/agentic/NeuroPersona/components/ui/toggle-group.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/toggle-group.tsx rename to kits/agentic/NeuroPersona/components/ui/toggle-group.tsx diff --git a/kits/agentic/deep-search/components/ui/toggle.tsx b/kits/agentic/NeuroPersona/components/ui/toggle.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/toggle.tsx rename to kits/agentic/NeuroPersona/components/ui/toggle.tsx diff --git a/kits/agentic/deep-search/components/ui/tooltip.tsx b/kits/agentic/NeuroPersona/components/ui/tooltip.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/tooltip.tsx rename to kits/agentic/NeuroPersona/components/ui/tooltip.tsx diff --git a/kits/agentic/deep-search/components/ui/use-mobile.tsx b/kits/agentic/NeuroPersona/components/ui/use-mobile.tsx similarity index 100% rename from kits/agentic/deep-search/components/ui/use-mobile.tsx rename to kits/agentic/NeuroPersona/components/ui/use-mobile.tsx diff --git a/kits/agentic/deep-search/components/ui/use-toast.ts b/kits/agentic/NeuroPersona/components/ui/use-toast.ts similarity index 100% rename from kits/agentic/deep-search/components/ui/use-toast.ts rename to kits/agentic/NeuroPersona/components/ui/use-toast.ts diff --git a/kits/agentic/deep-search/config.json b/kits/agentic/NeuroPersona/config.json similarity index 100% rename from kits/agentic/deep-search/config.json rename to kits/agentic/NeuroPersona/config.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-data-source/README.md b/kits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/README.md similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-data-source/README.md rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/README.md diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-data-source/config.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/config.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-data-source/config.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/config.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-data-source/inputs.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-data-source/inputs.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/inputs.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-data-source/meta.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-data-source/meta.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-data-source/meta.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-final/README.md b/kits/agentic/NeuroPersona/flows/agentic-reasoning-final/README.md similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-final/README.md rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-final/README.md diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-final/config.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-final/config.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-final/config.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-final/config.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-final/inputs.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-final/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-final/inputs.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-final/inputs.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-final/meta.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-final/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-final/meta.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-final/meta.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-generate-steps/README.md b/kits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/README.md similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-generate-steps/README.md rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/README.md diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-generate-steps/config.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/config.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-generate-steps/config.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/config.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-generate-steps/inputs.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-generate-steps/inputs.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/inputs.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-generate-steps/meta.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-generate-steps/meta.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-generate-steps/meta.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-search-web/README.md b/kits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/README.md similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-search-web/README.md rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/README.md diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-search-web/config.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/config.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-search-web/config.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/config.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-search-web/inputs.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-search-web/inputs.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/inputs.json diff --git a/kits/agentic/deep-search/flows/agentic-reasoning-search-web/meta.json b/kits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/agentic-reasoning-search-web/meta.json rename to kits/agentic/NeuroPersona/flows/agentic-reasoning-search-web/meta.json diff --git a/kits/agentic/deep-search/flows/crawling-indexation/README.md b/kits/agentic/NeuroPersona/flows/crawling-indexation/README.md similarity index 100% rename from kits/agentic/deep-search/flows/crawling-indexation/README.md rename to kits/agentic/NeuroPersona/flows/crawling-indexation/README.md diff --git a/kits/agentic/deep-search/flows/crawling-indexation/config.json b/kits/agentic/NeuroPersona/flows/crawling-indexation/config.json similarity index 100% rename from kits/agentic/deep-search/flows/crawling-indexation/config.json rename to kits/agentic/NeuroPersona/flows/crawling-indexation/config.json diff --git a/kits/agentic/deep-search/flows/crawling-indexation/inputs.json b/kits/agentic/NeuroPersona/flows/crawling-indexation/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/crawling-indexation/inputs.json rename to kits/agentic/NeuroPersona/flows/crawling-indexation/inputs.json diff --git a/kits/agentic/deep-search/flows/crawling-indexation/meta.json b/kits/agentic/NeuroPersona/flows/crawling-indexation/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/crawling-indexation/meta.json rename to kits/agentic/NeuroPersona/flows/crawling-indexation/meta.json diff --git a/kits/agentic/deep-search/flows/gdrive/README.md b/kits/agentic/NeuroPersona/flows/gdrive/README.md similarity index 100% rename from kits/agentic/deep-search/flows/gdrive/README.md rename to kits/agentic/NeuroPersona/flows/gdrive/README.md diff --git a/kits/agentic/deep-search/flows/gdrive/config.json b/kits/agentic/NeuroPersona/flows/gdrive/config.json similarity index 100% rename from kits/agentic/deep-search/flows/gdrive/config.json rename to kits/agentic/NeuroPersona/flows/gdrive/config.json diff --git a/kits/agentic/deep-search/flows/gdrive/inputs.json b/kits/agentic/NeuroPersona/flows/gdrive/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/gdrive/inputs.json rename to kits/agentic/NeuroPersona/flows/gdrive/inputs.json diff --git a/kits/agentic/deep-search/flows/gdrive/meta.json b/kits/agentic/NeuroPersona/flows/gdrive/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/gdrive/meta.json rename to kits/agentic/NeuroPersona/flows/gdrive/meta.json diff --git a/kits/agentic/deep-search/flows/gsheet/README.md b/kits/agentic/NeuroPersona/flows/gsheet/README.md similarity index 100% rename from kits/agentic/deep-search/flows/gsheet/README.md rename to kits/agentic/NeuroPersona/flows/gsheet/README.md diff --git a/kits/agentic/deep-search/flows/gsheet/config.json b/kits/agentic/NeuroPersona/flows/gsheet/config.json similarity index 100% rename from kits/agentic/deep-search/flows/gsheet/config.json rename to kits/agentic/NeuroPersona/flows/gsheet/config.json diff --git a/kits/agentic/deep-search/flows/gsheet/inputs.json b/kits/agentic/NeuroPersona/flows/gsheet/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/gsheet/inputs.json rename to kits/agentic/NeuroPersona/flows/gsheet/inputs.json diff --git a/kits/agentic/deep-search/flows/gsheet/meta.json b/kits/agentic/NeuroPersona/flows/gsheet/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/gsheet/meta.json rename to kits/agentic/NeuroPersona/flows/gsheet/meta.json diff --git a/kits/agentic/deep-search/flows/onedrive/README.md b/kits/agentic/NeuroPersona/flows/onedrive/README.md similarity index 100% rename from kits/agentic/deep-search/flows/onedrive/README.md rename to kits/agentic/NeuroPersona/flows/onedrive/README.md diff --git a/kits/agentic/deep-search/flows/onedrive/config.json b/kits/agentic/NeuroPersona/flows/onedrive/config.json similarity index 100% rename from kits/agentic/deep-search/flows/onedrive/config.json rename to kits/agentic/NeuroPersona/flows/onedrive/config.json diff --git a/kits/agentic/deep-search/flows/onedrive/inputs.json b/kits/agentic/NeuroPersona/flows/onedrive/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/onedrive/inputs.json rename to kits/agentic/NeuroPersona/flows/onedrive/inputs.json diff --git a/kits/agentic/deep-search/flows/onedrive/meta.json b/kits/agentic/NeuroPersona/flows/onedrive/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/onedrive/meta.json rename to kits/agentic/NeuroPersona/flows/onedrive/meta.json diff --git a/kits/agentic/deep-search/flows/postgres/README.md b/kits/agentic/NeuroPersona/flows/postgres/README.md similarity index 100% rename from kits/agentic/deep-search/flows/postgres/README.md rename to kits/agentic/NeuroPersona/flows/postgres/README.md diff --git a/kits/agentic/deep-search/flows/postgres/config.json b/kits/agentic/NeuroPersona/flows/postgres/config.json similarity index 100% rename from kits/agentic/deep-search/flows/postgres/config.json rename to kits/agentic/NeuroPersona/flows/postgres/config.json diff --git a/kits/agentic/deep-search/flows/postgres/inputs.json b/kits/agentic/NeuroPersona/flows/postgres/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/postgres/inputs.json rename to kits/agentic/NeuroPersona/flows/postgres/inputs.json diff --git a/kits/agentic/deep-search/flows/postgres/meta.json b/kits/agentic/NeuroPersona/flows/postgres/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/postgres/meta.json rename to kits/agentic/NeuroPersona/flows/postgres/meta.json diff --git a/kits/agentic/deep-search/flows/s3/README.md b/kits/agentic/NeuroPersona/flows/s3/README.md similarity index 100% rename from kits/agentic/deep-search/flows/s3/README.md rename to kits/agentic/NeuroPersona/flows/s3/README.md diff --git a/kits/agentic/deep-search/flows/s3/config.json b/kits/agentic/NeuroPersona/flows/s3/config.json similarity index 100% rename from kits/agentic/deep-search/flows/s3/config.json rename to kits/agentic/NeuroPersona/flows/s3/config.json diff --git a/kits/agentic/deep-search/flows/s3/inputs.json b/kits/agentic/NeuroPersona/flows/s3/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/s3/inputs.json rename to kits/agentic/NeuroPersona/flows/s3/inputs.json diff --git a/kits/agentic/deep-search/flows/s3/meta.json b/kits/agentic/NeuroPersona/flows/s3/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/s3/meta.json rename to kits/agentic/NeuroPersona/flows/s3/meta.json diff --git a/kits/agentic/deep-search/flows/scraping-indexation/README.md b/kits/agentic/NeuroPersona/flows/scraping-indexation/README.md similarity index 100% rename from kits/agentic/deep-search/flows/scraping-indexation/README.md rename to kits/agentic/NeuroPersona/flows/scraping-indexation/README.md diff --git a/kits/agentic/deep-search/flows/scraping-indexation/config.json b/kits/agentic/NeuroPersona/flows/scraping-indexation/config.json similarity index 100% rename from kits/agentic/deep-search/flows/scraping-indexation/config.json rename to kits/agentic/NeuroPersona/flows/scraping-indexation/config.json diff --git a/kits/agentic/deep-search/flows/scraping-indexation/inputs.json b/kits/agentic/NeuroPersona/flows/scraping-indexation/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/scraping-indexation/inputs.json rename to kits/agentic/NeuroPersona/flows/scraping-indexation/inputs.json diff --git a/kits/agentic/deep-search/flows/scraping-indexation/meta.json b/kits/agentic/NeuroPersona/flows/scraping-indexation/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/scraping-indexation/meta.json rename to kits/agentic/NeuroPersona/flows/scraping-indexation/meta.json diff --git a/kits/agentic/deep-search/flows/sharepoint/README.md b/kits/agentic/NeuroPersona/flows/sharepoint/README.md similarity index 100% rename from kits/agentic/deep-search/flows/sharepoint/README.md rename to kits/agentic/NeuroPersona/flows/sharepoint/README.md diff --git a/kits/agentic/deep-search/flows/sharepoint/config.json b/kits/agentic/NeuroPersona/flows/sharepoint/config.json similarity index 100% rename from kits/agentic/deep-search/flows/sharepoint/config.json rename to kits/agentic/NeuroPersona/flows/sharepoint/config.json diff --git a/kits/agentic/deep-search/flows/sharepoint/inputs.json b/kits/agentic/NeuroPersona/flows/sharepoint/inputs.json similarity index 100% rename from kits/agentic/deep-search/flows/sharepoint/inputs.json rename to kits/agentic/NeuroPersona/flows/sharepoint/inputs.json diff --git a/kits/agentic/deep-search/flows/sharepoint/meta.json b/kits/agentic/NeuroPersona/flows/sharepoint/meta.json similarity index 100% rename from kits/agentic/deep-search/flows/sharepoint/meta.json rename to kits/agentic/NeuroPersona/flows/sharepoint/meta.json diff --git a/kits/agentic/deep-search/hooks/use-mobile.ts b/kits/agentic/NeuroPersona/hooks/use-mobile.ts similarity index 100% rename from kits/agentic/deep-search/hooks/use-mobile.ts rename to kits/agentic/NeuroPersona/hooks/use-mobile.ts diff --git a/kits/agentic/deep-search/hooks/use-toast.ts b/kits/agentic/NeuroPersona/hooks/use-toast.ts similarity index 100% rename from kits/agentic/deep-search/hooks/use-toast.ts rename to kits/agentic/NeuroPersona/hooks/use-toast.ts diff --git a/kits/agentic/deep-search/lib/lamatic-client.ts b/kits/agentic/NeuroPersona/lib/lamatic-client.ts similarity index 100% rename from kits/agentic/deep-search/lib/lamatic-client.ts rename to kits/agentic/NeuroPersona/lib/lamatic-client.ts diff --git a/kits/agentic/deep-search/lib/utils.ts b/kits/agentic/NeuroPersona/lib/utils.ts similarity index 100% rename from kits/agentic/deep-search/lib/utils.ts rename to kits/agentic/NeuroPersona/lib/utils.ts diff --git a/kits/agentic/deep-search/next.config.mjs b/kits/agentic/NeuroPersona/next.config.mjs similarity index 100% rename from kits/agentic/deep-search/next.config.mjs rename to kits/agentic/NeuroPersona/next.config.mjs diff --git a/kits/agentic/deep-search/orchestrate.js b/kits/agentic/NeuroPersona/orchestrate.js similarity index 100% rename from kits/agentic/deep-search/orchestrate.js rename to kits/agentic/NeuroPersona/orchestrate.js diff --git a/kits/agentic/deep-search/package.json b/kits/agentic/NeuroPersona/package.json similarity index 100% rename from kits/agentic/deep-search/package.json rename to kits/agentic/NeuroPersona/package.json diff --git a/kits/agentic/deep-search/postcss.config.mjs b/kits/agentic/NeuroPersona/postcss.config.mjs similarity index 100% rename from kits/agentic/deep-search/postcss.config.mjs rename to kits/agentic/NeuroPersona/postcss.config.mjs diff --git a/kits/agentic/deep-search/public/lamatic-logo.png b/kits/agentic/NeuroPersona/public/lamatic-logo.png similarity index 100% rename from kits/agentic/deep-search/public/lamatic-logo.png rename to kits/agentic/NeuroPersona/public/lamatic-logo.png diff --git a/kits/agentic/deep-search/public/placeholder.svg b/kits/agentic/NeuroPersona/public/placeholder.svg similarity index 100% rename from kits/agentic/deep-search/public/placeholder.svg rename to kits/agentic/NeuroPersona/public/placeholder.svg diff --git a/kits/agentic/deep-search/scripts/deploy.sh b/kits/agentic/NeuroPersona/scripts/deploy.sh similarity index 100% rename from kits/agentic/deep-search/scripts/deploy.sh rename to kits/agentic/NeuroPersona/scripts/deploy.sh diff --git a/kits/agentic/deep-search/styles/globals.css b/kits/agentic/NeuroPersona/styles/globals.css similarity index 100% rename from kits/agentic/deep-search/styles/globals.css rename to kits/agentic/NeuroPersona/styles/globals.css diff --git a/kits/agentic/deep-search/tsconfig.json b/kits/agentic/NeuroPersona/tsconfig.json similarity index 100% rename from kits/agentic/deep-search/tsconfig.json rename to kits/agentic/NeuroPersona/tsconfig.json diff --git a/kits/agentic/deep-search/app/page.tsx b/kits/agentic/deep-search/app/page.tsx deleted file mode 100644 index 2e717397..00000000 --- a/kits/agentic/deep-search/app/page.tsx +++ /dev/null @@ -1,586 +0,0 @@ -"use client" - -import type React from "react" -import { useState, useRef, useEffect } from "react" -import { Button } from "@/components/ui/button" -import { Input } from "@/components/ui/input" -import { Card } from "@/components/ui/card" -import { ScrollArea } from "@/components/ui/scroll-area" -import { Send, ArrowUp, ExternalLink, FileText, Github } from "lucide-react" -import ReactMarkdown from "react-markdown" -import Link from "next/link" -import { orchestratePipelineStep } from "@/actions/orchestrate" -import { Typewriter } from "react-simple-typewriter" -import { - Dialog, - DialogContent, - DialogHeader, - DialogTitle, - DialogDescription, - DialogFooter, -} from "@/components/ui/dialog" - -interface Message { - role: "user" | "assistant" - message: string - references?: string[] - steps?: string - isTyping?: boolean - links?: string[] - isProcessing?: boolean -} - -interface FlowResponse { - success: boolean - flowId: string - flowName: string - data: Record - error?: string - links?: string[] -} - -const suggestions = [ - "Help me pack for my trip to Jaipur next week", - "Compare leather sofas vs fabric sofas", - "How to identify if the pashmina shawl I am buying is genuine?", -] - -export default function LamaticThinkMode() { - const [messages, setMessages] = useState([]) - const [input, setInput] = useState("") - const [isLoading, setIsLoading] = useState(false) - const [currentQuery, setCurrentQuery] = useState("") - const [currentStep, setCurrentStep] = useState<"steps" | "research" | "write" | null>(null) - const [isSearching, setIsSearching] = useState(false) - const [searchLinks, setSearchLinks] = useState([]) - const [isTypewriterDone, setIsTypewriterDone] = useState(false) - const scrollAreaRef = useRef(null) - const [showAuthModal, setShowAuthModal] = useState(false) - const [pendingQuery, setPendingQuery] = useState("") - const hasTrackedRef = useRef(false) // ensure we insert only once per session - - const KIT_ID = "reasoning" - - const scrollToBottom = () => { - if (scrollAreaRef.current) { - const scrollContainer = scrollAreaRef.current.querySelector("[data-radix-scroll-area-viewport]") - if (scrollContainer) { - setTimeout(() => { - scrollContainer.scrollTop = scrollContainer.scrollHeight - }, 100) - } - } - } - - useEffect(() => { - scrollToBottom() - }, [messages, isLoading]) - - // resume action after login if redirected back with params - 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) { - // run once, then clean URL - handleSubmit(q) - url.searchParams.delete("autostart") - url.searchParams.delete("query") - window.history.replaceState({}, "", url.toString()) - } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) - - const handleSubmit = async (query: string) => { - if (!query.trim() || isLoading) return - - setInput("") - setCurrentQuery(query) - setIsSearching(false) - setSearchLinks([]) - setIsTypewriterDone(false) - - const userMessage: Message = { role: "user", message: query } - setMessages((prev) => [...prev, userMessage]) - setIsLoading(true) - setCurrentStep("steps") - - setTimeout(scrollToBottom, 100) - - try { - const history = messages.map((msg) => ({ - role: msg.role, - message: msg.message, - })) - - console.log("[v0] Starting step-by-step orchestration pipeline") - - const assistantMessage: Message = { - role: "assistant", - message: "", - isProcessing: true, - } - - setMessages((prev) => [...prev, assistantMessage]) - - const results: Record = {} - - console.log("[v0] Executing step1...") - const step1Result = await orchestratePipelineStep(query, history, "step1") - - if (!step1Result.success) { - throw new Error(step1Result.error || "Failed to execute step1") - } - - if (step1Result.data?.steps) { - results.step1 = step1Result.data - setMessages((prev) => { - const updated = [...prev] - const lastIndex = updated.length - 1 - if (updated[lastIndex]?.role === "assistant") { - updated[lastIndex] = { - ...updated[lastIndex], - steps: step1Result.data.steps, - isProcessing: true, - } - } - return updated - }) - setCurrentStep("research") - - setTimeout(() => { - setIsSearching(true) - }, 500) - } - - const allLinks: string[] = [] - - console.log("[v0] Executing step2A...") - const step2AResult = await orchestratePipelineStep(query, history, "step2A", results) - if (step2AResult.success && step2AResult.data && Object.keys(step2AResult.data).length > 0) { - results.step2A = step2AResult.data - console.log("[v0] Stored step2A results:", results.step2A) - if (step2AResult.data?.links) { - allLinks.push(...step2AResult.data.links) - } - } - - console.log("[v0] Executing step2B...") - const step2BResult = await orchestratePipelineStep(query, history, "step2B", results) - if (step2BResult.success && step2BResult.data && Object.keys(step2BResult.data).length > 0) { - results.step2B = step2BResult.data - console.log("[v0] Stored step2B results:", results.step2B) - if (step2BResult.data?.links) { - allLinks.push(...step2BResult.data.links) - } - } - - console.log("[v0] Executing step2C...") - const step2CResult = await orchestratePipelineStep(query, history, "step2C", results) - if (step2CResult.success && step2CResult.data && Object.keys(step2CResult.data).length > 0) { - results.step2C = step2CResult.data - console.log("[v0] Stored step2C results:", results.step2C) - if (step2CResult.data?.links) { - allLinks.push(...step2CResult.data.links) - } - } - - console.log("[v0] All results before step3:", JSON.stringify(results, null, 2)) - - setSearchLinks(allLinks) - setCurrentStep("write") - - setMessages((prev) => { - const updated = [...prev] - const lastIndex = updated.length - 1 - if (updated[lastIndex]?.role === "assistant") { - updated[lastIndex] = { - ...updated[lastIndex], - links: allLinks, - isProcessing: true, - } - } - return updated - }) - - setTimeout(() => { - setIsSearching(false) - }, 1000) - - console.log("[v0] Executing step3...") - const step3Result = await orchestratePipelineStep(query, history, "step3", results) - - if (!step3Result.success) { - throw new Error(step3Result.error || "Failed to execute step3") - } - - if (step3Result.data?.answer) { - setMessages((prev) => { - const updated = [...prev] - const lastIndex = updated.length - 1 - if (updated[lastIndex]?.role === "assistant") { - updated[lastIndex] = { - role: "assistant", - message: step3Result.data.answer, - references: updated[lastIndex].links || allLinks, - steps: undefined, - isTyping: false, - isProcessing: false, - } - } - return updated - }) - setCurrentStep(null) - } - } catch (error) { - console.error("Error in step-by-step orchestration:", error) - setMessages((prev) => { - const updated = [...prev] - const lastIndex = updated.length - 1 - if (updated[lastIndex]?.role === "assistant") { - updated[lastIndex] = { - role: "assistant", - message: "Sorry, I encountered an error while processing your request. Please try again.", - isProcessing: false, - } - } - return updated - }) - setCurrentStep(null) - setIsSearching(false) - } finally { - setIsLoading(false) - } - } - - const handleSuggestionClick = (suggestion: string) => { - handleSubmit(suggestion) - } - - const handleFormSubmit = (e: React.FormEvent) => { - e.preventDefault() - handleSubmit(input) - } - - const extractDomain = (url: string) => { - try { - return new URL(url).hostname.replace("www.", "") - } catch { - return url - } - } - - const getFaviconUrl = (url: string) => { - try { - const domain = new URL(url).origin - return `${domain}/favicon.ico` - } catch { - return "/placeholder.svg?height=16&width=16" - } - } - - const showInitialInterface = messages.length === 0 && !isLoading - - return ( -
    - {/* Header */} -
    -
    - -

    - Agent Kit - Reasoning -

    - -
    - - - Docs - - - - GitHub - -
    -
    -
    - - {showInitialInterface && ( -
    -
    -
    -
    -

    Meet Lamatic Agentic Reasoning Mode

    -

    Ask detailed questions for better responses

    -
    - -
    -
    - setInput(e.target.value)} - placeholder="Ask anything" - className="w-full h-14 pl-6 pr-14 text-lg bg-card border-input rounded-full shadow-sm" - disabled={isLoading} - /> - -
    -
    - -
    - {suggestions.map((suggestion, index) => ( - - ))} -
    -
    -
    -
    - )} - - {(messages.length > 0 || isLoading) && ( -
    - {/* Scrollable Chat History - Middle Section */} -
    - -
    - {messages.map((message, index) => { - const nextMessage = messages[index + 1] - const isLastUserMessage = - index === messages.length - 1 || - (index === messages.length - 2 && messages[index + 1]?.role === "assistant") - - return ( -
    - {/* Query Heading */} - {message.role === "user" && ( -
    -

    {message.message}

    -
    - )} - - {isLastUserMessage && isLoading && !nextMessage && ( -
    -
    -

    Thinking...

    -
    -
    - )} - - {/* Answer and References */} - {nextMessage && nextMessage.role === "assistant" && ( -
    - {/* Answer Column */} -
    - {nextMessage.isProcessing && nextMessage.steps && ( -
    -
    -
    - {!isTypewriterDone ? ( - setIsTypewriterDone(true)} - /> - ) : ( - nextMessage.steps - )} -
    - {isSearching && ( -
    - Kicking off searches... -
    - )} - {searchLinks.length > 0 && ( -
    -
    Searching through:
    -
    - {searchLinks.map((link, linkIndex) => ( - - ))} -
    -
    - )} -
    -
    - )} - - {!nextMessage.isProcessing && nextMessage.message && ( -
    - ( - - {children} - - - ), - h1: ({ children }) => ( -

    - {children} -

    - ), - h2: ({ children }) => ( -

    {children}

    - ), - h3: ({ children }) => ( -

    {children}

    - ), - p: ({ children }) => ( -

    {children}

    - ), - ul: ({ children }) => ( -
      - {children} -
    - ), - li: ({ children }) => ( -
  • {children}
  • - ), - strong: ({ children }) => ( - {children} - ), - }} - > - {nextMessage.message} -
    -
    - )} -
    - - {/* References Column */} -
    - {!nextMessage.isProcessing && - nextMessage.references && - nextMessage.references.length > 0 && ( -
    -
    -

    - {nextMessage.references.length} sites -

    - -
    - - - - -
    - )} -
    -
    - )} -
    - ) - })} -
    -
    -
    - - {/* Fixed Input Section - Bottom */} -
    - {/* Blur gradient overlay */} -
    -
    -
    -
    - setInput(e.target.value)} - placeholder="Ask anything" - className="w-full h-14 pl-6 pr-16 text-base bg-card/90 backdrop-blur-sm border-input/50 rounded-full shadow-lg hover:shadow-xl transition-all duration-200 focus:ring-2 focus:ring-primary/20" - disabled={isLoading} - /> - -
    -
    -
    -
    -
    - )} -
    - ) -}