Skip to content

Commit 9f490b3

Browse files
committed
Fix /resource show to display clear pinned/indexed separation
- Add clear headers: '📌 Pinned Resources (always included)' - Add clear headers: '🔍 Indexed Resources (retrieved on demand)' - Proper visual separation between the two resource types - Import crossterm for styling
1 parent 1d8ede6 commit 9f490b3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use clap::{Subcommand, ValueEnum};
2+
use crossterm::{queue, style};
23
use eyre::Result;
34

45
use crate::cli::chat::{ChatError, ChatSession, ChatState};
@@ -59,7 +60,24 @@ impl ResourceSubcommand {
5960
Some(StorageType::Indexed) => KnowledgeSubcommand::Show.execute(os, session).await,
6061
Some(StorageType::Pinned) => ContextSubcommand::Show { expand }.execute(os, session).await,
6162
None => {
63+
// Show both with clear separation
64+
queue!(
65+
session.stderr,
66+
style::SetForegroundColor(style::Color::Cyan),
67+
style::Print("📌 Pinned Resources (always included):\n"),
68+
style::ResetColor
69+
)?;
70+
6271
ContextSubcommand::Show { expand }.execute(os, session).await?;
72+
73+
queue!(
74+
session.stderr,
75+
style::Print("\n"),
76+
style::SetForegroundColor(style::Color::Green),
77+
style::Print("🔍 Indexed Resources (retrieved on demand):\n"),
78+
style::ResetColor
79+
)?;
80+
6381
KnowledgeSubcommand::Show.execute(os, session).await
6482
}
6583
}

0 commit comments

Comments
 (0)