Skip to content

Commit 5061ce8

Browse files
jcorbinyiwang
authored andcommitted
Add agent tools debug logs
1 parent 4dd05f7 commit 5061ce8

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

crates/cli/src/cli/chat.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use futures::StreamExt;
44
use rustyline::DefaultEditor;
55
use rustyline::error::ReadlineError;
66
use std::io::{self, Write};
7+
use tracing::debug;
78

89
use localgpt_core::agent::{
910
Agent, AgentConfig, ImageAttachment, Skill, extract_tool_detail, get_last_session_id_for_agent,
@@ -127,6 +128,8 @@ pub async fn run(args: ChatArgs, agent_id: &str) -> Result<()> {
127128

128129
let mut agent = Agent::new(agent_config, &config, memory).await?;
129130
agent.extend_tools(crate::tools::create_cli_tools(&config)?);
131+
debug!("New agent with tools: {:?}", agent.tool_names());
132+
130133
let workspace_lock = WorkspaceLock::new()?;
131134

132135
// Determine session to use

crates/core/src/agent/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,12 @@ impl Agent {
458458

459459
// Build system prompt with identity, safety, workspace info
460460
let tool_names = self.tool_names_for_provider();
461+
debug!(
462+
"Using tools: {:?} provider: {:?}",
463+
tool_names,
464+
self.provider.name(),
465+
);
466+
461467
let system_prompt_params =
462468
system_prompt::SystemPromptParams::new(self.memory.workspace(), &self.config.model)
463469
.with_tools(tool_names)

0 commit comments

Comments
 (0)