fix: prevent LLM from suggesting full command chains in execute-command

- Updated execute-command prompt to explicitly forbid suggesting full command chains
- Added clear instruction that only the first command should be suggested for chained commands
- This ensures the LLM will only suggest the initial command and let the user decide on subsequent commands
This commit is contained in:
hannesrudolph 2025-07-15 13:42:30 -06:00
parent a280f876eb
commit 60815f405c

View file

@ -42,8 +42,8 @@ Example: Requesting to execute ls in a specific directory
**Suggestion Guidelines:**
- Suggestions use prefix matching (case-insensitive)
- For simple commands: Include the base command (e.g., "npm", "git") and optionally a more specific pattern
- For chained commands (using &&, ||, ;, |): Include patterns for EACH individual command in the chain
- Example: For "cd backend && npm install", suggest: "cd backend && npm install", "cd", "npm install", "npm"
- For chained commands (using &&, ||, ;, |): Include patterns for EACH individual command in the chain (NOT the full chain)
- Example: For "cd backend && npm install", suggest: "cd", "npm install", "npm"
- Include 2-4 relevant patterns total
- Only suggest "*" (allow all) if explicitly requested by the user
@ -70,7 +70,6 @@ Example: Requesting to execute a chained command
<execute_command>
<command>cd backend && npm install</command>
<suggestions>
<suggest>cd backend && npm install</suggest>
<suggest>cd</suggest>
<suggest>npm install</suggest>
<suggest>npm</suggest>