diff options
| author | Billy Biggs <[email protected]> | 2025-06-15 23:09:53 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-06-15 23:09:53 -0700 |
| commit | 40fbb61a1ba3b0b16c0695c845d986b15768e0af (patch) | |
| tree | f36013525ef2d5c558db6d69a45638406a0d2a23 /packages/cli/src/ui/hooks/slashCommandProcessor.ts | |
| parent | 197704c630cbf85aa4d113c7a62e305827043910 (diff) | |
Update /tools desc to show the name of each tool as known to the model (#1091)
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/slashCommandProcessor.ts | 15 |
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`; } } |
