10 Commits
Author SHA1 Message Date
jatmn ddef0df32d Fix provider errors and plan effects 2026-05-31 21:41:10 -07:00
jatmn 8ef78c0ad5 Restore TUI rendering affordances 2026-05-31 21:20:03 -07:00
jatmn 5e22a51150 Refine OpenTUI layout and transcript behavior
Move the transcript to a native OpenTUI scrollbox so new output sticks to the bottom, mouse wheel scrolling works, and the scroll indicator is native instead of hand-rolled.

Add a resizable todo rail with mouse movement enabled, a narrower default width, a larger max width, and hover feedback on the resize edge.

Rework the TUI framing with compact panel borders, a prompt frame, reclaimed vertical space, and a compact zero header mark with version/model/usage metadata.

Add explicit /build and /default paths back out of plan mode while preserving /plan as a toggle.
2026-05-30 21:33:04 -07:00
jatmn 466acc6eef Add clear command and build version header
Add /clear to reset the TUI transcript buffer.

Read the displayed and CLI version from package metadata instead of hard-coding it.
2026-05-30 19:59:21 -07:00
jatmn f4ff84a3b8 Fix terminal paste and cancel shortcuts
Handle OpenTUI paste events and add a Windows Ctrl+V clipboard fallback for terminals that send the control key directly.

Make Ctrl+C clear the composer or back out of provider screens before exiting the TUI.
2026-05-30 19:47:36 -07:00
jatmn fdc28f5648 Merge main into opentui
Resolve conflicts from main's plan-mode, debug, provider-error, and test additions by porting them into the OpenTUI/Solid implementation.

Keep the non-exe OpenTUI build path while preserving main's test script, plan-mode system prompt, tool schema conversion, tools/debug toggles, and improved provider error handling.
2026-05-30 19:39:35 -07:00
jatmn 1371f9407f Migrate TUI to OpenTUI Solid
Replace the Ink and React terminal UI with an OpenTUI + Solid implementation while preserving Zero's chat/provider flows.

Add a persistent header for provider, model, mode, and usage totals; add an optional todo rail fed by update_plan with Ctrl+T and /todo toggles; add a slash-command popup for /provider, /plan, /todo, /help, and /exit.

Update agent/provider plumbing to surface usage and plan updates, retry OpenAI-compatible streams without stream_options when unsupported, and lazy-load the TUI with the Solid transform for source execution.

Switch the build to a non-exe Bun bundle under dist and remove the old Ink/React dependencies and components.
2026-05-30 19:20:14 -07:00
8d49c3c0a5 fix plan mode and add test (#2)
* fix plan mode and add test

* Address review: wire plan mode, harden test script, restore friendly errors

- Wire /plan into agent behavior: add PLAN_MODE_SYSTEM_PROMPT and a planMode
  option on runAgent; App passes isPlanMode through so the agent actually
  plans without editing instead of only changing UI color.
- Harden test script to "bun test ./tests --timeout 15000" for deterministic
  discovery and a bounded runtime so it always exits.
- Restore friendly provider-setup/auth/network error mapping via
  toFriendlyError(); debug mode still records the full error object.
- Add tests/agent-loop.test.ts covering prompt selection and the
  tool-call -> result -> final-answer loop with a mock provider.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Kevin Codex <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-05-31 10:08:01 +08:00
JATMN e61d783ba8 Add contributing guidelines (#1) 2026-05-31 09:59:48 +08:00
Kevin Codex d634a36bea initial commit 2026-05-30 08:37:16 +08:00