Skip to content

Add reset() to the terminal controller#1

Merged
noah-wardlow merged 1 commit into
mainfrom
feat/reset-controller-method
Jun 5, 2026
Merged

Add reset() to the terminal controller#1
noah-wardlow merged 1 commit into
mainfrom
feat/reset-controller-method

Conversation

@noah-wardlow

Copy link
Copy Markdown
Owner

Problem

The TerminalController exposes clear() but not xterm's full reset(). clear() only wipes scrollback while keeping the current prompt line, so there is no way to blank the screen entirely — what an app wants when starting a fresh session.

Change

Add reset() to the controller, forwarding to xterm's Terminal.reset():

  • types.tsreset: () => void on TerminalController, plus a doc line on each clearing method noting the clear vs reset distinction.
  • use-xterm.ts — wire reset into the stable handle next to clear.
  • README.md — document reset in the controller surface.

Ported from downstream usage where a "new session" action needed a full blank, not just a scrollback clear. Typecheck and tsup build pass.

🤖 Generated with Claude Code

Expose xterm's full `reset()` alongside `clear()` on the controller.
`clear()` wipes scrollback but keeps the prompt line; `reset()` blanks
the screen entirely, which apps want when starting a fresh session.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@noah-wardlow noah-wardlow merged commit 2b04995 into main Jun 5, 2026
1 check passed
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant