fix: merge duplicate imports in packages/core (3/4)#20928
fix: merge duplicate imports in packages/core (3/4)#20928scidomino merged 15 commits intogoogle-gemini:mainfrom
Conversation
|
You already have 7 pull requests open. Please work on getting existing PRs merged before opening more. |
Summary of ChangesHello, 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 systematically refactors import statements across 141 files within the Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request correctly merges duplicate import statements across a large number of files in packages/core, improving code consistency. The changes align with modern TypeScript syntax by combining type and value imports. However, I found one critical issue in packages/core/src/telemetry/loggers.test.ts where value imports were incorrectly merged into a type-only import statement. This will likely break the build and needs to be corrected to follow the pattern used elsewhere in this PR.
|
@Nixxx19 Run the preflight. If you don't get it right on the next try I will ask you to break this into chunk and send me small PRs with no more than 30 files in each one. |
- Move enums (CoreToolCallStatus, ROOT_SCHEDULER_ID, HookEventName, ConfigSource, HookType, AuthType, ToolConfirmationOutcome, ToolErrorType) from type imports to value imports - Move classes (ToolRegistry, GeminiClient, EditTool) from type imports to value imports - These were incorrectly marked as type-only imports during duplicate import merge - Fixes TypeScript error TS1361: cannot be used as a value because it was imported using 'import type'
Head branch was pushed to by a user without write access
|
@scidomino ran preflight locally and the build passed. |
|
thank you so much @scidomino !! |
Summary
packages/coretypesyntaximport/no-duplicatesESLint ruleChanges
--fixwithimport/no-duplicatesrule to automatically merge most duplicatesgetFolderStructure.test.tsto use correct namespace import referencesTesting
Stats
Related
Fixes #19753 - PR 3 of 4 (packages/core)
Previous PRs: