Skip to content

Story/jwill9999 cli polish - #14

Merged
jwill9999 merged 4 commits into
mainfrom
story/jwill9999-cli-polish
Sep 12, 2025
Merged

Story/jwill9999 cli polish#14
jwill9999 merged 4 commits into
mainfrom
story/jwill9999-cli-polish

Conversation

@jwill9999

Copy link
Copy Markdown
Owner
  • UI/theming: add banner, palette, styled help (banner + examples), REPL prompt/tips; non-stream answer header/footer
    Rendering: support bold/italic inline; keep streaming raw; md rendering for non-stream

  • Spinners: add “Thinking” indicator for ask (non/stream) and REPL (non/stream; stream until first token)

  • Models: add listModels API and shared/models (TTL cache + fuzzy via Fuse); new models [query] cmd (interactive autocomplete in TTY, table fallback); integrate picker into init (OpenRouter-only), stable suggest mapping

  • Enquirer: robust prompt resolution for ESM/CJS; fix autocomplete choice mapping; avoid debounce spinner conflicts

  • Defaults: ask format=md and non-stream by default; REPL format=md and streaming off by default

  • Error handling: add file logger (~/.config/openrouter-cli/cli.log), top-level friendly error message; REPL logs errors with context

  • CLI polish: NO_COLOR/TTY-aware colors; help/tests updated

  • Tests: add models.spec (fuzzy + cache), help-style, ui-answer; all green

  • Docs: add existing_structure.md

  • Chore: add TODO.local.md (ignored), expand .gitignore; ESLint TS unused-vars rule

BREAKING CHANGE:

  • ask now defaults to non-stream and md rendering; pass --stream to stream
  • REPL starts with streaming off and md for non-stream outputs; toggle with /stream on|off, /format md|plain

…d, visual polish

UI/theming,Rendering,Spinners:Models,Error logging

BREAKING CHANGE: ask now defaults to non-stream and md rendering; pass --stream to streamREPL starts with streaming off and md for non-stream outputs; toggle with /stream on|off, /format md|plain
@jwill9999
jwill9999 requested a review from Copilot September 12, 2025 23:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds significant UI/UX polish and functional improvements to the OpenRouter CLI tool, transforming it from a basic CLI into a more user-friendly and feature-rich application. The changes include visual theming, interactive model selection, improved error handling, and enhanced rendering capabilities.

Key changes:

  • UI Enhancement: Added styled banners, color palette, spinners, and formatted help with examples
  • Interactive Features: Integrated fuzzy model search with autocomplete and caching capabilities
  • Improved Defaults: Changed to non-streaming mode with markdown rendering by default for better readability

Reviewed Changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/shared/ui.ts New module providing color-aware theming, styled components (banners, headers, footers), and spinner utilities
src/shared/models.ts New module implementing model caching, fuzzy search via Fuse.js, and debounced autocomplete suggestions
src/shared/logger.ts New error logging system writing to ~/.config/openrouter-cli/cli.log
src/shared/openrouter.ts Added listModels API and UI hooks (onFirstToken, onDone) for spinner integration
src/shared/format.ts Enhanced markdown rendering with bold/italic inline formatting support
src/main.ts Integrated styled help, spinners, and changed default behavior to non-streaming with markdown
src/repl.ts Updated with styled prompts, tips, spinner integration, and improved error handling
src/shared/init.ts Added interactive model picker using enquirer with fuzzy search capabilities
src/commands/models.ts New command for interactive/non-interactive model browsing with table output
tests/*.spec.ts Added comprehensive test coverage for new UI, models, and help functionality
package.json Added UI dependencies: boxen, chalk, cli-table3, ora, enquirer, fuse.js
eslint.config.js Enhanced TypeScript unused variables rule configuration

Comment thread src/commands/models.ts Outdated
@jwill9999
jwill9999 merged commit 82d5b4f into main Sep 12, 2025
4 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jwill9999
jwill9999 deleted the story/jwill9999-cli-polish branch September 13, 2025 17:56
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.

2 participants