Fix #162 インタラクティブモードのスラッシュコマンドを行末でも認識可能にする#406
Open
Yuma-Satake wants to merge 2 commits intonrslib:mainfrom
Open
Fix #162 インタラクティブモードのスラッシュコマンドを行末でも認識可能にする#406Yuma-Satake wants to merge 2 commits intonrslib:mainfrom
Yuma-Satake wants to merge 2 commits intonrslib:mainfrom
Conversation
- スラッシュコマンド検出ロジックを commandMatcher.ts に分離 - 行頭・行末の両方でコマンドを認識し、行中は無視する仕様を実装 - conversationLoop を早期リターン + switch ディスパッチにリファクタリング - SlashCommand 定数を shared/constants に追加 - コマンドマッチングのユニットテスト36件を追加 - 行末コマンド・行中非認識のE2Eテスト6件を追加 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Yuma-Satake
commented
Feb 26, 2026
Contributor
Author
There was a problem hiding this comment.
差分大きくなっていますが、
- 元々前側にあったコマンドの識別機構を切り出し
- マッチしていなければ通常のテキストとして扱う処理を前側に移動
- コマンド振り分けをswitchに
という内容なので、実際の差分はそこまで大きくありません
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
概要
インタラクティブモードのスラッシュコマンド(
/play,/go,/cancel等)を、行頭だけでなく行末でも認識できるようにした。変更内容
src/shared/constants.ts—SlashCommand定数オブジェクトを追加src/features/interactive/commandMatcher.ts— スラッシュコマンド検出ロジックを新規モジュールとして分離src/features/interactive/conversationLoop.ts—matchSlashCommandを使用するよう変更確認したこと
test/lintのパス
以下の手動チェック(2枚目はチェック用にログ出し)