Skip to content

feat: 1 basic chatting interface#8

Merged
chenxin-yan merged 8 commits intomainfrom
1-basic-chatting-interface
Apr 2, 2026
Merged

feat: 1 basic chatting interface#8
chenxin-yan merged 8 commits intomainfrom
1-basic-chatting-interface

Conversation

@chengus
Copy link
Copy Markdown
Collaborator

@chengus chengus commented Feb 26, 2026

Problems!

Janky outlines, need to resize terminal once to fix it


This pull request integrates OpenRouter chat functionality into the TUI app, enabling users to interact with language models directly from the terminal interface. It introduces a new chat UI, handles streaming responses, manages keyboard shortcuts for navigation and shutdown, and displays model and token usage information.

OpenRouter integration and chat functionality:

  • Added @openrouter/sdk as a dependency in package.json and imported it into the app, enabling communication with the OpenRouter API. [1] [2]
  • Implemented message sending, streaming response handling, and error management using OpenRouter, including environment variable-based API key retrieval and model selection.

User interface and experience improvements:

  • Redesigned the UI to display chat history in a scrollable box, show model information, reasoning token usage, and error messages, and provide an input box for user messages.
  • Added keyboard shortcuts for scrolling (PgUp/PgDn, Ctrl+U/Ctrl+D) and quitting (Esc/Ctrl+C), enhancing usability in the terminal.

App lifecycle management:

  • Introduced proper shutdown handling to abort in-progress requests and exit cleanly on quit commands or renderer destruction.

@chengus chengus linked an issue Feb 26, 2026 that may be closed by this pull request
@chengus chengus requested a review from chenxin-yan February 26, 2026 00:10
@chenxin-yan chenxin-yan changed the title 1 basic chatting interface feat: 1 basic chatting interface Apr 2, 2026
@chenxin-yan chenxin-yan merged commit c66c954 into main Apr 2, 2026
1 check passed
@chenxin-yan chenxin-yan deleted the 1-basic-chatting-interface branch April 2, 2026 22:13
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.

basic chatting interface

2 participants