Fix the plan-mode exit action type name in the fleet mode guide - #2090
Merged
Conversation
The "From plan mode" section of docs/features/fleet-mode.md introduces its snippet with "The generated session event types describe it as:", but names the union `PlanModeExitAction`. The generated session-event API declares `ExitPlanModeAction`, and the Node.js package root re-exports it as a type. `PlanModeExitAction` appeared only in this documentation example and is not an importable SDK symbol, so importing that formerly documented name from `@github/copilot-sdk` does not compile. The four string values were already correct; only the name changes.
Contributor
There was a problem hiding this comment.
Pull request overview
Corrects the fleet mode guide to use the exported session-event type name.
Changes:
- Renames
PlanModeExitActiontoExitPlanModeActionin the TypeScript snippet.
Show a summary per file
| File | Description |
|---|---|
docs/features/fleet-mode.md |
Aligns the documented type name with the generated SDK export. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Medium
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.
The "From plan mode" section of
docs/features/fleet-mode.mdintroduces its snippet with "Thegenerated session event types describe it as:", and then labels the union
PlanModeExitAction.The generated session-event union is
ExitPlanModeAction; the SDK does not export thedocumented name, which appears nowhere in the repository outside that snippet and nowhere in the
published package.
This renames the identifier in that one snippet. The four string values were already correct.
Fixes #2089
The change
One token, in
docs/features/fleet-mode.md.Why this identifier
ExitPlanModeActionis declared innodejs/src/generated/session-events.tsand re-exportedas a type from the package root.
actions,recommendedActionandselectedAction.autopilot_fleetmatches the one on that declaration.Before and after
Against the published package (
@github/copilot-sdk@1.0.8, TypeScript 5.9.3,strict,moduleResolution: NodeNext,skipLibCheck):A value outside the union is still rejected (
error TS2322: Type '"autopilot_swarm"' is not assignable to type 'ExitPlanModeAction'), so the corrected name really does resolve to thefour-value union.
Checks
npm run extract && npm run validate:tsinscripts/docs-validationpasses before and afterthis change - the snippet declares its own alias, so it compiled either way. The four values and
their order match
nodejs/src/generated/session-events.tsexactly.Only
docs/features/fleet-mode.mdchanges; no generated file, binding source, or public API istouched.