Skip to content

ZETA-7039: fix code snippets #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/snippets/log-position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export async function logCursorPosition(context: vscode.ExtensionContext, select
const nonFilePathParameters = (selectedOption as any).parameters.filter(parameter => parameter.paramType !== 'filePath');
const parameters = await collectInputBoxValues(nonFilePathParameters);
codeSnippetGeneratingNotification();
const generateVsCodeDownloadCodeParameters = createGenerateVsCodeDownloadCodeParameters(context, (selectedOption as any).orgId as string, (selectedOption as any).pathId, (selectedOption as any).recipeId, (selectedOption as any).id, parameters, fileName);
const generateVsCodeDownloadCodeParameters = createGenerateVsCodeDownloadCodeParameters(context, (selectedOption as any).orgId as string, (selectedOption as any).pathId, (selectedOption as any).recipeId, (selectedOption as any).id, parameters, fileName, vsCodeInstanceId);
generateVsCodeDownloadCode(generateVsCodeDownloadCodeParameters, context, isProduction).then(data => {
});
}
Expand Down Expand Up @@ -136,7 +136,7 @@ async function showInputBox(nonFilePathParameters: any, index: number, parameter
}

function createGenerateVsCodeDownloadCodeParameters(context, orgId: string,
pathId: string, recipeId: string, stepId: string, parameters: any, fileName?: string) {
pathId: string, recipeId: string, stepId: string, parameters: any, fileName?: string, vsCodeInstanceId?: string) {

return {
projectName: '',
Expand All @@ -146,7 +146,7 @@ function createGenerateVsCodeDownloadCodeParameters(context, orgId: string,
recipeId: recipeId,
stepId: stepId,
fileName: fileName,
vsCodeInstanceId: context.workspaceState.get(MEMENTO_RAZROO_ID_VS_CODE_TOKEN) as string,
vsCodeInstanceId: vsCodeInstanceId,
userId: context.globalState.get(MEMENTO_RAZROO_USER_ID) as string,
userOrgId: context.globalState.get(MEMENTO_RAZROO_ORG_ID) as string,
};
Expand Down
2 changes: 1 addition & 1 deletion src/update-vscode/update-vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function updateVsCode(context: vscode.ExtensionContext, isProductio
setWorkspaceState(context, accessToken, refreshToken, userId, orgId, isInProgress);
if(isInProgress) {
if(selectedProjects) {
await subscribeToGenerateVsCodeDownloadCodeSub({ context, isProduction, selectedProjects });
await subscribeToGenerateVsCodeDownloadCodeSub({ context, isProduction, selectedProjects, userId });
await updatePrivateDirectoriesInVSCodeAuthentication(accessToken, isProduction, userId, orgId, selectedProjects);
}
vscode.window.showInformationMessage('User successfully authenticated with Razroo.');
Expand Down