@@ -5,16 +5,19 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
55## Project Overview
66
77This is a JupyterLab extension package that provides default chat commands for Jupyter AI. It consists of:
8+
89- A Python server extension (` jupyter_ai_chat_commands ` )
910- A TypeScript frontend extension (` @jupyter-ai/chat-commands ` )
1011
1112The extension currently provides two chat commands:
13+
1214- ` @file:<path> ` : Add a file as an attachment to a message
1315- ` /refresh-personas ` : Reload local personas defined in ` .jupyter/personas `
1416
1517## Development Setup
1618
1719Initial setup requires micromamba/conda and Node.js 22:
20+
1821``` bash
1922micromamba install uv jupyterlab nodejs=22
2023jlpm
@@ -26,51 +29,60 @@ The `dev:install` script handles the complete development setup including buildi
2629## Common Commands
2730
2831### Building
32+
2933- ` jlpm build ` - Build both TypeScript and labextension for development
3034- ` jlpm build:prod ` - Production build with optimization
3135- ` jlpm build:lib ` - Build TypeScript source with source maps
3236- ` jlpm build:labextension ` - Build the JupyterLab extension
3337
3438### Development Workflow
39+
3540- ` jlpm watch ` - Watch mode for development (runs both TypeScript and labextension watch)
3641- ` jupyter lab ` - Start JupyterLab (run in separate terminal alongside watch)
3742
3843### Linting and Testing
44+
3945- ` jlpm lint ` - Run all linters (stylelint, prettier, eslint)
4046- ` jlpm lint:check ` - Check without fixing
4147- ` jlpm test ` - Run Jest tests with coverage
4248- ` pytest -vv -r ap --cov jupyter_ai_chat_commands ` - Run Python server tests
4349
4450### Extension Management
51+
4552- ` jlpm dev:uninstall ` - Remove development extension
4653- ` jupyter server extension list ` - Check server extension status
4754- ` jupyter labextension list ` - Check frontend extension status
4855
4956## Architecture
5057
5158### Frontend (TypeScript)
59+
5260- Entry point: ` src/index.ts ` - exports main plugin and chat command plugins
5361- Chat commands: ` src/chat-command-plugins/ ` contains individual command implementations
5462- Uses JupyterLab 4.x plugin system and ` @jupyter/chat ` for chat integration
5563
5664### Backend (Python)
65+
5766- Server extension: ` jupyter_ai_chat_commands/extension_app.py `
5867- Request handlers: ` jupyter_ai_chat_commands/handlers.py `
5968- Depends on ` jupyterlab_chat ` , ` jupyter_ai_router ` , and ` jupyter_ai_persona_manager `
6069
6170### Key Dependencies
71+
6272- Frontend: ` @jupyter/chat ` , ` @jupyterlab/application ` , Material-UI icons
6373- Backend: ` jupyter_server ` , ` jupyterlab_chat ` , ` jupyter_ai_router `
6474
6575## Code Style
76+
6677- TypeScript: ESLint with TypeScript rules, Prettier formatting, single quotes
6778- Interface naming: Must start with 'I' and use PascalCase
6879- CSS: Stylelint with standard config
6980- Python: No specific linter configured (follows standard Python conventions)
7081
7182## Testing
83+
7284- Frontend: Jest with coverage reporting
7385- Backend: Pytest with pytest-asyncio for server testing
7486- Integration: Playwright tests in ` ui-tests/ ` (currently skipped)
7587
76- Note: Integration tests are currently disabled - see recent commit "skip integration tests for now".
88+ Note: Integration tests are currently disabled - see recent commit "skip integration tests for now".
0 commit comments