Skip to content

feat(site): add gallery and ai generate infographic#7

Merged
Aarebecca merged 8 commits into
devfrom
feat/site-gallery
Nov 4, 2025
Merged

feat(site): add gallery and ai generate infographic#7
Aarebecca merged 8 commits into
devfrom
feat/site-gallery

Conversation

@Aarebecca

Copy link
Copy Markdown
Contributor
  • Gallery
  • AI 生成信息图

需要用户手动配置 API key,支持 claude/chat gpt/gemimi/deepseek/qwen

image image

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Aarebecca, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求为网站引入了两项重要的新功能:一个全面的信息图模板图库和一个创新的AI生成信息图工具。图库允许用户直观地浏览和选择现有模板,而AI工具则通过自然语言交互,极大地简化了信息图的创建过程,支持多种主流AI模型。这些改进旨在显著提升用户创建和探索信息图的效率和体验。

Highlights

  • 新增图库页面: 引入了一个全新的图库页面,用于展示所有内置的信息图模板,并提供搜索、筛选和预览功能,方便用户快速查找和选择模板。
  • 新增AI生成信息图功能: 集成了一个AI生成信息图的交互式演示,用户可以通过对话描述需求,AI将自动生成相应的信息图配置。该功能支持多种AI提供商,包括Claude、ChatGPT、Gemini、DeepSeek和Qwen,并且API Key仅存储在本地浏览器,保障用户隐私。
  • 重构金字塔结构: 将原有的hierarchy-pyramid结构重命名为list-pyramid,并更新了所有相关的模板引用,以更好地反映其列表型布局特性。
  • 网站UI优化: 更新了网站的favicon和导航栏标题,并对按钮样式进行了调整,提升了整体视觉一致性和用户体验。
  • 依赖更新与管理: 新增了多个依赖项,以支持AI集成和UI组件,包括@ai-sdk/*antdframer-motionreact-markdown等。
  • 文档和示例更新: 移除了旧的开发模板指南,并更新了首页的统计数据和功能描述,以反映项目的新特性和开源免费的定位。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

你好!感谢你对这个项目的贡献。这次的 PR 增加了模板画廊和 AI 生成信息图两大核心功能,代码结构清晰,特别是对 AI 服务和本地存储的抽象设计得很好。我主要在以下几个方面提出了一些建议:

  • 代码一致性:重命名组件后,内部代码也需要同步更新。
  • 安全性:API 密钥的处理需要更加谨慎,避免在 URL 中传递。
  • 用户体验:优化了确认对话框和错误状态的展示,以提供更一致和清晰的用户界面。
  • CSS 最佳实践:避免使用 !important 以提高代码的可维护性。

总的来说,这是一次非常出色的功能迭代!期待这些问题修复后合并。

Comment thread packages/site/src/components/AIDemo/aiService.ts
Comment thread packages/site/src/components/AIDemo/index.tsx
Comment thread packages/site/src/components/AIDemo/ChatInterface.tsx
Comment thread packages/site/src/css/custom.css
@hustcc

hustcc commented Nov 3, 2025

Copy link
Copy Markdown
Member

key 支持下 zenmux。

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@Aarebecca

Copy link
Copy Markdown
Contributor Author

key 支持下 zenmux。

image

我看了下 zenmux 提供的模型代理服务,那边平台申请到的 baseUrl 和 apiKey 直接填过来就能用

Copilot AI review requested due to automatic review settings November 4, 2025 03:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a major feature addition to the infographic site: an AI-powered demo for generating infographics through natural language conversations. It also includes several configuration updates, template fixes, a gallery component for browsing templates, and various UI enhancements.

  • Adds a comprehensive AI demo system supporting multiple AI providers (OpenAI, Anthropic, Google, xAI, DeepSeek, Qwen)
  • Implements a template gallery with search and filter capabilities
  • Fixes template naming inconsistencies (hierarchy-pyramid → list-pyramid)
  • Updates site configuration including domain, branding, and favicon

Reviewed Changes

Copilot reviewed 26 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/site/src/components/AIDemo/* Complete AI demo implementation with chat interface, config management, and storage
packages/site/src/components/Gallery.tsx New gallery component for browsing and previewing templates
packages/site/src/components/Infographic.tsx Enhanced with styling and resource loading
packages/site/src/components/ResourceLoader.ts SVG resource loader with caching
packages/infographic/src/designs/structures/list-pyramid.tsx Renamed structure file to fix naming consistency
packages/infographic/src/templates/built-in.ts Updated template references
packages/site/docusaurus.config.ts Updated domain, baseURL, and branding
packages/site/docs/examples/* Added AI demo page and updated examples
packages/site/package.json Added dependencies for AI SDK and Ant Design

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/site/src/components/AIDemo/types.ts
@Aarebecca Aarebecca merged commit d1906a0 into dev Nov 4, 2025
8 checks passed
@Aarebecca Aarebecca deleted the feat/site-gallery branch November 4, 2025 03:55
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.

3 participants