Skip to content

feat: add chat functionality with AI assistant and content indexing#40

Merged
Sithumli merged 4 commits intomainfrom
feat/chat-bot-rag
Apr 2, 2026
Merged

feat: add chat functionality with AI assistant and content indexing#40
Sithumli merged 4 commits intomainfrom
feat/chat-bot-rag

Conversation

@Sithumli
Copy link
Copy Markdown
Owner

  • Implemented a content index watcher to automatically index markdown files.
  • Created a chat widget component for user interaction with the AI assistant.
  • Developed a chat page to handle user messages and display responses.
  • Integrated Google Generative AI for generating responses based on user queries.
  • Added API endpoint for chat interactions, including vector search for relevant content.
  • Introduced new types for chat messages, requests, and responses to improve type safety.
  • Enhanced user experience with loading indicators and markdown parsing for responses.

@Sithumli Sithumli self-assigned this Mar 25, 2026
Copilot AI review requested due to automatic review settings March 25, 2026 16:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an AI chat assistant experience (homepage “Ask Anything”, chat page, and floating widget) backed by a RAG pipeline that indexes site content into Upstash Vector and uses Google Gemini to generate answers.

Changes:

  • Introduces chat UI surfaces (homepage AskAnything, dedicated chat page, and ChatWidget component).
  • Adds /api/chat endpoint that performs vector search + Gemini streaming responses.
  • Adds content indexing scripts (batch index + watch) and supporting types/constants/docs.

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
template/src/types/index.ts Re-exports new chat-related types.
template/src/types/constants.ts Adds chat/indexing constants and role/type definitions.
template/src/types/chat.ts Introduces request/response/context/vector typing for chat + indexing.
template/src/pages/index.astro Adds the AskAnything section to the homepage.
template/src/pages/chat/[uid].astro Adds a dedicated chat page with client-side streaming rendering.
template/src/pages/api/chat.ts Adds chat API route integrating Upstash Vector + Google Gemini streaming.
template/src/components/Hero.astro Removes CTA button markup from the hero section.
template/src/components/ChatWidget.astro Adds a modal-based floating chat widget UI + streaming client.
template/src/components/AskAnything.astro Adds homepage “Ask Anything” input that routes into chat.
scripts/index-watch.ts Adds a dev watcher to re-index content on markdown changes.
scripts/index-content.ts Adds a batch indexer with manifest-based incremental uploads.
package.json Adds scripts/dependencies for indexing + AI services and changes build flow.
pnpm-lock.yaml Locks new dependencies for AI/indexing/Vercel adapter.
astro.config.mjs Adds Vercel adapter configuration.
README.md Documents the new AI chat assistant feature and setup.
.gitignore Ignores the indexing manifest.
.env.example Provides env placeholders for Upstash + Gemini keys.
.changeset/plain-grapes-notice.md Changeset for minor release.
.changeset/ai-chat-feature.md Changeset describing the AI chat feature.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docubase Ready Ready Preview, Comment Mar 25, 2026 5:41pm

@Sithumli Sithumli merged commit 18b02b5 into main Apr 2, 2026
4 checks passed
@Sithumli Sithumli deleted the feat/chat-bot-rag branch April 2, 2026 05:23
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.

2 participants