Skip to content

Commit d083cc1

Browse files
committed
fix: don't throw when slash file path is at the beginning of the user input
1 parent 97255a0 commit d083cc1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -810,13 +810,8 @@ impl Command {
810810
}
811811
},
812812
"usage" => Self::Usage,
813-
unknown_command => {
814-
// If the command starts with a slash but isn't recognized,
815-
// return an error instead of treating it as a prompt
816-
return Err(format!(
817-
"Unknown command: '/{}'. Type '/help' to see available commands.\nTo use a literal slash at the beginning of your message, escape it with a backslash (e.g., '\\//hey' for '/hey').",
818-
unknown_command
819-
));
813+
_unknown_command => Self::Ask {
814+
prompt: input.to_string(),
820815
},
821816
});
822817
}

0 commit comments

Comments
 (0)