Skip to content

Commit 7d75a0c

Browse files
committed
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
1 parent 81ef373 commit 7d75a0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/tools/executeCommandTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export async function executeCommandTool(
8484
suggestions = individualSuggestMatches
8585
.map((match) => {
8686
const content = match.match(/<suggest>(.*?)<\/suggest>/)
87-
return content ? content[1] : ""
87+
return content ? content[1].trim() : ""
8888
})
8989
.filter((suggestion) => suggestion.length > 0)
9090
}

0 commit comments

Comments
 (0)