Commit c0fbf06
## 🎯 Aim
Aligns the `spo_list_remove` Language Model Tool with established naming
conventions ({verb}_{noun}) and adds support for recycling lists instead
of permanent deletion.
## 📷 Result
No visual changes - this is a backend tool enhancement for the Language
Model Tools.
## ✅ What was done
- [x] **Renamed tool**: `spo_list_remove` → `remove_spo_list`
- Updated registration in `ChatTools.ts`
- Updated metadata in `package.json`
- [x] **Added `recycle` parameter**: Optional boolean (default: `false`)
to send lists to recycle bin
```typescript
interface ISharePointListRemoveParameters {
title: string;
webUrl: string;
recycle?: boolean; // New parameter with default: false
}
```
- Always included in CLI command with nullish coalescing operator for
default value
- Response message reflects action taken (recycled vs. permanently
removed)
- [x] **Enhanced model description**: Concise documentation covering:
- Core functionality (permanent removal vs. recycling based on
parameter)
- Use cases (cleanup unused lists, remove test data, manage site
content)
- [x] **Applied review feedback**:
- Simplified modelDescription to be more concise
- Updated recycle parameter description for clarity
- Set default value for recycle to `false` instead of empty string
- Refactored code to always include recycle parameter in command inputs
## 🔗 Related issue
Follows patterns from PR #596 / issue #586.
Fixes #592
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>💡 [Feature]: Update spo_list_remove Language Model Tool
to Follow standards</issue_title>
> <issue_description>### 🎯 Aim of the feature
>
> Refactor the existing `spo_list_remove` Language Model Tool to align
with updated naming conventions, improve model descriptions, and add
additional list removal options for enhanced SharePoint list management
capabilities.
>
> **Issues to address:**
>
> - Rename the tool to **remove_spo_list** following the naming
convention {verb}_{noun} as established in the codebase
> - Improve `modelDescription`:
> - What exactly does the tool do? - describe the specific functionality
and capabilities
> - What kind of information does it return? - detail the expected
response format
> - When should and shouldn't it be used? - provide clear use cases and
scenarios to avoid
> - Describe important limitations or constraints of the tool - identify
technical and permission limitations
> - Refactor
[ListRemove](https://github.com/pnp/vscode-viva/blob/dev/src/chat/tools/spo/ListRemove.ts)
> - Missing Properties: lets add support for the following options:
`recycle`
>
> Under the hood use: [spo list
remove](https://pnp.github.io/cli-microsoft365/cmd/spo/list/list-remove)
>
> **The issue #586 has been
implemented and can be used as a reference to ensure consistency with
the correct standards.**
>
> ### 🤖 Agent info
>
> - create your feature branch with the implementation based on dev
branch. This is a must
> - when opening a PR you MUST target dev branch
> - similar change was done in this commit
796856b.
you must use it as refrence
>
> ### 🤔 Additional remarks or comments
>
> - VS Code LM docs:
https://code.visualstudio.com/api/extension-guides/tools
> - CLI for Microsoft 365 Reference:
https://pnp.github.io/cli-microsoft365/cmd/spo/list/list-remove</issue_description>
>
> <agent_instructions>don't forget your feature branch MUST be created
based on dev branch and NOT main.
> </agent_instructions>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
- Fixes #592
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Adam-it <[email protected]>
Co-authored-by: Adam Wójcik <[email protected]>
1 parent d670c21 commit c0fbf06
File tree
4 files changed
+18
-10
lines changed- src/chat/tools
- spo/list
4 files changed
+18
-10
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
301 | | - | |
| 301 | + | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
| 309 | + | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
325 | 330 | | |
326 | 331 | | |
327 | 332 | | |
| |||
1304 | 1309 | | |
1305 | 1310 | | |
1306 | 1311 | | |
1307 | | - | |
| 1312 | + | |
1308 | 1313 | | |
1309 | 1314 | | |
1310 | 1315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | | - | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
0 commit comments