async resolve()

in src/calls/model.ts [25:44]


	async resolve() {

		const items = await Promise.resolve(vscode.commands.executeCommand<vscode.CallHierarchyItem[]>('vscode.prepareCallHierarchy', this.location.uri, this.location.range.start));
		const model = new CallsModel(this.direction, items ?? []);
		const provider = new CallItemDataProvider(model);

		if (model.roots.length === 0) {
			return;
		}

		return {
			provider,
			get message() { return model.roots.length === 0 ? 'No results.' : undefined; },
			navigation: model,
			highlights: model,
			dispose() {
				provider.dispose();
			}
		};
	}