Compare commits

82 Commits

Author SHA1 Message Date
“ydy0615” 5e25801509 feat: add InTEX iOS project and refresh agent guide 2026-06-27 22:28:01 +08:00
“ydy0615” 23bfca51e4 feat: sync full-stack Docker runtime and UI 2026-06-27 22:22:42 +08:00
“ydy0615” 356108e792 feat: add video OCR/ASR, DOCX/PDF export, input block and risk config updates
- Video pipeline: video file OCR via VLM plus audio track ASR, integrated
  into job_handlers with progress emit per phase. New media_utils.py for
  audio extraction from video files.
- Document export: richExport.js replaces inline docx builder; DOCX and PDF
  export buttons are now enabled in MilkdownEditor. File size limit raised to
  100 MB.
- Input block: new InputBlockCrepe.vue component with inputBlockPlugin.ts
  and inputBlock.js for custom user-input nodes in the editor.
- Risk config: added Vite dev server ports (5173) to CORS allowlist and
  increased OCR max input from 10 MB to 100 MB.
- TTS/ASR refactor: simplified tts_asr.py model loading and warmup logic.
- Test coverage: updated tests for llm, main endpoints, pro completions and
  web search modules.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-18 16:32:31 +08:00
“ydy0615” 4813196b0a feat: update AGENTS.md with new components and API details; enhance FileContent.vue with Plyr video support; add VideoPlayer.vue for video playback; improve MilkdownEditor.vue for video file handling; refine TTSPlayer.vue volume controls; optimize settings store for localStorage; implement video upload support in uploadBlock.js; create utility functions for Plyr player management. 2026-06-13 11:03:40 +08:00
“ydy0615” 2283020e51 Refactor and enhance OCR and API functionalities
- Removed obsolete unit tests for TTS/ASR module.
- Deleted unused sample video file.
- Introduced OCRImageWrapper component for better OCR image handling with loading, success, and failure states.
- Updated copilot plugin to improve transaction handling and added new types for better type safety.
- Enhanced web search block plugin to support streaming content updates.
- Refactored API utility functions for better error handling and consistency across requests.
- Added new configuration for OCR API endpoint.
- Consolidated SSE event parsing into a shared utility.
- Created string utility functions to reduce code duplication.
- Removed outdated test documents related to compression functionality.
2026-06-10 14:47:51 +08:00
“ydy0615” 17d211bf93 feat: add web search block functionality and integrate with existing plugins
- Introduced a new web search block plugin to handle web search queries and results.
- Updated copilot, doc block, and pro block plugins to include web search context in AI completions.
- Implemented utility functions for parsing and building web search markdown.
- Enhanced API to support web search requests and responses.
- Added configuration for web search URL and timeout settings.
- Updated size limit checks to account for web search content.
2026-06-09 19:18:14 +08:00
“ydy0615” 5a26dfde2a refactor: 全栈架构升级 - 风险控制、会话管理、审计日志和验证码功能
后端变更:
- 新增 risk_config.py: 风险配置数据类,支持环境变量驱动
- 新增 risk_control.py: 风险控制控制器,管理并发和预算
- 新增 session_store.py: 匿名会话存储,基于 cookie 的 session ID
- 新增 audit_store.py: API 审计日志存储,记录请求和 LLM 调用
- 新增 captcha_api.py: 验证码 API,用于验证用户操作真实性
- 新增 llm_policy.py: LLM 策略配置,管理 completion/pro/vision 模型
- main.py: 集成 middleware、risk/audit/session 模块 (+467/-7)
- job_handlers.py: LLM 执行流程重构,新增 risk/audit 集成 (+207/-4)
- llm.py: 异步客户端封装,新增 max_output_tokens 参数 (+78/-1)
- job_system.py: stream_events 逻辑优化,支持心跳检测 (+12/-4)
- pro_completions.py: SSE heartbeat 机制,防止连接超时 (+14/-4)
- prompt.py: _normalize_preferences 支持 Mapping 类型 (+13/-0)
- tts_asr.py: asyncio loop 初始化,router export (+10/-0)

前端变更:
- src/components/CaptchaComponent.vue: 新增验证码组件 (NEW)
- src/utils/cookie_policy.js: Cookie 策略工具 (NEW)
- SettingsPanel.vue: 集成验证码组件,新增安全设置部分 (+59/-0)
- MilkdownEditor.vue: 移除硬编码 API_KEY,新增 credentials (+32/-10)
- ProBlockCrepe.vue: 样式简化,移除渐变动画 (+18/-4)
- proBlockPlugin.ts: 重构 schema/serializer 引用方式,通过 Ctx 管理 (+40/-10)
- api.js: 新增 credentials,重构 headers 条件逻辑 (+50/-14)
- config.js: API 基址改为 https://api.imageteach.tech:8002 (+8/-4)
- convert.js, docsApi.js, i18n.js: 新增 credentials 和验证码 i18n (+54/-12)
- proAccept.js: 重构正则和转义处理,修复捕获组索引 (+14/-4)

配置和基础设施:
- docker-compose.yml: 新增端口映射 8001:8001 (+2/-0)
- docker/nginx.conf: 改为 307 redirect,优化代理配置 (+8/-6)
- vite.config.js: 移除 proxy 配置,直接调用远程 API (+8/-4)
- .env.example: 新增 VITE_API_BASE_URL, VITE_API_KEY (+3/-1)
- backend/.env.example: 大量 RISK_*, SESSION_*, CORS_* 配置 (+54/-0)
- pytest.ini: 扩展 coverage 范围到整个 backend,移除 fail_under (+3/-2)
- .coveragerc: 移除 fail_under = 90 (+0/-1)
- .gitignore: 新增 docker-data/ (+3/-0)
- package.json: 新增 vue3-captcha 依赖 (+3/-1)
- AGENTS.md, README.md: 更新 Docker 部署和前端网络约定 (+20/-5)
- public/sw.js: Service Worker cache 版本从 v1 升级到 v2 (+0/-1)

测试变更:
- test_main_endpoints.py: 新增 session/risk/audit reset,新增测试用例 (+63/-4)
- test_main_cancel.py: 新增 reset 调用 (+6/-0)
- test_pro_completions.py: 新增 preferences 序列化和测试 (+23/-0)

总计: 45 个文件变更,+1009/-280 行
2026-06-08 11:51:39 +08:00
“ydy0615” b55af1eff0 feat: add Docker support and update backend dependencies
- Introduced `requirements.docker.txt` for Docker-specific dependencies.
- Updated `requirements.txt` to include `psycopg[binary]` and `python-multipart`.
- Enhanced test suite in `test_main_endpoints.py` to cover document CRUD operations.
- Modified `docker-compose.yml` to include PostgreSQL and frontend services.
- Added Nginx configuration for reverse proxying API requests.
- Refactored file handling in Vue components to support new document storage backend.
- Created new utility functions in `docsApi.js` for document management.
- Updated configuration to support new API endpoints for document operations.
- Adjusted Vite configuration to proxy API requests to the local backend.
2026-06-06 17:18:15 +08:00
“ydy0615” 81f711ef0b Migrate backend jobs to Redis Streams 2026-06-06 15:44:00 +08:00
“ydy0615” 2c7a02f587 Enhance LLM functionality with PRO mode support and improved prompt handling
- Added support for PRO mode in LLM with specific instruction handling and context awareness.
- Updated prompt building functions to include prefill options for better context management.
- Introduced new inline examples for PRO mode in JSON format.
- Enhanced system prompts to reflect PRO mode capabilities and rules.
- Modified API endpoints to accommodate new parameters and ensure backward compatibility.
- Improved test cases to validate new functionality and ensure comprehensive coverage.
2026-06-02 21:23:34 +08:00
“ydy0615” b82c6d392d Refactor settings store to rename proModel to proThinking and update related logic; enhance CSS for energy efficiency and reduced motion preferences; improve i18n translations for better clarity and consistency; modify proBlock utility functions for clearer instruction handling; streamline Vite configuration by removing unnecessary Univer.js dependencies. 2026-05-31 16:38:10 +08:00
“ydy0615” 3a1fd1c5d7 fix: pro completions 404 — align PRO_STREAM_URL and cancel endpoint with backend routes 2026-05-31 16:13:11 +08:00
ydy0615 59334e4057 Stabilize pro editing without heavy office runtime
The workspace now carries the pro editing flow, streaming completion path, and lighter Office preview state as one checkpoint so the remote has the current runnable project shape.

Constraint: Preserve the current workspace as a single reviewable project commit while excluding local agent state and verification artifacts. Removed stale Univer runtime dependencies from the lockfile so installs match package.json.

Rejected: Commit runtime screenshots, .omx state, and coverage files | they are local artifacts rather than source state.

Confidence: medium

Scope-risk: broad

Directive: Keep package.json and package-lock.json synchronized when changing frontend dependencies.

Tested: npm run build; C:\Users\ydy\.conda\envs\llmwebsite\python.exe -m pytest backend/tests/test_main_endpoints.py backend/tests/test_main_cancel.py backend/tests/test_llm.py backend/tests/test_llm_extended.py -v -o addopts= (44 passed).

Not-tested: Full pytest with repository coverage addopts currently reports 0% coverage because pytest-cov watches backend.* module names while tests import top-level backend modules.

Co-authored-by: OmX <omx@oh-my-codex.dev>
2026-05-24 23:30:32 +08:00
ydy0615 6dc9933853 refactor: remove FFmpeg dependencies and related video processing logic
- Deleted FFmpeg related packages from package.json and package-lock.json.
- Removed video transcoding and editing functionalities from FileContent.vue.
- Simplified video handling logic and error management in FileContent.vue.
- Added a clear button in MilkdownEditor.vue for clearing the editor content.
- Enhanced UniverPreview.vue to clear detached popups and mount nodes on destroy.
- Updated docBlockPlugin.ts to improve context handling for document blocks.
- Cleaned up vite.config.js by removing cross-origin isolation headers.
2026-05-03 19:14:55 +08:00
ydy0615 477f090dfa refactor: improve markdown sanitization by collapsing excessive newlines 2026-05-01 20:55:19 +08:00
ydy0615 70152c61b1 feat: enhance Milkdown editor and file system functionality
- Normalize line endings in Markdown export for DOCX files.
- Improve selection serialization to Markdown with better handling of empty documents.
- Add a new `updateFile` function to the file system for updating file properties.
- Introduce video transcoding capabilities using FFmpeg, supporting various video formats.
- Update AGENTS.md for clearer plugin structure and responsibilities.
- Add scoped styles for TreeNodeItem component to improve UI consistency.
- Implement cross-origin isolation headers in Vite configuration for enhanced security.
- Remove obsolete test_cross.py file.
2026-05-01 20:55:02 +08:00
ydy0615 52ade88840 modified: src/components/TTSPlayer.vue 2026-04-12 11:42:22 +08:00
ydy0615 e0054d4cbc refactor(tts): use numpy and proper temp file cleanup for WAV encoding
Update WAV encoding logic to convert audio to a NumPy array, employ a
temporary file for safe write with soundfile, and ensure cleanup in a
finally block. This resolves the BytesIO limitation and improves the
reliability of the TTS endpoint.
2026-04-11 10:33:46 +08:00
ydy0615 ae0d53e295 fix(tts): use temporary file for WAV encoding to avoid BytesIO limitation
fix(UniverPreview): update error messages and hints for document loading
2026-04-11 10:21:22 +08:00
ydy0615 f99acf5d50 feat(core): add ModelScope support for TTS and new office load status
Add support to download and load TTS model from ModelScope, with a fallback to the HuggingFace mirror.
Implement a `documentLoadStatus` property and helper functions in `office.js` to track file loading state.
Improve request cancellation logic in `api.js`, ensuring proper cancel URL resolution and request‑id handling.

These changes enhance robustness, reduce external dependencies, and provide better UX for office file handling.
2026-04-11 10:04:34 +08:00
ydy0615 d8b7832b14 refactor: improve codebase structure and Univer integration
- Add AGENTS.md knowledge base with project documentation
- Move UserPreferences model to separate models.py file
- Extract API_KEY to environment variable for security
- Enhance Univer Editor with PPTX support and improved UI
- Improve file system handling with binary file detection
- Add HF_ENDPOINT mirror for better China connectivity
- Clean up unused imports and code structure
2026-04-11 09:24:14 +08:00
ydy0615 2fdc996af9 test(backend): add comprehensive test coverage for backend modules
Added a new `.coveragerc` file configuring coverage thresholds and exclusions.
Included `pytest.ini` to enable coverage reporting for multiple backend modules (`main`, `llm`, `prompt`, `geoip`, `tts_asr`) with a 90 % fail‑under requirement and detailed HTML output.
Implemented a suite of unit tests:

* `test_geoip.py` – validates geo‑location lookup logic.
* `test_llm_extended.py` – tests LLm response extraction and Ollama interactions.
* `test_main_endpoints.py` – covers API endpoints for completions, OCR, and TTS.
* `test_prompt_extended.py` – verifies language sanitization, timestamp generation, and prompt building.
* `test_tts_asr_coverage.py` – checks device detection, cache clearing, and model loading under various environment configurations.
* `test_tts_asr_extended.py` – further tests TTS/ASR device selection and time‑outs.

Updated `backend/requirements.txt` to use newer, compatible packages, removed obsolete testing dependencies, and added `qwen-tts`.
Modified `backend/tts_asr.py` to work with the new `Qwen3TTSModel`, simplified imports, and adjusted device mapping logic.

Additionally, frontend changes added a new `TreeNodeItem` component, updated Markdown rendering, added TTS instruction fields, and reworked context menu handling.

No breaking changes were introduced.
2026-04-07 23:38:23 +08:00
ydy0615 bece7be267 refactor(frontend): improve API and component handling
优化文件内容组件和API工具函数,改进错误处理和配置管理。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-07 12:47:16 +08:00
ydy0615 538f3e227a test: improve test coverage for backend modules
优化测试用例以提高后端模块的测试覆盖率,调整测试断言和异常处理。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-07 12:46:56 +08:00
ydy0615 46494d2089 docs: update API performance report
更新API性能基准测试报告,反映最新的测试结果和错误状态。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-07 12:46:45 +08:00
ydy0615 12ae077ac7 refactor(frontend): adopt GitHub-style file tree design
统一采用GitHub风格的UI设计:文件树标题改为'Code',调整缩进和悬停样式,移除视图切换按钮,使用GitHub配色变量。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-07 12:46:00 +08:00
ydy0615 e5fcde6940 chore(backend): add test dependencies to requirements
添加 pytest、pytest-cov 和 pytest-asyncio 作为测试依赖项。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-07 12:45:06 +08:00
ydy0615 b2b1c87822 refactor(backend): add pragma marks for coverage exclusion
为无需测试覆盖的函数添加 # pragma: no cover 注释,包括启动事件、TTS/ASR加载器和API密钥验证等。

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-04-07 12:43:22 +08:00
“ydy0615” caf1ac1c01 refactor: replace Kokoro-82M with suno/bark for TTS, update HF cache path, and add model warmup on startup. 2026-04-06 13:40:41 +08:00
ydy0615 7985fe9641 feat(tts): add api endpoints and optimization for apple silicon
Introduce a comprehensive TTS/ASR module that:
- Adds /v1/tts-asr/config, /status, /warmup, /tts, /asr endpoints with detailed JSON responses
- Implements Apple‑Silicon detection, device selection (MPS/CUDA/CPU), and memory limiting logic
- Supports selectable model size, quantization, and offline mode via environment variables
- Adds robust audio validation and multi‑path resampling fallback
- Provides new README sections for API usage, device detection, and performance benchmarking
- Includes a full testing suite: unit tests, integration tests, macOS simulation and performance reports
- Updates backend dependencies and CI scripts
- Adds new front‑end views and components for Univer editor integration

All changes are backward compatible; new features are exposed through environment variables and new API routes.
2026-04-06 11:14:09 +08:00
ydy0615 c70cb2a9f0 refactor(ui): add context menu and file content viewer to Docs view
Introduce ContextMenu.vue and FileContent.vue components for interactive file operations
and file preview.

Update FileTree to support root drop, integrate the new components into DocsView,
and refresh i18n strings for file actions.

Refactor MilkdownEditor to embed TTS menu and player.
2026-04-05 23:30:01 +08:00
ydy0615 01b132266a feat(ui): add file explorer, TTS UI, views and routing
Add a file tree UI and corresponding composable for local file management.
Introduce TTS menu and player components for voice synthesis integration.
Add new EditorView and DocsView routes and update SettingsPanel view switching.
Enhance Mermaid plugin with improved styling and action buttons.
2026-04-05 23:22:00 +08:00
ydy0615 818baa349a modified: backend/llm.py
modified:   src/components/MilkdownEditor.vue
	modified:   src/utils/config.js
	modified:   src/utils/i18n.js
2026-04-05 15:10:23 +08:00
ydy0615 9293d48c1b modified: src/components/SettingsPanel.vue 2026-04-05 14:14:21 +08:00
ydy0615 68ed783d6c feat: LLM 应用网页开发及内联建议功能实现 2026-04-05 13:42:29 +08:00
ydy0615 9904b9bd78 feat: 批量上传支持及prompt优化
- 支持多文件批量上传,一次最多10个
- 新增json/toml/yaml格式支持
- 优化inline补全prompt结构,增加边界决策指南
- size计算包含doc_block内容长度
- 超限时显示警告tooltip
2026-04-05 11:40:56 +08:00
ydy0615 7ed199aaf1 style: 简化文档卡片样式,优化布局间距 2026-04-05 10:16:16 +08:00
ydy0615 9ff51ac2f3 feat(plugin): add document export, doc‑block, and TTS/ASR support
Adds a DocBlock component that renders embedded documents, new export buttons for DOCX
and PDF, and updates the file‑upload picker to accept *.txt, *.docx, *.pptx, and *.pdf.
Introduces a DOCX→PDF conversion bridge in the backend and new /tts and /asr
endpoints that expose TTS and speech‑recognition functionality.  The README is
rewritten to describe the new features and clean up legacy documentation.  All
changes are backward‑compatible and do not introduce breaking API changes.
2026-04-04 23:56:18 +08:00
ydy0615 be4000b774 chore: 更新项目配置和依赖,优化前后端代码 2026-04-04 20:05:40 +08:00
ydy0615 ef162de168 modified: backend/requirements.txt 2026-03-14 20:48:44 +08:00
ydy0615 1155de4867 feat(MilkdownEditor): add file upload support for documents and text files
Added new upload functionality to the editor supporting doc/docx/ppt/pptx/pdf/zip/txt/json files. Includes:
- New upload button with file input
- File type detection utilities (isTextFile, isConvertibleFile)
- Initial markdown sync with trailing whitespace normalization
- Warning messages for unsupported file types
2026-03-14 19:24:15 +08:00
ydy0615 d452d1747e feat: add language synonym mapping and canonicalization
Add LANGUAGE_SYNONYMS dictionary to map language aliases to canonical IDs,
_canonical_language_id() to normalize language identifiers, and
_language_guidance() to provide language-specific instructions for LLM
code generation. This improves language detection and ensures consistent
prompt context across different language format variations.
2026-03-14 18:20:39 +08:00
ydy0615 c0d4bf8b2b chore: remove unnecessary comments and suppress error logging 2026-03-10 23:26:18 +08:00
ydy0615 8d89c2a0f6 Merge remote changes with local modifications
- Add docx and html2pdf.js export functionality (from remote)
- Update backend with new API endpoints
- Sync local configuration changes
2026-03-10 23:10:11 +08:00
ydy0615 2ad57887cd feat: add docx and html2pdf.js for document export functionality 2026-03-10 22:21:11 +08:00
ydy0615 637456ee34 feat(api): add completion request cancellation and mermaid rendering
Add support for cancelling in-progress LLM completion requests via new /v1/completions/cancel endpoint with task tracking. Implement mermaid diagram rendering in the Milkdown editor with a new mermaidPlugin. Update copilotPlugin to properly abort requests with descriptive reasons. Refactor settings panel to handle system theme changes reactively. Add camera capture support for image uploads.
2026-02-25 19:00:17 +08:00
ydy0615 e28125079c feat(api): add system prompt support for LLM completion
Separate prompt generation into system and user prompts for better LLM instruction following. Backend now builds a detailed system prompt with constraints for math formatting, code block handling, boundary newlines, and OCR safety, while user prompt contains context and completion state flags. Added corresponding tests for both modules.
2026-02-23 15:17:36 +08:00
ydy0615 ce0731c2f2 feat(api): allow X-API-Key and X-Client-IP headers in CORS configuration 2026-02-19 20:26:56 +08:00
ydy0615 e77f69c5c4 chore(config): update default API base URL to production endpoint 2026-02-19 20:15:28 +08:00
ydy0615 5434f3eb47 fix(backend): rename thinking parameter to think for Ollama API compatibility
The Ollama API expects "think" parameter instead of "thinking". Also updates the API base URL in the frontend configuration to point to the correct endpoint.
2026-02-19 18:55:49 +08:00
ydy0615 4a979ba7c3 feat(api): add API key authentication to backend endpoints
Add API key security using fastapi.security.APIKeyHeader to protect /v1/completions and /v1/ocr endpoints. Updated frontend to include X-API-Key header in API requests. Also changed default API base URL from http://149.104.29.239:8001 to https://api.learnteach.tech:8002.
2026-02-19 18:18:47 +08:00
ydy0615 4fe4becdd5 fix(backend): filter out <br> tags from prompt context
Filter out potential web-scraping or legacy artifacts like <br>, <br/>, <br\> from prefix/suffix before using in model completion context
2026-02-19 11:14:43 +08:00
ydy0615 065b4ac319 feat(llm): add thinking parameter support for Ollama API calls
Add optional thinking parameter to the call_ollama function and pass it from the request. Also enhance timezone handling in prompt generation to support configurable timezone preferences.
2026-02-19 10:34:31 +08:00
ydy0615 aa6133e3ed feat: add privacy mode, thinking levels, PWA support, and i18n
- Add privacy mode to hide IP and user preferences from AI requests
- Add model thinking levels (low/medium/high) for context analysis depth
- Add PWA support with service worker, manifest, and app icons
- Add SettingsPanel for user preferences (theme, background, language)
- Add i18n translations for en/zh/ja/ko/de/fr
- Add Pinia store for centralized settings management
- Update backend to support user preferences and thinking levels
- Update config to use absolute API URLs
2026-02-19 10:22:27 +08:00
ydy0615 d2b64ad5d6 feat: add IP geolocation tracking and include location in prompts
- Add GeoLite2-City.mmdb database for IP lookup
- Create geoip.py module for IP location services
- Extract client IP from requests and log location info
- Pass location context to LLM prompts for enhanced responses
2026-02-18 08:59:28 +08:00
ydy0615 2b79f20e19 chore(config): update default Ollama model to gpt-oss:120b
Remove obsolete planning documents that are no longer needed:
- copilot-prompt-system-analysis.md
- ghost-text-markdown-rendering.md
- image-button-plan.md
- image-processing-plan.md
- refactor-backend.md
2026-02-17 09:27:21 +08:00
ydy0615 d9418fac98 refactor(copilot): simplify ghost mark addition by removing conditional check
Remove the mark type allowance validation and apply ghost marks directly
to text nodes within the specified range.
2026-02-16 22:58:11 +08:00
ydy0615 0d25f4d1ef Remove unused test files and tokenization modules
- Deleted `windowDelineation.test.ts` as it is no longer needed.
- Removed `index.ts` and `tokenizer.ts` from the tokenization module due to refactoring.
- Eliminated unused types related to authentication, code citation, context provider API, and core functionalities.
- Cleaned up the `status.ts` file by removing the `StatusKind` type definition.
2026-02-16 22:49:32 +08:00
“ydy0615” 71a71530a3 feat(ui): update editor welcome message to Chinese 2026-02-16 09:05:43 +08:00
“ydy0615” 9b37ca42d6 chore: remove env files and update gitignore for python
Remove sensitive environment files from repository tracking and add comprehensive Python ignore patterns including virtual environments, cache files, and environment variables. Also clean up staged __pycache__ binary files.
2026-02-16 09:01:08 +08:00
ydy0615 075eded2ba modified: .env
modified:   .env.example
2026-02-15 23:32:04 +08:00
ydy0615 eb6e8bbfff refactor(config): use Vite proxy for API requests and change backend port
- Configure Vite dev server to proxy /v1 requests to backend
- Change backend port from 8000 to 8001
- Simplify API URLs to relative paths instead of absolute localhost URLs
- Increase debounce delay from 500ms to 1000ms for better stability
- Update README documentation to reflect all changes
2026-02-15 23:23:00 +08:00
ydy0615 1e58c18bbc feat: add image hash-based OCR caching with 100MB size limit
- Implement SHA-256 image hashing to cache OCR results and avoid re-processing identical images
- Add 100MB file size limit for image uploads with user-friendly error messages
- Clear ghost suggestions when uploading new images to prevent interference
- Optimize size limit calculation in copilot plugin to include OCR context
- Remove debug logging from production code
- Add image processing optimization plan document

BREAKING CHANGE: Image upload size limit is now enforced at 100MB (previously unlimited)
2026-02-15 22:17:37 +08:00
ydy0615 190bb2b756 feat(ui): enhance theme toggle styling and add Chinese localization
- Redesign theme toggle with improved visual effects including gradient overlays, enhanced shadows, and smoother cubic-bezier transitions
- Update toggle dimensions and icon positioning for better visual balance
- Add SVG filter effects for sun/moon icons in dark mode
- Replace English UI text with Chinese localization in MilkdownEditor
- Refactor copilotPlugin by removing unused decoration functions and improving ghost mark text node handling
2026-02-15 18:24:34 +08:00
ydy0615 838eec30a8 feat: add theme management with light and dark modes
- Implemented a new composable `useTheme` for managing theme state.
- Added functions to read and write theme preference to local storage.
- Applied theme styles to the DOM based on user preference.
- Introduced a toggle function to switch between light and dark themes.

refactor: enhance copilot plugin functionality

- Improved request handling with sequence and document versioning.
- Refactored ghost text handling to improve clarity and efficiency.
- Updated markdown insertion logic to handle parsed content more robustly.
- Enhanced error handling and logging for better debugging.

style: update global styles for light and dark themes

- Defined CSS variables for light and dark themes to streamline styling.
- Improved overall styling consistency and responsiveness.
- Added transitions for smoother theme changes and interactions.
2026-02-15 15:44:09 +08:00
ydy0615 03bb21d5c6 feat(copilot): enhance OCR handling with inline tags and document serializer
- Replace HTML comment OCR metadata with inline `<OCR:...>` tags
- Implement serializer-based markdown conversion for prefix/suffix content
- Add extractTextFromOCR utility function for text extraction
- Enable Table, Diagram, and ListCheck features in MilkdownEditor
- Add periodic debug logging for document state analysis
2026-02-14 23:53:26 +08:00
“ydy0615” 794fbf8493 feat(config): add OCR URL configuration and improve image node handling
- Add VITE_OCR_URL environment variable with fallback URL construction
- Define IMAGE_NODE_TYPES constant to support 'image', 'image-block', and 'imageBlock' node types
- Add helper functions for safer image attribute access (getImageSrc, isImageNodeWithSrc, getImageLabel)
- Improve OCR error handling with HTTP status checking and error details
- Wrap OCR context in HTML comments to prevent prompt injection issues
- Update MilkdownEditor to use centralized OCR_URL configuration
2026-02-14 21:21:06 +08:00
“ydy0615” 64cfa58376 feat(editor): add image insertion with OCR support and size limit handling
Add image button with dropdown menu for uploading local images or inserting from URL.
Integrate VLM-based OCR to extract text context from images and include in AI suggestions.
Implement document size limits to disable AI when exceeding threshold.
Refactor copilot plugin with per-view runtime state and OCR context injection.
Add OCR cache utility for managing image metadata.
Add code splitting configuration for optimized bundle size.
2026-02-14 18:28:37 +08:00
“ydy0615” c64ff7be45 feat(copilot): enhance prompt system and add Markdown rendering for ghost text
- Rewrite prompt builder with comprehensive rules for seamless text completion
- Implement Markdown parsing for ghost text with proper mark handling
- Update LLM parameters (temperature 0.7, repeat_penalty, think mode)
- Add CSS styles for formatted ghost text elements
- Add planning documentation for Copilot prompt system analysis
2026-02-13 22:00:26 +08:00
“ydy0615” 7cddfaba30 feat(editor): add Markdown rendering for ghost text and optimize prompt system
- Implement Markdown parsing for ghost text using Milkdown parser
- Add support for both block and inline content in ghost text
- Refactor prompt system with comprehensive rules and examples
- Adjust LLM parameters: increase temperature to 0.7, add repeat_penalty
- Add CSS styles for formatted ghost text (bold, italic, code, links)
- Add documentation for Copilot prompt system and ghost text rendering
2026-02-13 21:17:45 +08:00
“ydy0615” 65d4a57d33 refactor(editor): migrate to ProseMirror Mark-based ghost text system
- Replace overlay-based GhostTextOverlay.vue with ProseMirror Mark system
- Add AI toggle button with enable/disable functionality
- Implement new copilotPlugin.ts using copilotGhostMark for inline suggestions
- Fix cursor position offset in prompt.py by moving first suffix char to prefix
- Improve API error handling with abort signal support and debug logging
- Update model configuration from gpt-oss:120b to gpt-oss:20b
- Add button tooltips and improve editor styling
- Remove deprecated inlineSuggestionPlugin.ts
- Update README with new architecture diagram and feature documentation
2026-02-13 09:24:50 +08:00
“ydy0615” 16e76e1e90 refactor(editor): migrate to Milkdown with LaTeX support and clean up legacy code
- Removed old contenteditable-based MarkdownEditor component
- Integrated Milkdown Crepe with LaTeX (KaTeX) rendering support
- Simplified inline suggestion plugin using ProseMirror decorations
- Removed debug logging and unused components (HelloWorld, plan files)
- Increased debounce from 150ms to 500ms for better performance
- Fixed SSE JSON serialization in backend main.py
2026-02-12 18:52:16 +08:00
“ydy0615” 2432e78fe1 feat(editor): add file upload and fix critical bugs
- Add markdown file upload functionality with upload button
- Fix error handling to throw errors instead of silently returning empty strings
- Fix memory leak by cleaning up debounceTimer in onUnmounted
- Update debounce timing from 150ms to 500ms for stability
- Enhance UI with floating action buttons and extensive style refinements
- Hide toolbar, menu, and line number elements for cleaner interface
2026-02-12 08:55:37 +08:00
ydy0615 c2c87d24bf style(editor): remove max-width limit on editor content
Allows the markdown editor to expand to full width instead of being constrained
to 900px, providing better use of available screen real estate.
2026-02-07 13:00:24 +08:00
ydy0615 370510cc50 feat(editor): add inline autocomplete suggestions
Add GhostTextOverlay component for displaying AI-powered completion
suggestions while typing. Includes accept and dismiss actions triggered
by API calls to /v1/completions endpoint with prefix/suffix context.
2026-02-07 11:46:03 +08:00
ydy0615 2abf276d10 feat: switch from OpenAI API to native Ollama Python client
This commit refactors the LLM integration to use Ollama's native Python client instead of OpenAI-compatible API, while fixing critical template syntax errors and improving project structure.

Key changes:
- Replace openai package with ollama package in backend requirements
- Rewrite llm.py to use ollama.AsyncClient for direct Ollama API calls
- Update main.py to use non-streaming Ollama responses with thinking extraction
- Fix template syntax error in MilkdownEditor.vue (GhostTextOverlay component tags)
- Fix string截取错误 by using slice() instead of substring()
- Add src/utils/api.js and src/utils/config.js for shared configuration
- Add CORS middleware to FastAPI backend
- Update prompt.py with clearer instructions for continuation generation
- Add comprehensive README.md documentation

BREAKING CHANGE: Environment variables OLLAMA_BASE_URL changed to OLLAMA_HOST (remove /v1/ suffix)
2026-02-07 09:10:26 +08:00
ydy0615 5f00e71ceb feat: enhance logging and error handling in backend and editor components 2026-01-25 13:29:11 +08:00
ydy0615 bf7dec86ab modified: .kilocode/rules/rules.md 2026-01-18 22:11:00 +08:00
ydy0615 f35049ac0b modified: backend/.env
modified:   src/components/MilkdownEditor.vue
2026-01-18 21:31:27 +08:00
ydy0615 6102f905ee feat: implement inline autocomplete suggestions with FastAPI backend and Milkdown editor integration 2026-01-18 19:42:58 +08:00
ydy0615 ba49f82953 Add tokenization and context provider API types
- Implemented window delineation tests for indentation-based tokenization.
- Created tokenizer module with various tokenization strategies including TTokenizer and ApproximateTokenizer.
- Added type definitions for authentication parameters and code citation notifications.
- Introduced context provider API for extensions to supply additional context items to Copilot.
- Defined core types and schemas for position and range.
- Established status types for agent status management in IDEs.
2026-01-18 10:24:32 +08:00
ydy0615 55c1b180f7 feat(editor): implement WYSIWYG Markdown editor using Milkdown Crepe
Replace the existing contenteditable-based markdown editor with a full-featured WYSIWYG editor using @milkdown/crepe. The new implementation provides:
- True WYSIWYG editing experience with instant Markdown syntax rendering
- Slash command menu support for quick formatting
- Code block highlighting and image paste support
- Built-in export to markdown file functionality

Changes include new MilkdownEditor component, updated App.vue integration, theme styling imports, and optimized Vite configuration for the new dependencies.
2026-01-18 09:08:38 +08:00
749 changed files with 98834 additions and 126454 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{p as n}from"./vendor-lezer-cpp-DwXC8bac.js";import{L as o,c as a,d as r,f as i,e as t,h as p,j as m,k as s}from"./cm-language-CDsY7zq0.js";import"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-common-tVQBIsvN.js";import"./vendor-lezer-highlight-DuEf3ZFH.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const d=o.define({name:"cpp",parser:n.configure({props:[r.add({IfStatement:t({except:/^\s*({|else\b)/}),TryStatement:t({except:/^\s*({|catch)\b/}),LabeledStatement:m,CaseStatement:e=>e.baseIndent+e.unit,BlockComment:()=>null,CompoundStatement:p({closing:"}"}),Statement:t({except:/^{/})}),i.add({"DeclarationList CompoundStatement EnumeratorList FieldDeclarationList InitializerList":s,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\})$/,closeBrackets:{stringPrefixes:["L","u","U","u8","LR","UR","uR","u8R","R"]}}});function C(){return new a(d)}export{C as cpp,d as cppLanguage};
File diff suppressed because one or more lines are too long
@@ -0,0 +1,7 @@
import{p as b}from"./vendor-lezer-go-BPzsaeno.js";import{L as w,c as S,d as g,f as h,e as m,h as I,j as C,k as L,s as D}from"./cm-language-CDsY7zq0.js";import{s as o,i as B,c as v}from"./cm-autocomplete-t9rzw_D0.js";import{a as N,I as F}from"./vendor-lezer-common-tVQBIsvN.js";import"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-highlight-DuEf3ZFH.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const T=[o("func ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"declaration",type:"keyword"}),o("func (${receiver}) ${name}(${params}) ${type} {\n ${}\n}",{label:"func",detail:"method declaration",type:"keyword"}),o("var ${name} = ${value}",{label:"var",detail:"declaration",type:"keyword"}),o("type ${name} ${type}",{label:"type",detail:"declaration",type:"keyword"}),o("const ${name} = ${value}",{label:"const",detail:"declaration",type:"keyword"}),o("type ${name} = ${type}",{label:"type",detail:"alias declaration",type:"keyword"}),o("for ${init}; ${test}; ${update} {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),o("for ${i} := range ${value} {\n ${}\n}",{label:"for",detail:"range",type:"keyword"}),o(`select {
\${}
}`,{label:"select",detail:"statement",type:"keyword"}),o("case ${}:\n${}",{label:"case",type:"keyword"}),o("switch ${} {\n ${}\n}",{label:"switch",detail:"statement",type:"keyword"}),o("switch ${}.(${type}) {\n ${}\n}",{label:"switch",detail:"type statement",type:"keyword"}),o("if ${} {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),o(`if \${} {
\${}
} else {
\${}
}`,{label:"if",detail:"/ else block",type:"keyword"}),o('import ${name} "${module}"\n${}',{label:"import",detail:"declaration",type:"keyword"})],f=new N,u=new Set(["SourceFile","Block","FunctionDecl","MethodDecl","FunctionLiteral","ForStatement","SwitchStatement","TypeSwitchStatement","IfStatement"]);function s(e,a){return(r,l)=>{e:for(let t=r.node.firstChild,c=0,n=null;;){for(;!t;){if(!c)break e;c--,t=n.nextSibling,n=n.parent}a&&t.name==a||t.name=="SpecList"?(c++,n=t,t=t.firstChild):(t.name=="DefName"&&l(t,e),t=t.nextSibling)}return!0}}const x={FunctionDecl:s("function"),VarDecl:s("var","VarSpec"),ConstDecl:s("constant","ConstSpec"),TypeDecl:s("type","TypeSpec"),ImportDecl:s("constant","ImportSpec"),Parameter:s("var"),__proto__:null};function y(e,a){let r=f.get(a);if(r)return r;let l=[],t=!0;function c(n,i){let k=e.sliceString(n.from,n.to);l.push({label:k,type:i})}return a.cursor(F.IncludeAnonymous).iterate(n=>{if(t)t=!1;else if(n.name){let i=x[n.name];if(i&&i(n,c)||u.has(n.name))return!1}else if(n.to-n.from>8192){for(let i of y(e,n.node))l.push(i);return!1}}),f.set(a,l),l}const d=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,$=["String","LineComment","BlockComment","DefName","LabelName","FieldName",".","?."],V=e=>{let a=D(e.state).resolveInner(e.pos,-1);if($.indexOf(a.name)>-1)return null;let r=a.name=="VariableName"||a.to-a.from<20&&d.test(e.state.sliceDoc(a.from,a.to));if(!r&&!e.explicit)return null;let l=[];for(let t=a;t;t=t.parent)u.has(t.name)&&(l=l.concat(y(e.state.doc,t)));return{options:l,from:r?a.from:e.pos,validFor:d}},p=w.define({name:"go",parser:b.configure({props:[g.add({IfStatement:m({except:/^\s*({|else\b)/}),LabeledStatement:C,"SwitchBlock SelectBlock":e=>{let a=e.textAfter,r=/^\s*\}/.test(a),l=/^\s*(case|default)\b/.test(a);return e.baseIndent+(r||l?0:e.unit)},Block:I({closing:"}"}),BlockComment:()=>null,Statement:m({except:/^{/})}),h.add({"Block SwitchBlock SelectBlock LiteralValue InterfaceType StructType SpecList":L,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case\b|default\b|\})$/}});let _=e=>({label:e,type:"keyword"});const M="interface struct chan map package go return break continue goto fallthrough else defer range true false nil".split(" ").map(_);function K(){let e=T.concat(M);return new S(p,[p.data.of({autocomplete:B($,v(e))}),p.data.of({autocomplete:V})])}export{K as go,p as goLanguage,V as localCompletionSource,T as snippets};
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{p as r}from"./vendor-lezer-java-B1EJhELL.js";import{L as s,c as i,d as l,f as d,e as t,h as m,j as p,k as c}from"./cm-language-CDsY7zq0.js";import"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-common-tVQBIsvN.js";import"./vendor-lezer-highlight-DuEf3ZFH.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const u=s.define({name:"java",parser:r.configure({props:[l.add({IfStatement:t({except:/^\s*({|else\b)/}),TryStatement:t({except:/^\s*({|catch|finally)\b/}),LabeledStatement:p,SwitchBlock:e=>{let a=e.textAfter,o=/^\s*\}/.test(a),n=/^\s*(case|default)\b/.test(a);return e.baseIndent+(o?0:n?1:2)*e.unit},Block:m({closing:"}"}),BlockComment:()=>null,Statement:t({except:/^{/})}),d.add({"Block SwitchBlock ClassBody ElementValueArrayInitializer ModuleBody EnumBody ConstructorBody InterfaceBody ArrayInitializer":c,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\})$/}});function j(){return new i(u)}export{j as java,u as javaLanguage};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{p as o}from"./vendor-lezer-json-DDnhoYFs.js";import{L as a,c as s,d as i,f as p,e as n,k as m}from"./cm-language-CDsY7zq0.js";import"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-common-tVQBIsvN.js";import"./vendor-lezer-highlight-DuEf3ZFH.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const S=()=>r=>{try{JSON.parse(r.state.doc.toString())}catch(t){if(!(t instanceof SyntaxError))throw t;const e=c(t,r.state.doc);return[{from:e,message:t.message,severity:"error",to:e}]}return[]};function c(r,t){let e;return(e=r.message.match(/at position (\d+)/))?Math.min(+e[1],t.length):(e=r.message.match(/at line (\d+) column (\d+)/))?Math.min(t.line(+e[1]).from+ +e[2]-1,t.length):0}const d=a.define({name:"json",parser:o.configure({props:[i.add({Object:n({except:/^\s*\}/}),Array:n({except:/^\s*\]/})}),p.add({"Object Array":m})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function b(){return new s(d)}export{b as json,d as jsonLanguage,S as jsonParseLinter};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{p as s}from"./vendor-lezer-php-CJlwwq4M.js";import{p as i}from"./vendor-lezer-common-tVQBIsvN.js";import{html as p}from"./cm-lang-html-BwlfE-a6.js";import{L as l,c as m,d as u,f as d,e as a,h as f,k as c}from"./cm-language-CDsY7zq0.js";import"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-highlight-DuEf3ZFH.js";import"./vendor-lezer-html-D-6QB8dd.js";import"./cm-lang-css-NVaY7c0M.js";import"./vendor-lezer-css-BMlSRxbI.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";import"./cm-lang-javascript-E0JyLAes.js";import"./vendor-lezer-javascript-BsA5KTFy.js";import"./cm-autocomplete-t9rzw_D0.js";const g=l.define({name:"php",parser:s.configure({props:[u.add({IfStatement:a({except:/^\s*({|else\b|elseif\b|endif\b)/}),TryStatement:a({except:/^\s*({|catch\b|finally\b)/}),SwitchBody:e=>{let r=e.textAfter,t=/^\s*\}/.test(r),o=/^\s*(case|default)\b/.test(r);return e.baseIndent+(t?0:o?1:2)*e.unit},ColonBlock:e=>e.baseIndent+e.unit,"Block EnumBody DeclarationList":f({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"String BlockComment":()=>null,Statement:a({except:/^({|end(for|foreach|switch|while)\b)/})}),d.add({"Block EnumBody DeclarationList SwitchBody ArrayExpression ValueList":c,ColonBlock(e){return{from:e.from+1,to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*(?:case |default:|end(?:if|for(?:each)?|switch|while)|else(?:if)?|\{|\})$/,wordChars:"$",closeBrackets:{stringPrefixes:["b","B"]}}});function v(e={}){let r=[],t;if(e.baseLanguage!==null)if(e.baseLanguage)t=e.baseLanguage;else{let o=p({matchClosingTags:!1});r.push(o.support),t=o.language}return new m(g.configure({wrap:t&&i(o=>o.type.isTop?{parser:t.parser,overlay:n=>n.name=="Text"}:null),top:e.plain?"Program":"Template"}),r)}export{v as php,g as phpLanguage};
@@ -0,0 +1,3 @@
import{p as h}from"./vendor-lezer-python-DDPChHKC.js";import{L as S,s as I,c as v,d as k,f as C,h as m,k as $}from"./cm-language-CDsY7zq0.js";import{a as A,I as F}from"./vendor-lezer-common-tVQBIsvN.js";import{i as w,c as N,s}from"./cm-autocomplete-t9rzw_D0.js";import"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-highlight-DuEf3ZFH.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const c=new A,E=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function p(e){return(r,t,n)=>{if(n)return!1;let o=r.node.getChild("VariableName");return o&&t(o,e),!0}}const B={FunctionDefinition:p("function"),ClassDefinition:p("class"),ForStatement(e,r,t){if(t){for(let n=e.node.firstChild;n;n=n.nextSibling)if(n.name=="VariableName")r(n,"variable");else if(n.name=="in")break}},ImportStatement(e,r){var t,n;let{node:o}=e,a=((t=o.firstChild)===null||t===void 0?void 0:t.name)=="from";for(let i=o.getChild("import");i;i=i.nextSibling)i.name=="VariableName"&&((n=i.nextSibling)===null||n===void 0?void 0:n.name)!="as"&&r(i,a?"variable":"namespace")},AssignStatement(e,r){for(let t=e.node.firstChild;t;t=t.nextSibling)if(t.name=="VariableName")r(t,"variable");else if(t.name==":"||t.name=="AssignOp")break},ParamList(e,r){for(let t=null,n=e.node.firstChild;n;n=n.nextSibling)n.name=="VariableName"&&(!t||!/\*|AssignOp/.test(t.name))&&r(n,"variable"),t=n},CapturePattern:p("variable"),AsPattern:p("variable"),__proto__:null};function y(e,r){let t=c.get(r);if(t)return t;let n=[],o=!0;function a(i,l){let _=e.sliceString(i.from,i.to);n.push({label:_,type:l})}return r.cursor(F.IncludeAnonymous).iterate(i=>{if(i.name){let l=B[i.name];if(l&&l(i,a,o)||!o&&E.has(i.name))return!1;o=!1}else if(i.to-i.from>8192){for(let l of y(e,i.node))n.push(l);return!1}}),c.set(r,n),n}const b=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,g=["String","FormatString","Comment","PropertyName"];function x(e){let r=I(e.state).resolveInner(e.pos,-1);if(g.indexOf(r.name)>-1)return null;let t=r.name=="VariableName"||r.to-r.from<20&&b.test(e.state.sliceDoc(r.from,r.to));if(!t&&!e.explicit)return null;let n=[];for(let o=r;o;o=o.parent)E.has(o.name)&&(n=n.concat(y(e.state.doc,o)));return{options:n,from:t?r.from:e.pos,validFor:b}}const D=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(e=>({label:e,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(e=>({label:e,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(e=>({label:e,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(e=>({label:e,type:"function"}))),P=[s("def ${name}(${params}):\n ${}",{label:"def",detail:"function",type:"keyword"}),s("for ${name} in ${collection}:\n ${}",{label:"for",detail:"loop",type:"keyword"}),s("while ${}:\n ${}",{label:"while",detail:"loop",type:"keyword"}),s("try:\n ${}\nexcept ${error}:\n ${}",{label:"try",detail:"/ except block",type:"keyword"}),s(`if \${}:
`,{label:"if",detail:"block",type:"keyword"}),s("if ${}:\n ${}\nelse:\n ${}",{label:"if",detail:"/ else block",type:"keyword"}),s("class ${name}:\n def __init__(self, ${params}):\n ${}",{label:"class",detail:"definition",type:"keyword"}),s("import ${module}",{label:"import",detail:"statement",type:"keyword"}),s("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],W=w(g,N(D.concat(P)));function d(e){let{node:r,pos:t}=e,n=e.lineIndent(t,-1),o=null;for(;;){let a=r.childBefore(t);if(a)if(a.name=="Comment")t=a.from;else if(a.name=="Body"||a.name=="MatchBody")e.baseIndentFor(a)+e.unit<=n&&(o=a),r=a;else if(a.name=="MatchClause")r=a;else if(a.type.is("Statement"))r=a;else break;else break}return o}function f(e,r){let t=e.baseIndentFor(r),n=e.lineAt(e.pos,-1),o=n.from+n.text.length;return/^\s*($|#)/.test(n.text)&&e.node.to<o+100&&!/\S/.test(e.state.sliceDoc(o,e.node.to))&&e.lineIndent(e.pos,-1)<=t||/^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(e.textAfter)&&e.lineIndent(e.pos,-1)>t?null:t+e.unit}const u=S.define({name:"python",parser:h.configure({props:[k.add({Body:e=>{var r;let t=/^\s*(#|$)/.test(e.textAfter)&&d(e)||e.node;return(r=f(e,t))!==null&&r!==void 0?r:e.continue()},MatchBody:e=>{var r;let t=d(e);return(r=f(e,t||e.node))!==null&&r!==void 0?r:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),"ForStatement WhileStatement":e=>/^\s*else:/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except[ :]|finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),MatchStatement:e=>/^\s*case /.test(e.textAfter)?e.baseIndent+e.unit:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":m({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":m({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":m({closing:"]"}),MemberExpression:e=>e.baseIndent+e.unit,"String FormatString":()=>null,Script:e=>{var r;let t=d(e);return(r=t&&f(e,t))!==null&&r!==void 0?r:e.continue()}}),C.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":$,Body:(e,r)=>({from:e.from+1,to:e.to-(e.to==r.doc.length?0:1)}),"String FormatString":(e,r)=>({from:r.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/}});function Z(){return new v(u,[u.data.of({autocomplete:x}),u.data.of({autocomplete:W})])}export{W as globalCompletion,x as localCompletionSource,Z as python,u as pythonLanguage};
@@ -0,0 +1 @@
import{p as o}from"./vendor-lezer-rust-B_ZJVDF1.js";import{L as r,c as i,d as s,f as a,e as n,k as m}from"./cm-language-CDsY7zq0.js";import"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-common-tVQBIsvN.js";import"./vendor-lezer-highlight-DuEf3ZFH.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const p=r.define({name:"rust",parser:o.configure({props:[s.add({IfExpression:n({except:/^\s*({|else\b)/}),"String BlockComment":()=>null,AttributeItem:e=>e.continue(),"Statement MatchArm":n()}),a.add(e=>{if(/(Block|edTokens|List)$/.test(e.name))return m;if(e.name=="BlockComment")return t=>({from:t.from+2,to:t.to-2})})]}),languageData:{commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:\{|\})$/,closeBrackets:{stringPrefixes:["b","r","br"]}}});function B(){return new i(p)}export{B as rust,p as rustLanguage};
@@ -0,0 +1 @@
import{p as n}from"./vendor-lezer-sass-C6Jy1LV-.js";import{L as s,c as i,f as t,d as a,k as m,e as p}from"./cm-language-CDsY7zq0.js";import{defineCSSCompletionSource as d}from"./cm-lang-css-NVaY7c0M.js";import"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-common-tVQBIsvN.js";import"./vendor-lezer-highlight-DuEf3ZFH.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";import"./vendor-lezer-css-BMlSRxbI.js";const e=s.define({name:"sass",parser:n.configure({props:[t.add({Block:m,Comment(o,r){return{from:o.from+2,to:r.sliceDoc(o.to-2,o.to)=="*/"?o.to-2:o.to}}}),a.add({Declaration:p()})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"},line:"//"},indentOnInput:/^\s*\}$/,wordChars:"$-"}}),l=e.configure({dialect:"indented",props:[a.add({"Block RuleSet":o=>o.baseIndent+o.unit}),t.add({Block:o=>({from:o.from,to:o.to})})]}),u=d(o=>o.name=="VariableName"||o.name=="SassVariableName");function w(o){return new i(o?.indented?l:e,e.data.of({autocomplete:u}))}export{w as sass,u as sassCompletionSource,e as sassLanguage};
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{L as s,c as m}from"./cm-language-CDsY7zq0.js";import{html as u}from"./cm-lang-html-BwlfE-a6.js";import{javascriptLanguage as l}from"./cm-lang-javascript-E0JyLAes.js";import{s as b,t as e}from"./vendor-lezer-highlight-DuEf3ZFH.js";import{p as n}from"./vendor-lezer-common-tVQBIsvN.js";import{L as c,a as r}from"./vendor-lezer-lr-eZ5kYecM.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";import"./vendor-lezer-html-D-6QB8dd.js";import"./cm-lang-css-NVaY7c0M.js";import"./vendor-lezer-css-BMlSRxbI.js";import"./vendor-lezer-javascript-BsA5KTFy.js";import"./cm-autocomplete-t9rzw_D0.js";const S=c.deserialize({version:14,states:"%pOVOWOOObQPOOOpOSO'#C_OOOO'#Cp'#CpQVOWOOQxQPOOO!TQQOOQ!YQPOOOOOO,58y,58yO!_OSO,58yOOOO-E6n-E6nO!dQQO'#CqQ{QPOOO!iQPOOQ{QPOOO!qQPOOOOOO1G.e1G.eOOQO,59],59]OOQO-E6o-E6oO!yOpO'#CiO#RO`O'#CiQOQPOOO#ZO#tO'#CmO#fO!bO'#CmOOQO,59T,59TO#qOpO,59TO#vO`O,59TOOOO'#Cr'#CrO#{O#tO,59XOOQO,59X,59XOOOO'#Cs'#CsO$WO!bO,59XOOQO1G.o1G.oOOOO-E6p-E6pOOQO1G.s1G.sOOOO-E6q-E6q",stateData:"$g~OjOS~OQROUROkQO~OWTOXUOZUO`VO~OSXOTWO~OXUO[]OlZO~OY^O~O[_O~OT`O~OYaO~OmcOodO~OmfOogO~O^iOnhO~O_jOphO~ObkOqkOrmO~OcnOsnOtmO~OnpO~OppO~ObkOqkOrrO~OcnOsnOtrO~OWX`~",goto:"!^hPPPiPPPPPPPPPmPPPpPPsy!Q!WTROSRe]Re_QSORYSS[T^Rb[QlfRqlQogRso",nodeNames:"⚠ Content Text Interpolation InterpolationContent }} Entity Attribute VueAttributeName : Identifier @ Is ScriptAttributeValue AttributeScript AttributeScript AttributeName AttributeValue Entity Entity",maxTerm:36,nodeProps:[["isolate",-3,3,13,17,""]],skippedNodes:[0],repeatNodeCount:4,tokenData:"'y~RdXY!aYZ!a]^!apq!ars!rwx!w}!O!|!O!P#t!Q![#y![!]$s!_!`%g!b!c%l!c!}#y#R#S#y#T#j#y#j#k%q#k#o#y%W;'S#y;'S;:j$m<%lO#y~!fSj~XY!aYZ!a]^!apq!a~!wOm~~!|Oo~!b#RX`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|!b#qP;=`<%l!|~#yOl~%W$QXY#t`!b}!O!|!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y%W$pP;=`<%l#y~$zXX~`!b}!O!|!Q![!|![!]!|!c!}!|#R#S!|#T#o!|%W;'S!|;'S;:j#n<%lO!|~%lO[~~%qOZ~%W%xXY#t`!b}!O&e!Q![#y![!]!|!c!}#y#R#S#y#T#o#y%W;'S#y;'S;:j$m<%lO#y!b&jX`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|!b'^XW!b`!b}!O!|!Q![!|![!]!|!c!}'V#R#S!|#T#o'V%W;'S!|;'S;:j#n<%lO!|",tokenizers:[6,7,new r("b~RP#q#rU~XP#q#r[~aOT~~",17,4),new r("!k~RQvwX#o#p!_~^TU~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOU~~![P;=`<%lm~!bP#o#p!e~!jOk~~",72,2),new r("[~RPwxU~ZOp~~",11,15),new r("[~RPrsU~ZOn~~",11,14),new r("!e~RQvwXwx!_~^Tc~Opmq!]m!^;'Sm;'S;=`!X<%lOm~pUOpmq!]m!]!^!S!^;'Sm;'S;=`!X<%lOm~!XOc~~![P;=`<%lm~!dOt~~",66,35),new r("!e~RQrsXvw^~^Or~~cTb~Oprq!]r!^;'Sr;'S;=`!^<%lOr~uUOprq!]r!]!^!X!^;'Sr;'S;=`!^<%lOr~!^Ob~~!aP;=`<%lr~",66,33)],topRules:{Content:[0,1],Attribute:[1,7]},tokenPrec:157}),P=l.parser.configure({top:"SingleExpression"}),o=S.configure({props:[b({Text:e.content,Is:e.definitionOperator,AttributeName:e.attributeName,VueAttributeName:e.keyword,Identifier:e.variableName,"AttributeValue ScriptAttributeValue":e.attributeValue,Entity:e.character,"{{ }}":e.brace,"@ :":e.punctuation})]}),i={parser:P},Q=o.configure({wrap:n((O,t)=>O.name=="InterpolationContent"?i:null)}),g=o.configure({wrap:n((O,t)=>O.name=="AttributeScript"?i:null),top:"Attribute"}),y={parser:Q},R={parser:g},a=u();function p(O){return O.configure({dialect:"selfClosing",wrap:n(X)},"vue")}const T=p(a.language);function X(O,t){switch(O.name){case"Attribute":return/^(@|:|v-)/.test(t.read(O.from,O.from+2))?R:null;case"Text":return y}return null}function N(O={}){let t=a;if(O.base){if(O.base.language.name!="html"||!(O.base.language instanceof s))throw new RangeError("The base option must be the result of calling html(...)");t=O.base}return new m(t.language==a.language?T:p(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:["{",'"']}})])}export{N as vue,T as vueLanguage};
@@ -0,0 +1 @@
import{L as r,c as O,d as t,f as b,h as s,k as a}from"./cm-language-CDsY7zq0.js";import{s as P,t as e}from"./vendor-lezer-highlight-DuEf3ZFH.js";import{L as i}from"./vendor-lezer-lr-eZ5kYecM.js";import"./vendor-lezer-common-tVQBIsvN.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const n={__proto__:null,anyref:34,dataref:34,eqref:34,externref:34,i31ref:34,funcref:34,i8:34,i16:34,i32:34,i64:34,f32:34,f64:34},S=i.deserialize({version:14,states:"!^Q]QPOOOqQPO'#CbOOQO'#Cd'#CdOOQO'#Cl'#ClOOQO'#Ch'#ChQ]QPOOOOQO,58|,58|OxQPO,58|OOQO-E6f-E6fOOQO1G.h1G.h",stateData:"!P~O_OSPOSQOS~OTPOVROXROYROZROaQO~OSUO~P]OSXO~P]O",goto:"xaPPPPPPbPbPPPhPPPrXROPTVQTOQVPTWTVXSOPTV",nodeNames:"⚠ LineComment BlockComment Module ) ( App Identifier Type Keyword Number String",maxTerm:17,nodeProps:[["isolate",-3,1,2,11,""],["openedBy",4,"("],["closedBy",5,")"],["group",-6,6,7,8,9,10,11,"Expression"]],skippedNodes:[0,1,2],repeatNodeCount:1,tokenData:"0o~R^XY}YZ}]^}pq}rs!Stu#pxy'Uyz(e{|(j}!O(j!Q!R(s!R![*p!]!^.^#T#o.{~!SO_~~!VVOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j<%lO!S~!qOZ~~!tRO;'S!S;'S;=`!};=`O!S~#QWOr!Srs!ls#O!S#O#P!q#P;'S!S;'S;=`#j;=`<%l!S<%lO!S~#mP;=`<%l!S~#siqr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%b!`!a%b!a!b%b!b!c%b!c!}%b#Q#R%b#R#S%b#S#T%b#T#o%b#p#q%b#r#s%b~%giV~qr%bst%btu%buv%bvw%bwx%bz{%b{|%b}!O%b!O!P%b!P!Q%b!Q![%b![!]%b!^!_%b!_!`%b!`!a%b!a!b%b!b!c%b!c!}%b#Q#R%b#R#S%b#S#T%b#T#o%b#p#q%b#r#s%b~'ZPT~!]!^'^~'aTO!]'^!]!^'p!^;'S'^;'S;=`(_<%lO'^~'sVOy'^yz(Yz!]'^!]!^'p!^;'S'^;'S;=`(_<%lO'^~(_OQ~~(bP;=`<%l'^~(jOS~~(mQ!Q!R(s!R![*p~(xUY~!O!P)[!Q![*p!g!h){#R#S+U#X#Y){#l#m+[~)aRY~!Q![)j!g!h){#X#Y){~)oSY~!Q![)j!g!h){#R#S*j#X#Y){~*OR{|*X}!O*X!Q![*_~*[P!Q![*_~*dQY~!Q![*_#R#S*X~*mP!Q![)j~*uTY~!O!P)[!Q![*p!g!h){#R#S+U#X#Y){~+XP!Q![*p~+_R!Q![+h!c!i+h#T#Z+h~+mVY~!O!P,S!Q![+h!c!i+h!r!s-P#R#S+[#T#Z+h#d#e-P~,XTY~!Q![,h!c!i,h!r!s-P#T#Z,h#d#e-P~,mUY~!Q![,h!c!i,h!r!s-P#R#S.Q#T#Z,h#d#e-P~-ST{|-c}!O-c!Q![-o!c!i-o#T#Z-o~-fR!Q![-o!c!i-o#T#Z-o~-tSY~!Q![-o!c!i-o#R#S-c#T#Z-o~.TR!Q![,h!c!i,h#T#Z,h~.aP!]!^.d~.iSP~OY.dZ;'S.d;'S;=`.u<%lO.d~.xP;=`<%l.d~/QiX~qr.{st.{tu.{uv.{vw.{wx.{z{.{{|.{}!O.{!O!P.{!P!Q.{!Q![.{![!].{!^!_.{!_!`.{!`!a.{!a!b.{!b!c.{!c!}.{#Q#R.{#R#S.{#S#T.{#T#o.{#p#q.{#r#s.{",tokenizers:[0],topRules:{Module:[0,3]},specialized:[{term:9,get:o=>n[o]||-1}],tokenPrec:0}),p=r.define({name:"wast",parser:S.configure({props:[t.add({App:s({closing:")",align:!1})}),b.add({App:a,BlockComment(o){return{from:o.from+2,to:o.to-2}}}),P({Keyword:e.keyword,Type:e.typeName,Number:e.number,String:e.string,Identifier:e.variableName,LineComment:e.lineComment,BlockComment:e.blockComment,"( )":e.paren})]}),languageData:{commentTokens:{line:";;",block:{open:"(;",close:";)"}},closeBrackets:{brackets:["(",'"']}}});function g(){return new O(p)}export{g as wast,p as wastLanguage};
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{p as m}from"./vendor-lezer-yaml-BRjO6Z3u.js";import{L as O,c as r,d as l,f as i,h as a,k as p}from"./cm-language-CDsY7zq0.js";import{p as u}from"./vendor-lezer-common-tVQBIsvN.js";import{s as f,t as d}from"./vendor-lezer-highlight-DuEf3ZFH.js";import{L as c}from"./vendor-lezer-lr-eZ5kYecM.js";import"./cm-state-X9WpHEQO.js";import"./vendor-marijn-find-cluster-break-DXwl3gUT.js";import"./cm-view-CiSFjroV.js";import"./vendor-style-mod-Bs6eFhZE.js";import"./vendor-w3c-keyname-Vcq4gwWv.js";import"./vendor-crelt-C8TCjufn.js";const g=c.deserialize({version:14,states:"!vOQOPOOO]OPO'#C_OhOPO'#C^OOOO'#Cc'#CcOpOPO'#CaQOOOOOO{OPOOOOOO'#Cb'#CbO!WOPO'#C`O!`OPO,58xOOOO-E6a-E6aOOOO-E6`-E6`OOOO'#C_'#C_OOOO1G.d1G.d",stateData:"!h~OXPOYROWTP~OWVXXRXYRX~OYVOXSP~OXROYROWTX~OXROYROWTP~OYVOXSX~OX[O~OXY~",goto:"vWPPX[beioRUOQQOR]XRXQTTOUQWQRZWSSOURYS",nodeNames:"⚠ Document Frontmatter DashLine FrontmatterContent Body",maxTerm:10,skippedNodes:[0],repeatNodeCount:2,tokenData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),s=O.define({name:"yaml",parser:m.configure({props:[l.add({Stream:e=>{for(let n=e.node.resolve(e.pos,-1);n&&n.to>=e.pos;n=n.parent){if(n.name=="BlockLiteralContent"&&n.from<n.to)return e.baseIndentFor(n);if(n.name=="BlockLiteral")return e.baseIndentFor(n)+e.unit;if(n.name=="BlockSequence"||n.name=="BlockMapping")return e.column(n.from,1);if(n.name=="QuotedLiteral")return null;if(n.name=="Literal"){let t=e.column(n.from,1);if(t==e.lineIndent(n.from,1))return t;if(n.to>e.pos)return null}}return null},FlowMapping:a({closing:"}"}),FlowSequence:a({closing:"]"})}),i.add({"FlowMapping FlowSequence":p,"Item Pair BlockLiteral":(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function $(){return new r(s)}const S=O.define({name:"yaml-frontmatter",parser:g.configure({props:[f({DashLine:d.meta})]})});function y(e){let{language:n,support:t}=e.content instanceof r?e.content:{language:e.content,support:[]};return new r(S.configure({wrap:u(o=>o.name=="FrontmatterContent"?{parser:s.parser}:o.name=="Body"?{parser:n.parser}:null)}),t)}export{$ as yaml,y as yamlFrontmatter,s as yamlLanguage};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
import{E as d}from"./cm-view-CiSFjroV.js";import{u as m,H as s}from"./cm-language-CDsY7zq0.js";import{t as o}from"./vendor-lezer-highlight-DuEf3ZFH.js";const g="#e5c07b",t="#e06c75",b="#56b6c2",p="#ffffff",r="#abb2bf",a="#7d8799",f="#61afef",u="#98c379",c="#d19a66",k="#c678dd",h="#21252b",l="#2c313a",n="#282c34",e="#353a42",C="#3E4451",i="#528bff",y=d.theme({"&":{color:r,backgroundColor:n},".cm-content":{caretColor:i},".cm-cursor, .cm-dropCursor":{borderLeftColor:i},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:C},".cm-panels":{backgroundColor:h,color:r},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:n,color:a,border:"none"},".cm-activeLineGutter":{backgroundColor:l},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:e},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:e,borderBottomColor:e},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:l,color:r}}},{dark:!0}),B=s.define([{tag:o.keyword,color:k},{tag:[o.name,o.deleted,o.character,o.propertyName,o.macroName],color:t},{tag:[o.function(o.variableName),o.labelName],color:f},{tag:[o.color,o.constant(o.name),o.standard(o.name)],color:c},{tag:[o.definition(o.name),o.separator],color:r},{tag:[o.typeName,o.className,o.number,o.changed,o.annotation,o.modifier,o.self,o.namespace],color:g},{tag:[o.operator,o.operatorKeyword,o.url,o.escape,o.regexp,o.link,o.special(o.string)],color:b},{tag:[o.meta,o.comment],color:a},{tag:o.strong,fontWeight:"bold"},{tag:o.emphasis,fontStyle:"italic"},{tag:o.strikethrough,textDecoration:"line-through"},{tag:o.link,color:a,textDecoration:"underline"},{tag:o.heading,fontWeight:"bold",color:t},{tag:[o.atom,o.bool,o.special(o.variableName)],color:c},{tag:[o.processingInstruction,o.string,o.inserted],color:u},{tag:o.invalid,color:p}]),w=[y,m(B)];export{w as o};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
function t(i){if(i)throw i}export{t as b};
@@ -0,0 +1 @@
function r(i,e){const t=String(i);if(typeof e!="string")throw new TypeError("Expected character");let o=0,n=t.indexOf(e);for(;n!==-1;)o++,n=t.indexOf(e,n+e.length);return o}export{r as c};

Some files were not shown because too many files have changed in this diff Show More