From ab84469997e0d15e25caa7c85610cc80c80b82b7 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 20 Mar 2026 14:04:06 -0700 Subject: [PATCH] style: fix prettier formatting Co-Authored-By: Claude Opus 4.6 (1M context) --- docs-site/app/[[...slug]]/page.tsx | 25 ++++- docs-site/app/components/ClientRedirect.tsx | 6 +- docs-site/app/components/NotFoundPage.tsx | 11 ++- docs-site/app/layout.tsx | 3 +- docs-site/components/docs/CopyPageButton.tsx | 2 +- docs-site/components/docs/DocsSearch.tsx | 24 +++-- docs-site/components/docs/DocsShell.tsx | 97 +++++++++++-------- docs-site/components/docs/PageNav.tsx | 6 +- docs-site/components/docs/TableOfContents.tsx | 16 ++- docs-site/components/docs/mdx/Callout.tsx | 4 +- docs-site/components/docs/mdx/CardGroup.tsx | 25 ++--- docs-site/components/docs/mdx/CodeBlock.tsx | 6 +- docs-site/components/docs/mdx/CodeGroup.tsx | 10 +- docs-site/components/docs/mdx/Columns.tsx | 9 +- .../components/docs/mdx/DocsAccordion.tsx | 20 ++-- docs-site/components/docs/mdx/DocsTabs.tsx | 2 +- .../components/docs/mdx/OSAutoDetect.tsx | 4 +- docs-site/components/ui/command.tsx | 24 +++-- docs-site/components/ui/dialog.tsx | 10 +- docs-site/lib/docs.ts | 35 +++---- docs-site/lib/resolveHref.ts | 3 +- docs-site/scripts/build-search-index.ts | 9 +- docs-site/scripts/copy-doc-images.ts | 10 +- docs-site/tsconfig.json | 14 +-- .../__tests__/NavigationContext.test.tsx | 9 +- .../RecentlyVisitedRangesService.ts | 1 - gui/src/components/Layout.tsx | 71 +++++++------- gui/src/redux/thunks/streamThunkWrapper.tsx | 3 +- gui/vite.config.ts | 5 +- package-lock.json | 4 + 30 files changed, 255 insertions(+), 213 deletions(-) diff --git a/docs-site/app/[[...slug]]/page.tsx b/docs-site/app/[[...slug]]/page.tsx index 873aa1370..94b6c0542 100644 --- a/docs-site/app/[[...slug]]/page.tsx +++ b/docs-site/app/[[...slug]]/page.tsx @@ -6,7 +6,15 @@ import remarkGfm from "remark-gfm"; import rehypeSlug from "rehype-slug"; import rehypeAutolinkHeadings from "rehype-autolink-headings"; import rehypePrismPlus from "rehype-prism-plus"; -import { loadMdxFile, getHeadings, getAllDocTitles, getAllDocSlugs, docsNav, resolveDocsRedirect, docsRedirects } from "@/lib/docs"; +import { + loadMdxFile, + getHeadings, + getAllDocTitles, + getAllDocSlugs, + docsNav, + resolveDocsRedirect, + docsRedirects, +} from "@/lib/docs"; import { getPageNavigation } from "@/config/docsNav"; import { mdxComponents } from "@/components/docs/mdx"; import { DocsShell } from "@/components/docs/DocsShell"; @@ -58,7 +66,9 @@ export default async function DocsPage({ params }: Props) { // Check redirect first const redirectTo = resolveDocsRedirect(slugPath); if (redirectTo) { - const target = redirectTo.startsWith("http") ? redirectTo : `/docs${redirectTo}`; + const target = redirectTo.startsWith("http") + ? redirectTo + : `/docs${redirectTo}`; return ; } @@ -95,9 +105,14 @@ export default async function DocsPage({ params }: Props) { const { prev, next } = getPageNavigation(docsNav, currentSlug, titleMap); return ( - + {doc.frontmatter.title && ( -
+

{doc.frontmatter.title}

@@ -105,7 +120,7 @@ export default async function DocsPage({ params }: Props) {
)} {doc.frontmatter.description && ( -

+

{doc.frontmatter.description.replace(/\*\*/g, "")}

)} diff --git a/docs-site/app/components/ClientRedirect.tsx b/docs-site/app/components/ClientRedirect.tsx index 1623c4e99..99c3f07af 100644 --- a/docs-site/app/components/ClientRedirect.tsx +++ b/docs-site/app/components/ClientRedirect.tsx @@ -8,10 +8,8 @@ export function ClientRedirect({ to }: { to: string }) { }, [to]); return ( -
-

- Redirecting... -

+
+

Redirecting...

); } diff --git a/docs-site/app/components/NotFoundPage.tsx b/docs-site/app/components/NotFoundPage.tsx index f0bd602d5..50e984cba 100644 --- a/docs-site/app/components/NotFoundPage.tsx +++ b/docs-site/app/components/NotFoundPage.tsx @@ -2,9 +2,14 @@ import Link from "next/link"; export default function NotFoundPage() { return ( -
-

Page not found

- +
+

+ Page not found +

+ Back to docs
diff --git a/docs-site/app/layout.tsx b/docs-site/app/layout.tsx index ea2ca44cd..ced9a7e34 100644 --- a/docs-site/app/layout.tsx +++ b/docs-site/app/layout.tsx @@ -7,7 +7,8 @@ import "./docs.css"; export const metadata: Metadata = { title: "Continue Docs", - description: "Documentation for Continue — the open-source AI code assistant.", + description: + "Documentation for Continue — the open-source AI code assistant.", }; export default function RootLayout({ diff --git a/docs-site/components/docs/CopyPageButton.tsx b/docs-site/components/docs/CopyPageButton.tsx index 73ec5c08a..869cb3ee4 100644 --- a/docs-site/components/docs/CopyPageButton.tsx +++ b/docs-site/components/docs/CopyPageButton.tsx @@ -19,7 +19,7 @@ export function CopyPageButton({ slug }: { slug: string }) { return ( - + string }) { /> {loading ? ( -
+
Loading search index...
) : ( @@ -125,7 +135,7 @@ export function DocsSearch({ resolve }: { resolve: (path: string) => string }) { >
{result.title} - + {result.content.slice(0, 120)}
diff --git a/docs-site/components/docs/DocsShell.tsx b/docs-site/components/docs/DocsShell.tsx index ec7ef01cc..b1e60180c 100644 --- a/docs-site/components/docs/DocsShell.tsx +++ b/docs-site/components/docs/DocsShell.tsx @@ -66,13 +66,13 @@ function ThemeToggle() { useEffect(() => setMounted(true), []); if (!mounted) { - return
; + return
; } return ( {open && ( -
+
{group.pages.map((item, i) => ( {slugToLabel(item, titleMap)} @@ -188,7 +188,13 @@ function SidebarItem({ } return ( - + ); } @@ -213,19 +219,20 @@ export function DocsShell({ const [selectedTab, setSelectedTab] = useState(activeTab.tab); const [mobileOpen, setMobileOpen] = useState(false); const [mobileMenuOpen, setMobileMenuOpen] = useState(false); - const currentTab = - docsNav.find((t) => t.tab === selectedTab) ?? docsNav[0]!; + const currentTab = docsNav.find((t) => t.tab === selectedTab) ?? docsNav[0]!; const navLinks = NAV_LINKS; return ( -
+
{/* ---- Header: nav + tabs ---- */} -
+
{/* Top nav bar */}