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
Copy file name to clipboardExpand all lines: src/backends/docs.md
+28-4Lines changed: 28 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -248,10 +248,10 @@ The Agent Client Protocol (ACP) is a standardized protocol for communication bet
248
248
- 7 passing unit tests covering all translation paths
249
249
250
250
3.**AcpClientHandler** - Full `Client` trait implementation:
251
-
-`request_permission()` - Auto-approves by selecting first "allow" option (AllowOnce/AllowAlways)
252
-
-`session_notification()` - Forwards SessionUpdate to event stream via mpsc channel
253
-
-`read_text_file()` - Reads from working directory, handles absolute/relative paths
254
-
-`write_text_file()` - Writes with auto-created parent directories
251
+
-`request_permission()` - Auto-approves by selecting first "allow" option (AllowOnce/AllowAlways) - logs permission requests and granted options at debug level
252
+
-`session_notification()` - Forwards SessionUpdate to event stream via mpsc channel - logs all session updates at debug level
253
+
-`read_text_file()` - Reads from working directory, handles absolute/relative paths - logs file path at debug level, logs failures at warn level
254
+
-`write_text_file()` - Writes with auto-created parent directories - logs file path and content length at debug level, logs failures at warn level
Copy file name to clipboardExpand all lines: src/docs.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ pub mod ui; // Rendering functions for each mode
26
26
```
27
27
28
28
**Entry Point** (@/src/main.rs):
29
-
-`main()`: Parses CLI arguments via clap::Parser, validates agent name (exits with error if invalid), reads from stdin if piped, then sets up terminal (raw mode, Viewport::Inline(8)), runs async event loop, restores terminal on exit with cursor positioning to next line before disabling raw mode to ensure shell prompt appears cleanly below TUI content
29
+
-`main()`: Parses CLI arguments via clap::Parser, validates agent name (exits with error if invalid), reads from stdin if piped, then sets up terminal (raw mode, Viewport::Inline(8)), runs async event loop, restores terminal on exit with cursor positioning to next line before disabling raw mode to ensure shell prompt appears cleanly below TUI content - enables disk-based logging via `TuiApp::builder().use_disk_logs(true)` which writes structured logs to ~/.nori-cli/logs/ directory using tuicore's tracing-appender integration with daily log rotation
30
30
-`run_app(agent_index, initial_message)`: Core event loop using tokio::select! to handle messages and render at ~30 fps interval - accepts optional agent_index to skip agent selection screen and optional initial_message to pre-fill textarea - includes mpsc channel for syncing `last_ctrl_c_time` to event handler task - removed loading frame increment logic after adopting Shimmer component
31
31
-`handle_event_simple()` / `handle_key_simple()`: Convert crossterm key events to Message based on current mode - Ctrl-C detection happens FIRST before overlay/install prompt checks to ensure double Ctrl-C always works
32
32
-`get_backend()`: Factory function that returns appropriate backend based on selected_agent_index, using the centralized BACKEND_OPTIONS constant for consistent backend ordering
@@ -217,4 +217,24 @@ pub mod ui; // Rendering functions for each mode
217
217
-**Follows existing pattern**: UserMessage rendering uses exact same pipeline as StreamEvent rendering (lines 88-112) - both call render_event(), wrap_text_to_width(), and terminal.insert_before() in identical sequence
218
218
-**Slash command handling**: Slash commands bypass user message rendering entirely - they are not stored as conversation events and should not appear in chat history
219
219
220
+
### Things to Know
221
+
222
+
**Structured Tracing and Observability** (@/src/acp_runner.rs, @/src/main.rs):
223
+
- Parallel logging system using Rust's `tracing` crate alongside existing TUI debug events
224
+
-**Log file location**: `~/.nori-cli/logs/` with daily rotation handled by tuicore's tracing-appender integration
225
+
-**Enabled via**: `TuiApp::builder().use_disk_logs(true)` in main.rs - opt-in configuration
0 commit comments