fmt
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
use crate::controller::ControllerType;
|
||||
mod tests;
|
||||
|
||||
pub fn determine_controller(
|
||||
text: &str,
|
||||
) -> ControllerType {
|
||||
pub fn determine_controller(text: &str) -> ControllerType {
|
||||
let text = text.trim();
|
||||
|
||||
if let Some(prompt) = text.strip_prefix("create") {
|
||||
|
||||
@@ -22,11 +22,12 @@ fn determine_controller() {
|
||||
input: "create Some prompt",
|
||||
expected: super::ControllerType::ImageGeneration("Some prompt".to_owned()),
|
||||
},
|
||||
|
||||
TestCase {
|
||||
name: "Image edit triggered by edit prefix",
|
||||
input: "edit Turn this into an anime-style image",
|
||||
expected: super::ControllerType::ImageEdit("Turn this into an anime-style image".to_owned()),
|
||||
expected: super::ControllerType::ImageEdit(
|
||||
"Turn this into an anime-style image".to_owned(),
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user