Merged
Conversation
…ding - Multiple providers and models - Tool calling for better editing - Result loop with AI to enhance results - Response schema validation - Chat history - AI Operations history - Error queue fed into the AI - Autolayout (needed because of the mess of AI added nodes)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR represents a major refactoring of the AI chat system, transforming it from a basic OpenAI-only implementation into a comprehensive multi-provider AI assistant with advanced features.
Key improvements:
- Multi-provider support (OpenAI, Anthropic, Google, DeepSeek, xAI, OpenRouter, Ollama) with dynamic model fetching
- Tool calling architecture for structured AI-graph interactions with automatic validation and error recovery
- Persistent chat history with IndexedDB storage and conversation management
- Error queue system that feeds runtime errors back to the AI for self-correction
- Auto-layout functionality using Dagre for graph organization
Reviewed changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/jsonRepair.ts | JSON repair utilities for fallback mode when tool calling isn't supported |
| src/utils/autoLayout.ts | Graph auto-layout using Dagre algorithm |
| src/config/ | Multi-provider configuration system with model metadata |
| src/services/LangChainService.ts | Refactored to support tool calling, multiple providers, and error recovery loops |
| src/services/LLMProviderService.ts | Unified provider abstraction layer |
| src/services/ModelFetcherService.ts | Dynamic model fetching from provider APIs |
| src/services/AudioGraphToolService.ts | Zod-validated tools for AI graph manipulation |
| src/services/ChatPersistenceService.ts | IndexedDB-based conversation persistence |
| src/stores/ChatStore.ts | MST store for conversation management |
| src/stores/AudioGraphStore.ts | Added error queue for AI feedback |
| src/stores/NodeAdapter.ts | Integrated error reporting to queue |
| src/components/AIChat/ | Modularized chat UI with sidebar, actions panel, and improved UX |
| src/components/NodePalette.tsx | Added collapsible categories for better organization |
| src/components/GraphCanvas.tsx | Integrated auto-layout panel |
| package.json | Updated LangChain dependencies and added new providers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes
Type of change
Known issues