feat: add project file system with CRUD, upload, inline editing, and video attachment support
- Add new `/projects/{slug}/files` endpoint group for per-project filesystem operations including directory and file CRUD, upload, and inline editing with public read and owner write access
- Extend attachment system to support video formats (webm, ogv, mov, m4v) with proper file icons and MIME types
- Implement configurable allowed file types via `allowed_file_types` site setting, replacing hardcoded `ALLOWED_UPLOAD_TYPES` with dynamic `allowed_extensions()` and `is_extension_allowed()` functions
- Add `delete_all_project_files()` call in `delete_content_item()` to clean up project files when a project is deleted
- Create database indexes on `project_files` table for `(project_uid, path)` and `(project_uid, parent_path)` to optimize file lookups
- Introduce `docs_prose.py` module with `render_prose()` function that renders Markdown content inside `data-render` divs using mistune, enabling dynamic prose rendering in documentation pages
- Enhance docs search with Markdown-aware text stripping (`_demarkdown()`) and improved HTML/script/style sanitization for better search indexing
- Update documentation API samples to reflect new attachment response fields (`is_image`, `is_video`, `mime_type`) and note video format support
- Update README to document the new project files endpoint and clarify AI gateway attribution for guest Devii sessions
2026-06-08 22:51:09 +02:00
|
|
|
import "./components/index.js";
|
2026-05-23 01:50:31 +02:00
|
|
|
import { ModalManager } from "./ModalManager.js";
|
|
|
|
|
import { FormManager } from "./FormManager.js";
|
|
|
|
|
import { VoteManager } from "./VoteManager.js";
|
2026-05-25 16:16:53 +02:00
|
|
|
import { NotificationManager } from "./NotificationManager.js";
|
2026-05-23 01:50:31 +02:00
|
|
|
import { MessageSearch } from "./MessageSearch.js";
|
|
|
|
|
import { ProfileEditor } from "./ProfileEditor.js";
|
|
|
|
|
import { MobileNav } from "./MobileNav.js";
|
|
|
|
|
import { CommentManager } from "./CommentManager.js";
|
|
|
|
|
import { ContentEnhancer } from "./ContentEnhancer.js";
|
|
|
|
|
import { DomUtils } from "./DomUtils.js";
|
2026-05-23 10:03:27 +02:00
|
|
|
import { PushManager } from "./PushManager.js";
|
|
|
|
|
import { PwaInstaller } from "./PwaInstaller.js";
|
2026-06-06 16:31:42 +02:00
|
|
|
import { CounterManager } from "./CounterManager.js";
|
|
|
|
|
import { ReactionBar } from "./ReactionBar.js";
|
|
|
|
|
import { BookmarkManager } from "./BookmarkManager.js";
|
|
|
|
|
import { PollManager } from "./PollManager.js";
|
feat: add api key auth, devii agent, openai gateway, and admin service management
This commit introduces a comprehensive set of new features including API key authentication with CLI management commands (get, reset, backfill), a Devii agentic assistant with WebSocket terminal and session bootstrap, an OpenAI-compatible LLM gateway service, and an admin service management panel. It also adds Playwright browser automation for bot support, configures internal gateway URLs, refactors content editing/deletion to support JSON API responses, and updates documentation across AGENTS.md, README.md, and the developer docs site.
2026-06-08 17:38:33 +02:00
|
|
|
import { ApiKeyManager } from "./ApiKeyManager.js";
|
2026-06-09 22:52:51 +02:00
|
|
|
import { CustomizationToggle } from "./CustomizationToggle.js";
|
feat: add project file system with CRUD, upload, inline editing, and video attachment support
- Add new `/projects/{slug}/files` endpoint group for per-project filesystem operations including directory and file CRUD, upload, and inline editing with public read and owner write access
- Extend attachment system to support video formats (webm, ogv, mov, m4v) with proper file icons and MIME types
- Implement configurable allowed file types via `allowed_file_types` site setting, replacing hardcoded `ALLOWED_UPLOAD_TYPES` with dynamic `allowed_extensions()` and `is_extension_allowed()` functions
- Add `delete_all_project_files()` call in `delete_content_item()` to clean up project files when a project is deleted
- Create database indexes on `project_files` table for `(project_uid, path)` and `(project_uid, parent_path)` to optimize file lookups
- Introduce `docs_prose.py` module with `render_prose()` function that renders Markdown content inside `data-render` divs using mistune, enabling dynamic prose rendering in documentation pages
- Enhance docs search with Markdown-aware text stripping (`_demarkdown()`) and improved HTML/script/style sanitization for better search indexing
- Update documentation API samples to reflect new attachment response fields (`is_image`, `is_video`, `mime_type`) and note video format support
- Update README to document the new project files endpoint and clarify AI gateway attribution for guest Devii sessions
2026-06-08 22:51:09 +02:00
|
|
|
import { UserAiUsage } from "./UserAiUsage.js";
|
feat: add api key auth, devii agent, openai gateway, and admin service management
This commit introduces a comprehensive set of new features including API key authentication with CLI management commands (get, reset, backfill), a Devii agentic assistant with WebSocket terminal and session bootstrap, an OpenAI-compatible LLM gateway service, and an admin service management panel. It also adds Playwright browser automation for bot support, configures internal gateway URLs, refactors content editing/deletion to support JSON API responses, and updates documentation across AGENTS.md, README.md, and the developer docs site.
2026-06-08 17:38:33 +02:00
|
|
|
import { Tabs } from "./Tabs.js";
|
|
|
|
|
import { DeviiTerminal } from "./DeviiTerminal.js";
|
2026-06-09 01:32:57 +02:00
|
|
|
import { ZipDownloader } from "./ZipDownloader.js";
|
2026-06-09 16:06:02 +02:00
|
|
|
import { ProjectForker } from "./ProjectForker.js";
|
|
|
|
|
import WindowManager from "./components/WindowManager.js";
|
|
|
|
|
import { ContainerTerminalManager } from "./ContainerTerminalManager.js";
|
2026-05-23 01:50:31 +02:00
|
|
|
|
2026-05-10 09:08:12 +02:00
|
|
|
class Application {
|
|
|
|
|
constructor() {
|
feat: add project file system with CRUD, upload, inline editing, and video attachment support
- Add new `/projects/{slug}/files` endpoint group for per-project filesystem operations including directory and file CRUD, upload, and inline editing with public read and owner write access
- Extend attachment system to support video formats (webm, ogv, mov, m4v) with proper file icons and MIME types
- Implement configurable allowed file types via `allowed_file_types` site setting, replacing hardcoded `ALLOWED_UPLOAD_TYPES` with dynamic `allowed_extensions()` and `is_extension_allowed()` functions
- Add `delete_all_project_files()` call in `delete_content_item()` to clean up project files when a project is deleted
- Create database indexes on `project_files` table for `(project_uid, path)` and `(project_uid, parent_path)` to optimize file lookups
- Introduce `docs_prose.py` module with `render_prose()` function that renders Markdown content inside `data-render` divs using mistune, enabling dynamic prose rendering in documentation pages
- Enhance docs search with Markdown-aware text stripping (`_demarkdown()`) and improved HTML/script/style sanitization for better search indexing
- Update documentation API samples to reflect new attachment response fields (`is_image`, `is_video`, `mime_type`) and note video format support
- Update README to document the new project files endpoint and clarify AI gateway attribution for guest Devii sessions
2026-06-08 22:51:09 +02:00
|
|
|
this.dialog = document.createElement("dp-dialog");
|
|
|
|
|
this.contextMenu = document.createElement("dp-context-menu");
|
|
|
|
|
this.toast = document.createElement("dp-toast");
|
|
|
|
|
document.body.append(this.dialog, this.contextMenu, this.toast);
|
2026-05-23 01:50:31 +02:00
|
|
|
this.modals = new ModalManager();
|
|
|
|
|
this.forms = new FormManager();
|
|
|
|
|
this.votes = new VoteManager();
|
2026-05-25 16:16:53 +02:00
|
|
|
this.notifications = new NotificationManager();
|
2026-05-23 01:50:31 +02:00
|
|
|
this.messageSearch = new MessageSearch();
|
|
|
|
|
this.profile = new ProfileEditor();
|
|
|
|
|
this.mobileNav = new MobileNav();
|
|
|
|
|
this.comments = new CommentManager();
|
|
|
|
|
this.content = new ContentEnhancer();
|
|
|
|
|
this.dom = new DomUtils();
|
2026-05-23 10:03:27 +02:00
|
|
|
this.push = new PushManager();
|
|
|
|
|
this.pwa = new PwaInstaller();
|
2026-06-06 16:31:42 +02:00
|
|
|
this.counters = new CounterManager();
|
|
|
|
|
this.reactions = new ReactionBar();
|
|
|
|
|
this.bookmarks = new BookmarkManager();
|
|
|
|
|
this.polls = new PollManager();
|
feat: add api key auth, devii agent, openai gateway, and admin service management
This commit introduces a comprehensive set of new features including API key authentication with CLI management commands (get, reset, backfill), a Devii agentic assistant with WebSocket terminal and session bootstrap, an OpenAI-compatible LLM gateway service, and an admin service management panel. It also adds Playwright browser automation for bot support, configures internal gateway URLs, refactors content editing/deletion to support JSON API responses, and updates documentation across AGENTS.md, README.md, and the developer docs site.
2026-06-08 17:38:33 +02:00
|
|
|
this.apiKey = new ApiKeyManager();
|
2026-06-09 22:52:51 +02:00
|
|
|
this.customizationToggle = new CustomizationToggle();
|
feat: add project file system with CRUD, upload, inline editing, and video attachment support
- Add new `/projects/{slug}/files` endpoint group for per-project filesystem operations including directory and file CRUD, upload, and inline editing with public read and owner write access
- Extend attachment system to support video formats (webm, ogv, mov, m4v) with proper file icons and MIME types
- Implement configurable allowed file types via `allowed_file_types` site setting, replacing hardcoded `ALLOWED_UPLOAD_TYPES` with dynamic `allowed_extensions()` and `is_extension_allowed()` functions
- Add `delete_all_project_files()` call in `delete_content_item()` to clean up project files when a project is deleted
- Create database indexes on `project_files` table for `(project_uid, path)` and `(project_uid, parent_path)` to optimize file lookups
- Introduce `docs_prose.py` module with `render_prose()` function that renders Markdown content inside `data-render` divs using mistune, enabling dynamic prose rendering in documentation pages
- Enhance docs search with Markdown-aware text stripping (`_demarkdown()`) and improved HTML/script/style sanitization for better search indexing
- Update documentation API samples to reflect new attachment response fields (`is_image`, `is_video`, `mime_type`) and note video format support
- Update README to document the new project files endpoint and clarify AI gateway attribution for guest Devii sessions
2026-06-08 22:51:09 +02:00
|
|
|
this.userAiUsage = new UserAiUsage();
|
feat: add api key auth, devii agent, openai gateway, and admin service management
This commit introduces a comprehensive set of new features including API key authentication with CLI management commands (get, reset, backfill), a Devii agentic assistant with WebSocket terminal and session bootstrap, an OpenAI-compatible LLM gateway service, and an admin service management panel. It also adds Playwright browser automation for bot support, configures internal gateway URLs, refactors content editing/deletion to support JSON API responses, and updates documentation across AGENTS.md, README.md, and the developer docs site.
2026-06-08 17:38:33 +02:00
|
|
|
this.tabs = new Tabs();
|
2026-06-09 16:06:02 +02:00
|
|
|
this.windows = new WindowManager();
|
|
|
|
|
this.containerTerminals = new ContainerTerminalManager();
|
feat: add api key auth, devii agent, openai gateway, and admin service management
This commit introduces a comprehensive set of new features including API key authentication with CLI management commands (get, reset, backfill), a Devii agentic assistant with WebSocket terminal and session bootstrap, an OpenAI-compatible LLM gateway service, and an admin service management panel. It also adds Playwright browser automation for bot support, configures internal gateway URLs, refactors content editing/deletion to support JSON API responses, and updates documentation across AGENTS.md, README.md, and the developer docs site.
2026-06-08 17:38:33 +02:00
|
|
|
this.devii = new DeviiTerminal();
|
2026-06-09 01:32:57 +02:00
|
|
|
this.zipDownloader = new ZipDownloader();
|
2026-06-09 16:06:02 +02:00
|
|
|
this.projectForker = new ProjectForker();
|
2026-05-10 09:08:12 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const app = new Application();
|
2026-05-12 15:07:34 +02:00
|
|
|
window.app = app;
|
2026-06-09 16:06:02 +02:00
|
|
|
app.containerTerminals.restore();
|