Skip to content

fix: merge duplicate imports in a2a-server package (2/4)#19781

Merged
scidomino merged 10 commits intogoogle-gemini:mainfrom
Nixxx19:nityam/cleanup-import-no-duplicates-a2a
Feb 27, 2026
Merged

fix: merge duplicate imports in a2a-server package (2/4)#19781
scidomino merged 10 commits intogoogle-gemini:mainfrom
Nixxx19:nityam/cleanup-import-no-duplicates-a2a

Conversation

@Nixxx19
Copy link
Contributor

@Nixxx19 Nixxx19 commented Feb 21, 2026

Summary

This PR consolidates duplicate import statements from the same modules to comply with the import/no-duplicates ESLint rule.

Part 2 of 4 - Fixes 10 files in packages/a2a-server

Changes

  • packages/a2a-server (10 files):
    • Merged duplicate imports from @google/gemini-cli-core in multiple files
    • Merged duplicate imports from ../types.js in agent files
    • Merged duplicate imports from @a2a-js/sdk/server in task.ts
    • Merged duplicate imports from vitest in gcs.test.ts

Testing

  • ✅ All a2a-server tests pass (99 tests)
  • ✅ ESLint passes with no warnings
  • ✅ Pre-commit hooks pass

Related

Consolidate duplicate import statements from the same modules to comply
with the import/no-duplicates ESLint rule.

Changes:
- Merged duplicate imports from '@google/gemini-cli-core' in multiple files
- Merged duplicate imports from '../types.js' in agent files
- Merged duplicate imports from '@a2a-js/sdk/server' in task.ts
- Merged duplicate imports from 'vitest' in gcs.test.ts

This is part 2 of 4 PRs to clean up import/no-duplicates warnings across
the codebase (10 files in a2a-server package).
@Nixxx19 Nixxx19 requested a review from a team as a code owner February 21, 2026 04:14
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Nixxx19, 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 focuses on improving code quality and adherence to ESLint rules by consolidating duplicate import statements within the packages/a2a-server package. The changes streamline module imports, making the code cleaner and more maintainable. This is a targeted effort, addressing 10 specific files as part of a broader initiative to eliminate import/no-duplicates violations.

Highlights

  • Import Consolidation: Consolidated duplicate import statements in 10 files within the packages/a2a-server directory to comply with the import/no-duplicates ESLint rule.
  • Module Specific Merges: Merged imports from @google/gemini-cli-core across several files, combined type imports from ../types.js in agent-related files, streamlined imports from @a2a-js/sdk/server in task.ts, and unified vitest imports in gcs.test.ts.
  • Part of a Larger Fix: This pull request represents the second part of a four-part series aimed at fixing import duplication issues across the codebase.
Changelog
  • packages/a2a-server/src/agent/executor.ts
    • Merged ToolCallRequestInfo and Config into an existing import from @google/gemini-cli-core.
    • Merged StateChange, AgentSettings, and PersistedStateMetadata into an existing import from ../types.js.
  • packages/a2a-server/src/agent/task.test.ts
    • Merged ToolCall into an existing import from @google/gemini-cli-core.
  • packages/a2a-server/src/agent/task.ts
    • Merged RequestContext into an existing import from @a2a-js/sdk/server.
    • Merged CoderAgentMessage, StateChange, ToolCallUpdate, TextContent, TaskMetadata, Thought, ThoughtSummary, and Citation into an existing import from ../types.js.
  • packages/a2a-server/src/commands/init.test.ts
    • Merged CommandActionReturn and Config into an existing import from @google/gemini-cli-core.
  • packages/a2a-server/src/commands/memory.test.ts
    • Merged AnyDeclarativeTool, Config, and ToolRegistry into an existing import from @google/gemini-cli-core.
  • packages/a2a-server/src/config/config.ts
    • Merged TelemetryTarget, ConfigParameters, and ExtensionLoader into an existing import from @google/gemini-cli-core.
  • packages/a2a-server/src/http/app.test.ts
    • Merged Config into an existing import from @google/gemini-cli-core.
  • packages/a2a-server/src/persistence/gcs.test.ts
    • Merged Mocked, MockedClass, and Mock into an existing import from vitest.
  • packages/a2a-server/src/utils/executor_utils.ts
    • Merged StateChange into an existing import from ../types.js.
  • packages/a2a-server/src/utils/testing_utils.ts
    • Merged Config and Storage into an existing import from @google/gemini-cli-core.
Activity
  • All a2a-server tests passed (99 tests).
  • ESLint passed with no warnings.
  • Pre-commit hooks passed.
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.

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 correctly consolidates duplicate import statements across multiple files in the packages/a2a-server directory. The changes are straightforward, improve code cleanliness, and align with the stated goal of fixing the import/no-duplicates ESLint rule. The implementation is sound, and I see no issues with the proposed refactoring.

@gemini-cli gemini-cli bot added priority/p2 Important but can be addressed in a future release. help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! labels Feb 26, 2026
@scidomino scidomino enabled auto-merge February 27, 2026 21:02
@scidomino scidomino added this pull request to the merge queue Feb 27, 2026
Merged via the queue into google-gemini:main with commit ba149af Feb 27, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! priority/p2 Important but can be addressed in a future release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleanup existing import/no-duplicates warnings and suppressions

3 participants