From e89415fc9a95ab9c3acd72b49bedba93ddb710c7 Mon Sep 17 00:00:00 2001 From: Argenis Date: Sun, 15 Feb 2026 07:44:50 -0500 Subject: [PATCH] chore: add .wt-pr37 Windsurf directory to gitignore Also removes dead inject_openclaw_identity function and replaces unreachable macros with anyhow bail for cleaner error handling. --- .gitignore | 1 + src/channels/mod.rs | 38 ++------------------------------------ 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/.gitignore b/.gitignore index 1520314..08a2efc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.db *.db-journal .DS_Store +.wt-pr37/ diff --git a/src/channels/mod.rs b/src/channels/mod.rs index ee1043d..fa44411 100644 --- a/src/channels/mod.rs +++ b/src/channels/mod.rs @@ -192,38 +192,6 @@ pub fn build_system_prompt( } } -/// Inject `OpenClaw` (markdown) identity files into the prompt -fn inject_openclaw_identity(prompt: &mut String, workspace_dir: &std::path::Path) { - #[allow(unused_imports)] - use std::fmt::Write; - - prompt.push_str("## Project Context\n\n"); - prompt - .push_str("The following workspace files define your identity, behavior, and context.\n\n"); - - let bootstrap_files = [ - "AGENTS.md", - "SOUL.md", - "TOOLS.md", - "IDENTITY.md", - "USER.md", - "HEARTBEAT.md", - ]; - - for filename in &bootstrap_files { - inject_workspace_file(prompt, workspace_dir, filename); - } - - // BOOTSTRAP.md — only if it exists (first-run ritual) - let bootstrap_path = workspace_dir.join("BOOTSTRAP.md"); - if bootstrap_path.exists() { - inject_workspace_file(prompt, workspace_dir, "BOOTSTRAP.md"); - } - - // MEMORY.md — curated long-term memory (main session only) - inject_workspace_file(prompt, workspace_dir, "MEMORY.md"); -} - /// Inject a single workspace file into the prompt with truncation and missing-file markers. fn inject_workspace_file(prompt: &mut String, workspace_dir: &std::path::Path, filename: &str) { use std::fmt::Write; @@ -257,12 +225,10 @@ fn inject_workspace_file(prompt: &mut String, workspace_dir: &std::path::Path, f pub fn handle_command(command: crate::ChannelCommands, config: &Config) -> Result<()> { match command { crate::ChannelCommands::Start => { - // Handled in main.rs (needs async), this is unreachable - unreachable!("Start is handled in main.rs") + anyhow::bail!("Start must be handled in main.rs (requires async runtime)") } crate::ChannelCommands::Doctor => { - // Handled in main.rs (needs async), this is unreachable - unreachable!("Doctor is handled in main.rs") + anyhow::bail!("Doctor must be handled in main.rs (requires async runtime)") } crate::ChannelCommands::List => { println!("Channels:");