The JSON/YAML tree viewer (#484) hardcoded its default: valid json/yaml fenced blocks opened in Tree view at 10+ lines (`const showTree=lineCount>=10;`). Make that default user-configurable while preserving current behavior. - New settings (persisted via /api/settings -> settings.json): - structured_code_default_view: auto | on | off (default auto) - structured_code_auto_tree_lines: int 1..1000 (default 10) - ui.js: replace the hardcode with a sanitized, unit-testable decision helper _structuredCodeShowTree(mode, threshold, lineCount); Tree/Raw toggle, Raw <pre><code>, parse-failure fallback, and YAML lazy-load are unchanged. - Appearance settings: 'JSON/YAML code blocks' select + 'Auto threshold lines' input (disabled outside auto mode); wired through the existing appearance-autosave and explicit-save paths; live re-render on change. - boot.js seeds window globals; i18n labels added to all 13 locales. - Default (auto + 10) reproduces the original >=10 behavior exactly. |
||
|---|---|---|
| .. | ||
| vendor | ||
| apple-touch-icon.png | ||
| assistant_turn_anchors.js | ||
| boot.js | ||
| commands.js | ||
| favicon-32.png | ||
| favicon-192.png | ||
| favicon-512.png | ||
| favicon-512.svg | ||
| favicon.ico | ||
| favicon.svg | ||
| i18n.js | ||
| icons.js | ||
| index.html | ||
| login.js | ||
| manifest.json | ||
| messages.js | ||
| onboarding.js | ||
| outline.js | ||
| panels.js | ||
| pwa-startup.js | ||
| sessions.js | ||
| style.css | ||
| sw.js | ||
| terminal.js | ||
| ui.js | ||
| workspace.js | ||