Skip to content

Add ai assistant ui#81

Merged
syifan merged 8 commits into
syifan:mainfrom
yuqisun:main
Feb 26, 2026
Merged

Add ai assistant ui#81
syifan merged 8 commits into
syifan:mainfrom
yuqisun:main

Conversation

@yuqisun

@yuqisun yuqisun commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

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.

image

Copilot AI review requested due to automatic review settings February 26, 2026 15:47
@vercel

vercel Bot commented Feb 26, 2026

Copy link
Copy Markdown

@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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:latest to cgra/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_TYPES constant from aiConfigExtractor.js using getDefaultFuTypes() 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 fuTypes array, making the conditional check ineffective. Then lines 825-829 immediately override this by checking fuTypes.length > 0 and 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 handleApplyAIConfig function, 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.

@yuqisun

yuqisun commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator Author

Failure in CI seems caused by permission issue?

RequestError: Resource not accessible by integration
status: 403

@tancheng tancheng requested a review from syifan February 26, 2026 16:31
@tancheng

Copy link
Copy Markdown
Collaborator

@syifan Could you help upload an image to docker hub so that we can align, thanks.

I guess we need to use the latest image, i.e., cgra/cgra-flow:ui. I saw your PR already changed:

const DOCKER_IMAGE = process.env.DOCKER_IMAGE || 'cgra-flow:latest';

what is the current issue due to docker?

@syifan

syifan commented Feb 26, 2026

Copy link
Copy Markdown
Owner

@syifan Could you help upload an image to docker hub so that we can align, thanks.

I guess we need to use the latest image, i.e., cgra/cgra-flow:ui. I saw your PR already changed:

const DOCKER_IMAGE = process.env.DOCKER_IMAGE || 'cgra-flow:latest';

what is the current issue due to docker?

@syifan Could you help upload an image to docker hub so that we can align, thanks.

I guess we need to use the latest image, i.e., cgra/cgra-flow:ui. I saw your PR already changed:

const DOCKER_IMAGE = process.env.DOCKER_IMAGE || 'cgra-flow:latest';

what is the current issue due to docker?

Let me merge it and then start a new PR to fix the docker issue.

@syifan syifan merged commit 4d60cbf into syifan:main Feb 26, 2026
6 of 8 checks passed
@yuqisun

yuqisun commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator Author

Hi both, Opus fixed the mapping issue in #83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants