Skip to content

feat: 新增模板 ”BlueArchive“ 蔚蓝档案#196

Open
VanillaNahida wants to merge 2 commits into
SXP-Simon:mainfrom
VanillaNahida:main
Open

feat: 新增模板 ”BlueArchive“ 蔚蓝档案#196
VanillaNahida wants to merge 2 commits into
SXP-Simon:mainfrom
VanillaNahida:main

Conversation

@VanillaNahida

@VanillaNahida VanillaNahida commented Jun 10, 2026

Copy link
Copy Markdown

What's Change?

新增模板 BlueArchive ,用来创建蔚蓝档案风格的群聊分析报告模板

Demo

BlueArchive(蔚蓝档案)

BlueArchive

Summary by Sourcery

Add a new BlueArchive-themed group chat analysis report template and wire it into the existing reporting system.

New Features:

  • Introduce the BlueArchive HTML and image-based report templates for rendering daily group chat analysis in a Blue Archive style.

Documentation:

  • Showcase the BlueArchive template in the README with a preview image alongside existing templates.

@sourcery-ai

sourcery-ai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds a new 'BlueArchive' (蔚蓝档案) themed reporting template, including HTML templates for full report, image report, and partial components, and updates the README showcase.

Flow diagram for BlueArchive reporting template integration

flowchart TD
    Start([Start]) --> Gen["Generate group analysis report"]
    Gen --> SelTemplate["Select template: BlueArchive"]

    SelTemplate --> Type{Output type}
    Type -->|HTML report| HtmlTpl["Render BlueArchive/html_template.html"]
    Type -->|Image report| ImgTpl["Render BlueArchive/image_template.html"]

    HtmlTpl --> Partials
    ImgTpl --> Partials

    Partials["Inject partials:
- activity_chart.html
- topic_item.html
- user_title_item.html
- quote_item.html
- chat_quality_item.html"] --> Rendered["BlueArchive-themed report output"]
Loading

File-Level Changes

Change Details Files
Add BlueArchive template set (full report, image report, and partials) wired to existing reporting data (stats, topics, titles, quotes, quality, activity).
  • Create main BlueArchive HTML report template that consumes existing context variables (stats, hourly_chart_html, topics_html, titles_html, quotes_html, chat_quality_html) and renders a Blue Archive–styled dashboard layout with responsive CSS.
  • Create a parallel BlueArchive image_template.html with identical layout and bindings, tailored for image generation use.
  • Add Jinja partials for activity chart, topics list, user titles, quotes, and chat quality items, using defensive clamping of percentage values and conditional rendering when data is missing or zero.
  • Use external Blue Archive fonts via CDN and fixed character/assistant image URLs, with theme-specific color variables and responsive layout tweaks for small screens.
src/infrastructure/reporting/templates/BlueArchive/html_template.html
src/infrastructure/reporting/templates/BlueArchive/image_template.html
src/infrastructure/reporting/templates/BlueArchive/activity_chart.html
src/infrastructure/reporting/templates/BlueArchive/topic_item.html
src/infrastructure/reporting/templates/BlueArchive/user_title_item.html
src/infrastructure/reporting/templates/BlueArchive/quote_item.html
src/infrastructure/reporting/templates/BlueArchive/chat_quality_item.html
Showcase the new BlueArchive template in the README gallery.
  • Insert a new table cell in the README template gallery with label 'BlueArchive' and a demo image hosted on jsDelivr.
README.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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

Hey - I've left some high level feedback:

  • The html_template.html and image_template.html files are almost completely duplicated; consider extracting the shared layout and styles into a common base template or CSS to reduce maintenance overhead and risk of divergence.
  • Several external resources (fonts and character images) are hardcoded to specific CDN/HTTP(S) URLs; making these configurable (or serving locally) would improve robustness if those endpoints change or become unavailable.
  • Color palettes for dimensions are defined inline in multiple Jinja templates (e.g. chat_quality_item.html and activity_chart.html); centralizing these color definitions would make it easier to keep the visual style consistent and to tweak in one place.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `html_template.html` and `image_template.html` files are almost completely duplicated; consider extracting the shared layout and styles into a common base template or CSS to reduce maintenance overhead and risk of divergence.
- Several external resources (fonts and character images) are hardcoded to specific CDN/HTTP(S) URLs; making these configurable (or serving locally) would improve robustness if those endpoints change or become unavailable.
- Color palettes for dimensions are defined inline in multiple Jinja templates (e.g. `chat_quality_item.html` and `activity_chart.html`); centralizing these color definitions would make it easier to keep the visual style consistent and to tweak in one place.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@SXP-Simon

Copy link
Copy Markdown
Owner

感谢贡献,能不能看看效果图

可能要等我考完期末再来 review 了,抱歉

@VanillaNahida

Copy link
Copy Markdown
Author

感谢贡献,能不能看看效果图

可能要等我考完期末再来 review 了,抱歉

你好,效果图我已经放在第一个评论的描述里了
可以再看看:https://fastly.jsdelivr.net/gh/VanillaNahida/astrbot_plugin_qq_group_daily_analysis@main/assets/BlueArchive-demo.jpg

BlueArchive

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.

2 participants