feat: Integrate GitHub Copilot SDK and LangChain for provider-independent orchestration

- Added @github/copilot-sdk and related dependencies for GitHub Copilot integration.
- Implemented ChatCopilot adapter for LangChain compatibility.
- Created LLM factory to return provider-specific models (OpenAI, Anthropic, Copilot).
- Developed Orchestrator agent using LangGraph for intent routing and context assembly.
- Enhanced IPC communication for streaming AI responses to the renderer.
- Updated progress documentation with implementation details and learnings.
This commit is contained in:
Roberto Musso
2026-02-23 17:58:00 +01:00
parent c1aa6829c9
commit 00a43e0fbc
13 changed files with 1348 additions and 14 deletions

View File

@@ -350,8 +350,8 @@
"Typecheck passes"
],
"priority": 19,
"passes": false,
"notes": ""
"passes": true,
"notes": "Completed: LangGraph-based provider-independent orchestrator. StateGraph with classifyIntent node (structured output via withStructuredOutput(zodSchema) for route classification) + 3 specialist agent nodes (projectAgent, knowledgeAgent, generalAgent) connected via addConditionalEdges. LLM factory (src/main/ai/llm.ts) returns BaseChatModel per provider: ChatOpenAI (openai), ChatAnthropic (anthropic), ChatCopilot adapter (copilot). ChatCopilot (src/main/ai/chat-copilot.ts) wraps @github/copilot-sdk in SimpleChatModel with _call() and _streamResponseChunks(). Streaming via LangGraph streamMode:'messages' + IPC side-channel (ai:stream). Context assembly from DB (buildProjectContext/buildGlobalContext), tRPC context with event.sender, auth/timeout error handling. Typecheck passes."
},
{
"id": "US-020",