diff --git a/packages/tui/src/component/prompt/autocomplete.tsx b/packages/tui/src/component/prompt/autocomplete.tsx index 6fae556fc..f2916173d 100644 --- a/packages/tui/src/component/prompt/autocomplete.tsx +++ b/packages/tui/src/component/prompt/autocomplete.tsx @@ -359,9 +359,8 @@ export function Autocomplete(props: { const width = props.anchor().width - 4 for (const res of Object.values(sync.data.mcp_resource)) { - const text = `${res.name} (${res.uri})` options.push({ - display: Locale.truncateMiddle(text, width), + display: Locale.truncateMiddle(res.name, width), // Match the name only; matching the URI caused unrelated fuzzy hits. value: res.name, description: res.description, @@ -497,6 +496,7 @@ export function Autocomplete(props: { ...(store.visible === "/" ? ["description" as const] : []), (obj) => obj.aliases?.join(" ") ?? "", ], + threshold: store.visible === "@" ? 0.5 : 0, limit: 10, scoreFn: (objResults) => { const displayResult = objResults[0]