Refactor UI into separate CSS/JS, add help modal and HELP.md

- static/index.html: reduced to 127-line HTML shell
- static/style.css: all styles extracted (~900 lines) + help modal styles
  + shared markdown rendering for file-preview and help-modal-body
  including tables (previously missing)
- static/app.js: all JS extracted (~900 lines) + help modal fetch/render
- index.html: adds ? help button + help modal HTML
- inara/HELP.md: comprehensive reference doc covering all features,
  keyboard shortcuts, API endpoints, memory system, planned items
- routers/files.py: HELP.md added to ALLOWED set
- context_loader.py: HELP.md loaded at tier 2+ (after PROTOCOLS.md)
  so Inara can reference it when helping Scott with the interface

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-17 21:52:54 -04:00
parent fa96c50935
commit 0ebfbc6590
6 changed files with 2039 additions and 1662 deletions

View File

@@ -48,11 +48,15 @@ def load_context(
if tier < 2:
return "\n\n".join(parts)
# ── 3. Protocols (tier 2+) ─────────────────────────────────────
# ── 3. Protocols + Help reference (tier 2+) ───────────────────
proto_path = inara_dir / "PROTOCOLS.md"
if proto_path.exists():
parts.append(f"--- PROTOCOLS.md ---\n{proto_path.read_text()}")
help_path = inara_dir / "HELP.md"
if help_path.exists():
parts.append(f"--- HELP.md ---\n{help_path.read_text()}")
# ── 4. Tiered memory — long → mid → short ─────────────────────
# Short is last so it sits closest to the conversation turn.
if include_long: