Workspace Sidebar
File browser and preview functionality for managing generated files
Table of Contents
- Overview
- Workspace Configuration
- Directory Tree
- File Preview
- Resizable Sidebar
- Supported File Types
- See Also
Overview
The workspace sidebar provides a file browser for viewing and previewing files generated by OHMind agents. It displays a directory tree of the workspace folder and allows previewing text files with syntax highlighting.
Key Features
- Live directory tree of workspace files
- File preview with syntax highlighting
- Image file information display
- Resizable sidebar with drag-to-resize
- Toggle visibility with
Ctrl+B - Refresh with
Ctrl+R
Workspace Configuration
Environment Variable
The workspace path is configured via the OHMind_workspace environment variable:
# Set workspace path
export OHMind_workspace="/path/to/workspace"
# Default if not set: current directory (./)
Default Structure
When agents generate files, they are organized into subdirectories:
OHMind_workspace/
├── HEM/ # HEM optimization results
│ ├── backbone_*.yaml
│ ├── cation_*.smi
│ └── optimization_*.log
├── QM/ # Quantum chemistry files
│ ├── *.inp # ORCA input files
│ ├── *.out # ORCA output files
│ └── *.xyz # Molecular coordinates
├── MD/ # Molecular dynamics files
│ ├── *.gro # GROMACS structure files
│ ├── *.top # Topology files
│ └── *.mdp # Parameter files
├── Multiwfn/ # Wavefunction analysis
│ └── *.txt # Analysis results
└── Chem/ # Chemistry outputs
└── *.sdf # Structure files
Directory Tree
Navigation
- Click on folders to expand/collapse
- Click on files to open preview
- Use arrow keys for keyboard navigation
- Press Enter to select
Filtering
The directory tree automatically filters out:
- Hidden files (starting with
.) - Python cache directories (
__pycache__) - Common temporary files
Refreshing
Files generated during a session may not appear immediately. Use Ctrl+R to refresh the directory tree and see newly created files.
File Preview
Opening Files
Click on any file in the directory tree to open a preview modal. The preview displays:
- File name in the title bar
- File contents with appropriate formatting
- Close button or press Escape to dismiss
Text File Preview
Text files are displayed with:
- Syntax highlighting based on file extension
- Line numbers for code files
- Scrollable content area
- Truncation indicator for large files (>100KB)
Image File Preview
Image files show file information:
- File name
- File size
- Image dimensions (if PIL is available)
- File type
Note: Actual image rendering depends on terminal capabilities.
Binary Files
Binary files that cannot be previewed show a message indicating the file type cannot be displayed.
Resizable Sidebar
Drag to Resize
The sidebar includes a draggable splitter between the file tree and chat view:
- Position cursor on the splitter (vertical line between sidebar and chat)
- Click and drag left or right
- Release to set new width
Width Constraints
- Minimum width: 10% of window
- Maximum width: 50% of window
- Default width: 25% of window
Persistence
The sidebar width is maintained during the session but resets to default on restart.
Supported File Types
Text Files with Syntax Highlighting
| Extension | Language | Description |
|---|---|---|
.py |
Python | Python scripts |
.json |
JSON | Configuration files |
.yaml, .yml |
YAML | YAML configuration |
.sh, .bash |
Bash | Shell scripts |
.md |
Markdown | Documentation |
.html |
HTML | Web pages |
.xml |
XML | XML data |
.toml |
TOML | TOML configuration |
Plain Text Files
| Extension | Description |
|---|---|
.txt |
Plain text |
.log |
Log files |
.out |
Output files |
.csv |
CSV data |
.xyz |
Molecular coordinates |
.sdf |
Structure data |
.ini, .cfg |
Configuration |
.rst |
reStructuredText |
Image Files
| Extension | Description |
|---|---|
.png |
PNG images |
.jpg, .jpeg |
JPEG images |
.gif |
GIF images |
.bmp |
Bitmap images |
.svg |
SVG vector graphics |
Usage Examples
Viewing HEM Results
- Run an HEM optimization query
- Press
Ctrl+Rto refresh the file tree - Navigate to
HEM/folder - Click on result files to preview
Checking QM Outputs
- After QM calculation completes
- Refresh tree with
Ctrl+R - Open
QM/folder - Preview
.outfiles for results
Managing Workspace
# Set custom workspace before starting CLI
export OHMind_workspace="$HOME/ohmind_results"
python -m OHMind_cli
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl+B |
Toggle sidebar visibility |
Ctrl+R |
Refresh directory tree |
Escape |
Close file preview modal |
Troubleshooting
Files Not Appearing
- Press
Ctrl+Rto refresh the tree - Check that files are in the workspace directory
- Verify
OHMind_workspaceenvironment variable
Preview Not Loading
- Ensure file is a supported text type
- Check file permissions
- Large files (>100KB) are truncated
Sidebar Not Visible
- Press
Ctrl+Bto toggle visibility - Check if sidebar was hidden previously
See Also
- CLI Overview - Getting started with the CLI
- Keyboard Shortcuts - All shortcuts
- Configuration - Workspace configuration
| *Last updated: 2025-12-23 | OHMind v1.0.0* |