Skip to content

feat(#314): Auto-YesにStop条件(正規表現)追加#316

Merged
Kewton merged 1 commit intodevelopfrom
feature/314-worktree
Feb 19, 2026
Merged

feat(#314): Auto-YesにStop条件(正規表現)追加#316
Kewton merged 1 commit intodevelopfrom
feature/314-worktree

Conversation

@Kewton
Copy link
Owner

@Kewton Kewton commented Feb 19, 2026

Summary

  • Auto-Yes確認ダイアログにStop条件(正規表現)入力フィールドを追加
  • ターミナル出力がパターンにマッチした場合にAuto-Yesを自動停止しトースト通知
  • safe-regex2によるReDoS対策、executeRegexWithTimeoutによるタイムアウト保護
  • デルタベースのStop条件チェックで既存ターミナル内容による誤発動を防止

Changes

  • src/config/auto-yes-config.ts: validateStopPattern(), MAX_STOP_PATTERN_LENGTH, AutoYesStopReason型
  • src/lib/auto-yes-manager.ts: disableAutoYes(), checkStopCondition(), executeRegexWithTimeout(), デルタベースチェック
  • src/app/api/worktrees/[id]/auto-yes/route.ts: stopPatternバリデーション
  • src/app/api/worktrees/[id]/current-output/route.ts: stopReason返却
  • src/components/worktree/AutoYesConfirmDialog.tsx: Stop条件入力UI
  • src/components/worktree/AutoYesToggle.tsx: AutoYesToggleParamsオブジェクト引数パターン
  • src/components/worktree/WorktreeDetailRefactored.tsx: トースト通知、handleAutoYesToggle変更
  • locales/ja/autoYes.json, locales/en/autoYes.json: 6翻訳キー追加

Test plan

  • Stop条件なしでAuto-Yesが従来通り動作する
  • Stop条件にkewtonを入力して有効化 → 既存ターミナル内容で誤発動しない
  • AIの新規出力にパターンがマッチした場合にAuto-Yesが停止しトースト通知される
  • 不正な正規表現入力時にバリデーションエラーが表示される
  • ReDoSパターン (a+)+$ が拒否される
  • 118/118 ユニットテストパス、lint/typeエラー0件

🤖 Generated with Claude Code

…gers

Stop condition was matching pre-existing terminal content (shell prompts,
paths containing pattern text) causing Auto-Yes to be disabled immediately
after enabling. Now only checks NEW output since polling started.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Kewton Kewton merged commit 52ac994 into develop Feb 19, 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