Skip to content

Tui - #1

Merged
ayan-de merged 20 commits into
mainfrom
tui
May 9, 2026
Merged

Tui#1
ayan-de merged 20 commits into
mainfrom
tui

Conversation

@ayan-de

Copy link
Copy Markdown
Owner

No description provided.

Ayan Deand others added 20 commits May 8, 2026 12:22
React + xterm.js architecture with layered terminal/UI overlay,
IPC bridge, message store, diff panel, and keybinding system.
Logo-on-idle pattern with fade-out on interaction, textarea prompt
that auto-resizes and scrolls beyond 5 rows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scaffold @freecode/tui as a Next.js 15 app with:
- React 19, xterm.js, zustand dependencies
- Dark theme CSS variables
- Root layout with FreeCode metadata
- Port 3001 for local dev
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Logo: ASCII FreeCode logo, visible on idle, hidden on first typing
- PromptInput: auto-resizing textarea (grows up to 5 rows, then scrolls)
- ChatLayout: flex column layout with fixed bottom input
- useAutoResize hook: JS fallback for textarea height management
Enter submits prompt, Shift+Enter adds newline.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- TextPart: renders text with preserved whitespace
- CodePart: code block with language label and copy button
- ToolPart: tool call display with color-coded headers and result output
- UserMessage: user message bubble with avatar
- AssistantMessage: assistant message with multi-part rendering
- ChatLayout: updated to display messages with auto-scroll to bottom
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Electron wrapper that:
- Loads Next.js TUI at localhost:3001 (dev) or bundled file (prod)
- Frameless window matching terminal size (120x40)
- Waits for TUI server before launching in dev mode
- Opens external links in system browser
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
TUI is now a terminal-native app using Ink (React that renders to ANSI):
- Logo: ASCII art, shown when idle
- PromptInput: keyboard input via Ink's useInput hook
- ChatLayout: messages + logo + prompt
- Message components: UserMessage, AssistantMessage, TextPart, CodePart, ToolPart
- Removed tui-electron (not needed with Ink)
- Removed Next.js app/ directory (replaced by src/)
Bin: freecode runs via tsx src/index.tsx
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move logoLines and tagline to src/assets/logo.ts for easier updates.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ayan-de
ayan-de merged commit fb4907d into mainMay 9, 2026
Sign up for freeto 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.

1 participant

@ayan-de