File tree Expand file tree Collapse file tree
packages/tui/src/component/prompt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -362,7 +362,8 @@ export function Autocomplete(props: {
362362 const text = `${ res . name } (${ res . uri } )`
363363 options . push ( {
364364 display : Locale . truncateMiddle ( text , width ) ,
365- value : text ,
365+ // Match the name only; matching the URI caused unrelated fuzzy hits.
366+ value : res . name ,
366367 description : res . description ,
367368 onSelect : ( ) => {
368369 insertPart ( res . name , {
@@ -492,7 +493,8 @@ export function Autocomplete(props: {
492493 . go ( removeLineRange ( searchValue ) , nonFileOptions , {
493494 keys : [
494495 ( obj ) => removeLineRange ( ( obj . value ?? obj . display ) . trimEnd ( ) ) ,
495- "description" ,
496+ // Match description for slash commands only; for "@" it surfaced unrelated items.
497+ ...( store . visible === "/" ? [ "description" as const ] : [ ] ) ,
496498 ( obj ) => obj . aliases ?. join ( " " ) ?? "" ,
497499 ] ,
498500 limit : 10 ,
You can’t perform that action at this time.
0 commit comments