Skip to content

Commit 7865295

Browse files
Copilotyiwang
andcommitted
Fix /attachments command unreachable due to /attach prefix match
Co-authored-by: yiwang <142937+yiwang@users.noreply.github.com>
1 parent bc5046d commit 7865295

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

crates/cli/src/cli/chat.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ use std::io::{self, Write};
77
use tracing::debug;
88

99
use localgpt_core::agent::{
10-
Agent, AgentConfig, ImageAttachment, Skill, extract_tool_detail,
11-
get_last_session_id_for_agent, get_skills_summary, list_sessions_for_agent, load_skills,
12-
parse_skill_command, search_sessions_for_agent,
10+
Agent, AgentConfig, ImageAttachment, Skill, extract_tool_detail, get_last_session_id_for_agent,
11+
get_skills_summary, list_sessions_for_agent, load_skills, parse_skill_command,
12+
search_sessions_for_agent,
1313
};
1414
use localgpt_core::concurrency::WorkspaceLock;
1515
use localgpt_core::config::Config;
@@ -233,7 +233,7 @@ pub async fn run(args: ChatArgs, agent_id: &str) -> Result<()> {
233233
// Handle commands
234234
if input.starts_with('/') {
235235
// Special handling for /attach - adds to pending attachments
236-
if input.starts_with("/attach") {
236+
if input.starts_with("/attach ") || input == "/attach" {
237237
let parts: Vec<&str> = input.split_whitespace().collect();
238238
if parts.len() < 2 {
239239
eprintln!("Usage: /attach <file_path>");

0 commit comments

Comments
 (0)