feat: add /repeat command and --repeat CLI flag#14
Merged
Conversation
…+Enter handling Status row text (e.g. "Update available! Run: curl ...") was never truncated on the right side, causing terminal wrapping on narrow windows. This broke the moveUp cursor calculation and left the cursor outside the composer box. Now the right part is clipped to fit the terminal width before gap calculations. Also adds support for xterm modifyOtherKeys level 2 Shift+Enter sequences (ESC[27;modifier;13~) and broadens residual fragment detection so stray CSI codes don't leak into the text buffer.
Introduces a new /repeat command that lets users schedule prompts to run on a recurring cadence. The command uses LLM-first parsing with regex fallback to extract intervals from natural language input. Key features: - RepeatManager with in-process setInterval scheduling and auto-expiry - LLM parses schedule, prompt, maxRuns, and custom expiry from input - maxRuns support: auto-cancels after N executions (e.g. "only 10 times") - Custom expiry: override default 3-day limit (e.g. "for the next week") - Disambiguation rule: when conflicting intervals exist, the most specific one wins and the broader becomes expiry context - /repeat list and /repeat cancel subcommands - promptInterrupt mechanism for injecting repeat prompts into the idle input loop without polling
Adds parseRepeatFlag() and buildRepeatRunConfig() for the --repeat CLI flag, enabling headless recurring prompts without the interactive shell. Supports two-arg form (interval + prompt) and single-string natural language parsing with automatic interval extraction. Handles --max-runs and --expires options, validates interval formats, preserves technical content like shell commands and file paths in prompts, and falls back to a 5-minute default when no interval is detected.
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
/repeatslash command with RepeatManager, maxRuns, custom expiry, and interval disambiguation--repeatCLI flag for non-interactive recurring modeTest plan