Skip to content

Commit

Permalink
Fix: API Center extension deep link (#6008)
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome authored Jan 14, 2025
1 parent c765971 commit 11cd214
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions vscode/microsoft-kiota/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file.

### Changed

- Fixed a bug in the VS Code extension deeplink with the API Center extension [#6004](https://github.com/microsoft/kiota/issues/6004)

## [1.22.100000001] - 2025-01-10

### Added
Expand Down
11 changes: 8 additions & 3 deletions vscode/microsoft-kiota/src/handlers/uriHandler.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as vscode from 'vscode';
import TelemetryReporter from '@vscode/extension-telemetry';
import * as vscode from 'vscode';

import { treeViewId } from '../constants';
import { OpenApiTreeProvider } from "../providers/openApiTreeProvider";
import { updateTreeViewIcons } from '../util';
import { validateDeepLinkQueryParams } from '../utilities/deep-linking';
import { openTreeViewWithProgress } from '../utilities/progress';
import { setDeepLinkParams, getDeepLinkParams } from './deepLinkParamsHandler';
import { getDeepLinkParams, setDeepLinkParams } from './deepLinkParamsHandler';

export class UriHandler {
constructor(private context: vscode.ExtensionContext, private openApiTreeProvider: OpenApiTreeProvider) { }
Expand All @@ -26,7 +28,10 @@ export class UriHandler {

let deepLinkParams = getDeepLinkParams();
if (deepLinkParams.descriptionurl) {
await openTreeViewWithProgress(() => this.openApiTreeProvider.setDescriptionUrl(deepLinkParams.descriptionurl!));
await openTreeViewWithProgress(async () => {
await this.openApiTreeProvider.setDescriptionUrl(deepLinkParams.descriptionurl!);
await updateTreeViewIcons(treeViewId, true, false);
});
return;
}
}
Expand Down

0 comments on commit 11cd214

Please sign in to comment.