Skip to content

Commit 049ea08

Browse files
committed
fix cr
1 parent e16541e commit 049ea08

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl CheckpointSubcommand {
9494
session.stderr,
9595
style::SetForegroundColor(Color::Yellow),
9696
style::Print(
97-
"⚠️ Checkpoint is disabled while in tangent mode. Disbale tangent mode with: q settings -d chat.enableTangentMode.\n\n"
97+
"⚠️ Checkpoint is disabled while in tangent mode. Disable tangent mode with: q settings -d chat.enableTangentMode.\n\n"
9898
),
9999
style::SetForegroundColor(Color::Reset),
100100
)?;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl TangentArgs {
7474
session.stderr,
7575
style::SetForegroundColor(Color::Yellow),
7676
style::Print(
77-
"⚠️ Tangent mode is disabled while using checkpoint. Disbale checkpoint with: q settings -d chat.enableCheckpoint.\n"
77+
"⚠️ Tangent mode is disabled while using checkpoint. Disable checkpoint with: q settings -d chat.enableCheckpoint.\n"
7878
),
7979
style::SetForegroundColor(Color::Reset),
8080
)?;

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

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ impl ChatSession {
13461346
self.stderr,
13471347
style::SetForegroundColor(Color::Yellow),
13481348
style::Print(
1349-
"⚠️ Checkpoint is disabled while in tangent mode. Disbale tangent mode with: q settings -d chat.enableTangentMode.\n\n"
1349+
"⚠️ Checkpoint is disabled while in tangent mode. Disable tangent mode with: q settings -d chat.enableTangentMode.\n\n"
13501350
),
13511351
style::SetForegroundColor(Color::Reset),
13521352
)?;
@@ -2388,7 +2388,7 @@ impl ChatSession {
23882388
execute!(self.stdout, style::Print("\n"))?;
23892389

23902390
// Handle checkpoint after tool execution - store tag for later display
2391-
let checkpoint_tag = {
2391+
let checkpoint_tag: Option<String> = {
23922392
let enabled = os
23932393
.database
23942394
.settings
@@ -2400,7 +2400,7 @@ impl ChatSession {
24002400
.get_bool(Setting::EnabledTangentMode)
24012401
.unwrap_or(false);
24022402
if invoke_result.is_err() || !enabled {
2403-
String::new()
2403+
None
24042404
}
24052405
// Take manager out temporarily to avoid borrow conflicts
24062406
else if let Some(mut manager) = self.conversation.checkpoint_manager.take() {
@@ -2442,20 +2442,20 @@ impl ChatSession {
24422442
Some(tool.name.clone()),
24432443
) {
24442444
debug!("Failed to create tool checkpoint: {}", e);
2445-
String::new()
2445+
None
24462446
} else {
24472447
manager.tools_in_turn += 1;
2448-
tag
2448+
Some(tag)
24492449
}
24502450
} else {
2451-
String::new()
2451+
None
24522452
};
24532453

24542454
// Put manager back
24552455
self.conversation.checkpoint_manager = Some(manager);
24562456
tag
24572457
} else {
2458-
String::new()
2458+
None
24592459
}
24602460
};
24612461

@@ -2502,8 +2502,15 @@ impl ChatSession {
25022502
style::Print(format!(" ● Completed in {}s", tool_time)),
25032503
style::SetForegroundColor(Color::Reset),
25042504
)?;
2505-
if !checkpoint_tag.is_empty() {
2506-
execute!(self.stdout, style::Print(format!(" [{checkpoint_tag}]").blue().bold()))?;
2505+
if let Some(tag) = checkpoint_tag {
2506+
execute!(
2507+
self.stdout,
2508+
style::SetForegroundColor(Color::Blue),
2509+
style::SetAttribute(Attribute::Bold),
2510+
style::Print(format!(" [{tag}]")),
2511+
style::SetForegroundColor(Color::Reset),
2512+
style::SetAttribute(Attribute::Reset),
2513+
)?;
25072514
}
25082515
execute!(self.stdout, style::Print("\n\n"))?;
25092516

0 commit comments

Comments
 (0)