feat: view config.yaml reference codelens
This commit is contained in:
parent
ac96f3da03
commit
9d9c93dec0
1 changed files with 22 additions and 8 deletions
|
|
@ -15,20 +15,34 @@ export class DownloadYamlExtensionCodeLensProvider
|
|||
if (!document.uri.fsPath.includes(".continue")) {
|
||||
return [];
|
||||
}
|
||||
if (this.yamlExtensionDownloaded()) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const codeLens: vscode.CodeLens = {
|
||||
const codeLenses: vscode.CodeLens[] = [];
|
||||
|
||||
// Always show documentation link
|
||||
const docCodeLens: vscode.CodeLens = {
|
||||
range: new vscode.Range(0, 0, 0, 0),
|
||||
command: {
|
||||
title: "Download YAML extension for Intellisense",
|
||||
command: "workbench.extensions.installExtension",
|
||||
arguments: ["redhat.vscode-yaml"],
|
||||
title: "📖 View Continue Reference",
|
||||
command: "vscode.open",
|
||||
arguments: [vscode.Uri.parse("https://docs.continue.dev/reference")],
|
||||
},
|
||||
isResolved: true,
|
||||
};
|
||||
codeLenses.push(docCodeLens);
|
||||
|
||||
return [codeLens];
|
||||
if (!this.yamlExtensionDownloaded()) {
|
||||
const codeLens: vscode.CodeLens = {
|
||||
range: new vscode.Range(0, 0, 0, 0),
|
||||
command: {
|
||||
title: "Download YAML extension for Intellisense",
|
||||
command: "workbench.extensions.installExtension",
|
||||
arguments: ["redhat.vscode-yaml"],
|
||||
},
|
||||
isResolved: true,
|
||||
};
|
||||
codeLenses.push(codeLens);
|
||||
}
|
||||
|
||||
return codeLenses;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue