Skip to content

feat(ai): add Glossary Copilot, a glossary-grounded Solana concept assistant#30

Open
paollacq wants to merge 3 commits intosolanabr:mainfrom
paollacq:feat/glossary-copilot
Open

feat(ai): add Glossary Copilot, a glossary-grounded Solana concept assistant#30
paollacq wants to merge 3 commits intosolanabr:mainfrom
paollacq:feat/glossary-copilot

Conversation

@paollacq
Copy link
Copy Markdown

@paollacq paollacq commented Apr 6, 2026

Summary

This PR adds Glossary Copilot to the existing Glossary OS frontend. Instead of adding a generic chatbot, it introduces a glossary-grounded AI interface that answers Solana questions using structured context from the glossary itself: current term, aliases, related concepts, confusions, next-step terms, mental models, and path context. The Copilot is available inline on term pages and in a dedicated /[locale]/copilot workspace, and can also explain Anchor or Solana code snippets using glossary vocabulary. The result is a more useful AI-native knowledge interface for builders, not just another search UI.

Demo

Live app: https://solana-glossary-two.vercel.app/en/copilot

What This PR Adds

  • Ask AI panel inside glossary term pages
  • dedicated Copilot workspace at /[locale]/copilot
  • glossary-grounded context builder for Solana concepts
  • structured AI responses with:
    • explanation
    • key concepts
    • suggested next terms
    • caveat when context is insufficient
  • clickable glossary mentions in the Copilot output
  • optional Explain this code input for Anchor / Solana snippets
  • localized Copilot UI for en, pt, and es
  • Gemini integration through a server-side API route

Why This Is Useful

Glossary OS already helps users browse and learn terminology. This PR turns that static knowledge layer into an interactive assistant for real developer questions.

Instead of asking users to jump between search, documentation, mental models, and related terms, the Copilot composes that context into one grounded answer. That makes it useful for:

  • understanding a concept faster
  • clarifying how related Solana terms connect
  • reducing confusion between adjacent concepts
  • deciding what to learn next
  • explaining Anchor or Solana code using glossary language

Why This Is Different

This is not a generic chatbot and not a free-form LLM wrapper.

The Copilot is grounded in glossary data and uses structured context from the product:

  • current term
  • aliases
  • related concepts
  • commonly confused terms
  • next-step terms
  • builder paths
  • mental model
  • concept graph branches

That makes the AI output much more consistent with the glossary and much more relevant to Solana builders.

Routes

  • /en/term/[slug] -> inline Copilot on each term page
  • /pt/term/[slug] -> inline Copilot in Portuguese UI
  • /es/term/[slug] -> inline Copilot in Spanish UI
  • /en/copilot -> dedicated Copilot workspace
  • /pt/copilot -> dedicated Copilot workspace
  • /es/copilot -> dedicated Copilot workspace

Gemini Setup

Create apps/glossary-os/.env.local:

GEMINI_API_KEY=your_api_key_here
GEMINI_MODEL=gemini-2.5-flash

GEMINI_MODEL is optional.

After editing the file, restart the dev server.

Local Run

From the repository root:

npm install
npm run dev:web

Validation

npm run typecheck:web
npm run build --workspace @stbr/glossary-os

Warning

cuidado para não vazarem a chave da api rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant