mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
- Create runAgentCore() in node-runtime/src/ai/agent/ encapsulating PiAgentCore construction, history conversion, event subscription, abort forwarding, tool round management, and usage collection - Re-export pi-agent-core/pi-ai types (AgentTool, Type, Model, etc.) and functions (completeSimple, streamSimple) from node-runtime - Refactor Server agent.ts to use runAgentCore, removing all direct pi-agent-core/pi-ai imports (~335→~210 lines) - Remove pi-agent-core and pi-ai from Server package.json dependencies - Refactor Electron agent/index.ts and event-handler.ts to use runAgentCore with DI hooks (streamFn, onConvertToLlm, onDebugContext) - Document remaining Electron pi-ai usage points for future migration