You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(cli): move setup-cli-symlinks into cli/scripts and update postinstall
Move CLI-specific symlink setup into the CLI workspace and update the root postinstall and docs so callers use the new location.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Copy file name to clipboardExpand all lines: cli/knowledge.md
+45-1Lines changed: 45 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -433,4 +433,48 @@ The CLI workspace depends on `@opentui/core` and `@opentui/react` from GitHub. T
433
433
- Cross-platform (Windows, Mac, Linux)
434
434
- Better error handling with TypeScript
435
435
- Uses Node.js 'junction' symlinks which work universally
436
-
- Automatically cleans up existing symlinks before creating new ones
436
+
- Automatically cleans up existing symlinks before creating new ones## Toggle Branch Rendering
437
+
438
+
Agent and tool toggles in the TUI render inside `<text>` components. Expanded content must resolve to plain strings or StyledText-compatible fragments (`<span>`, `<strong>`, `<em>`).
439
+
440
+
### TextNodeRenderable Constraint
441
+
442
+
**Problem**: Markdown-rendered content that returned arbitrary React elements (e.g., nested `<box>` containers) under `<text>` caused errors when toggling branches:
443
+
```
444
+
Error: TextNodeRenderable only accepts strings, TextNodeRenderable instances, or StyledText instances
- Otherwise → renders the raw element tree directly
450
+
451
+
This prevents invalid children from reaching `TextNodeRenderable` while preserving formatted markdown.
452
+
453
+
**Related**: `cli/src/hooks/use-message-renderer.tsx` ensures toggle headers render within a single `<text>` block for StyledText compatibility.
454
+
455
+
### Scroll Behavior
456
+
457
+
Toggling any agent/tool branch calls `scrollToAgent`, with each branch registering its container via `registerAgentRef`. This anchors the toggled item in the top third of the scrollbox for better navigation in long sessions.
458
+
459
+
## Command Menus
460
+
461
+
### Slash Commands (`/`)
462
+
463
+
Typing `/` opens a five-item slash menu above the input, mirroring npm-app commands.
464
+
465
+
**Navigation**:
466
+
- Arrow keys or Tab/Shift+Tab to move highlight
467
+
- Enter to insert selected command
468
+
- List scrolls when moving beyond first five items
469
+
470
+
### Agent Mentions (`@`)
471
+
472
+
Typing `@` scans the local `.agents` directory and surfaces agent `displayName`s (e.g., `@Codebase Commands Explorer`).
473
+
474
+
**Navigation**:
475
+
- Same as slash menu (arrows/Tab to navigate, Enter to insert)
476
+
- Both menus cap visible list at five entries
477
+
478
+
## Streaming Markdown Optimization
479
+
480
+
Streaming markdown renders as plain text until the message or agent finishes. This prevents scroll jitter that occurred when partial formatting changed line heights mid-stream.
0 commit comments