code-yeongyu / code-yeongyu/senpi
Support lossless extension shortcut sequences
- Dominant language
- TypeScript
- Stars
- 429
- Forks
- 98
- Avg merge
- 5h 3m
- Merged PRs (30d)
- 526
Description
## Motivation
Extensions can currently register single-key shortcuts, but they cannot safely own a multi-key sequence such as `Ctrl+X`, then `Down`.
This matters for subagent tooling: users can see that child agents are running, but an extension needs a conflict-safe way to open an inspection surface without replacing Senpi's existing `Ctrl+X` copy behavior.
## Requested behavior
- Add a public extension API for ordered shortcut sequences.
- Use a 2,000 ms leader window by default.
- Let extensions provide an optional availability predicate.
- Replay buffered input exactly once on timeout or mismatch.
- Preserve existing single-key shortcuts and immediate `Ctrl+X` copy when no sequence is available.
- Dispose pending timers and registrations during reload or shutdown.
## Why this belongs in Senpi
Senpi owns terminal input dispatch and existing keybindings. Implementing sequence matching in a consumer extension would either swallow input or duplicate host behavior. A host-level API keeps replay, conflict handling, diagnostics, and lifecycle ownership in one place.
Contributor guide
Research direction
Start by tracing Senpi's terminal input dispatch and existing extension shortcut registration, then inspect the current Ctrl+X copy path. The work is done when extensions can register ordered sequences with availability checks, timeout or mismatch replay, preserved single-key behavior, and cleanup during reload or shutdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100