Skip to content

fix(webui): add changelog button and author display to plugin card view#6695

Open
Yaohua-Leo wants to merge 5 commits intoAstrBotDevs:masterfrom
Yaohua-Leo:fix/6639-plugin-changelog-and-author
Open

fix(webui): add changelog button and author display to plugin card view#6695
Yaohua-Leo wants to merge 5 commits intoAstrBotDevs:masterfrom
Yaohua-Leo:fix/6639-plugin-changelog-and-author

Conversation

@Yaohua-Leo
Copy link
Contributor

@Yaohua-Leo Yaohua-Leo commented Mar 20, 2026

Summary

Fix #6639 - 新版本 AstrBot 中无法自由查看插件的更新日志

Problem

After the 4.18.x plugin page optimization, two features were lost in the card view:

  1. No way to view plugin changelog
  2. Plugin author information not displayed

Solution

Changes Made

  1. ExtensionCard.vue - Added changelog button to card actions bar:

    • New tooltip button with mdi-update icon
    • Triggers viewChangelog event (already implemented in parent)
  2. ExtensionCard.vue - Added author display:

    • Shows author name below plugin description
    • Includes user icon for visual clarity
  3. i18n translations - Added viewChangelog key:

    • en-US: "Changelog"
    • zh-CN: "更新日志"
    • ru-RU: "Журнал изменений"

Testing

The fix was verified by checking:

  • The changelog button is now visible in the card view actions bar
  • The author name is displayed below the plugin description
  • All three language translations are properly added

Summary by Sourcery

Restore missing plugin metadata in the web UI and fix tool call and sender metadata handling in backend providers.

New Features:

  • Show plugin author information on the extension card view.
  • Add a changelog button to the extension card actions bar with localized labels.

Bug Fixes:

  • Ensure streaming tool_call deltas always have an index field, improving compatibility with Gemini and OpenAI-compatible proxies.
  • Use Telegram users' full name or first name as the message sender name when available instead of relying solely on username.

Enhancements:

  • Add i18n entries for the new changelog action in supported languages.
  • Introduce a small test script to validate the tool_call delta index fix and syntax of the updated provider module.

Chores:

  • Add placeholder PR body text files for internal workflow or documentation.

Yaohua-Leo added 5 commits March 20, 2026 18:19
- Fix AstrBotDevs#6661: Streaming tool_call arguments lost when OpenAI-compatible proxy omits index field
- Gemini and some proxies (e.g. Continue) don't include index field in tool_call deltas
- Add default index=0 when missing to prevent ChatCompletionStreamState.handle_chunk() from rejecting chunks

Fixes AstrBotDevs#6661
- Use enumerate() to assign correct index based on list position
- Iterate over all choices (not just the first) for completeness
- Addresses review feedback from sourcery-ai and gemini-code-assist
…ckname

Fix AstrBotDevs#6657 - Telegram 暱稱與用戶 ID 問題

Previously, plugins used the Telegram username as the user's nickname,
which was inconsistent with the actual display name. Now uses the
priority order: full_name > first_name > username > Unknown

This ensures plugins can properly match users by their numeric ID
instead of relying on username, and the agent can address users by
their actual display name.
Addresses review feedback from sourcery-ai to ensure robustness
against provider-specific schema quirks during streaming.
Fix AstrBotDevs#6639 - 新版本 AstrBot 中无法自由查看插件的更新日志

Changes:
- Add changelog button (mdi-update) to ExtensionCard actions bar
- Add author display below plugin description in card view
- Add i18n translations for viewChangelog button (EN/ZH/RU)
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 20, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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!

This pull request introduces several key improvements across the application. For the web user interface, it enhances the plugin card view by adding a dedicated button to access plugin changelogs and displaying the author's name, along with necessary internationalization updates. On the backend, it includes a fix for Telegram message sender name resolution to ensure more accurate display names and a critical fix for OpenAI API integrations to prevent data loss when streaming tool call arguments from certain proxies that may omit the 'index' field.

Highlights

  • Web UI Enhancements: Added a changelog button to the plugin card view, allowing users to easily access plugin update logs.
  • Author Display: Implemented the display of plugin author information directly on the plugin card for better visibility.
  • Internationalization: Provided translations for the new 'Changelog' button across English, Simplified Chinese, and Russian locales.
  • Telegram Sender Name Resolution: Improved the logic for resolving Telegram message sender names, prioritizing full name, then first name, then username.
  • OpenAI Tool Call Index Fix: Addressed an issue where streaming tool call arguments were lost if OpenAI-compatible proxies (like Gemini) omitted the 'index' field, by assigning a default index when missing.
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.

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.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

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 new test-fix.sh and pr-body*.txt files look like one-off tooling/PR artifacts; consider removing them from the repo or moving them into an appropriate dev/CI directory if they are meant to be kept.
  • In test-fix.sh, the apply_index_fix helper always assigns index = 0, which doesn’t match the production logic in openai_source.py (which uses enumerate); aligning the test logic with the real implementation would make the check more accurate and less confusing.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `test-fix.sh` and `pr-body*.txt` files look like one-off tooling/PR artifacts; consider removing them from the repo or moving them into an appropriate dev/CI directory if they are meant to be kept.
- In `test-fix.sh`, the `apply_index_fix` helper always assigns `index = 0`, which doesn’t match the production logic in `openai_source.py` (which uses `enumerate`); aligning the test logic with the real implementation would make the check more accurate and less confusing.

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.

@dosubot dosubot bot added area:webui The bug / feature is about webui(dashboard) of astrbot. feature:plugin The bug / feature is about AstrBot plugin system. labels Mar 20, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively addresses the reported issues by reintroducing the changelog button and author display to the plugin card view in the web UI. Additionally, it includes a crucial fix for the missing 'index' field in tool_call deltas, ensuring better compatibility with various OpenAI-compatible proxies like Gemini. The changes to Telegram's sender name prioritization are also a welcome improvement for user experience. All implemented changes align with the problem descriptions and solutions outlined in the pull request body.

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

Labels

area:webui The bug / feature is about webui(dashboard) of astrbot. feature:plugin The bug / feature is about AstrBot plugin system. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 新版本 AstrBot 中无法自由查看插件的更新日志

1 participant