fix: trim markdown json identifier

This commit is contained in:
iff 2025-01-07 02:14:27 +01:00
parent 60ba16a97c
commit b88ce2b7bc

View file

@ -166,6 +166,7 @@ The command `{last_command}` returns the following error message: `{error_msg}`.
str?;
str.expect("AI module: Failed to get content from response")
.trim_start_matches("```")
.trim_start_matches("json")
.trim_end_matches("```")
};
let json = serde_json::from_str(str);