Commit 3bad3bf
Auto-include askQuestions tool in Plan agent when enabled (#3100)
* Initial plan
* Include searchSubagent and askQuestions tools in Plan agent when enabled
- Modified PlanAgentProvider.buildCustomizedConfig to check if searchSubagent and askQuestions tools are enabled via configuration
- Added ToolName import to access tool name constants
- Added checks for ConfigKey.Advanced.SearchSubagentToolEnabled and ConfigKey.AskQuestionsEnabled
- Tools are automatically included in the Plan agent's tool list when their corresponding settings are enabled
- Updated onDidChangeConfiguration listener to monitor changes to these settings and refresh the agent
- Added comprehensive unit tests to verify the new functionality including:
- Tools are included when enabled
- Tools are not included when disabled
- Both tools work together when both are enabled
- Deduplication works when tools are also in additionalTools
- Change events fire correctly when settings change
- All tests passing (31/31)
Co-authored-by: digitarald <8599+digitarald@users.noreply.github.com>
* Improve test robustness for tool deduplication check
- Updated regex pattern to match both single and double quotes for better robustness
- Addresses code review feedback about brittle test implementation
Co-authored-by: digitarald <8599+digitarald@users.noreply.github.com>
* Fix regex pattern for consistent quote matching in test
- Updated regex to match either single or double quotes consistently (not mixed)
- Pattern now uses alternation to prevent matching invalid mixed quotes like 'tool"
- Addresses code review feedback for more precise pattern matching
Co-authored-by: digitarald <8599+digitarald@users.noreply.github.com>
* Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add missing IExperimentationService import in PlanAgentProvider
* Fix askQuestions tool reference name and remove searchSubagent from Plan agent
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: digitarald <8599+digitarald@users.noreply.github.com>
Co-authored-by: Harald Kirschner <hkirschner@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent c8f61c7 commit 3bad3bf
File tree
2 files changed
+54
-4
lines changed- src/extension/agents/vscode-node
- test
2 files changed
+54
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| |||
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
269 | 280 | | |
270 | | - | |
271 | | - | |
272 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
273 | 284 | | |
274 | 285 | | |
275 | 286 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
199 | 238 | | |
200 | 239 | | |
201 | 240 | | |
| |||
0 commit comments