YeonGyu-Kim
b77c256943
fix(jsonc): strip BOM before parsing ( #3164 )
2026-04-07 15:39:51 +09:00
YeonGyu-Kim
daae6ed05b
fix(jsonc-parser): strip UTF-8 BOM before parsing to fix Windows "InvalidSymbol at offset 0" errors
...
Windows editors often save UTF-8 files with a BOM (Byte Order Mark: \uFEFF).
When this is present, jsonc-parser reports InvalidSymbol at offset 0 because
the BOM is not valid JSON/JSONC syntax.
This commit strips the BOM before parsing, fixing issues #3164 where Windows
users report their opencode.jsonc file fails to parse even though it appears
to start with a valid '{' character.
Fixes : #3164
Co-authored-by: Jobdori <agent@yeongyu.kim >
2026-04-07 14:48:30 +09:00
YeonGyu-Kim
b096e6f751
fix: prefer canonical plugin config files
2026-04-03 17:15:08 +09:00
YeonGyu-Kim
32035d153e
fix(config): prefer canonical plugin config filenames
...
Ensure oh-my-opencode filenames always win over legacy oh-my-openagent files so readers match canonical writer behavior.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-03-24 20:38:54 +09:00
YeonGyu-Kim
7f20dd6ff5
fix: add oh-my-openagent.jsonc config file detection ( fixes #2624 )
2026-03-23 18:11:01 +09:00
Sisyphus
b2c2c6eab7
feat: Add JSONC support for oh-my-opencode config files ( #275 )
...
Uses Microsoft's jsonc-parser package for reliable JSONC parsing:
- oh-my-opencode.jsonc (preferred) or oh-my-opencode.json
- Supports line comments (//), block comments (/* */), and trailing commas
- Better error reporting with line/column positions
Core changes:
- Added jsonc-parser dependency (Microsoft's VS Code parser)
- Shared JSONC utilities (parseJsonc, parseJsoncSafe, readJsoncFile, detectConfigFile)
- Main plugin config loader uses detectConfigFile for .jsonc priority
- CLI config manager supports JSONC parsing
Comprehensive test suite with 18 tests for JSONC parsing.
Fixes #265
🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode )
Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com >
2025-12-28 00:45:17 +09:00