"use client" import { Button } from "@/components/ui/button" import { Dialog, DialogContent } from "@/components/ui/dialog" import { ModelProviderLogo } from "@/features/chat/components/chatBox/modelProviderLogo" import { cn } from "@/lib/utils" import mentionsDemo from "@/public/ask_sb_tutorial_at_mentions.png" import citationsDemo from "@/public/ask_sb_tutorial_citations.png" import searchScopeDemo from "@/public/ask_sb_tutorial_search_scope.png" import logoDarkSmall from "@/public/sb_logo_dark_small.png" import { useQuery } from "@tanstack/react-query" import { ArrowLeftRightIcon, AtSignIcon, BookMarkedIcon, BookTextIcon, ChevronLeft, ChevronRight, CircleCheckIcon, FileIcon, FolderIcon, GitCommitHorizontalIcon, LibraryBigIcon, ScanSearchIcon, StarIcon, TicketIcon, } from "lucide-react" import Image from "next/image" import Link from "next/link" import { useState } from "react" interface AgenticSearchTutorialDialogProps { onClose: () => void } // Star button component that fetches GitHub star count const GitHubStarButton = () => { const { data: starCount, isLoading, isError } = useQuery({ queryKey: ['github-stars', 'sourcebot-dev/sourcebot'], queryFn: async () => { const response = await fetch('https://api.github.com/repos/sourcebot-dev/sourcebot') if (!response.ok) { throw new Error('Failed to fetch star count') } const data = await response.json() return data.stargazers_count as number; }, staleTime: 5 * 60 * 1000, // 5 minutes gcTime: 30 * 60 * 1000, // 30 minutes retry: 3, retryDelay: attemptIndex => Math.min(1000 * 2 ** attemptIndex, 30000), }) const formatStarCount = (count: number) => { if (count >= 1000) { return `${(count / 1000).toFixed(1)}k` } return count.toString() } return ( ) } const tutorialSteps = [ { leftContent: (
Ask questions about your entire codebase in natural language. Get back responses grounded in code with inline citations.
Ask Sourcebot is an agentic search tool that can answer questions about your codebase by searching, reading files, navigating references, and more. Supports any compatible LLM.
{`When asking Sourcebot a question, you can select one or more scopes to focus the search.`}
There are two types of search scopes:
@ mention specific
Coming soon
{`Sourcebot searches your codebase and provides responses with clickable citations that link directly to relevant sections of code.`}
You can now ask Sourcebot any question about your codebase. Checkout the docs for more information.
Hit a bug? Open up an issue.
Feature request? Open a discussion.
Anything else? Contact us.