-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(copilot-v1): Copilot v1 #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
v0.2.10: fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR introduces Copilot v1, a comprehensive AI-powered workflow assistant for Sim Studio. The implementation transforms the platform from a manual workflow builder into an intelligent system that can understand, analyze, and modify workflows through natural language interactions.
Core Architecture
The Copilot system operates in two distinct modes:
- Ask Mode: Provides educational guidance and workflow analysis without editing capabilities
- Agent Mode: Enables direct workflow editing with full AI assistance for building and modifying workflows
Key Components Added
Database Infrastructure: New tables for copilot_chats (conversation storage with JSONB messages) and copilot_checkpoints (workflow state versioning), enabling persistent conversations and rollback capabilities.
YAML Workflow System: Comprehensive YAML documentation and parsing utilities covering all block types (starter, agent, function, api, condition, router, evaluator, response, loop, parallel, webhook, workflow). This includes block reference syntax, connection configurations, and validation rules.
Tool Ecosystem: Four critical internal tools power the AI assistant:
get_blocks_and_tools: Discovery of available blocks and their capabilitiesget_blocks_metadata: Detailed schema information for specific blocksget_yaml_structure: Complete YAML syntax guide and best practicesedit_workflow: Direct workflow modification through YAML processing
Real-time Features: Enhanced socket server with copilot-workflow-edit and workflow-updated events for live collaboration when AI modifies workflows.
Professional UI: Complete redesign of the chat interface with tool call visualization, checkpoint management panels, mode switching, and streaming message support with inline tool execution feedback.
Auto-layout System: Intelligent workflow visualization with multiple algorithms (hierarchical, smart, force-directed, layered) that automatically arranges blocks based on complexity analysis.
Integration Points
The Copilot integrates deeply with existing workflow infrastructure through consolidated API endpoints (/api/workflows/{id}/yaml, /api/workflows/{id}/state) and extends all LLM providers (Anthropic, OpenAI, Azure, Groq, Cerebras, Deepseek, Ollama, xAI) to pass chatId context for checkpoint operations.
Provider Enhancements
Significant streaming improvements to the Anthropic provider add three execution modes: early streaming (no tools), incremental streaming with real-time tool call feedback (for copilot), and silent tool execution with final response streaming (for chat applications).
Confidence Score: 3/5
• Moderate risk due to several implementation concerns and missing validations that could cause runtime issues
• Major architectural changes with extensive new functionality increase complexity and potential failure points
• Multiple files need attention including API endpoint mismatches, type safety issues, and validation schema problems
97 files reviewed, 58 comments
* Fix docs agent * Doc agent fixes * Refactor copilot * Lint * Update yaml editor * Lint * Fix block tool * Lint * Get block metadata tool * Lint * Yaml changes * Lint * Fixes? * Lint * Better yaml language * Lint * UPdate * Lint * Fix condition blocks * lint * Fix start block * Fix starter block stuff * Lint * Fix yaml ui * Lint * get yaml tool * Lint * hi * Lint * Agnet * Copilot UI * Lint * Better workflow builder * Lint * REHYDRATION * Lint * Auto layout * Lint * Fixes * Lint * Chatbar sizing * Lint * Initial chat fixes * Lint * Dropdown overflow * Lint * UI text * Lint * Sample question pills * Lint * Ui button * Fix dropdown appearance * Lint * Modal fixes * UI Updates * Lint * Initial ask vs agent mode * Lint * Ask vs agent * Lint * Ask udpate * Ui fixes * Lint * User message width * Chat leak fix * Lint * Agent ui * Checkpointing * Lint * Checkpoints * Lint * Tweaks * Sample questions * Lint * Modal full screen mode * Lint * Prompt updates * Cleaning * Lint * Prompt update * Streaming v1 * Lint * Tool call inline * Lint * Checkpoint * Lint * Fix lint * Sizing * Lint * Copilot ui tool call fixes * Remove output from tool call ui * Updates * Lint * Checkpoitn * Loading icon * Lint * Pulse * Lint * Modal fixes * Sidebar padding * Checkpoint * checkpoint * feat(platform): new UI and templates (simstudioai#639) (simstudioai#693) * improvement: control bar * improvement: debug flow * improvement: control bar hovers and skeleton loading * improvement: completed control bar * improvement: panel tab selector complete * refactor: deleted notifications and history dropdown * improvement: chat UI complete * fix: tab change on control bar run * improvement: finshed console (audio display not working) * fix: text wrapping in console content * improvement: audio UI * improvement: image display * feat: add input to console * improvement: code input and showing input on errors * feat: download chat and console * improvement: expandable panel and console visibility * improvement: empty state UI * improvement: finished variables * fix: image in console entry * improvement: sidebar and templates ui * feat: uploading and fetching templates * improvement: sidebar and control bar * improvement: templates * feat: templates done * fix(sockets): remove package-lock * fix: sidebar scroll going over sidebar height (simstudioai#709) * Checkpoint * Fix build error * Checkpoitn * Docs updates * Checkpoint * Streaming vs non streaming * Clean up yaml save * Fix revert checkpoitn yaml * Doc fixes * Small docs fix * Clean up old yaml docs * Doc updates * Hide copilot * Revert width * Db migration fixes * Add snapshot * Remove space from mdx * Add spaces * Lint * Address greptile comments * lint fix * Hide copilot --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: Waleed Latif <walif6@gmail.com> Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com> Co-authored-by: Siddharth Sim <sidstudio@SiddharthsMBP2.attlocal.net>
Description
Adds v1 of copilot chat to workflow. Adds internal tools for the copilot agent to access and call. DOES NOT EXPOSE COPILOT IN THIS PR
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Manual testing of copilot
Checklist:
bun run test)Security Considerations:
Additional Information:
Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.