Skip to content

Commit

Permalink
Merge branch 'ext/task5112/Improve-deep-link-structure-to-skip-predef…
Browse files Browse the repository at this point in the history
…ined-questions' of github.com:microsoft/kiota into ext/task5112/Improve-deep-link-structure-to-skip-predefined-questions
  • Loading branch information
fey101 committed Aug 27, 2024
2 parents 06febfe + 515b890 commit fd6a174
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
2 changes: 2 additions & 0 deletions vscode/microsoft-kiota/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ export async function activate(
if (uri.path === "/") {
return;
}
console.log(uri);
const queryParameters = getQueryParameters(uri);
console.log(queryParameters);
if (uri.path.toLowerCase() === "/opendescription") {
deepLinkParams = validateDeepLinkQueryParams(queryParameters);
reporter.sendTelemetryEvent("DeepLink.OpenDescription", deepLinkParams);
Expand Down
24 changes: 12 additions & 12 deletions vscode/microsoft-kiota/src/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,18 @@ export function transformToGenerationconfig(deepLinkParams: Record<string, strin
{
generationConfig["pluginName"] = deepLinkParams.name;
switch(deepLinkParams.type){
case "apiplugin":
generationConfig["generationType"] = "plugin";
generationConfig["pluginTypes"] = ["ApiPlugin"];
break;
case "openai":
generationConfig["generationType"] = "plugin";
generationConfig["pluginTypes"] = ['OpenAI'];
break;
case "apimanifest":
generationConfig["generationType"] = "apimanifest";
break;
}
case "apiplugin":
generationConfig["generationType"] = "plugin";
generationConfig["pluginTypes"] = ["ApiPlugin"];
break;
case "openai":
generationConfig["generationType"] = "plugin";
generationConfig["pluginTypes"] = ['OpenAI'];
break;
case "apimanifest":
generationConfig["generationType"] = "apimanifest";
break;
}
}
return generationConfig;
}
Expand Down
40 changes: 20 additions & 20 deletions vscode/microsoft-kiota/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,26 +119,26 @@ export function parseGenerationType(generationType: string | QuickPickItem | und

export function parseGenerationLanguage(value: string): KiotaGenerationLanguage {
switch (value.toLowerCase()) {
case "csharp":
return KiotaGenerationLanguage.CSharp;
case "java":
return KiotaGenerationLanguage.Java;
case "typescript":
return KiotaGenerationLanguage.TypeScript;
case "php":
return KiotaGenerationLanguage.PHP;
case "python":
return KiotaGenerationLanguage.Python;
case "go":
return KiotaGenerationLanguage.Go;
case "swift":
return KiotaGenerationLanguage.Swift;
case "ruby":
return KiotaGenerationLanguage.Ruby;
case "cli":
return KiotaGenerationLanguage.CLI;
default:
throw new Error("unknown language");
case "csharp":
return KiotaGenerationLanguage.CSharp;
case "java":
return KiotaGenerationLanguage.Java;
case "typescript":
return KiotaGenerationLanguage.TypeScript;
case "php":
return KiotaGenerationLanguage.PHP;
case "python":
return KiotaGenerationLanguage.Python;
case "go":
return KiotaGenerationLanguage.Go;
case "swift":
return KiotaGenerationLanguage.Swift;
case "ruby":
return KiotaGenerationLanguage.Ruby;
case "cli":
return KiotaGenerationLanguage.CLI;
default:
throw new Error("unknown language");
}
}

Expand Down

0 comments on commit fd6a174

Please sign in to comment.