Skip to content

Commit 8b88541

Browse files
authored
fix(agent): permission reset (#2469)
1 parent 9e4c257 commit 8b88541

File tree

1 file changed

+5
-2
lines changed
  • crates/chat-cli/src/cli/chat/cli

1 file changed

+5
-2
lines changed

crates/chat-cli/src/cli/chat/cli/tools.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ use crossterm::{
1818
};
1919

2020
use crate::api_client::model::Tool as FigTool;
21-
use crate::cli::agent::Agent;
21+
use crate::cli::agent::{
22+
Agent,
23+
DEFAULT_AGENT_NAME,
24+
};
2225
use crate::cli::chat::consts::{
2326
AGENT_FORMAT_TOOLS_DOC_URL,
2427
DUMMY_TOOL_NAME,
@@ -371,7 +374,7 @@ impl ToolsSubcommand {
371374
.conversation
372375
.agents
373376
.get_active()
374-
.is_some_and(|a| a.name.as_str() == "default")
377+
.is_some_and(|a| a.name.as_str() == DEFAULT_AGENT_NAME)
375378
{
376379
// We only want to reset the tool permission and nothing else
377380
if let Some(active_agent) = session.conversation.agents.get_active_mut() {

0 commit comments

Comments
 (0)