Commit Graph
4 Commits
Author SHA1 Message Date
evandro e8927ebf78 perf(extension): cache parsed session files by mtime and size
GET /api/sessions (and every session lookup) re-read and JSON.parsed every
.jsonl session file synchronously on each request, blocking the agent's
event loop. Parsed metadata is now cached per path (bounded to 500 entries)
and invalidated when mtime or size changes.
2026-10-10 04:23:16 -03:00
evandro 3dd3fa5d05 test: read SSE chunks until session.updated arrives
session.status and session.updated are two separate res.write calls, so the
test failed whenever TCP delivered them in different chunks.
2026-10-10 04:23:16 -03:00
evandro adf63ef9f7 chore: remove unused modules and ignore local env and coverage output
src/api/piContract.ts and src/hooks/usePanelResizeStatus.ts have no importers (knip and grep).
2026-10-10 04:20:27 -03:00
evandro 2d2cdf3b19 refactor: reduce cyclomatic complexity of settings, tool data and layout sanitizers
Add characterization tests first, then split the hot spots into small helpers:
- STT/TTS settings updates move to extensions/piagentui-speech-settings.ts (rule tables)
- defaultExtractData is split into diff/diagnostic/output extractors
- getToolSummaryCategory becomes an ordered rule table (toolSummary.ts)
- sanitizePersistedTerminalLayoutMap is split per level
- duplicated diff stats helpers are merged into utils/diffStats.ts
2026-10-10 04:19:34 -03:00