import { Link } from "../lib/navigation"; import { Blocks, Clock3, PanelsTopLeft, PlayCircleIcon, Search } from "lucide-react"; import { linearLogo, slackLogo } from "./new-session-starter-logos"; import { Button } from "../../ui/button"; // Plain editable prompts, not service identifiers or a connector resolver. export const NEW_SESSION_STARTERS = [ { id: "slack", title: "Work with Opengeni from Slack", description: "Install the bot. Start tasks and follow up on the go.", prompt: "Help me install the Opengeni Slack bot so I can ask questions, start work, and follow up from Slack, including on my phone.", }, { id: "github", title: "Connect GitHub and start a fix", description: "Explore a repository and find an improvement to make.", prompt: "Help me connect a GitHub repository. Explain the codebase, suggest a useful improvement, and help me implement it once we agree on the change.", }, { id: "linear", title: "Connect Linear and analyze issues", description: "Find blockers and decide what to tackle next.", prompt: "Help me connect Linear and analyze a project's open issues. Highlight blockers and possible duplicates, then recommend what to tackle next. Don't change any issues yet.", }, { id: "schedule", title: "Schedule a morning brief", description: "Stay up to date without asking every day.", prompt: "Help me schedule a weekday morning brief. Ask what I want to track, which sources to use, my time zone, and where to deliver it. Show me a sample and let me confirm before enabling the schedule.", }, { id: "research", title: "Research a decision", description: "Compare options and get a sourced recommendation.", prompt: "Help me research a decision. Ask what I am deciding and what matters most, compare the options, and recommend a next step with sources.", }, { id: "create", title: "Turn an idea into a first version", description: "Make a presentation, prototype, or shareable page.", prompt: "Help me turn an idea into something real. Ask about the idea and its audience, suggest whether to make a presentation, prototype, or shareable page, then help me build a first version.", }, ] as const; /** For people who said they build a product: their agent first, then a demo. */ export const ADD_AGENT_STARTER = { id: "add-agent", title: "Add an agent to my product", description: "Tell the agent about your product.", } as const; /** The recorded playground demo, opened in the workspace. */ export const PLAYGROUND_STARTER = { id: "playground", title: "See a demo of an agent in a product", description: "A recorded agent inside a sample app.", } as const; /** The agent asks about the product first. */ export const ADD_AGENT_DEFAULT_PROMPT = "I want to add an AI agent to my product with Opengeni. Ask me what the product is and where it lives (a website, an app, a GitHub repository), propose where an agent fits best, then help me build it."; /** The general starters a builder still needs, after their own two. */ const PRODUCT_GENERAL_IDS = ["github", "create", "research", "schedule"] as const; export type StarterSet = "general" | "product"; const STARTER_CLASS = "h-full min-h-16 justify-start gap-3 whitespace-normal px-3 py-3 text-left hover:bg-surface hover:hover-layer"; /** * Six starters under the new-chat composer. The set follows the signup * answer: people adding agents to a product get their own agent and the * playground demo first; everyone else gets the general six. */ export function NewSessionStarters({ onSelect, disabled = false, set = "general", workspaceId, }: { onSelect: (prompt: string) => void; disabled?: boolean | undefined; set?: StarterSet | undefined; /** Where the playground demo opens (product set). */ workspaceId?: string | undefined; }) { const general = set === "product" ? PRODUCT_GENERAL_IDS.map((id) => NEW_SESSION_STARTERS.find((starter) => starter.id === id)!) : NEW_SESSION_STARTERS; return (

Suggestions

{set === "product" ? ( <> {workspaceId ? ( ) : null} ) : null} {general.map((starter) => { const Icon = starter.id === "schedule" ? Clock3 : starter.id === "research" ? Search : PanelsTopLeft; const logo = starter.id === "slack" ? slackLogo : starter.id === "linear" ? linearLogo : null; return ( ); })}
); } function StarterText({ title, description }: { title: string; description: string }) { return ( {title} {description} ); } // GitHub's vendor mark, inlined as a small SVG so it works offline and inherits // the foreground color in both themes. No remote favicon or base64 module. function GitHubMark() { return ( ); }