Skip to content

Commit afdab75

Browse files
committed
PR review comments resolved.
1 parent f83d71f commit afdab75

File tree

4 files changed

+18
-25
lines changed

4 files changed

+18
-25
lines changed

azure-pipelines/PublishRoslynCopilot.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extends:
1717
parameters:
1818
pool:
1919
name: AzurePipelines-EO
20-
image: AzurePipelinesWindows2022compliantGPT
20+
image: 1ESPT-Windows2022
2121
os: windows
2222
stages:
2323
- stage: Upload
@@ -26,19 +26,20 @@ extends:
2626
displayName: Upload to server
2727
pool:
2828
name: AzurePipelines-EO
29-
image: AzurePipelinesWindows2022compliantGPT
29+
image: 1ESPT-Windows2022
3030
os: windows
3131
steps:
3232
- checkout: none
3333

3434
- download: CI
3535
artifact: partnerDeployables-Windows
3636
displayName: 'Download official build CI artifact'
37+
targetPath: '$(Pipeline.Workspace)/artifacts'
3738

3839
- task: CopyFiles@2
3940
displayName: 'Copy files from Zip folder to staging directory'
4041
inputs:
41-
SourceFolder: '$(Pipeline.Workspace)/partnerDeployables-Windows/'
42+
SourceFolder: '$(Pipeline.Workspace)/artifacts/'
4243
Contents: '**/*Roslyn.LanguageServer*.zip'
4344
TargetFolder: '$(Build.ArtifactStagingDirectory)/staging'
4445
CleanTargetFolder: true

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
"id": "RoslynCopilot",
427427
"description": "Language server for Roslyn Copilot integration (Windows)",
428428
"url": "https://roslyn.blob.core.windows.net/releases/Microsoft.VisualStudio.Copilot.Roslyn.LanguageServer-17.0.460-alpha-g8013717149",
429-
"installPath": ".roslyncopilot",
429+
"installPath": ".roslynCopilot",
430430
"platforms": [
431431
"win32",
432432
"linux",
@@ -437,7 +437,7 @@
437437
"x86_64",
438438
"arm64"
439439
],
440-
"installTestPath": "./.roslyncopilot/Microsoft.VisualStudio.Copilot.Roslyn.LanguageServer.dll",
440+
"installTestPath": "./.roslynCopilot/Microsoft.VisualStudio.Copilot.Roslyn.LanguageServer.dll",
441441
"integrity": "9944EBD6EE06BD595BCADD3057CD9BEF4105C3A3952DAE03E54F3114E2E6661F"
442442
},
443443
{
@@ -1459,6 +1459,10 @@
14591459
"xamlTools": {
14601460
"description": "%configuration.dotnet.server.componentPaths.xamlTools%",
14611461
"type": "string"
1462+
},
1463+
"roslynCopilot": {
1464+
"description": "%configuration.dotnet.server.componentPaths.roslynCopilot%",
1465+
"type": "string"
14621466
}
14631467
},
14641468
"default": {}

src/lsptoolshost/extensions/builtInComponents.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ export const componentInfo: { [key: string]: ComponentInfo } = {
3737
optionName: 'razorExtension',
3838
componentDllPaths: ['Microsoft.VisualStudioCode.RazorExtension.dll'],
3939
},
40+
roslynCopilot: {
41+
defaultFolderName: '.roslynCopilot',
42+
optionName: 'roslynCopilot',
43+
componentDllPaths: ['Microsoft.VisualStudio.Copilot.Roslyn.LanguageServer.dll'],
44+
},
4045
};
4146

4247
export function getComponentPaths(componentName: string, options: LanguageServerOptions | undefined): string[] {

src/lsptoolshost/server/roslynLanguageServer.ts

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,6 @@ export class RoslynLanguageServer {
106106
*/
107107
private static _processId: number | undefined;
108108

109-
/**
110-
* The folder name for the Roslyn Copilot language server dll.
111-
*/
112-
private static readonly _copilotLanguageServerDllDirName = '.roslyncopilot';
113-
private static readonly _copilotLanguageServerDllName = 'Microsoft.VisualStudio.Copilot.Roslyn.LanguageServer.dll';
114-
115109
/**
116110
* The solution file previously opened; we hold onto this so we can send this back over if the server were to be relaunched for any reason, like some other configuration
117111
* change that required the server to restart, or some other catastrophic failure that completely took down the process. In the case that the process is crashing because
@@ -1083,20 +1077,9 @@ export class RoslynLanguageServer {
10831077
await exports.setupTelemetryEnvironmentAsync(env);
10841078
}
10851079

1086-
const copilotServerExtensionFullPath = path.join(
1087-
util.getExtensionPath(),
1088-
RoslynLanguageServer._copilotLanguageServerDllDirName,
1089-
RoslynLanguageServer._copilotLanguageServerDllName
1090-
);
1091-
1092-
if (fs.existsSync(copilotServerExtensionFullPath)) {
1093-
additionalExtensionPaths.push(copilotServerExtensionFullPath);
1094-
channel.trace(
1095-
`CSharp DevKit contributes Copilot language server extension: ${copilotServerExtensionFullPath}`
1096-
);
1097-
} else {
1098-
channel.debug(`Copilot language server extension not found at: ${copilotServerExtensionFullPath}`);
1099-
}
1080+
getComponentPaths('roslynCopilot', languageServerOptions).forEach((extPath) => {
1081+
additionalExtensionPaths.push(extPath);
1082+
});
11001083
}
11011084

11021085
/**

0 commit comments

Comments
 (0)