Skip to content

Commit fd39e59

Browse files
Adam-itnirav-ravalSaurabh7019
authored
Release v4.17.0 (#714)
## 🎯 Aim The aim is to create a minor release that primary dilivers update of the latest SPFx version which is 1.22.2 ## ✅ What was done - [X] Added copy SharePoint Online page Language Model Tool - [X] Updated add component form to run install dependencies - [X] Added support for SPFx 1.22.2 ## 🔗 Related issue Closes: #709 --------- Co-authored-by: Nirav Raval <niravraval34@gmail.com> Co-authored-by: Saurabh Tripathi <saurabh7019@gmail.com>
1 parent 06f3e12 commit fd39e59

File tree

20 files changed

+315
-100
lines changed

20 files changed

+315
-100
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ npm run test # Run VS Code extension tests
9292
The extension exposes SharePoint Online operations as GitHub Copilot tools:
9393
- `list_spo_app`, `install_spo_app`, `uninstall_spo_app`, `upgrade_spo_app`, `list_spo_app_instances` - App catalog management
9494
- `add_spo_list`, `get_spo_list`, `remove_spo_list` - List operations
95-
- `add_spo_page` - Page creation
95+
- `add_spo_page`, `get_spo_page`, `list_spo_page`, `copy_spo_page`, `remove_spo_page` - Page operations
9696
- `spo_site_add`, `spo_site_get`, `spo_site_remove` - Site management
9797
- `upgrade_spfx_project` - SPFx project upgrade
9898

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## [4.17.0] - 2026-02-15
4+
5+
- Added copy SharePoint Online page Language Model Tool
6+
- Updated 'add component form' to run install dependencies
7+
- Added support for SPFx 1.22.2
8+
39
## [4.16.0] - 2025-12-20
410

511
- Fixed bug in project upgrade action

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ This action checks if your local development environment meets the required vers
7272

7373
It is also possible to install the required Node.js version and global dependencies for any SPFx version using the **Install dependencies** action.
7474

75-
![install dependencies](./assets/images/install-dependencies.png)
75+
![install dependencies](./docs/assets/images-vscode/Install-dependencies.png)
7676

7777
> [!NOTE]
7878
> The list of valid dependencies is based on [set up your development environment recommendations](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment)

assets/walkthrough/validate-local-setup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ To build and deploy client-side web parts, extensions, or adaptive cards using t
44

55
- **Validate Local Setup**: This action checks if your local development environment meets the required versions of Node.js and global dependencies for the SPFx version you have installed, and in case you do not have any SPFx generator installed, it will validate against the latest SPFx version.
66

7-
![validate dependencies](../images/validate-dependency.png)
7+
![validate dependencies](../../docs/assets/images-vscode/validate-dependency.png)
88

99
- **Install Dependencies**: This action installs the required global dependencies for any SPFx version.
1010

11-
![install dependencies](../images/install-dependencies.png)
11+
![install dependencies](../../docs/assets/images-vscode/Install-dependencies.png)
1212

1313
SPFx Toolkit may also help you install and switch to the correct version of Node.js using either `nvm` (Node Version Manager) or `nvs` (Node Version Switcher). First you need to make sure you have set the Node.js Version Manager setting in SPFx Toolkit to either `nvm` or `nvs`.
1414

1515
Then during installing dependencies, SPFx Toolkit will check if you have the correct version of Node.js installed, and if not, it will offer to install and switch to the correct version for you using the selected Node version manager.
1616

17-
![node installation](../images/install-node-support.png)
17+
![node installation](../../docs/assets/images-vscode/install-node-support.png)
1818

1919
Check out the [docs for more details](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment) on the required node and dependency versions.

docs/src/content/docs/about/changelog.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
title: Changelog
33
---
44

5+
## [4.17.0] - 2026-02-15
6+
7+
- Added copy SharePoint Online page Language Model Tool
8+
- Updated 'add component form' to run install dependencies
9+
- Added support for SPFx 1.22.2
10+
511
## [4.16.0] - 2025-12-20
612

713
- Fixed bug in project upgrade action

docs/src/content/docs/features/github-copilot-capabilities.mdx

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,31 @@ You don't need to do anything specific to use any of the language model tools in
1515

1616
![language-model-tools-in-action](../../../../assets/images-vscode/language-model-tools-in-action.png)
1717

18-
The extension provides the following tools
19-
20-
| Tool | Description |
21-
|-----------------------------------|-----------------------------------------------------------|
22-
| SharePointAppInstall | Installs an app from tenant app catalog in the site |
23-
| SharePointAppList | Lists apps from the tenant app catalog |
24-
| SharePointFrameworkProjectUpgrade | Upgrade SharePoint Framework project |
25-
| SharePointListAdd | Creates list in the specified site |
26-
| SharePointListGet | Gets information about the specific list |
27-
| SharePointListRemove | Removes the specified list |
28-
| SharePointPageAdd | Creates a page |
29-
| SharePointSiteAdd | Create a new SharePoint Online site |
30-
| SharePointSiteGet | Gets information about the specific site |
31-
| SharePointSiteRemove | Remove a SharePoint Online site |
32-
3318
### SharePoint Online Management
3419

3520
This set of tools aim to allow you to perform common management tasks on your SharePoint Online tenant. In order to use them you need to be first signed in to your tenant in SPFx Toolkit.
3621

3722
The extension provides the following tools
3823

39-
| Tool | Description |
40-
|---------------------------|-------------------------------------------------------------------------|
41-
| SharePointAppList | Lists SharePoint apps from the tenant or site collection app catalog |
42-
| SharePointAppInstanceList | Lists SharePoint app instances installed in a specific site |
43-
| SharePointAppInstall | Installs an app from the specified app catalog to a site |
44-
| SharePointAppUninstall | Uninstalls an app from the specified site |
45-
| SharePointAppUpgrade | Upgrades an app to the latest version in the specified site |
46-
| SharePointListAdd | Creates a new list in the specified site |
47-
| SharePointListGet | Gets information about a specific list |
48-
| SharePointListRemove | Removes the specified list from a site |
49-
| SharePointPageAdd | Creates a new page in the specified site |
50-
| SharePointSiteAdd | Creates a new SharePoint Online site |
51-
| SharePointSiteRemove | Removes a SharePoint Online site |
52-
| SharePointSiteGet | Gets information about a specific SharePoint site |
24+
| Tool | Description |
25+
|-----------------------------------|-------------------------------------------------------------|
26+
| SharePointAppInstall | Installs an app from tenant app catalog in the site |
27+
| SharePointAppInstanceList | Lists app instances installed in the specified site |
28+
| SharePointAppList | Lists apps from the tenant app catalog |
29+
| SharePointAppUninstall | Uninstalls an app from the specified site |
30+
| SharePointAppUpgrade | Upgrades an app to the latest version in the specified site |
31+
| SharePointFrameworkProjectUpgrade | Upgrade SharePoint Framework project |
32+
| SharePointListAdd | Creates list in the specified site |
33+
| SharePointListGet | Gets information about the specific list |
34+
| SharePointListRemove | Removes the specified list |
35+
| SharePointPageAdd | Creates a page |
36+
| SharePointPageGet | Gets information about the specific page |
37+
| SharePointPageList | Lists all pages in the specified site |
38+
| SharePointPageCopy | Copies a page from a source site to a target site |
39+
| SharePointPageRemove | Removes the specified page |
40+
| SharePointSiteAdd | Create a new SharePoint Online site |
41+
| SharePointSiteGet | Gets information about the specific site |
42+
| SharePointSiteRemove | Remove a SharePoint Online site |
5343

5444
## Chat Participant
5545

npm-shrinkwrap.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "viva-connections-toolkit",
33
"displayName": "SharePoint Framework Toolkit",
44
"description": "SharePoint Framework Toolkit aims to boost your productivity in developing and managing SharePoint Framework solutions helping at every stage of your development flow, from setting up your development workspace to deploying a solution straight to your tenant without the need to leave VS Code and now even create a CI/CD pipeline to introduce automate deployment of your app. This toolkit is provided by the community.",
5-
"version": "4.16.0",
5+
"version": "4.17.0",
66
"publisher": "m365pnp",
77
"preview": false,
88
"homepage": "https://pnp.github.io/vscode-viva",
@@ -508,6 +508,45 @@
508508
}
509509
}
510510
},
511+
{
512+
"name": "copy_spo_page",
513+
"tags": [
514+
"sharepoint",
515+
"page",
516+
"spfx-toolkit"
517+
],
518+
"toolReferenceName": "SharePointPageCopy",
519+
"displayName": "Copy a SharePoint Page",
520+
"modelDescription": "Copies a modern SharePoint page within the same site or to a different site. Supports copying page templates. Use relative path in targetUrl for same-site copies or absolute URL for cross-site copies. Set overwrite to true to replace existing pages. Requires Microsoft 365 authentication and read permissions on the source site, write permissions on the target site.",
521+
"userDescription": "Copies a page.",
522+
"canBeReferencedInPrompt": true,
523+
"icon": "$(copy)",
524+
"inputSchema": {
525+
"type": "object",
526+
"properties": {
527+
"webUrl": {
528+
"type": "string",
529+
"description": "URL of the site where the source page is located. This option is required.",
530+
"default": ""
531+
},
532+
"sourceName": {
533+
"type": "string",
534+
"description": "Name of the source page to copy (e.g., 'home.aspx' or 'templates/PageTemplate.aspx'). This option is required.",
535+
"default": ""
536+
},
537+
"targetUrl": {
538+
"type": "string",
539+
"description": "Target URL for the copied page. Use relative path (e.g., 'home-copy.aspx') for same-site copies or absolute URL for cross-site copies. This option is required.",
540+
"default": ""
541+
},
542+
"overwrite": {
543+
"type": "boolean",
544+
"description": "Set to true to overwrite the target page if it already exists.",
545+
"default": false
546+
}
547+
}
548+
}
549+
},
511550
{
512551
"name": "remove_spo_page",
513552
"tags": [
@@ -1545,11 +1584,11 @@
15451584
},
15461585
"dependencies": {
15471586
"@grconrad/vscode-extension-feedback": "^1.0.0",
1548-
"@pnp/cli-microsoft365-spfx-toolkit": "1.8.0",
1587+
"@pnp/cli-microsoft365-spfx-toolkit": "1.9.0",
15491588
"node-forge": "1.3.2",
15501589
"react-markdown": "10.1.0",
15511590
"remark-gfm": "4.0.1",
15521591
"use-debounce": "10.0.4",
15531592
"rehype-raw": "7.0.0"
15541593
}
1555-
}
1594+
}

scripts/prepare-sample-data.ps1

Lines changed: 73 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -39,48 +39,90 @@ function Parse-SampleJsonFiles {
3939
$sampleJsons = ConvertFrom-Json -InputObject $sampleContent
4040

4141
foreach ($sampleJson in $sampleJsons) {
42+
$version = $null
43+
$componentType = $null
44+
$extensionType = $null
45+
$isSPFxProject = $false
46+
4247
$yoRcPath = $sample.FullName.ToLower().Replace("assets\sample.json", ".yo-rc.json")
4348

44-
if (-not (Test-Path -Path $yoRcPath)) {
45-
Continue
49+
if (Test-Path -Path $yoRcPath) {
50+
try {
51+
$yoRcContent = Get-Content -Path $yoRcPath -Raw
52+
$yoRcJson = ConvertFrom-Json -InputObject $yoRcContent
53+
$yoRcJson = $yoRcJson.PSObject.Properties.Value
54+
55+
if ($null -ne $yoRcJson) {
56+
$isSPFxProject = $true
57+
58+
if ($null -ne $yoRcJson.version -and $yoRcJson.version.GetType().BaseType -eq [System.Array]) {
59+
if ($null -ne $yoRcJson.version[$yoRcJson.version.Length - 1]) {
60+
$version = $yoRcJson.version[$yoRcJson.version.Length - 1]
61+
}
62+
else {
63+
$version = $yoRcJson.version[0]
64+
}
65+
}
66+
else {
67+
$version = $yoRcJson.version
68+
}
69+
70+
if ($null -ne $yoRcJson.componentType -and $yoRcJson.componentType.GetType().BaseType -eq [System.Array]) {
71+
if ($null -ne $yoRcJson.componentType[$yoRcJson.componentType.Length - 1]) {
72+
$componentType = $yoRcJson.componentType[$yoRcJson.componentType.Length - 1]
73+
}
74+
else {
75+
$componentType = $yoRcJson.componentType[0]
76+
}
77+
}
78+
else {
79+
$componentType = $yoRcJson.componentType
80+
}
81+
82+
if ($null -ne $yoRcJson.extensionType -and $yoRcJson.extensionType.GetType().BaseType -eq [System.Array]) {
83+
$extensionType = $yoRcJson.extensionType[$yoRcJson.extensionType.Length - 1]
84+
}
85+
else {
86+
$extensionType = $yoRcJson.extensionType
87+
}
88+
}
89+
}
90+
catch {
91+
Write-Warning "Failed to parse package.json for $($sample.FullName): $($_.Exception.Message)"
92+
}
4693
}
4794

48-
$yoRcContent = Get-Content -Path $yoRcPath -Raw
49-
$yoRcJson = ConvertFrom-Json -InputObject $yoRcContent
50-
$yoRcJson = $yoRcJson.PSObject.Properties.Value
95+
if (-not $isSPFxProject) {
96+
$packageJsonPath = $sample.FullName.ToLower().Replace("assets\sample.json", "package.json")
5197

52-
$version = $null
53-
if ($null -ne $yoRcJson.version -and $yoRcJson.version.GetType().BaseType -eq [System.Array]) {
54-
if ($null -ne $yoRcJson.version[$yoRcJson.version.Length - 1]) {
55-
$version = $yoRcJson.version[$yoRcJson.version.Length - 1]
98+
if (-not (Test-Path -Path $packageJsonPath)) {
99+
Continue
56100
}
57-
else {
58-
$version = $yoRcJson.version[0]
59-
}
60-
}
61-
else {
62-
$version = $yoRcJson.version
63-
}
64101

65-
$componentType = $null
66-
if ($null -ne $yoRcJson.componentType -and $yoRcJson.componentType.GetType().BaseType -eq [System.Array]) {
67-
if ($null -ne $yoRcJson.componentType[$yoRcJson.componentType.Length - 1]) {
68-
$componentType = $yoRcJson.componentType[$yoRcJson.componentType.Length - 1]
102+
try {
103+
$packageJsonContent = Get-Content -Path $packageJsonPath -Raw
104+
$packageJson = ConvertFrom-Json -InputObject $packageJsonContent
105+
106+
if ($null -ne $packageJson.dependencies.'@microsoft/sp-core-library') {
107+
$isSPFxProject = $true
108+
109+
$coreLibVersion = $packageJson.dependencies.'@microsoft/sp-core-library'
110+
$version = $coreLibVersion -replace '[\^~>=<]', ''
111+
112+
switch ($sampleRepo) {
113+
'sp-dev-fx-webparts' { $componentType = 'webPart' }
114+
'sp-dev-fx-extensions' { $componentType = 'extension' }
115+
'sp-dev-fx-aces' { $componentType = 'adaptiveCardExtension' }
116+
'sp-dev-fx-library-components' { $componentType = 'library' }
117+
}
118+
}
69119
}
70-
else {
71-
$componentType = $yoRcJson.componentType[0]
120+
catch {
72121
}
73122
}
74-
else {
75-
$componentType = $yoRcJson.componentType
76-
}
77123

78-
$extensionType = $null
79-
if ($null -ne $yoRcJson.extensionType -and $yoRcJson.extensionType.GetType().BaseType -eq [System.Array]) {
80-
$extensionType = $yoRcJson.extensionType[$yoRcJson.extensionType.Length - 1]
81-
}
82-
else {
83-
$extensionType = $yoRcJson.extensionType
124+
if (-not $isSPFxProject) {
125+
Continue
84126
}
85127

86128
$sampleAuthors = @()

src/chat/tools/ChatTools.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
SharePointListGet,
1212
SharePointListRemove,
1313
SharePointPageAdd,
14+
SharePointPageCopy,
1415
SharePointPageGet,
1516
SharePointPageList,
1617
SharePointPageRemove,
@@ -58,6 +59,9 @@ export class ChatTools {
5859
subscriptions.push(
5960
lm.registerTool('list_spo_page', new SharePointPageList())
6061
);
62+
subscriptions.push(
63+
lm.registerTool('copy_spo_page', new SharePointPageCopy())
64+
);
6165
subscriptions.push(
6266
lm.registerTool('remove_spo_page', new SharePointPageRemove())
6367
);

0 commit comments

Comments
 (0)