summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/slashCommandProcessor.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts')
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.ts15
1 files changed, 4 insertions, 11 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index dfefc562..11e1247f 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -473,25 +473,18 @@ export const useSlashCommandProcessor = (
geminiTools.forEach((tool) => {
if (useShowDescriptions && tool.description) {
// Format tool name in cyan using simple ANSI cyan color
- message += ` - \u001b[36m${tool.displayName}\u001b[0m: `;
+ message += ` - \u001b[36m${tool.displayName} (${tool.name})\u001b[0m:\n`;
// Apply green color to the description text
const greenColor = '\u001b[32m';
const resetColor = '\u001b[0m';
// Handle multi-line descriptions by properly indenting and preserving formatting
- const descLines = tool.description.split('\n');
- message += `${greenColor}${descLines[0]}${resetColor}\n`;
+ const descLines = tool.description.trim().split('\n');
// If there are multiple lines, add proper indentation for each line
- if (descLines.length > 1) {
- for (let i = 1; i < descLines.length; i++) {
- // Skip empty lines at the end
- if (
- i === descLines.length - 1 &&
- descLines[i].trim() === ''
- )
- continue;
+ if (descLines) {
+ for (let i = 0; i < descLines.length; i++) {
message += ` ${greenColor}${descLines[i]}${resetColor}\n`;
}
}