Commit Graph

8 Commits

Author SHA1 Message Date
Ed_
2ab3f101d6 Merge origin/cache 2026-02-23 22:03:06 -05:00
bd8551d282 Harden reliability, security, and UX across core modules
- Add thread safety: _anthropic_history_lock and _send_lock in ai_client to prevent concurrent corruption
  - Add _send_thread_lock in gui_2 for atomic check-and-start of send thread
  - Add atexit fallback in session_logger to flush log files on abnormal exit
  - Fix file descriptor leaks: use context managers for urlopen in mcp_client
  - Cap unbounded tool output growth at 500KB per send() call (both Gemini and Anthropic)
  - Harden path traversal: resolve(strict=True) with fallback in mcp_client allowlist checks
  - Add SLOP_CREDENTIALS env var override for credentials.toml with helpful error message
  - Fix Gemini token heuristic: use _CHARS_PER_TOKEN (3.5) instead of hardcoded // 4
  - Add keyboard shortcuts: Ctrl+Enter to send, Ctrl+L to clear message input
  - Add auto-save: flush project and config to disk every 60 seconds
2026-02-23 21:29:30 -05:00
Ed_
6d825e6585 wip: gemini doing gui_2.py catchup track 2026-02-23 21:07:06 -05:00
Ed_
c19b13e4ac Merge branch 'origin/cache' 2026-02-23 20:32:49 -05:00
Ed_
24b831c712 feat(gui2): Integrate core event system
Integrates the ai_client.events emitter into the gui_2.py App class. Adds a new test file to verify that the App subscribes to API lifecycle events upon initialization. This is the first step in aligning gui_2.py with the project's event-driven architecture.
2026-02-23 20:22:36 -05:00
69401365be Port missing features to gui_2 and optimize caching
- Port 10 missing features from gui.py to gui_2.py: performance
    diagnostics, prior session log viewing, token budget visualization,
    agent tools config, API hooks server, GUI task queue, discussion
    truncation, THINKING/LIVE indicators, event subscriptions, and
    session usage tracking
  - Persist window visibility state in config.toml
  - Fix Gemini cache invalidation by separating discussion history
    from cached context (use MD5 hash instead of built-in hash)
  - Add cost optimizations: tool output truncation at source, proactive
    history trimming at 40%, summary_only support in aggregate.run()
  - Add cleanup() for destroying API caches on exit
2026-02-23 20:06:13 -05:00
75e1cf84fe fixed up gui_2.py
multi viewport works and no crashes thus far
2026-02-23 19:33:09 -05:00
Ed_
96a013c3dc fixes and possible wip gui_2/theme_2 for multi-viewport support 2026-02-22 01:43:24 -05:00