Skip to content

feat: add query suggestions based on repository contents #185 - #206

Merged
Aharshi3614 merged 2 commits into
Aharshi3614:mainfrom
Aryanbuha890:issue-185-query-suggestions
Aug 4, 2026
Merged

feat: add query suggestions based on repository contents #185#206
Aharshi3614 merged 2 commits into
Aharshi3614:mainfrom
Aryanbuha890:issue-185-query-suggestions

Conversation

@Aryanbuha890

Copy link
Copy Markdown
Contributor

Summary

This PR implements contextual query suggestions based on the indexed codebase files and AST-extracted symbols, closing #185.

Changes

  • Backend Symbol Caching: Updated indexer.py to write parsed functions, classes, and methods per-file directly to .index_cache.json (and maintain them in incremental re-indexing runs).
  • Suggestions Endpoint: Added GET /index/suggestions in main.py which generates smart, contextual questions based on cached symbols (e.g. "How is the class SymbolExtractor implemented in symbol_parser.py?") and falls back to general queries if the cache is empty.
  • Unit Tests: Added tests/test_suggestions.py to verify the endpoint correctness.
  • Frontend UI & Suggestions Display:
    • Added suggestions polling in App.jsx that automatically updates the landing page when the codebase is re-indexed.
    • Rendered suggestions as modern, responsive, clickable tag buttons on startup.
    • Clicking a suggestion automatically populates the text area and submits the query.

Closes #185

@Aharshi3614

Copy link
Copy Markdown
Owner

@Aryanbuha890 Merge conflicts are there in this PR

@Aharshi3614
Aharshi3614 merged commit 7fecc7f into Aharshi3614:main Aug 4, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Query Suggestions Based on Repository Contents

2 participants