omp packages

@webdavis/omp-clearscreen0.2.2

Clear omp's screen, keeping the scrollback, the session and its context.

GitHub Actions Published 4 days ago MIT ~233 downloads/mo

Built for omp

The author tagged this package oh-my-pi.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

omp-clearscreen

Press Ctrl+\, or run the /clearscreen command in omp to clear the screen.

/clearscreen works just like Ctrl+L does in a Bash terminal. The messages move up into the terminal's scrollback. If you need to see what was on the screen before, just scroll up and it's still there.

The session and the model's context are kept. This is not related to omp's own /clear, which drops the context from your session.

Requirements

  • The extension requires omp 19.2+
  • The keyboard shortcut clears the screen only while the prompt has the keyboard

Install

omp plugin install npm:@webdavis/omp-clearscreen

Restart omp after the install.

Usage

Press Ctrl+\, or run /clearscreen.

[!NOTE] If you run clearscreen while a response is running, the extension shows a warning and clears nothing.

Configuring a different key binding

Ctrl+\ is the default. To clear the screen with another key, set it and then start a new session or restart omp:

omp plugin config set @webdavis/omp-clearscreen key ctrl+l

Alternatively, you can configure it in your ~/.omp/plugins/omp-plugins.lock.json file, like so:

"settings": {
  "@webdavis/omp-clearscreen": {
    "key": "ctrl+l"
  }
}

Develop

bun install                # installs the dependencies listed in package.json
bun test                   # runs every test
bun test test/unit         # runs only the isolated tests, which load nothing from omp
bun test test/integration  # runs only the integration tests, which exercise the whole extension against a fake omp
bun test test/omp          # runs only the tests that load omp's real code
bun run typechecker        # runs the TypeScript compiler's type-checker on the code in src/ and test/
bun run format             # formats with Prettier, rewriting the files
bun run format:check       # checks the formatting without changing any file
bun run verify             # runs what CI runs: the tests, the type-checker and the format check
bun run workflows:check    # runs actionlint and zizmor on the GitHub Actions workflows

workflows:check needs actionlint and zizmor, which are separate programs, not dependencies. Install them with:

brew install actionlint zizmor

It also needs gh logged in, so zizmor can include the audits that call the GitHub API, as CI does. Log in with:

gh auth login