Skip to content

feature (fileblock): Support FileBlock in AgentScope and Bump to v1.1.0b3#436

Merged
AgentScopeTeam merged 5 commits intoagentscope-ai:mainfrom
rayrayraykk:weirui/dev/fileblock
Feb 5, 2026
Merged

feature (fileblock): Support FileBlock in AgentScope and Bump to v1.1.0b3#436
AgentScopeTeam merged 5 commits intoagentscope-ai:mainfrom
rayrayraykk:weirui/dev/fileblock

Conversation

@rayrayraykk
Copy link
Copy Markdown
Member

No description provided.

@rayrayraykk rayrayraykk requested review from a team and Copilot February 5, 2026 03:20
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @rayrayraykk, 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 significantly enhances the AgentScope runtime by adding robust support for file content within its messaging system. It establishes a standardized FileBlock structure for representing files, enabling the system to seamlessly handle and stream file data, whether it's embedded directly as base64 or linked via a URL. This improvement broadens the scope of information that can be processed and exchanged through AgentScope messages.

Highlights

  • New FileBlock Support: Introduced a new FileBlock TypedDict to represent file content within messages, supporting both base64 encoded data and URL references.
  • Message Processing Enhancement: Modified the message validation and parsing logic to correctly identify and process file type blocks, converting raw file data or URLs into structured FileBlock objects.
  • Streaming Integration: Integrated FileBlock handling into the message streaming mechanism, allowing file content to be properly adapted and streamed as FileContent.
  • Version Update: Updated the project version from 1.1.0b2 to 1.1.0b3 across pyproject.toml and src/agentscope_runtime/version.py.
Changelog
  • pyproject.toml
    • Updated project version from 1.1.0b2 to 1.1.0b3.
  • src/agentscope_runtime/adapters/agentscope/message.py
    • Added Literal, TypedDict, and Required imports for type hinting.
    • Defined FileBlock TypedDict to standardize file content representation.
    • Extended is_valid_block function to include file type in block mapping and implement parsing logic for base64 and URL file sources.
  • src/agentscope_runtime/adapters/agentscope/stream.py
    • Imported FileContent for streaming file blocks.
    • Modified adapt_agentscope_message_stream to handle file type elements, converting them into FileContent objects for streaming, supporting both URL and base64 sources.
  • src/agentscope_runtime/version.py
    • Updated __version__ from v1.1.0b2 to v1.1.0b3.
Activity
  • No activity has been recorded for this pull request yet.
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.

@rayrayraykk rayrayraykk changed the title feature (fileblock): Support FileBlock in AgentScope feature (fileblock): Support FileBlock in AgentScope and Bump to v1.1.0b3 Feb 5, 2026
Copy link
Copy Markdown

@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 adds support for FileBlock in AgentScope. The changes are generally in the right direction, but I've identified a critical issue in src/agentscope_runtime/adapters/agentscope/message.py where a TypedDict is being instantiated incorrectly, which will lead to a runtime error. I've also provided suggestions to improve code robustness, readability, and maintainability by refactoring data URI parsing and simplifying verbose logic.

Comment thread src/agentscope_runtime/adapters/agentscope/message.py
Comment thread src/agentscope_runtime/adapters/agentscope/message.py
Comment thread src/agentscope_runtime/adapters/agentscope/stream.py
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 adds support for FileBlock in AgentScope, enabling file content handling in both message conversion and streaming scenarios.

Changes:

  • Version bumped from v1.1.0b2 to v1.1.0b3 across version.py and pyproject.toml
  • Introduced FileBlock TypedDict to define file block structure with URL/base64 source support
  • Extended message-to-Msg conversion to handle file content types with filename metadata
  • Added file content streaming support with both URL and base64 data handling

Reviewed changes

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

File Description
src/agentscope_runtime/version.py Version bump to v1.1.0b3
pyproject.toml Version bump to v1.1.0b3 to maintain consistency
src/agentscope_runtime/adapters/agentscope/message.py Adds FileBlock TypedDict definition and integrates file content handling in message conversion logic with support for both URL and base64 sources
src/agentscope_runtime/adapters/agentscope/stream.py Imports FileContent and adds streaming support for file blocks with URL and base64 data handling

Comment thread src/agentscope_runtime/adapters/agentscope/message.py
@AgentScopeTeam AgentScopeTeam merged commit ed121f5 into agentscope-ai:main Feb 5, 2026
13 checks passed
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