[codex] Refactor session slash command module#31
Merged
Conversation
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.
Summary
Refactors the M4 session slash-command slice so
/continue,/clear, and the/session ...command family run through the core slash command registry instead of the TUI local command switchboard.Changes include:
src/core/commands/slash/modules/session/session-commands.tsfor session command behavior and module-owned static hints.SlashCommandExecutionContextand wired them from the TUI slash command adapter.local-commands.ts; dynamic/session switch <id>hints remain in the TUI wrapper because that API receives live session state.Impact
This keeps existing TUI behavior stable while moving session command policy into a reusable core module. Session reference resolution now has a dedicated pure helper and preserves the existing exact-id-before-index behavior.
Validation
yarn test:unit src/__tests__/unit/core/slash-command-modules.test.tsyarn test:unit src/__tests__/unit/tui/local-commands.test.tsyarn vitest run src/__tests__/integration/tui/session-cli.test.tsyarn eslintyarn typecheckyarn testoutside the sandbox, because the full integration suite needs localhost binding and normal git identity for temp repositories