-
-
Notifications
You must be signed in to change notification settings - Fork 1k
[Feature] Onboarding | Built-in documentation search tool #682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
[Feature] Onboarding | Built-in documentation search tool #682
Conversation
|
@CREDO23 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by RecurseML
🔍 Review performed on e8dc80c..2c3d625
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (15)
• scripts/docker/entrypoint-allinone.sh
• surfsense_backend/alembic/versions/60_add_surfsense_docs_tables.py
• surfsense_backend/app/agents/new_chat/tools/__init__.py
• surfsense_backend/app/agents/new_chat/tools/registry.py
• surfsense_backend/app/agents/new_chat/tools/search_surfsense_docs.py
• surfsense_backend/app/db.py
• surfsense_backend/app/routes/__init__.py
• surfsense_backend/app/routes/surfsense_docs_routes.py
• surfsense_backend/app/schemas/surfsense_docs.py
• surfsense_backend/app/tasks/surfsense_docs_indexer.py
• surfsense_backend/scripts/seed_surfsense_docs.py
• surfsense_web/components/assistant-ui/inline-citation.tsx
• surfsense_web/components/assistant-ui/markdown-text.tsx
• surfsense_web/components/new-chat/source-detail-panel.tsx
• surfsense_web/lib/apis/documents-api.service.ts
Description
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR adds a built-in documentation search tool that allows the AI assistant to search and cite Surfsense's own documentation when answering user questions about how to use the application. The implementation includes database tables (
surfsense_docs_documentsandsurfsense_docs_chunks) with vector embeddings for semantic search, an indexer that processes MDX documentation files at deployment time, a new agent tool for searching the docs, API routes for citation resolution, and frontend updates to display documentation citations alongside regular knowledge base citations using adoc-prefix to differentiate them.⏱️ Estimated Review Time: 30-90 minutes
💡 Review Order Suggestion
surfsense_backend/alembic/versions/60_add_surfsense_docs_tables.pysurfsense_backend/app/db.pysurfsense_backend/app/schemas/surfsense_docs.pysurfsense_backend/app/tasks/surfsense_docs_indexer.pysurfsense_backend/scripts/seed_surfsense_docs.pyscripts/docker/entrypoint-allinone.shsurfsense_backend/app/agents/new_chat/tools/search_surfsense_docs.pysurfsense_backend/app/agents/new_chat/tools/registry.pysurfsense_backend/app/agents/new_chat/tools/__init__.pysurfsense_backend/app/routes/surfsense_docs_routes.pysurfsense_backend/app/routes/__init__.pysurfsense_web/lib/apis/documents-api.service.tssurfsense_web/components/assistant-ui/inline-citation.tsxsurfsense_web/components/assistant-ui/markdown-text.tsxsurfsense_web/components/new-chat/source-detail-panel.tsx