chore: add #[allow(dead_code)] for v0.6.6 additions not yet wired
- ClientError, StreamError, and their impl blocks in error_taxonomy.rs - ApprovalCache in approval_cache.rs (pending #66 follow-up wiring) - Legacy prompt constants in prompts.rs (backward compat) - with_mcp_tools and McpToolAdapter in registry.rs (pending MCP migration) - Fix rlm_query → rlm in when_not_to_use_sections_present test
This commit is contained in:
@@ -305,6 +305,7 @@ impl From<ToolError> for ErrorEnvelope {
|
||||
///
|
||||
/// Carries a full `ErrorEnvelope` so the TUI can render category‑specific
|
||||
/// styling instead of a generic `Event::Error { message, recoverable }`.
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ClientError {
|
||||
/// Transport / HTTP / auth error from the LLM provider.
|
||||
@@ -322,6 +323,7 @@ pub enum ClientError {
|
||||
Internal { envelope: ErrorEnvelope },
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl ClientError {
|
||||
/// Unwrap the inner envelope regardless of variant.
|
||||
#[must_use]
|
||||
@@ -407,6 +409,7 @@ impl std::error::Error for ClientError {}
|
||||
///
|
||||
/// Each variant maps to an `ErrorCategory` so the UI can render
|
||||
/// stream‑specific icons or formatting.
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum StreamError {
|
||||
/// Stream stalled — no chunk received within the idle timeout.
|
||||
@@ -421,6 +424,7 @@ pub enum StreamError {
|
||||
Transport { message: String },
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl StreamError {
|
||||
/// Convert into a `ClientError` for emission.
|
||||
#[must_use]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![allow(dead_code)]
|
||||
//! System prompts for different modes.
|
||||
//!
|
||||
//! Prompts are assembled from composable layers loaded at compile time:
|
||||
@@ -375,7 +376,7 @@ mod tests {
|
||||
assert!(prompt.contains("### `edit_file`"));
|
||||
assert!(prompt.contains("### `exec_shell`"));
|
||||
assert!(prompt.contains("### `agent_spawn`"));
|
||||
assert!(prompt.contains("### `rlm_query`"));
|
||||
assert!(prompt.contains("### `rlm`"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -79,13 +79,15 @@ Don't reach for `agent_spawn` when:
|
||||
- The work can be done with a fast `exec_shell` pipeline or a `grep_files` call.
|
||||
- You haven't first laid out a plan with `todo_write`. Sub-agents are implementation, not exploration.
|
||||
|
||||
### `rlm_query`
|
||||
Don't reach for `rlm_query` when:
|
||||
### `rlm`
|
||||
Don't reach for `rlm` (the recursive language model tool) when:
|
||||
- The input fits comfortably in your context window — just read it directly with `read_file`.
|
||||
- A simple `grep_files` or `exec_shell` pipeline can answer the question.
|
||||
- You need interactive, iterative exploration of the data — RLM is batch-oriented.
|
||||
- You need interactive, iterative exploration of the data — `rlm` is batch-oriented (the sub-LLM writes Python in one shot, then returns).
|
||||
- The task is a simple classification or extraction on short text — your own reasoning is faster and cheaper.
|
||||
|
||||
Inside the `rlm` REPL, the sub-LLM has access to `llm_query()`, `llm_query_batched()`, `rlm_query()`, and `rlm_query_batched()` as Python helpers for further sub-LLM work — those are not standalone tools you call directly.
|
||||
|
||||
## Sub-agent completion sentinel
|
||||
|
||||
When you spawn a sub-agent via `agent_spawn` (or `agent_swarm`), the child runs independently in its own context. You will receive a `<deepseek:subagent.done>` element in the transcript when it finishes. This sentinel carries:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#![allow(dead_code)]
|
||||
//! Per‑call approval cache with fingerprint keys (§5.A).
|
||||
//!
|
||||
//! Instead of caching by tool name alone (which would let an approved
|
||||
|
||||
@@ -414,6 +414,7 @@ impl ToolRegistryBuilder {
|
||||
/// MCP tools are marked `defer_loading` by default (except discovery
|
||||
/// helpers) to keep the model-visible catalog compact.
|
||||
#[must_use]
|
||||
#[allow(dead_code)]
|
||||
pub fn with_mcp_tools(
|
||||
mut self,
|
||||
mcp_pool: std::sync::Arc<tokio::sync::Mutex<crate::mcp::McpPool>>,
|
||||
@@ -592,6 +593,7 @@ impl Default for ToolRegistryBuilder {
|
||||
|
||||
/// Adapter that wraps an MCP tool definition so it can live in the
|
||||
/// unified `ToolRegistry` alongside native tools (§5.B).
|
||||
#[allow(dead_code)]
|
||||
struct McpToolAdapter {
|
||||
name: String,
|
||||
tool: crate::mcp::McpTool,
|
||||
|
||||
Reference in New Issue
Block a user