feat: Implement CodeMirror 6 file editor with tab support
Implement Phase 1 of the file editor & chat UI redesign: - CodeMirror 6 integration with syntax highlighting - Multi-file tab support with dirty state tracking - Custom dark theme matching GitHub's color scheme - Keyboard shortcuts (Ctrl+S to save, Ctrl+W to close tab) - Mobile-responsive design with proper touch targets - Fallback to basic textarea if CodeMirror fails to load Technical details: - Import map for ESM modules from node_modules - Language support for JS, Python, HTML, CSS, JSON, Markdown - Auto-initialization on DOM ready - Global window.fileEditor instance for integration - Serve node_modules at /claude/node_modules for import map Files added: - public/claude-ide/components/file-editor.js (main component) - public/claude-ide/components/file-editor.css (responsive styles) Files modified: - public/claude-ide/index.html (import map, script tags) - public/claude-ide/ide.js (updated loadFile function) - server.js (serve node_modules for CodeMirror) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -189,6 +189,9 @@ app.get('/projects', (req, res) => {
|
||||
// Serve static files (must come after specific routes)
|
||||
app.use('/claude', express.static(path.join(__dirname, 'public')));
|
||||
|
||||
// Serve node_modules for CodeMirror 6 import map
|
||||
app.use('/claude/node_modules', express.static(path.join(__dirname, 'node_modules')));
|
||||
|
||||
// Login route
|
||||
app.post('/claude/api/login', (req, res) => {
|
||||
const { username, password } = req.body;
|
||||
|
||||
Reference in New Issue
Block a user