The CLI was showing version "1.0.0" but package.json has "1.0.0-rc2".
Changes:
- Import package.json in src/index.ts
- Use packageJson.version in program.version()
- Ensures --version shows correct version matching package.json
Fixes incorrect version displayed to users.
Co-authored-by: Ren <ren@openclaw.ai>
* feat: Agent Skills discovery and prompt catalog
- Discover skills in ~/.agents/skills and project .agents/skills (project wins on name)
- Inject OpenCode-style <available_skills> XML + read_file instructions in system prompt
- /skills slash command lists installed skills in the TUI
- Document layout and usage in README; gitignore .agents for local skill installs
* chore: ignore skills-lock.json
* feat: add startup API key modal
Allow the interactive app to boot without a preconfigured API key and guide users into adding one in-app instead of exiting early. Persist explicit auth and model preferences so first-run setup and subsequent launches feel consistent.
* bump version
* format
* fix lint issues
* feat: add background agents and background bash processes (#161)
Add async background delegation system (delegate, delegation_read,
delegation_list) for read-only research that persists to disk and
notifies the session on completion. Extend bash tool with background
mode for long-running processes (dev servers, watchers) with companion
process_logs, process_stop, and process_list tools.
Cherry-picked from a10a337 — lost during merge of cursor/agent-new-architecture-b3d5.
* feat: add prompt queuing with follow-ups UI
Allow users to submit messages while the agent is processing. Queued
messages display in a follow-ups panel above the prompt and are
processed sequentially after the current response completes.
Cherry-picked from 299023b — lost during merge of cursor/agent-new-architecture-b3d5.
* chore: switch CI to Bun, remove unused files and dead code
- Update security workflow to use Bun instead of npm (fixes ERESOLVE peer dependency conflict)
- Delete unused files: hello.py, package-lock.json, .eslintrc.js
- Remove broken ESLint config and devDependencies (lint was non-functional)
- Remove unused exports: MODEL_GROUPS, Skill interface, formatDuration
* chore: update lockfile after removing ESLint dependencies
* fix: use ref for mode color to prevent stale closure in message borders
* feat: add Biome for linting and formatting, update CI workflow
- Add Biome as linter and formatter with project-appropriate config
- Add lint, format, format:fix, and lint:fix scripts to package.json
- Rename typecheck workflow to CI, switch from npm to Bun, add format
and lint steps alongside typecheck
- Auto-fix formatting and import ordering across all source files
* fix: improve cancellation flow and queued message editing
* fix: improve cancellation flow and prompt footer context display
* chore: update Bun version and refresh lockfile
* feat: complete architecture rewrite with Bun, OpenTUI, bash-only tools, and X Search API
Major rewrite of the Grok CLI agent:
- Runtime: Bun-first (removed Node.js/tsx fallbacks)
- UI: Replaced Ink with OpenTUI (@opentui/react) terminal framework
- Tools: Simplified to bash-only (removed text-editor, search, morph, todo, confirmation tools)
- Search: Integrated X Search API and Web Search via xAI Responses API
- Models: Updated to all latest Grok models (grok-4, grok-4.20-beta, grok-4-1-fast, grok-4-fast, grok-3-mini)
- Agent: Streamlined agent loop with async generator streaming
- Client: Dual API support (Chat Completions for tool calling, Responses API for search)
- Removed MCP integration, confirmation service, token counter, Morph editor
- Updated tsconfig for OpenTUI React JSX
- Clean 10-file architecture in src/
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* Fix HelpPanel rendering bug: replace <br/> with Text component
- Replaced <br/> tag with <text>{" "}</text> in HelpPanel component
- Ink requires all HTML-like elements to be wrapped in Text components
- Fixes React reconciler error: 'Component of type br must be created inside of a Text node'
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* fix: use ref for reliable streaming content accumulation in UI
- Replace fragile setState callback with contentAccRef for tracking streamed content
- Save intermediate assistant content when tool calls arrive
- Remove unused useTerminalDimensions import
- Fix HelpPanel <br/> tag (must be inside text node in OpenTUI)
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* fix: improve UI visibility with dark theme and text wrapping
- Add dark background (#0f172a) to main app, model picker, input
- Set explicit text/background colors on input for visibility
- Use wrapMode='word' on all text content for proper wrapping
- Use children instead of content prop for user messages
- Add Grok label to streaming content display
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* fix: remove wrapMode that caused garbled text rendering
wrapMode='word' was corrupting character display in OpenTUI text components.
Removed it from all message views and streaming display.
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* feat: rewrite UI to match OpenCode's design language
- Use OpenCode's exact dark theme tokens (#0a0a0a bg, #141414 panel, #eeeeee text, #fab283 primary)
- Left-border accent (┃) on user messages with primary color, matching OpenCode's SplitBorder
- Panel backgrounds for user messages and tool blocks (backgroundPanel)
- Home screen with centered logo + prompt (like OpenCode's home.tsx)
- Session view with header, scrollable messages, prompt, footer
- Inline tool results (icon + label) for simple tools
- Block tool results (panel with output) for bash with >3 lines
- Footer with cwd on left, model on right (matching OpenCode's footer.tsx)
- Separate theme.ts with typed dark theme object
- Reasoning shown in subtle left-bordered panel (like OpenCode's ReasoningPart)
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* feat: add Agent/Plan/Ask mode system with tab cycling and OpenCode home screen
- Add AgentMode type (agent/plan/ask) with per-mode system prompts
- Agent mode: full tool access, executes changes directly
- Plan mode: read-only tools, creates implementation plans without modifying files
- Ask mode: read-only tools, answers questions with context
- Tab key cycles between modes (visible in prompt box)
- OpenCode-style block-letter GROK logo on home screen (left=muted, right=bold)
- Prompt box shows mode label + model name + provider (like OpenCode's prompt)
- Shadow/bottom-edge effect below prompt (╹ + ▀ pattern from OpenCode)
- Keyboard hints bar: 'tab modes · ctrl+p commands' (matches OpenCode layout)
- Mode color changes left-border accent on prompt and user messages
- Refactored into HomeView and SessionView components
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* feat: black and white theme, Grok brand logo, modal model picker
- Theme: pure black (#000000) and white (#ffffff) only, no color accents
- Logo: Grok brand symbol (stylized compass/G) next to bold 'Grok' text
- Model picker: floating modal dialog overlaying the app (like OpenCode's DialogSelect)
- Centered panel with dark background
- Title 'Select model' + esc hint
- Search placeholder
- Models grouped by category (Grok 4, Grok Code, Grok 3)
- Current model marked with ●
- Selected item highlighted with selectedBg
- Pricing shown for budget models
- Mode colors changed to white/gray (monochrome)
- Models grouped via MODEL_GROUPS in models.ts
- Added selectedBg and selected tokens to theme
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* feat: differentiated UI, colored modes, clean logo, remove xAI labels
- Remove all 'xAI' labels from model picker and prompt box
- Mode colors: blue (#5c9cf5) for Agent, yellow (#e5c07b) for Plan, orange (#f5a742) for Ask
- Logo: clean '✦ G R O K' text with tagline (no broken Unicode art)
- Differentiated UI from OpenCode:
- Home: centered logo + tagline, input with thin single-line border colored by mode,
mode selector row showing all three modes with dots, model name on right
- Session: top bar with model + mode instead of bordered header panel,
thin separator line, user messages with colored ▸ prefix instead of left-border panels,
input with colored single-line border instead of thick ┃ accent
- Tool output in subtle background panels
- Model picker: bordered modal instead of borderless floating panel,
category headers in muted text, no 'xAI' provider label
- Simplified theme: removed unused color tokens, added textDim for ultra-subtle text
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* revert: restore ┃ left-border prompt box with mode/model line and shadow edge
Bring back the previous input style that was preferred:
- ┃ left-border accent colored by mode (blue/yellow/orange)
- Mode label + model name inside the prompt box below input
- ╹/▀ shadow edge below the prompt
- Hints row (tab modes · ctrl+p commands) right-aligned under prompt
- Used in both home screen and session view
- Keep everything else from current version (differentiated session layout,
▸ prefix messages, top bar, clean model picker, logo, mode colors)
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* feat: replicate OpenCode conversation layout
Session view now matches OpenCode's session/index.tsx patterns:
- Session header: # Model Name in ┃ left-border panel with backgroundPanel
- User messages: ┃ left-border colored by mode, backgroundPanel fill, text inside
- Tool results (inline): paddingLeft=3, icon + muted text ($ cmd, ◈ Search)
- Tool results (block): ┃ left-border panel for bash output >3 lines, search results
- Assistant text: paddingLeft=3, marginTop=1, plain text
- Metadata line: ▣ Mode · model · duration after each assistant turn (like OpenCode's
AssistantMessage final block with ▣ icon)
- Reasoning: ┃ left-border panel with backgroundElement border, italic dim text
- Pending tools: ~ prefix with text color
- Track tool call count and elapsed time for metadata line
- InlineTool component for consistent tool result formatting
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* feat: redesign model picker and slash menu modals
- Remove borders, add search filtering with keyboard input
- Flat model list without category sections
- Blue accent color for current model highlight
- Fit-to-content modals with max height cap and scroll
- scrollChildIntoView for arrow key navigation
- Trim logo height by removing decorative lines
- Add accent color to theme
Made-with: Cursor
* feat: migrate to Vercel AI SDK with xAI provider
- Replace custom OpenAI client with AI SDK streamText + @ai-sdk/xai
- Add standalone search_web and search_x tools via chat completions
- Fix follow-up messages by using isProcessingRef to avoid stale closures
- Fallback message history when result.response fails after stream errors
- Remove post-response status line, adjust input padding
Made-with: Cursor
* feat: add file tools, diff view, and markdown rendering
- Add read_file, write_file, edit_file tools with diff generation
- Inline diff viewer with line numbers, colored add/remove, and
unmodified-lines separators (OpenCode-style)
- Lightweight markdown renderer for assistant messages: headings,
bold, italic, inline code, code blocks, lists, blockquotes, links
- Update agent system prompts with terminal environment guidance
- Install diff package for unified diff computation
Made-with: Cursor
* feat: add plan mode (#156)
* feat: add plan mode with interactive questions UI
Add generate_plan tool, structured plan types, and an OpenCode-style
inline questions panel with tabbed navigation, number-key shortcuts,
custom text answers, and a review/confirm tab.
* fix: plan-to-agent handover, mode-scoped tools, and UI polish
- Carry plan context forward when switching plan→agent mode
- Restrict generate_plan tool to plan mode only
- Stamp modeColor on all message types for correct per-message colors
- Sanitize model-echoed role labels and raw JSON from content
- Truncate tool result labels to single lines
- Single-word tab labels for plan questions
- Always show edit/write file results with diff
- Clear agent history on mode switch
* feat: add Brin contributor trust check workflow and use OpenTUI native markdown (#157)
* feat: add sub-agent task delegation and UI (#159)
* feat: add background agents and background bash processes (#161)
Add async background delegation system (delegate, delegation_read,
delegation_list) for read-only research that persists to disk and
notifies the session on completion. Extend bash tool with background
mode for long-running processes (dev servers, watchers) with companion
process_logs, process_stop, and process_list tools.
Closes#146
* feat: add prompt queuing with follow-ups UI (#162)
Allow users to submit messages while the agent is processing. Queued
messages display in a follow-ups panel above the prompt and are
processed sequentially after the current response completes.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* feat: add plan mode with interactive questions UI
Add generate_plan tool, structured plan types, and an OpenCode-style
inline questions panel with tabbed navigation, number-key shortcuts,
custom text answers, and a review/confirm tab.
* fix: plan-to-agent handover, mode-scoped tools, and UI polish
- Carry plan context forward when switching plan→agent mode
- Restrict generate_plan tool to plan mode only
- Stamp modeColor on all message types for correct per-message colors
- Sanitize model-echoed role labels and raw JSON from content
- Truncate tool result labels to single lines
- Single-word tab labels for plan questions
- Always show edit/write file results with diff
- Clear agent history on mode switch
- Replace custom OpenAI client with AI SDK streamText + @ai-sdk/xai
- Add standalone search_web and search_x tools via chat completions
- Fix follow-up messages by using isProcessingRef to avoid stale closures
- Fallback message history when result.response fails after stream errors
- Remove post-response status line, adjust input padding
Made-with: Cursor
- Remove borders, add search filtering with keyboard input
- Flat model list without category sections
- Blue accent color for current model highlight
- Fit-to-content modals with max height cap and scroll
- scrollChildIntoView for arrow key navigation
- Trim logo height by removing decorative lines
- Add accent color to theme
Made-with: Cursor
Session view now matches OpenCode's session/index.tsx patterns:
- Session header: # Model Name in ┃ left-border panel with backgroundPanel
- User messages: ┃ left-border colored by mode, backgroundPanel fill, text inside
- Tool results (inline): paddingLeft=3, icon + muted text ($ cmd, ◈ Search)
- Tool results (block): ┃ left-border panel for bash output >3 lines, search results
- Assistant text: paddingLeft=3, marginTop=1, plain text
- Metadata line: ▣ Mode · model · duration after each assistant turn (like OpenCode's
AssistantMessage final block with ▣ icon)
- Reasoning: ┃ left-border panel with backgroundElement border, italic dim text
- Pending tools: ~ prefix with text color
- Track tool call count and elapsed time for metadata line
- InlineTool component for consistent tool result formatting
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
Bring back the previous input style that was preferred:
- ┃ left-border accent colored by mode (blue/yellow/orange)
- Mode label + model name inside the prompt box below input
- ╹/▀ shadow edge below the prompt
- Hints row (tab modes · ctrl+p commands) right-aligned under prompt
- Used in both home screen and session view
- Keep everything else from current version (differentiated session layout,
▸ prefix messages, top bar, clean model picker, logo, mode colors)
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
- Remove all 'xAI' labels from model picker and prompt box
- Mode colors: blue (#5c9cf5) for Agent, yellow (#e5c07b) for Plan, orange (#f5a742) for Ask
- Logo: clean '✦ G R O K' text with tagline (no broken Unicode art)
- Differentiated UI from OpenCode:
- Home: centered logo + tagline, input with thin single-line border colored by mode,
mode selector row showing all three modes with dots, model name on right
- Session: top bar with model + mode instead of bordered header panel,
thin separator line, user messages with colored ▸ prefix instead of left-border panels,
input with colored single-line border instead of thick ┃ accent
- Tool output in subtle background panels
- Model picker: bordered modal instead of borderless floating panel,
category headers in muted text, no 'xAI' provider label
- Simplified theme: removed unused color tokens, added textDim for ultra-subtle text
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
- Theme: pure black (#000000) and white (#ffffff) only, no color accents
- Logo: Grok brand symbol (stylized compass/G) next to bold 'Grok' text
- Model picker: floating modal dialog overlaying the app (like OpenCode's DialogSelect)
- Centered panel with dark background
- Title 'Select model' + esc hint
- Search placeholder
- Models grouped by category (Grok 4, Grok Code, Grok 3)
- Current model marked with ●
- Selected item highlighted with selectedBg
- Pricing shown for budget models
- Mode colors changed to white/gray (monochrome)
- Models grouped via MODEL_GROUPS in models.ts
- Added selectedBg and selected tokens to theme
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
- Use OpenCode's exact dark theme tokens (#0a0a0a bg, #141414 panel, #eeeeee text, #fab283 primary)
- Left-border accent (┃) on user messages with primary color, matching OpenCode's SplitBorder
- Panel backgrounds for user messages and tool blocks (backgroundPanel)
- Home screen with centered logo + prompt (like OpenCode's home.tsx)
- Session view with header, scrollable messages, prompt, footer
- Inline tool results (icon + label) for simple tools
- Block tool results (panel with output) for bash with >3 lines
- Footer with cwd on left, model on right (matching OpenCode's footer.tsx)
- Separate theme.ts with typed dark theme object
- Reasoning shown in subtle left-bordered panel (like OpenCode's ReasoningPart)
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
wrapMode='word' was corrupting character display in OpenTUI text components.
Removed it from all message views and streaming display.
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
- Add dark background (#0f172a) to main app, model picker, input
- Set explicit text/background colors on input for visibility
- Use wrapMode='word' on all text content for proper wrapping
- Use children instead of content prop for user messages
- Add Grok label to streaming content display
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
- Replaced <br/> tag with <text>{" "}</text> in HelpPanel component
- Ink requires all HTML-like elements to be wrapped in Text components
- Fixes React reconciler error: 'Component of type br must be created inside of a Text node'
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
Major rewrite of the Grok CLI agent:
- Runtime: Bun-first (removed Node.js/tsx fallbacks)
- UI: Replaced Ink with OpenTUI (@opentui/react) terminal framework
- Tools: Simplified to bash-only (removed text-editor, search, morph, todo, confirmation tools)
- Search: Integrated X Search API and Web Search via xAI Responses API
- Models: Updated to all latest Grok models (grok-4, grok-4.20-beta, grok-4-1-fast, grok-4-fast, grok-3-mini)
- Agent: Streamlined agent loop with async generator streaming
- Client: Dual API support (Chat Completions for tool calling, Responses API for search)
- Removed MCP integration, confirmation service, token counter, Morph editor
- Updated tsconfig for OpenTUI React JSX
- Clean 10-file architecture in src/
Co-authored-by: Ismail Pelaseyed <homanp@users.noreply.github.com>
* feat: add support for global custom instructions
* Remove comments
* Fix import syntax for fs-extra module (#112)
* Fix import syntax for fs-extra module
* Fix import syntax for fs-extra module
* Fix import syntax for fs-extra module
* Fix missing newline at end of morph-editor.ts
* Add where to set the API key in the json file (#107)
* Fix diff generation showing entire file as changed (fixes#83) (#98)
The diff preview was showing the entire file as changed when only a few
lines were actually modified. This was caused by a broken change detection
algorithm that couldn't properly handle insertions and deletions.
Replaced the naive line-matching algorithm with a proper LCS (Longest
Common Subsequence) based diff algorithm using dynamic programming. This
produces minimal, accurate diffs that match what git diff shows.
Changes:
- Added computeLCS(): Computes longest common subsequence between old/new lines
- Added extractChanges(): Extracts actual change regions from LCS table
- Updated generateDiff(): Uses LCS-based change detection instead of broken algorithm
Impact:
- Diff previews now show only actual changes (e.g., 4 lines instead of 260)
- Drastically reduces context pollution in conversation history
- Matches git diff output accuracy
🤖 Contributed by ZDS-AI (https://zds.group)
* add model migration manager and new grok models (#124)
* minor tweaks
---------
Co-authored-by: jszczypk <janusz@fide.pl>
Co-authored-by: Ben Faerber <benfaerber@protonmail.com>
Co-authored-by: Joseph Cheek <jcheek@users.noreply.github.com>
Co-authored-by: Ismail Pelaseyed <homanp@gmail.com>
The diff preview was showing the entire file as changed when only a few
lines were actually modified. This was caused by a broken change detection
algorithm that couldn't properly handle insertions and deletions.
Replaced the naive line-matching algorithm with a proper LCS (Longest
Common Subsequence) based diff algorithm using dynamic programming. This
produces minimal, accurate diffs that match what git diff shows.
Changes:
- Added computeLCS(): Computes longest common subsequence between old/new lines
- Added extractChanges(): Extracts actual change regions from LCS table
- Updated generateDiff(): Uses LCS-based change detection instead of broken algorithm
Impact:
- Diff previews now show only actual changes (e.g., 4 lines instead of 260)
- Drastically reduces context pollution in conversation history
- Matches git diff output accuracy
🤖 Contributed by ZDS-AI (https://zds.group)
* Fix import syntax for fs-extra module
* Fix import syntax for fs-extra module
* Fix import syntax for fs-extra module
* Fix missing newline at end of morph-editor.ts