Skip to content

Feature/support video url#422

Closed
iSample wants to merge 2 commits intoagentscope-ai:mainfrom
iSample:feature/support_video_url
Closed

Feature/support video url#422
iSample wants to merge 2 commits intoagentscope-ai:mainfrom
iSample:feature/support_video_url

Conversation

@iSample
Copy link
Copy Markdown
Collaborator

@iSample iSample commented Jan 26, 2026

Description

[Describe what this PR does and why]

Related Issue: Fixes #[issue_number] or Relates to #[issue_number]

Security Considerations: [If applicable, especially for sandbox changes]

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactoring

Component(s) Affected

  • Engine
  • Sandbox
  • Tools
  • Common
  • Documentation
  • Tests
  • CI/CD

Checklist

  • Pre-commit hooks pass
  • Tests pass locally
  • Documentation updated (if needed)
  • Ready for review

Testing

[How to test these changes]

Additional Notes

[Optional: any other context]

@iSample iSample requested a review from a team January 26, 2026 02:57
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @iSample, 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 enhances the system's data modeling capabilities by introducing explicit support for video content through a new ContentType enum member and a dedicated VideoContent schema. Additionally, it includes the definition of a new McpApprovalResponse schema, which provides a structured format for handling approval-related data.

Highlights

  • Video Content Type Support: Introduced a new VIDEO type within the ContentType enumeration, enabling the system to explicitly categorize video content.
  • Video Content Schema Definition: Added a VideoContent Pydantic model, which defines the structure for representing video content, including an optional video_url field.
  • MCP Approval Response Schema: Implemented a new McpApprovalResponse Pydantic model, designed to handle approval responses with fields such as approval_request_id, approve, id, and reason.
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.

@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Jan 26, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


hexuguang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Jan 26, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


hexuguang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@rayrayraykk
Copy link
Copy Markdown
Member

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 introduces support for video content by adding a VIDEO content type and a corresponding VideoContent schema. The changes are a good step, but I've identified a critical issue and a high-severity issue. The new VideoContent type is not added to the AgentContent type alias, which will prevent it from being used in messages. Additionally, the McpApprovalResponse class has an incorrect docstring for its approve field. I've provided specific comments and suggestions for these issues. As a further improvement, consider adding a get_video_content() method to the Message class for consistency with existing methods for other media types.

Comment on lines +405 to +412
class VideoContent(Content):
type: Literal[ContentType.VIDEO] = ContentType.VIDEO
"""The type of the content part."""

video_url: Optional[str] = None
"""The video URL details."""


Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

The new VideoContent type is not included in the AgentContent Union type alias (defined on lines 464-474). This will prevent VideoContent from being used within a Message's content list and will likely cause validation errors at runtime. Please add VideoContent to the AgentContent union type to complete the video support feature.

Comment on lines +236 to +244
"""
mcp approval response
"""

approval_request_id: str
"""The unique ID of the approval request."""

approve: bool
"""A json string of arguments for the tool."""
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The docstrings for this class and its approve field could be improved for clarity and correctness. The class docstring should be capitalized, and the docstring for approve is incorrect for a boolean field, likely a copy-paste error.

Suggested change
"""
mcp approval response
"""
approval_request_id: str
"""The unique ID of the approval request."""
approve: bool
"""A json string of arguments for the tool."""
"""
Mcp approval response
"""
approval_request_id: str
"""The unique ID of the approval request."""
approve: bool
"""Whether the approval request is approved."""

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