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.
This commit is contained in:
Argenis 2026-02-15 07:44:50 -05:00 committed by GitHub
parent 6725eb2995
commit e89415fc9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 36 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
*.db
*.db-journal
.DS_Store
.wt-pr37/

View file

@ -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:");