1
0
This commit is contained in:
2026-03-01 16:46:09 +09:00
parent 09780fab1d
commit 9b0816138c
4 changed files with 32 additions and 24 deletions

View File

@@ -32,12 +32,9 @@ impl ClaudeSession {
.join("bot");
fs::create_dir_all(&work_dir)?;
// Write CLAUDE.md rules if not already present
// Always overwrite CLAUDE.md with latest rules
let rules_path = work_dir.join("CLAUDE.md");
if !rules_path.exists() {
fs::write(&rules_path, BOT_RULES)?;
eprintln!("bot: created CLAUDE.md at {}", rules_path.display());
}
fs::write(&rules_path, BOT_RULES)?;
eprintln!("bot: claude working directory = {}", work_dir.display());

View File

@@ -112,8 +112,12 @@ pub async fn get_records(collection: &str, limit: u32) -> Result<()> {
}
/// Delete a record
pub async fn delete_record(collection: &str, rkey: &str) -> Result<()> {
let session = auth::refresh_session().await?;
pub async fn delete_record(collection: &str, rkey: &str, is_bot: bool) -> Result<()> {
let session = if is_bot {
auth::refresh_bot_session().await?
} else {
auth::refresh_session().await?
};
let pds = session.pds.as_deref().unwrap_or("bsky.social");
let client = XrpcClient::new(pds);