fix: trim trailing spaces from command suggestions

- Add .trim() when parsing individual <suggest> tags
- Prevents suggestions like 'npm run ' with trailing spaces
- Ensures cleaner command patterns in the UI
This commit is contained in:
hannesrudolph 2025-07-14 15:57:14 -06:00
parent 81ef373680
commit 7d75a0c07e

View file

@ -84,7 +84,7 @@ export async function executeCommandTool(
suggestions = individualSuggestMatches
.map((match) => {
const content = match.match(/<suggest>(.*?)<\/suggest>/)
return content ? content[1] : ""
return content ? content[1].trim() : ""
})
.filter((suggestion) => suggestion.length > 0)
}