Skip to content

Commit 6e531fd

Browse files
rename to ask sourcebot
1 parent 253b055 commit 6e531fd

File tree

3 files changed

+31
-20
lines changed

3 files changed

+31
-20
lines changed

packages/web/src/app/[domain]/components/homepage/toolbar.tsx

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
55
import { Separator } from "@/components/ui/separator";
66
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
77
import { cn } from "@/lib/utils";
8-
import { TriangleAlert } from "lucide-react";
8+
import { MessageCircleIcon, SearchIcon, TriangleAlert } from "lucide-react";
99
import Link from "next/link";
1010
import { useState } from "react";
1111

@@ -32,16 +32,20 @@ export const SearchModeSelector = ({
3232

3333
return (
3434
<div className={cn("flex flex-row items-center", className)}>
35-
<p className="text-sm text-muted-foreground mr-1.5">Search mode:</p>
3635
<Select
3736
value={searchMode}
3837
onValueChange={(value) => onSearchModeChange(value as "precise" | "agentic")}
3938
>
4039
<SelectTrigger
41-
className="h-6 mt-0.5 font-mono font-semibold text-xs p-0 w-fit border-none bg-inherit"
40+
className="flex flex-row items-center h-6 mt-0.5 font-mono font-semibold text-xs p-0 w-fit border-none bg-inherit rounded-md"
4241
>
42+
{searchMode === "precise" ? (
43+
<SearchIcon className="w-4 h-4 text-muted-foreground mr-1.5" />
44+
) : (
45+
<MessageCircleIcon className="w-4 h-4 text-muted-foreground mr-1.5" />
46+
)}
4347
<SelectValue>
44-
{searchMode === "precise" ? "Precise" : "Agentic"}
48+
{searchMode === "precise" ? "Code Search" : "Ask"}
4549
</SelectValue>
4650
</SelectTrigger>
4751

@@ -61,10 +65,12 @@ export const SearchModeSelector = ({
6165
value="precise"
6266
className="cursor-pointer"
6367
>
64-
<div className="flex flex-row items-center gap-2">
65-
<span>Precise</span>
66-
<Separator orientation="vertical" className="h-4" />
67-
<KeyboardShortcutHint shortcut="⌘ P" />
68+
<div className="flex flex-row items-center justify-between w-full gap-1.5">
69+
<span>Search</span>
70+
<div className="flex flex-row items-center gap-2">
71+
<Separator orientation="vertical" className="h-4" />
72+
<KeyboardShortcutHint shortcut="⌘ P" />
73+
</div>
6874
</div>
6975

7076
</SelectItem>
@@ -74,7 +80,7 @@ export const SearchModeSelector = ({
7480
sideOffset={8}
7581
>
7682
<div className="flex flex-col gap-2">
77-
<p className="font-semibold">Precise Search</p>
83+
<p className="font-semibold">Code Search</p>
7884
<Separator orientation="horizontal" className="w-full my-0.5" />
7985
<p>Search for exact matches using regular expressions and filters.</p>
8086
<Link
@@ -93,22 +99,27 @@ export const SearchModeSelector = ({
9399
<div
94100
onMouseEnter={() => setFocusedSearchMode("agentic")}
95101
onFocus={() => setFocusedSearchMode("agentic")}
102+
className={cn({
103+
"cursor-not-allowed": !isAgenticSearchEnabled,
104+
})}
96105
>
97106
<SelectItem
98107
value="agentic"
108+
disabled={!isAgenticSearchEnabled}
99109
className={cn({
100-
"cursor-not-allowed": !isAgenticSearchEnabled,
101110
"cursor-pointer": isAgenticSearchEnabled,
102111
})}
103-
disabled={!isAgenticSearchEnabled}
104112
>
113+
<div className="flex flex-row items-center justify-between w-full gap-1.5">
114+
<span>Ask</span>
105115

106-
<div className="flex flex-row items-center gap-2">
107-
<span>Agentic</span>
108-
<Separator orientation="vertical" className="h-4" />
109-
<KeyboardShortcutHint shortcut="⌘ I" />
116+
<div className="flex flex-row items-center gap-2">
117+
<Separator orientation="vertical" className="h-4" />
118+
<KeyboardShortcutHint shortcut="⌘ I" />
119+
</div>
110120
</div>
111121
</SelectItem>
122+
112123
</div>
113124
</TooltipTrigger>
114125
<TooltipContent
@@ -121,10 +132,10 @@ export const SearchModeSelector = ({
121132
{!isAgenticSearchEnabled && (
122133
<TriangleAlert className="w-4 h-4 text-destructive flex-shrink-0 text-yellow-300" />
123134
)}
124-
<p className="font-semibold">Agentic Search</p>
135+
<p className="font-semibold">Ask Sourcebot</p>
125136
</div>
126137
{!isAgenticSearchEnabled && (
127-
<p className="text-destructive">Language model not configured. See <Link href={AGENTIC_SEARCH_DOCS_URL} className="text-link hover:underline">setup instructions.</Link></p>
138+
<p className="text-destructive">Language model not configured. <Link href={AGENTIC_SEARCH_DOCS_URL} className="text-link hover:underline">See setup instructions.</Link></p>
128139
)}
129140
<Separator orientation="horizontal" className="w-full my-0.5" />
130141
<p>Use natural language to search, summarize and understand your codebase using a reasoning agent.</p>

packages/web/src/components/ui/select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ const SelectItem = React.forwardRef<
129129
</SelectPrimitive.ItemIndicator>
130130
</span>
131131

132-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
132+
{children}
133133
</SelectPrimitive.Item>
134134
))
135135
SelectItem.displayName = SelectPrimitive.Item.displayName

packages/web/src/lib/newsData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { NewsItem } from "./types";
22

33
export const newsData: NewsItem[] = [
44
{
5-
unique_id: "agentic-search",
6-
header: "Agentic Search",
5+
unique_id: "ask-sourcebot",
6+
header: "Ask Sourcebot",
77
sub_header: "Ask Sourcebot to search, summarize, and explain code. Bring your own LLM.",
88
url: "https://docs.sourcebot.dev/docs/features/search/agentic-search/overview"
99
},

0 commit comments

Comments
 (0)