AI Dialog
The AI dialog feature enables intelligent interaction with artificial intelligence, improving work efficiency.
Overview
The AI dialog sidebar is one of the core features of the Chaterm application, providing users with powerful AI dialog capabilities. It supports multiple dialog modes, intelligent command execution, file uploads, voice input, and other features, designed to enhance user terminal operation efficiency.
Main Features
1. Dialog Modes
The AI sidebar supports three dialog modes:
Chat Mode
Purpose: Pure text conversation, similar to ChatGPT
Features: Supports natural language communication, AI responds in text format
Use Cases: Q&A, concept explanation, code review, etc.
Command Mode
Purpose: Generate and execute terminal commands
Features: AI generates executable commands, users can choose to copy or execute directly
Use Cases: System management, file operations, development tasks, etc.
Agent Mode
Purpose: Intelligent agent that can execute complex multi-step tasks
Features: AI can autonomously execute commands and handle interactive commands
Use Cases: Automated tasks, complex workflows, etc.
2. Message System
Message Types
| Type | Description |
|---|---|
| User Message | User input content |
| Assistant Message | AI response |
| Command Message | Generated command code |
| Output Message | Command execution results |
| Thinking Message | AI reasoning process (Thinking mode) |
3. Intelligent Features
File Upload
Supported Formats:
.txt,.md,.js,.ts,.py,.java,.cpp,.c,.html,.css,.json,.xml,.yaml,.yml,.sql,.sh,.bat,.ps1,.log,.csv,.tsv
Maximum File Size: 1MB
Smart Formatting: Automatically adds code block markers based on file type
Host Management
Auto Detection: Automatically detects the host connected to the current terminal
Manual Selection: Agent mode supports manual @ selection of target hosts
Multi-Host Support: Agent mode supports multi-host operations
Connection Types: Supports personal connections and JumpServer connections
4. History Management
Features
Auto Save: All conversations are automatically saved locally
Search Function: Supports searching history by title
Favorite Function: Can favorite important conversations
Pagination: Supports paginated display of large amounts of history
Edit Title: Can customize conversation titles
History Operations
Restore Conversation: Click on history to restore previous conversations
Delete Record: Supports deleting unwanted history records
Favorite Management: Can add or remove favorite markers
5. Interactive Features
Command Operations
Approve Execution: Users can choose to approve AI-generated commands
Reject Operation: Can reject inappropriate commands
Copy Command: Copy command to clipboard
Direct Execution: Directly execute commands in Command mode
Option Handling
Single Selection: AI-provided option selection
Custom Input: Supports custom option input
Batch Operations: Supports batch selection and processing
Feedback System
Like/Dislike: Provide feedback on AI responses
Task Completion: Mark task completion status
Retry Mechanism: Supports retry after failure
Usage
Basic Operations
1. Start Dialog
- Open Application: Open the Chaterm application
- Open Sidebar: Click the AI icon on the right to open the sidebar
- Select Mode: Choose dialog mode (Chat/Command/Agent)
- Select Model: Select the corresponding model from the list (DeepSeek, Qwen, etc.)
- Enter Content: Enter questions or instructions in the input box
- Send Message: Press Enter or click the send button
2. Host Selection
- Enter Symbol: Enter the
@symbol in the input box - Select Host: Choose target host from the dropdown list
- Search Navigation: Supports search and keyboard navigation
- Confirm Selection: After selection, the host will be displayed as a tag
3. File Upload (Optional)
- Select File: Click the upload icon to select a file
- Auto Read: System automatically reads file content
- Code Block Display: Content is added to the input box as a code block
- Edit and Send: Can continue editing or send directly
Advanced Features
1. History Management
View History: Click the history icon to view all conversations
Search Records: Enter keywords in the search box
Favorite Conversation: Click the star icon to favorite important conversations
Edit Title: Click the edit icon to modify conversation title
2. Command Execution
Command Mode: After generating commands, can choose to copy or execute
Agent Mode: AI automatically executes commands and handles interactions
Local Execution: Supports executing commands on local host
Remote Execution: Supports executing commands on remote hosts
3. Code Processing
Syntax Highlighting: Code automatically applies syntax highlighting
Code Folding: Long code automatically folds
Copy Code: Click the copy icon to copy code
Formatting: Supports intelligent recognition of multiple code formats
Configuration Options
Feature Switches
Auto Execute: Can configure automatic execution strategy for commands
For detailed configuration instructions, please refer to AI Preferences.
Best Practices
1. Dialog Tips
Clear Instructions: Provide clear and specific instructions
Context Maintenance: Maintain context coherence within the same conversation
Step-by-Step Execution: For complex tasks, execute step by step
2. Command Usage
Command Mode: Suitable for generating single commands or simple scripts
Agent Mode: Suitable for complex multi-step tasks
Security Check: Carefully check content before executing commands
3. File Processing
File Size: Pay attention to file size limits (1MB)
Format Selection: Choose appropriate file formats for upload
Content Cleanup: Clean sensitive information before uploading
4. History Management
Regular Cleanup: Regularly delete unwanted history records
Important Favorites: Add important conversations to favorites
Title Naming: Use meaningful titles for easy searching
Troubleshooting
Common Issues
1. Dialog Stuck in Processing State
Session Connection: Can click new dialog to restart conversation
2. Command Execution Failed
Permission Check: Ensure you have permission to execute commands
Host Connection: Check target host connection status
Command Syntax: Verify command syntax is correct