Skip to content

Commit dcedc5a

Browse files
committed
revise
1 parent c2d8cb1 commit dcedc5a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

crates/q_chat/src/command.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ impl ContextSubcommand {
180180
<em>help</em> <black!>Show an explanation for the context command</black!>
181181
182182
<em>show [--expand]</em> <black!>Display the context rule configuration and matched files</black!>
183-
<black!>--expand: Print out each matched file's content,
184-
along with the conversation summaries and hook configurations</black!>
183+
<black!>--expand: Print out each matched file's content, hook</black!>
184+
<black!> configurations and last conversation summary </black!>
185185
186186
<em>add [--global] [--force] <<paths...>></em>
187187
<black!>Add context rules (filenames or glob patterns)</black!>

crates/q_chat/src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,13 +1845,12 @@ impl ChatContext {
18451845
style::Print(format!("\nTotal: ~{} tokens\n\n", total_tokens)),
18461846
)?;
18471847

1848+
// Show last cached conversation summary if available, otherwise regenerate it
18481849
if expand {
1849-
let existing_summary =
1850-
self.conversation_state.latest_summary().map(|s| s.to_owned());
1851-
if let Some(summary) = existing_summary {
1852-
// Add a border around the summary for better visual separation
1853-
let terminal_width = self.terminal_width();
1854-
let border = "═".repeat(terminal_width.min(80));
1850+
if let Some(summary) =
1851+
self.conversation_state.latest_summary().map(|s| s.to_owned())
1852+
{
1853+
let border = "═".repeat(self.terminal_width().min(80));
18551854
execute!(
18561855
self.output,
18571856
style::Print("\n"),
@@ -2742,6 +2741,7 @@ impl ChatContext {
27422741
})
27432742
}
27442743

2744+
// Prints hook configuration grouped by trigger: conversation sesiion start or per user message
27452745
fn print_hook_section(output: &mut impl Write, hooks: &HashMap<String, Hook>, trigger: HookTrigger) -> Result<()> {
27462746
let section = match trigger {
27472747
HookTrigger::ConversationStart => "On Session Start",

0 commit comments

Comments
 (0)