@@ -289,30 +289,32 @@ const ContextMenu: React.FC<ContextMenuProps> = ({
289289 overflowX : "hidden" ,
290290 } } >
291291 { /* Settings button for slash commands */ }
292- { searchQuery . startsWith ( "/" ) && (
292+ { searchQuery === "/" && (
293293 < div className = "p-2 flex items-start gap-4 justify-between" >
294- < div className = "text-sm" >
295- < p className = "font-bold text-base text-vscode-foreground mt-1 mb-0.5" > Slash Commands</ p >
296- < p className = "text-xs mt-0.5 -mb-1" >
297- < Trans
298- i18nKey = "settings:slashCommands.description"
299- components = { {
300- DocsLink : (
301- < a
302- href = { buildDocLink (
303- "features/slash-commands" ,
304- "slash_commands_settings" ,
305- ) }
306- target = "_blank"
307- rel = "noopener noreferrer"
308- className = "text-vscode-textLink-foreground hover:underline" >
309- Docs
310- </ a >
311- ) ,
312- } }
313- />
314- </ p >
315- </ div >
294+ { searchQuery . length === 1 && (
295+ < div className = "text-sm" >
296+ < p className = "font-bold text-base text-vscode-foreground mt-1 mb-0.5" > Slash Commands</ p >
297+ < p className = "text-xs mt-0.5 -mb-1" >
298+ < Trans
299+ i18nKey = "settings:slashCommands.description"
300+ components = { {
301+ DocsLink : (
302+ < a
303+ href = { buildDocLink (
304+ "features/slash-commands" ,
305+ "slash_commands_settings" ,
306+ ) }
307+ target = "_blank"
308+ rel = "noopener noreferrer"
309+ className = "text-vscode-textLink-foreground hover:underline" >
310+ Docs
311+ </ a >
312+ ) ,
313+ } }
314+ />
315+ </ p >
316+ </ div >
317+ ) }
316318 < button
317319 className = "mt-1 cursor-pointer"
318320 onClick = { handleSettingsClick }
0 commit comments