Skip to content

Commit 7caaee6

Browse files
authored
Format bug bash (#334)
1 parent a3f93f3 commit 7caaee6

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ impl ToolsSubcommand {
209209
session.stderr,
210210
style::SetForegroundColor(Color::Green),
211211
if valid_tools.len() > 1 {
212-
style::Print(format!("\nTools '{}' are ", valid_tools.join("', '")))
212+
style::Print(format!("Tools '{}' are ", valid_tools.join("', '")))
213213
} else {
214-
style::Print(format!("\nTool '{}' is ", valid_tools[0]))
214+
style::Print(format!("Tool '{}' is ", valid_tools[0]))
215215
},
216216
style::Print("now trusted. I will "),
217217
style::SetAttribute(Attribute::Bold),
@@ -226,6 +226,7 @@ impl ToolsSubcommand {
226226
"this tool"
227227
}
228228
)),
229+
style::Print("\n"),
229230
style::SetForegroundColor(Color::Reset),
230231
)?;
231232
}
@@ -256,11 +257,11 @@ impl ToolsSubcommand {
256257
session.stderr,
257258
style::SetForegroundColor(Color::Green),
258259
if valid_tools.len() > 1 {
259-
style::Print(format!("\nTools '{}' are ", valid_tools.join("', '")))
260+
style::Print(format!("Tools '{}' are ", valid_tools.join("', '")))
260261
} else {
261-
style::Print(format!("\nTool '{}' is ", valid_tools[0]))
262+
style::Print(format!("Tool '{}' is ", valid_tools[0]))
262263
},
263-
style::Print("set to per-request confirmation."),
264+
style::Print("set to per-request confirmation.\n"),
264265
style::SetForegroundColor(Color::Reset),
265266
)?;
266267
}
@@ -274,14 +275,14 @@ impl ToolsSubcommand {
274275
.for_each(|FigTool::ToolSpecification(spec)| {
275276
session.tool_permissions.trust_tool(spec.name.as_str());
276277
});
277-
queue!(session.stderr, style::Print(TRUST_ALL_TEXT),)?;
278+
queue!(session.stderr, style::Print(TRUST_ALL_TEXT), style::Print("\n"))?;
278279
},
279280
Self::Reset => {
280281
session.tool_permissions.reset();
281282
queue!(
282283
session.stderr,
283284
style::SetForegroundColor(Color::Green),
284-
style::Print("\nReset all tools to the default permission levels."),
285+
style::Print("Reset all tools to the default permission levels.\n"),
285286
style::SetForegroundColor(Color::Reset),
286287
)?;
287288
},
@@ -291,15 +292,15 @@ impl ToolsSubcommand {
291292
queue!(
292293
session.stderr,
293294
style::SetForegroundColor(Color::Green),
294-
style::Print(format!("\nReset tool '{}' to the default permission level.", tool_name)),
295+
style::Print(format!("Reset tool '{}' to the default permission level.\n", tool_name)),
295296
style::SetForegroundColor(Color::Reset),
296297
)?;
297298
} else {
298299
queue!(
299300
session.stderr,
300301
style::SetForegroundColor(Color::Red),
301302
style::Print(format!(
302-
"\nTool '{}' does not exist or is already in default settings.",
303+
"Tool '{}' does not exist or is already in default settings.\n",
303304
tool_name
304305
)),
305306
style::SetForegroundColor(Color::Reset),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ impl ChatSession {
12921292
queue!(
12931293
self.stderr,
12941294
style::SetForegroundColor(Color::Red),
1295-
style::Print(format!("Failed to execute command: {}\n", err)),
1295+
style::Print(format!("\nFailed to execute command: {}\n", err)),
12961296
style::SetForegroundColor(Color::Reset)
12971297
)?;
12981298
},
@@ -1378,7 +1378,7 @@ impl ChatSession {
13781378
queue!(
13791379
self.stderr,
13801380
style::SetForegroundColor(Color::Red),
1381-
style::Print(format!("Failed to execute command: {}\n", e)),
1381+
style::Print(format!("\nFailed to execute command: {}\n", e)),
13821382
style::SetForegroundColor(Color::Reset)
13831383
)?;
13841384
},

0 commit comments

Comments
 (0)