Skip to content

Commit 67bed88

Browse files
committed
feat(workspace): add IDE-like workspace support (v0.2.0)
Major feature release adding workspace capabilities: New Features: - set_workspace tool for opening project folders - read_file tool for reading files with relative paths - get_project_structure tool for visual file trees - scan_workspace tool for intelligent project scanning - Support for 20+ programming languages - Auto project detection from package.json - File caching for performance - Cross-platform path handling (Windows/Mac/Linux) Documentation: - Added WORKSPACE.md comprehensive guide - Added WORKSPACE_QUICKREF.md quick reference - Added MIGRATION_v0.2.0.md upgrade guide - Updated README with workspace features section - Updated CHANGELOG with v0.2.0 release notes - Updated ROADMAP marking v0.2.0 complete Technical: - New WorkspaceDetector class in src/workspace-detector.ts - Enhanced server.ts with 4 new MCP tools - FileContent and ProjectSnapshot types added - Smart ignore patterns for node_modules, .git, etc. - Emoji icons for better file type visualization Breaking Changes: None Migration: Fully backward compatible with v0.1.0
1 parent 76296a1 commit 67bed88

12 files changed

Lines changed: 2507 additions & 28 deletions

CHANGELOG.md

Lines changed: 174 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,170 @@
22

33
All notable changes to Context Sync will be documented in this file.
44

5+
## [0.2.0] - 2025-10-20
6+
7+
### 🎉 Major Feature Release: Workspace Support
8+
9+
**The Next Evolution:**
10+
Context Sync now has IDE-like capabilities! Claude can read your project files, understand your codebase structure, and provide context-aware assistance based on your actual code.
11+
12+
**No more copy-pasting code into chat. Just point Claude to your workspace.**
13+
14+
### ✨ New Features
15+
16+
#### 🗂️ Workspace Management
17+
- **Set Workspace** - Open project folders like an IDE
18+
- **Automatic Project Detection** - Detects project from `package.json`, `pyproject.toml`, etc.
19+
- **File Caching** - Fast subsequent reads with intelligent caching
20+
- **Cross-platform Support** - Works on Windows, macOS, and Linux paths
21+
22+
#### 📂 File Operations
23+
- **Read Files** - Access any file using relative paths
24+
- **Language Detection** - Automatic syntax detection for 20+ languages
25+
- **Syntax Highlighting** - Pretty-formatted code responses
26+
- **Large File Handling** - Warnings and smart handling for files >100KB
27+
28+
#### 🌳 Structure Visualization
29+
- **Project Tree View** - Visual file/folder hierarchy
30+
- **Customizable Depth** - Explore from 1-10 levels deep
31+
- **Smart Filtering** - Ignores `node_modules`, `.git`, build folders
32+
- **File Icons** - Emoji icons for better readability (📘 TypeScript, ⚛️ React, 🐍 Python, etc.)
33+
34+
#### 🔍 Intelligent Scanning
35+
- **Auto-detect Important Files** - Finds entry points, configs, documentation
36+
- **Project Overview** - File statistics and line count estimates
37+
- **Tech Stack Summary** - Understands your architecture automatically
38+
39+
### 🛠️ New MCP Tools
40+
41+
#### `set_workspace`
42+
Open a project folder and make it accessible to Claude.
43+
```json
44+
{
45+
"path": "/absolute/path/to/project"
46+
}
47+
```
48+
Auto-detects project, clears cache, shows structure preview.
49+
50+
#### `read_file`
51+
Read any file from the workspace using relative paths.
52+
```json
53+
{
54+
"path": "src/components/Header.tsx"
55+
}
56+
```
57+
Returns file content with syntax highlighting and metadata.
58+
59+
#### `get_project_structure`
60+
Get visual tree view of project structure.
61+
```json
62+
{
63+
"depth": 3 // optional, default: 3
64+
}
65+
```
66+
Returns formatted tree with icons and proper indentation.
67+
68+
#### `scan_workspace`
69+
Intelligent scan of important project files.
70+
```json
71+
{}
72+
```
73+
Returns project summary, structure, and list of key files.
74+
75+
### 🏗️ Architecture Changes
76+
77+
- **New Class:** `WorkspaceDetector` - Handles all workspace operations
78+
- **File Cache System** - LRU cache for performance
79+
- **Smart Filtering** - Configurable ignore patterns
80+
- **Type Definitions** - Added `FileContent` and `ProjectSnapshot` interfaces
81+
82+
### 📖 Documentation
83+
84+
- **NEW:** [WORKSPACE.md](WORKSPACE.md) - Complete workspace features guide
85+
- Updated README with workspace examples
86+
- Added troubleshooting for common workspace issues
87+
88+
### 🎯 Use Cases Unlocked
89+
90+
1. **Code Understanding** - "How does authentication work?" → Claude reads your auth code
91+
2. **Debugging** - "Fix this TypeScript error" → Claude sees the actual file
92+
3. **Code Review** - "Review my API routes" → Claude analyzes your code
93+
4. **Onboarding** - "Explain this project" → Claude scans and summarizes
94+
5. **Refactoring** - "Improve this component" → Claude reads and suggests changes
95+
96+
### 🔧 Technical Details
97+
98+
**Language Support:**
99+
- TypeScript, JavaScript, TSX, JSX
100+
- Python, Rust, Go, Java, C++, C#
101+
- Ruby, PHP, Swift, Kotlin
102+
- JSON, YAML, TOML, SQL
103+
- HTML, CSS, SCSS, Markdown
104+
105+
**Ignored by Default:**
106+
- `node_modules/`, `dist/`, `build/`, `.next/`
107+
- `.git/`, `.cache/`, `coverage/`
108+
- Hidden files starting with `.`
109+
- `yarn-error.log`, `npm-debug.log`
110+
- `.env`, `.env.local` (security)
111+
112+
**Performance:**
113+
- File caching for repeated reads
114+
- Lazy loading of directory trees
115+
- Configurable depth limits
116+
- Efficient filtering algorithms
117+
118+
### 🐛 Bug Fixes
119+
120+
- Fixed project detection on Windows paths
121+
- Improved error handling for missing files
122+
- Better handling of symlinks and special files
123+
124+
### 📦 Dependencies
125+
126+
No new dependencies! Workspace features use Node.js built-ins:
127+
- `fs` - File system operations
128+
- `path` - Cross-platform path handling
129+
130+
### 🚀 Migration Guide
131+
132+
**No breaking changes!** Existing projects continue to work.
133+
134+
**New capabilities:**
135+
```bash
136+
# Before (v0.1.0)
137+
You: "I'm building with Next.js"
138+
Claude: "Great! What's your question?"
139+
140+
# After (v0.2.0)
141+
You: "Set workspace to /my/project"
142+
Claude: *reads package.json, detects Next.js*
143+
Claude: "I can see you're using Next.js 14. How can I help?"
144+
```
145+
146+
### 🎬 Demo
147+
148+
**Watch workspace features in action:**
149+
1. Set workspace → instant project detection
150+
2. Read files → no copy-pasting needed
151+
3. Get structure → visual project overview
152+
4. Scan workspace → intelligent summary
153+
154+
### 🙏 Acknowledgments
155+
156+
- Community feedback on wanting file access
157+
- Cursor IDE integration inspiration
158+
- Contributors who tested workspace features
159+
160+
### 📈 Stats
161+
162+
- **4 new MCP tools** added
163+
- **1 new class** (`WorkspaceDetector`)
164+
- **20+ file types** supported
165+
- **~500 lines** of workspace code
166+
167+
---
168+
5169
## [0.1.0] - 2025-10-16
6170

7171
### 🎉 Initial Release
@@ -40,8 +204,8 @@ node setup.js
40204
### 🎯 What's Next
41205

42206
See [ROADMAP.md](ROADMAP.md) for upcoming features:
43-
- v0.2.0: Automatic context capture
44-
- v0.3.0: Project auto-detection
207+
- v0.2.0: Workspace support ✅ DONE!
208+
- v0.3.0: File writing capabilities
45209
- v0.4.0: Cursor IDE integration
46210

47211
### 🙏 Acknowledgments
@@ -55,4 +219,12 @@ Thanks to:
55219

56220
**First release! If you find Context Sync useful, please ⭐ star the repo!**
57221

222+
---
223+
224+
## Version History
225+
226+
- [0.2.0] - 2025-10-20 - Workspace Support 🗂️
227+
- [0.1.0] - 2025-10-16 - Initial Release 🎉
228+
229+
[0.2.0]: https://github.com/Intina47/context-sync/releases/tag/v0.2.0
58230
[0.1.0]: https://github.com/Intina47/context-sync/releases/tag/v0.1.0

0 commit comments

Comments
 (0)