Files
ChatLab/electron/main
digua 07fffb0112 refactor: data flow inversion, IPC contract fixes, and frontend adaptation
Data flow inversion:
- Add getHistoryForAgent() in conversations.ts — Agent now reads
  history directly from SQLite instead of receiving it from frontend
- Remove historyMessages parameter from agent:runStream IPC chain,
  add maxHistoryRounds for configurable context window
- Frontend (useAIChat.ts) pre-creates conversation before Agent call,
  removes history message collection logic

IPC fixes:
- Restore llm:chat and llm:chatStream handlers using pi-ai's
  completeSimple/streamSimple (P0-1: SQLLab compatibility)
- Send agent:complete with aborted flag in all abort paths to prevent
  hanging Promises in renderer (P0-2)
- Fix createConversation parameter order to match preload/data layer
  contract: (sessionId, title?) instead of (title, sessionId?) (P1)

Preload/frontend:
- Update preload API signatures and type declarations
- Use shared types for TokenUsage and AgentRuntimeStatus
2026-02-26 21:06:27 +08:00
..
2026-02-13 14:15:38 +08:00
2026-02-13 14:15:38 +08:00
2026-02-13 14:15:38 +08:00
2026-02-13 14:15:38 +08:00
2026-02-13 14:15:38 +08:00
2026-02-13 14:15:38 +08:00