Skip to content

DOCS-1685 - Add AI Tools sidebar widget#6769

Draft
kimsauce wants to merge 1 commit into
mainfrom
docs-1685-ai-tools
Draft

DOCS-1685 - Add AI Tools sidebar widget#6769
kimsauce wants to merge 1 commit into
mainfrom
docs-1685-ai-tools

Conversation

@kimsauce
Copy link
Copy Markdown
Collaborator

@kimsauce kimsauce commented Jun 5, 2026

Purpose of this pull request

Adds a small "AI Tools" widget to the documentation sidebar, injected above the table of contents on every doc page via Docusaurus theme swizzling (DocItem/TOC/Desktop wrapper).

Three actions:

  • Copy as Markdown — fetches raw source from the /llm/docs/ mirror (DOCS-1374) when available, falls back to DOM text extraction for local dev
  • Ask Claude — deep-links to claude.ai/new with the page URL pre-filled
  • Ask ChatGPT — deep-links to chatgpt.com with the page URL pre-filled

Modeled on Supabase's implementation. Depends on DOCS-1374 for the "Copy as Markdown" mirror fetch path (falls back gracefully if the mirror isn't deployed yet).

Files:

  • src/components/AITools/index.tsx — React component
  • src/components/AITools/styles.module.css — scoped card styles
  • src/theme/DocItem/TOC/Desktop/index.tsx — swizzle wrapper

Select the type of change

  • Minor Changes - Typos, formatting, slight revisions
  • Update Content - Revisions, updating sections
  • New Content - New features, sections, pages, tutorials
  • Site and Tools - .clabot, version updates, maintenance, dependencies, new packages for the site (Docusaurus, Gatsby, React, etc.)

Ticket (if applicable)

https://sumologic.atlassian.net/browse/DOCS-1685

Adds an "AI Tools" widget above the table of contents on every doc page,
modeled on Supabase's implementation. Three actions:
- Copy as Markdown: fetches raw source from /llm/docs/ mirror, falls
  back to DOM extraction for dev/local use
- Ask Claude: deep-links to claude.ai/new with the page URL pre-filled
- Ask ChatGPT: deep-links to chatgpt.com with the page URL pre-filled

Implemented via Docusaurus theme swizzle (DocItem/TOC/Desktop wrapper).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kimsauce kimsauce self-assigned this Jun 5, 2026
@cla-bot cla-bot Bot added the cla-signed Contributor approved, listed in .clabot file label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed Contributor approved, listed in .clabot file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant