Skip to main content
Kasava’s Code Search lets you find code across all your indexed repositories using natural language queries or exact patterns. It’s powered by the same AI embeddings that enable contextual chat, giving you semantic understanding of your code.

Overview

Code Search provides a powerful interface to explore your codebase:
  • Natural language queries - Search by describing what you’re looking for
  • Pattern matching - Find exact code patterns and text
  • Repository filtering - Narrow results to specific repositories
  • Split-view results - Browse files on the left, view code on the right
  • AI explanations - Optional AI-powered analysis of search results
Code Search interface showing search bar, file list, and code preview There are two ways to access Code Search:

From a Product

1

Select a Product

Expand any Product in the sidebar
2

Navigate to Code Search

Under the “Plan” section, click Code Search
3

Start Searching

Enter your query in the search bar and press Enter
This limits search results to repositories associated with that Product. Navigate directly to /code-search in your browser to search across all indexed repositories in your organization.

The Search Interface

The search bar at the top accepts your query:
  • Type your search query
  • Press Enter or click the search button to execute
  • A loading spinner appears while searching
Search bar with query entered

Settings Panel

Click the gear icon next to the search bar to open the settings panel:

Repository Filter

Select which repositories to include in your search:
  • Check/uncheck individual repositories
  • Use Select All / Deselect All for bulk selection
  • Repositories not yet indexed show a warning icon
Repository filter panel with checkboxes

Advanced Options

Generate Search Explanation - Enable this to get AI-powered analysis of your search results. When enabled, the AI will explain:
  • Why results were ranked the way they were
  • How it interpreted your query
  • Key factors that influenced each result’s score
Generating explanations adds 10-20 seconds to search time. Results appear first, then the explanation loads.

Search Results

Results display in a split-view layout:

File List Sidebar

The left panel shows matching files:
  • File path with syntax-highlighted icon
  • Match count showing number of results in each file
  • Repository name when searching multiple repositories
  • Click a file to view its matches
File list showing multiple matching files

Code Preview Panel

The right panel displays the actual code:
  • Syntax highlighting for your code
  • Line numbers for easy reference
  • Match highlighting showing where your query matched
  • File path header with copy and GitHub link buttons
Code preview showing highlighted matches

Result Summary

When results load, a summary bar shows:
  • Query understanding - How the AI interpreted your search
  • Search strategy - The approach used to find results
  • Result count - “Showing X of Y results in Z files”

Search Examples

Finding Functions by Description

Query: “authentication middleware that checks JWT tokens” Results: Functions related to JWT validation, auth middleware, token verification

Locating Error Handling

Query: “try catch blocks with database errors” Results: Error handling code around database operations

Pattern Matching

Query: “import from” Results: Files with specific React imports (exact text match)

Understanding Architecture

Query: “main entry point application startup” Results: Bootstrap files, main functions, app initialization code

Tips for Better Results

Be specific - “user registration form validation” works better than just “validation”
Use technical terms - Include function names, class names, or specific patterns when you know them
Describe intent - “function that sends email notifications” is more effective than “email function”
Enable explanations - Turn on the AI explanation option for complex queries to understand why results were ranked
Filter repositories - Narrow down to relevant repos when you know where to look

Search History

Your recent searches are saved for quick access:
  1. Click in the search box to see your search history
  2. Click any previous search to run it again
  3. History shows your most recent queries
Search history dropdown showing recent queries

Understanding Results

Semantic vs Pattern Matching

Kasava uses structural search by default, which finds exact text patterns. The semantic capabilities from indexed embeddings help with ranking and understanding.
Search TypeBest For
Exact patternsFinding specific function names, imports, constants
Natural languageDescribing what code does conceptually

Match Quality Indicators

Results are sorted by relevance. Higher-ranked results typically:
  • Match more of your query terms
  • Have stronger semantic similarity
  • Appear in more relevant code contexts (functions, classes vs. comments)

Working with Results

Copying Code

Click the copy button in the code preview header to copy the displayed code to your clipboard.

Opening in GitHub

Click the GitHub icon to open the file directly in your GitHub repository. Click different files in the sidebar to switch between results without running a new search.

Combining with AI Chat

For deeper exploration:
  1. Search to find relevant code sections
  2. Chat to understand how they work (press Cmd+J to open chat)
  3. Search again based on what you learned
This iterative approach helps you build comprehensive understanding.

Troubleshooting

No Results Found

If your search returns no results:
  • Check repository selection - Ensure repositories are selected in the settings
  • Verify indexing - Unindexed repositories show a warning icon; they need to be indexed first
  • Broaden your query - Try more general terms
  • Check for typos - Exact pattern matches are case-sensitive

Results Don’t Seem Relevant

  • Be more specific - Add more context to your query
  • Try different phrasing - Describe the same thing in a different way
  • Enable explanations - See how the AI interpreted your query

Search is Slow

  • Reduce repository scope - Search fewer repositories at once
  • Disable explanations - Turn off AI explanations for faster results
  • Check repository size - Very large repositories take longer to search

Limitations

  • Only searches indexed repositories
  • Results are based on last index time
  • Very large result sets may be paginated

Keyboard Shortcuts

ShortcutAction
EnterExecute search
Cmd/Ctrl + KOpen command palette (then search)