Skip to content

fix(#287): プロンプト検出の誤検出防止とカーソルキーロジック統合#291

Merged
Kewton merged 3 commits intodevelopfrom
feature/287-worktree
Feb 16, 2026
Merged

fix(#287): プロンプト検出の誤検出防止とカーソルキーロジック統合#291
Kewton merged 3 commits intodevelopfrom
feature/287-worktree

Conversation

@Kewton
Copy link
Owner

@Kewton Kewton commented Feb 16, 2026

Summary

  • Bug2修正: sendPromptAnswer()prompt-answer-sender.ts に共通化し、auto-yes-manager.tsprompt-response/route.ts のカーソルキーロジック重複を解消
  • Bug3修正: prompt-detector.ts の Pass 2 逆方向スキャンに バリアを追加し、過去の会話テキスト内の番号付きリストを multiple_choice プロンプトとして誤検出する問題を修正
  • テスト: 新規テスト 414行 (prompt-answer-sender) + 73行 (prompt-detector バリアテスト) 追加

Changes

Bug 内容 変更ファイル
Bug2 sendPromptAnswer() 共通化 src/lib/prompt-answer-sender.ts (新規), src/lib/auto-yes-manager.ts, src/app/api/.../route.ts
Bug3 ❯ バリアによる誤検出防止 src/lib/prompt-detector.ts

Test plan

  • ユニットテスト 3439/3439 passed
  • prompt-detector テスト 165 passed (Bug3: 4件追加)
  • prompt-answer-sender テスト新規追加 (Bug2)
  • ESLint / TypeScript 0 errors
  • ビルド成功
  • 受入テスト全パス

🤖 Generated with Claude Code

Kewton and others added 3 commits February 16, 2026 18:50
…-key logic duplication

Bug2: route.ts and auto-yes-manager.ts had fully duplicated cursor-key
sending logic. When Bug1 fix (fallbackPromptType) was applied to route.ts,
auto-yes-manager.ts was missed. Extract shared sendPromptAnswer() into
src/lib/prompt-answer-sender.ts to ensure both modules use identical logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tection

Add U+276F (❯) barrier in Pass 2 backward scan of detectMultipleChoicePrompt().
When no options have been collected and the line starts with ❯ but does not
match DEFAULT_OPTION_PATTERN, scanning stops to prevent historical numbered
lists from being falsely detected as active prompts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Kewton Kewton changed the title refactor(#287): extract shared sendPromptAnswer() for DRY cursor-key logic fix(#287): プロンプト検出の誤検出防止とカーソルキーロジック統合 Feb 16, 2026
@Kewton Kewton merged commit 5776675 into develop Feb 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant