Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions webview-ui/src/components/welcome/RooTips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ import { Trans } from "react-i18next"
import { buildDocLink } from "@src/utils/docLinks"
import { ReplaceAll, Users } from "lucide-react"

const buildWelcomeDocLink = (path: string, campaign: string) =>
buildDocLink(path, campaign).replace("https://docs.roocode.com", "https://docs.zoocode.dev")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💀💀💀💀💀💀💀💀💀💀💀

I'm closing this PR, I have another one that does the job better


const tips = [
{
icon: <Users className="size-4 shrink-0 mt-0.5" />,
href: buildDocLink("basic-usage/using-modes", "tips"),
href: buildWelcomeDocLink("basic-usage/using-modes", "tips"),
titleKey: "rooTips.customizableModes.title",
descriptionKey: "rooTips.customizableModes.description",
},
{
icon: <ReplaceAll className="size-4 shrink-0 mt-0.5" />,
href: buildDocLink("getting-started/connecting-api-provider", "tips"),
href: buildWelcomeDocLink("getting-started/connecting-api-provider", "tips"),
titleKey: "rooTips.modelAgnostic.title",
descriptionKey: "rooTips.modelAgnostic.description",
},
Expand Down Expand Up @@ -48,7 +51,7 @@ const RooTips = () => {
DocsLink: (
<VSCodeLink
className="text-muted-foreground underline"
href={buildDocLink("", "welcome")}
href={buildWelcomeDocLink("", "welcome")}
/>
),
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,11 @@ describe("RooTips Component", () => {
// Ensure only two tips are present plus the docs link in the Trans component (3 total links)
expect(screen.getAllByRole("link")).toHaveLength(3)
})

test("uses Zoo docs links on the welcome screen", () => {
const links = screen.getAllByRole("link")

expect(links.every((link) => link.getAttribute("href")?.startsWith("https://docs.zoocode.dev/"))).toBe(true)
})
})
})
Loading