feat: add drive view with extension-based categorization and async terminal process management

- Register DriveView at /drive.json and /drive/{drive}.json endpoints in app router
- Add DriveModel.name field and async items property yielding drive items
- Add DriveItemModel.extension and mime_type properties using mimetypes
- Implement DriveService.get_drive_name_by_extension and get_drive_by_extension for automatic drive categorization
- Store file extension in DriveItemService during item creation
- Refactor TerminalSession to use async subprocess with lazy process initialization and multi-socket output buffering
- Move database preparation and service initialization to async startup hook with await on drive.prepare_all
This commit is contained in:
2025-03-23 12:57:20 +00:00
parent dd3b45e31f
commit 3623ec13b4
8 changed files with 187 additions and 28 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ run:
$(GUNICORN) -w $(GUNICORN_WORKERS) -k aiohttp.worker.GunicornWebWorker snek.gunicorn:app --bind 0.0.0.0:$(PORT) --reload
install:
python3 -m venv .venv
python3.12 -m venv .venv
$(PIP) install -e .