feat(wren-ui): Integrate chart_type & transform property
Description
- Support
multi_linechart type - Integrate AI-provided chart_type & transform property
- AI image
0.14.3
Summary by CodeRabbit
-
New Features
- Added support for multi-line charts in the application.
- Expanded chart type options with a new
MULTI_LINEchart type.
-
Improvements
- Enhanced chart response details to include chart type information.
- Updated GraphQL schema and type definitions to support new chart type.
-
Technical Updates
- Modified chart handling and specification generation to accommodate the new chart type.
- Updated various components to utilize the new
chartDetailstructure for better data handling.
Walkthrough
This pull request introduces a new MULTI_LINE chart type across multiple files in the Wren UI project. The changes systematically update GraphQL schemas, type definitions, and chart handling components to support a new multi-line chart representation. The modifications span from type definitions in __types__.ts to server-side adaptors and client-side chart rendering components, ensuring consistent integration of the new chart type throughout the application.
Changes
| File | Change Summary |
|---|---|
wren-ui/src/apollo/client/graphql/__types__.ts |
Added MULTI_LINE to ChartType enum, updated ThreadResponseChartDetail with optional chartType |
wren-ui/src/apollo/client/graphql/home.generated.ts |
Updated multiple GraphQL fragment types to include chartType field |
wren-ui/src/apollo/client/graphql/home.ts |
Added chartType to CommonChartDetail fragment |
wren-ui/src/apollo/server/adaptors/wrenAIAdaptor.ts |
Added chartType to transformChartResult method response |
wren-ui/src/apollo/server/models/adaptor.ts |
Added MULTI_LINE to ChartType enum, updated ChartResponse interface |
wren-ui/src/apollo/server/repositories/threadResponseRepository.ts |
Added optional chartType to ThreadResponseChartDetail interface |
wren-ui/src/apollo/server/schema.ts |
Updated ChartType enum and ThreadResponseChartDetail type |
wren-ui/src/components/chart/handler.ts |
Modified chart specification handling to support new chart type |
wren-ui/src/components/pages/home/promptThread/ChartAnswer.tsx |
Updated getChartSpecOptionValues function call |
Possibly related PRs
- #1079: Enhances chart generation by adding
chart_typefield to API response - #1080: Modifies
ThreadResponseChartDetailtype to includechartType - #1101: Adds
multi_lineoption tochart_typefield
Suggested labels
module/ai-service
Suggested reviewers
- paopa
- wwwy3y3
- fredalai
Poem
🐰 A rabbit's chart-drawing delight,
Multi-lines dancing, a graphical sight!
Enums expanding, types growing free,
Wren UI's canvas, now more to see
Code hopping forward with chartful glee! 📊
📜 Recent review details
Configuration used: CodeRabbit UI Review profile: CHILL Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between fe3fb421298cce2f89ca6cf577457cda4a3dd944 and dd42a749a9ed3c6b7ec3ad161228cb2ab91c3b72.
📒 Files selected for processing (1)
wren-ui/src/components/pages/home/promptThread/ChartAnswer.tsx(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- wren-ui/src/components/pages/home/promptThread/ChartAnswer.tsx
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (go)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
I pushed a fix in commit <commit_id>, please review it.Generate unit testing code for this file.Open a follow-up GitHub issue for this discussion.
- Files and specific lines of code (under the "Files changed" tab): Tag
@coderabbitaiin a new review comment at the desired location with your query. Examples:@coderabbitai generate unit testing code for this file.@coderabbitai modularize this function.
- PR comments: Tag
@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read src/utils.ts and generate unit testing code.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.@coderabbitai help me debug CodeRabbit configuration file.
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.
CodeRabbit Commands (Invoked using PR comments)
@coderabbitai pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR. (Beta)@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile to the root of your repository. - Please see the configuration documentation for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Documentation and Community
- Visit our Documentation for detailed information on how to use CodeRabbit.
- Join our Discord Community to get help, request features, and share feedback.
- Follow us on X/Twitter for updates and announcements.