Add ai assistant ui#81
Conversation
|
@yuqisun is attempting to deploy a commit to the syifan's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Pull request overview
This pull request adds a comprehensive AI Assistant feature to the CGRA Flow UI, enabling users to get AI-powered recommendations for CGRA configuration based on kernel descriptions or mapping analysis. The implementation includes multi-provider AI support (OpenAI, Gemini, Qwen, DeepSeek), configuration extraction/validation, and a complete UI integration.
Changes:
- New AI services for API integration and CGRA configuration extraction with validation
- UI components including AIAssistantPanel with chat interface and SidePanel with tabbed navigation
- Workspace integration with state management for AI-generated configurations
- Docker image name standardization from
cgra-flow:latesttocgra/cgra-flow:ui - Comprehensive local development setup documentation
Reviewed changes
Copilot reviewed 80 out of 84 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/workspace/services/aiApiService.js |
AI API service supporting multiple providers with OpenAI-compatible endpoints |
src/workspace/services/aiConfigExtractor.js |
Configuration extraction, validation, and auto-correction logic |
src/workspace/AIAssistantPanel.jsx |
Main AI assistant component with chat interface (not in diff but exists) |
src/workspace/SidePanel.jsx |
Tabbed container for Manual and AI Assistant modes |
src/workspace/DesignTab.jsx |
Integration of SidePanel replacing PropertyInspector |
src/Workspace.jsx |
State management and callback implementation for AI config application |
runner/* |
Docker image name updates across runner configuration |
docs/LOCAL_SETUP.md |
New comprehensive local development guide |
README.md |
Updated setup instructions with new Docker image |
.gitignore |
Added AI log plugin ignore entries |
openspec/** |
Complete OpenSpec documentation for changes |
.github/skills/** |
OpenSpec workflow skill definitions |
.codebuddy/** |
CodeBuddy skill definitions (duplicates) |
Comments suppressed due to low confidence (3)
src/Workspace.jsx:882
- The hardcoded FU types list appears in multiple places (lines 816-818, 879-882) with the same array literal. This should reference the
DEFAULT_FU_TYPESconstant fromaiConfigExtractor.jsusinggetDefaultFuTypes()to ensure consistency and avoid duplication.
src/Workspace.jsx:829 - Logic error: Lines 820-821 set all FU types to 1 (enabled) regardless of the
fuTypesarray, making the conditional check ineffective. Then lines 825-829 immediately override this by checkingfuTypes.length > 0and conditionally enabling/disabling based on the array. This means lines 820-822 are redundant and confusing. Remove lines 820-822 or consolidate the logic to avoid the double assignment.
src/Workspace.jsx:884 - In the
handleApplyAIConfigfunction, when creating new PEs (lines 872-884), the FU configuration logic duplicates the array of all FU types three times. This creates the same array literal['add', 'mul', 'div', ...]on lines 879-881 and again on lines 881-882. Consider extracting this to a constant at the function or file level to avoid repetition and potential inconsistency.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Failure in CI seems caused by permission issue? |
I guess we need to use the latest image, i.e., cgra-flow-ui/runner/mappingExecutor.js Line 44 in 7744da3 what is the current issue due to docker? |
Let me merge it and then start a new PR to fix the docker issue. |
|
Hi both, Opus fixed the mapping issue in #83 |
Hi @tancheng , @syifan ,
The AI assistant UI works after merge code but looks there's change in the cgra-flow image so error happens while mapping in my cgra/cgra-flow:ui image. @syifan Could you help upload an image to docker hub so that we can align, thanks.