Repository navigation
types: remove an unused import and check unused locals like VS Code - #611
Merged
Connor Peet (connor4312) merged 2 commits intoNov 18, 2026
Merged
Conversation
AutomationDefinitionPatch.target no longer links AutomationNewSessionTarget, so its import is unused. Consumers that copy the types with unused-import checks, such as VS Code, fail to compile. Co-authored-by: Copilot <[email protected]>
VS Code compiles the synced types with noUnusedLocals, noImplicitReturns, noImplicitOverride, noUncheckedSideEffectImports and allowUnreachableCode: false, so a type that passes here can still break its sync. Turn the same checks on here. The message map assertions are exported so they still count as used; nothing imports this file. Co-authored-by: Copilot <[email protected]>
Federico Brancasi (federicobrancasi)
requested review from
Connor Peet (connor4312) and
roblourens
as code owners
November 18, 2026 15:51
Connor Peet (connor4312)
approved these changes
Nov 18, 2026
Connor Peet (connor4312)
enabled auto-merge (squash)
November 18, 2026 15:55
Connor Peet (connor4312)
deleted the
fbrancasi/remove-unused-target-import
branch
November 18, 2026 15:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#604 removed the doc link from
AutomationDefinitionPatch.targettoAutomationNewSessionTarget, buttypes/channels-automation/actions.tsstill imports it. AHP's typecheck allows that, but VS Code compiles the synced types withnoUnusedLocals, so syncing #604 into VS Code fails with TS6196.types/tsconfig.json:noUnusedLocals,noImplicitReturns,noImplicitOverride,noUncheckedSideEffectImportsandallowUnreachableCode: false, so a change that would break the VS Code sync now fails here first._Check…assertions intypes/version/message-checks.tsso they still count as used. Nothing imports that file and the package entry doesn't re-export it, so the public API is unchanged. VS Code's sync skips it.No protocol change:
npm run generateproduces no changes, so there is no changelog fragment.Validation:
npm run typecheckwith the old import put back: fails with TS6196 onAutomationNewSessionTarget, so the new settings catch this case.npm run generate: no changes.npm test: 667 passing.clients/typescript:npm test, 79 passing.scripts/sync-agent-host-protocol.ts, thenpnpm run typecheck-client: passed.