Skip to content

Add /scotty command that displays Scotty ASCII art - #205

Closed
ethantao14 wants to merge 2 commits into
CMU-313:mainfrom
ethantao14:add-scotty-command
Closed

ethantao14 wants to merge 2 commits into
CMU-313:mainfrom
ethantao14:add-scotty-command

Conversation

@ethantao14

Copy link
Copy Markdown

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

  • adds a /scotty slash command to the interactive TUI
  • it opens a dialog that prints ASCII art of Scotty the Scottish Terrier
  • new file packages/tui/src/ui/dialog-scotty.tsx, modeled on the existing dialog-alert.tsx next to it
  • the art is a String.raw template so the backslashes stay literal, split on newline, one text row per line
  • one command object registered in packages/tui/src/app.tsx right after help.show; the slashName: "scotty" field is what actually makes /scotty work
  • the ctrl+p palette and the slash autocomplete both read that same command array, so there is no second place to register it
  • the Add dev container config commit is carried over from earlier setup on my fork and is not part of this feature

How did you verify your code works?

I ran the TUI locally with bun run dev and typed /scotty, and the ASCII art dialog renders as expected. Both esc and enter close it. The command also shows up in the ctrl+p command palette as "Show Scotty" under the System category, and launching it from there works too.

For static checks, oxlint is clean on both changed files and tsgo --noEmit passes for packages/tui. The package test suite passes with 193 pass, 1 skip, 0 fail.

CI is green on commit 826bb52, with unit, typecheck, and e2e smoke all succeeding.

Screenshots / recordings

scotty

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

Registers a new built-in TUI command with slashName "scotty" that opens a
dialog rendering ASCII art of Scotty the Scottish Terrier. The dialog follows
the existing ui/dialog-alert.tsx pattern and closes on esc or enter.
@bingbhakdibhumi

Copy link
Copy Markdown
Collaborator

FYI: this is the best Scotty I've seen so far today

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.

2 participants