AI Chat
Interactive AI conversations with powerful coding assistance
AI Chat Interface
The AI Chat interface is the heart of TalkCody, providing an interactive conversational experience with AI models. Chat with AI to get coding help, review code, generate tests, and more.
Overview
TalkCody's chat interface offers:
- Streaming Responses: Real-time text generation as the AI formulates answers
- Multi-Turn Conversations: Context-aware dialogues that remember previous messages
- Code Highlighting: Syntax-highlighted code blocks with language detection
- Tool Execution: AI can execute file operations, searches, and web crawling
- Attachments: Upload images or files for AI analysis
- Voice Input: Hands-free input with voice-to-text
- Message Compression: Automatic context management for long conversations
Starting a Conversation
Select or Create a Conversation
Navigate to the Chat view and either:
- Start a new conversation (+ New Chat button)
- Continue an existing conversation from the sidebar
Choose Your AI Agent
Select which AI agent to use:
- Default Agent: General-purpose coding assistant
- Custom Agents: Specialized agents you've created
- Use the dropdown at the top of the chat to switch agents
Send Your Message
Type your message in the input field and:
- Press Enter to send
- Or click the Send button
- Use Shift + Enter for multi-line input
Chat Features
Streaming Responses
TalkCody uses streaming to display AI responses in real-time:
User: Explain async/await in JavaScript
AI: Async/await is a modern JavaScript syntax for handling
asynchronous operations. It makes asynchronous code look
and behave like synchronous code...
[Response continues to stream in real-time]You can stop generation at any time by clicking the Stop button.
Code Blocks
The AI automatically formats code with syntax highlighting:
User: Write a React component for a counter
AI: Here's a simple counter component:
```jsx
import { useState } from 'react';
export function Counter() {
const [count, setCount] = useState(0);
return (
<div>
<p>Count: {count}</p>
<button onClick={() => setCount(count + 1)}>
Increment
</button>
</div>
);
}
```Code block features:
- Automatic language detection
- Syntax highlighting for 100+ languages
- Copy button for quick copying
- Line numbers (optional)
File Attachments
Attach files or images to your conversations:
- Click the 📎 Attach button
- Select a file from your computer
- The AI can analyze:
- Images (screenshots, diagrams, UI mockups)
- Code files
- Text documents
- Configuration files
Vision Models: Use GPT-4.1 Vision or Gemini Pro Vision to analyze images and screenshots.
Example use cases:
[Attach screenshot of error]
User: What's causing this error?
[Attach diagram]
User: Generate code based on this architecture diagram
[Attach config file]
User: Review this configuration and suggest improvementsTool Execution
AI agents can execute tools to assist you:
Available Tools:
- File Operations: Read, write, edit files in your project
- Code Search: Search through your codebase
- Bash Commands: Execute terminal commands
- Web Search: Search the internet for information
- Web Crawling: Fetch and analyze web pages
Example:
User: Find all TODO comments in my project
AI: I'll search for TODO comments in your project.
[Executes code search tool]
[Displays results from the search]
Found 15 TODO items across 8 files:
- src/app.tsx:45 - TODO: Implement error handling
- src/utils/api.ts:120 - TODO: Add retry logic
...Permission Required: Tool execution requires confirmation for potentially destructive operations (file edits, deletions).
Voice Input
Use voice-to-text for hands-free input:
- Click the 🎤 Microphone icon
- Speak your message
- The text appears in the input field
- Review and send
Tips for better voice recognition:
- Speak clearly and at a normal pace
- Use a quiet environment
- Pronounce technical terms carefully
- Review transcription before sending
Context Management
Message History
TalkCody maintains conversation context automatically:
- Previous messages are included in context
- AI remembers earlier parts of the conversation
- Code and file references are preserved
Example of context awareness:
User: Write a function to calculate factorial
AI: [Provides factorial function]
User: Now add error handling to it
AI: [Adds error handling to the previously written function]Message Compression
For long conversations, TalkCody automatically compresses older messages:
- Summarizes earlier messages
- Preserves important context
- Manages token limits effectively
- Keeps recent messages in full detail
Message compression happens automatically when approaching token limits. You can adjust settings in Configuration → Model Settings.
Conversation Limits
Different models have different context windows:
| Model | Context Window |
|---|---|
| GPT-4.1 | 128K tokens (~96K words) |
| Claude 4.5 Opus | 200K tokens (~150K words) |
| Gemini 2.5 Pro | 1M tokens (~750K words) |
| Qwen 3 Max | 128K tokens |
Token counts are displayed in the chat interface (enable in Settings).
Advanced Chat Features
Regenerate Responses
Not satisfied with a response?
- Click the ↻ Regenerate button
- The AI generates a new response
- Previous response is preserved in history
Edit Messages
Edit your previous messages:
- Hover over your message
- Click the Edit button
- Modify the text
- The conversation branches from that point
Copy and Share
- Copy Message: Click the copy button on any message
- Copy Code: Copy code blocks separately
- Export Conversation: Export the full conversation as markdown
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Enter | Send message |
Shift + Enter | New line |
Cmd/Ctrl + K | Clear chat |
Cmd/Ctrl + / | Toggle voice input |
Esc | Stop generation |
Working with Projects
When you have a project open, the AI has enhanced capabilities:
File Context
The AI can:
- Read files from your project
- Search through your codebase
- Understand project structure
- Reference multiple files
Example:
User: Refactor the authentication logic in auth.ts
AI: [Reads auth.ts from your project]
I've reviewed your authentication code. Here are my suggestions:
[Provides specific refactoring advice based on actual code]File Editing
AI agents can propose file edits:
- AI suggests changes to a file
- Review dialog shows the proposed changes
- You can accept, reject, or modify the changes
- Changes are applied to the actual file
Always review AI-proposed changes before accepting them. You have full control over what gets written to your files.
Multi-File Operations
The AI can work across multiple files:
User: Create a new React component with tests and styles
AI: I'll create three files for you:
1. components/Button.tsx - The component
2. components/Button.test.tsx - Unit tests
3. components/Button.module.css - Styles
[Shows preview of all three files]
[Awaits your approval]Best Practices
Writing Effective Prompts
Be specific:
❌ "Fix my code"
✅ "Fix the TypeError in the fetchData function in api.ts"Provide context:
❌ "Write a component"
✅ "Write a React component for a user profile card that displays
name, avatar, and bio. Use TypeScript and Tailwind CSS."Break down complex tasks:
Instead of: "Build a complete authentication system"
Try:
1. "Design the database schema for user authentication"
2. "Implement user registration with email validation"
3. "Create login endpoint with JWT tokens"
4. "Add password reset functionality"Managing Long Conversations
- Start new conversations for unrelated topics
- Use message compression for extended discussions
- Export important conversations for reference
- Periodically summarize progress with the AI
Choosing the Right Model
Different models excel at different tasks:
- Code Generation: Qwen 3 Coder, Codestral, GPT-4.1
- Explanations: Claude 4.5 Sonnet, GPT-4.1
- Quick Questions: Claude Haiku, GPT-4.1 Turbo
- Complex Reasoning: Claude 4.5 Opus, GPT-5
- Budget-Friendly: DeepSeek Chat, GLM 4.5 Air
Troubleshooting
AI Not Responding
- Check your internet connection
- Verify API key is valid
- Check provider status page
- Try a different model
Responses Are Cut Off
- Increase max tokens in Settings
- Use a model with larger context window
- Break request into smaller parts
AI Can't Access My Files
- Verify project is opened in TalkCody
- Check file permissions
- Ensure file tools are enabled for the agent
- Try explicitly providing the file path
Code Formatting Issues
- Specify the programming language in your prompt
- Ask the AI to format code in markdown code blocks
- Copy code separately using the code block copy button
Next Steps
- AI Agents - Create specialized AI assistants
- AI Completions - Use inline code suggestions
- Model Settings - Configure AI models
- Agent Configuration - Customize agent behavior
Master the chat interface to unlock TalkCody's full potential for AI-assisted development!