Overview
AI Chat is powered by Claude, Anthropic’s advanced language model. When combined with your indexed code, it can:- Answer questions about how your code works
- Explain implementations with code references
- Suggest improvements based on your patterns
- Debug issues using your actual code context
- Generate documentation for your codebase
- Analyze uploaded documents and discuss their contents
Getting Started
Index a Repository
First, index a repository to give the AI context about your codebase
Open Chat
Access Chat from the sidebar by expanding a Product and clicking on any sub-tab, or use the chat icon in the header to open the slide-out chat panel
Start a New Conversation
Click the “New Conversation” button in the header to start a fresh chat session
Accessing AI Chat
There are multiple ways to access AI Chat in Kasava:Global Chat Panel
Click the chat icon (message bubble) in the top-right header area of any page. This opens a slide-out panel where you can chat with the AI without leaving your current page. Keyboard shortcut: PressCmd+J (Mac) or Ctrl+J (Windows) to toggle the chat panel.
Dedicated Chat Page
Navigate to/chat directly for a full-page chat experience with:
- Conversation sidebar on the left showing all your chat sessions
- Main chat area on the right for the active conversation
- Resizable panels - drag the divider to adjust sidebar width
Managing Conversations
Conversation Sidebar
The sidebar displays all your conversations organized by date:- Today - Conversations from today
- Yesterday - Yesterday’s conversations
- This Week - Conversations from the past 7 days
- Older - Conversations older than a week
Conversation Actions
Hover over any conversation in the sidebar to reveal options:- Rename - Click the pencil icon or right-click and select “Rename”
- Delete - Click the trash icon or right-click and select “Delete”
Starting Fresh
Click the “New Conversation” button at the top of the page to start a new chat session. The AI will automatically generate a title for the conversation based on your first message.Chat Features
Streaming Responses
Responses stream in real-time, so you see the answer as it’s being generated. A loading indicator shows when the AI is processing your request.Code References
The AI includes references to specific files and code patterns from your indexed repositories:Multi-Turn Conversations
Continue conversations with follow-up questions. The AI remembers context from earlier in the chat, allowing you to dive deeper into topics without repeating context.Personalization from AI Learning
AI Chat automatically incorporates your learned patterns to personalize responses:- Terminology - Uses your preferred terms (e.g., “customer” vs “user”)
- Categorization - Follows your classification conventions
- Formatting - Matches your documentation style preferences
Document Attachments
Upload documents directly into your conversation:- Drag and drop a file anywhere in the chat window
- Or click the attachment button (+) in the input toolbar
Suggested Actions
When you start a new conversation, the chat may display helpful suggestions to get you started. Click any suggestion to quickly send that message.Asking Questions
Effective Prompts
The AI works best with clear, specific questions:| Good Prompt | Why It Works |
|---|---|
| ”How does the authentication middleware validate JWT tokens?” | Specific component and action |
| ”Explain the data flow in the user registration process” | Clear scope and request |
| ”What error handling patterns are used in the API routes?” | Focused technical question |
| ”Where is the database connection configured?” | Specific lookup request |
Less Effective Prompts
| Prompt | Issue |
|---|---|
| ”Explain everything” | Too broad |
| ”Is my code good?” | Vague evaluation criteria |
| ”Fix all bugs” | No specific problem identified |
Best Practices
Example Conversations
Understanding Code Flow
You: How does the checkout process work in this e-commerce app? AI: The checkout process is implemented insrc/services/checkout.ts. Here’s the flow:
initiateCheckout()validates the cart contentscalculateTotals()computes prices, taxes, and shippingprocessPayment()handles Stripe integrationcreateOrder()persists the order to the database
POST /api/checkout route in src/routes/checkout.ts:42.
Debugging
You: Why might the user session be expiring too quickly? AI: Looking at your session configuration insrc/config/auth.ts, I see the session maxAge is set to 3600000ms (1 hour). However, in src/middleware/session.ts:28, there’s a rolling: false setting which means the session timer isn’t reset on activity.
To fix the quick expiration, you could either:
- Increase
maxAgein the config - Set
rolling: trueto refresh on each request
Code Review
You: Are there any obvious issues with the error handling in the API routes? AI: I noticed a few patterns that could be improved:- In
src/routes/users.ts, errors are caught but not logged before returning a 500 response - The
src/routes/orders.tsfile doesn’t have try-catch blocks around database operations - Some routes return raw error messages which could expose implementation details
src/middleware/errorHandler.ts.
Limitations
Be aware of these limitations:- Only indexed code - The AI can only reference repositories you’ve indexed
- Point-in-time - Answers are based on when the repository was last indexed
- Not real-time - The AI doesn’t see uncommitted changes in your local environment
- Token limits - Very large codebases may have some files truncated in context
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Cmd/Ctrl + J | Toggle chat panel |
Enter | Send message |
Shift + Enter | New line in message |