path -> uri extensions/vscode
This commit is contained in:
parent
3a99509915
commit
fe47f45ddf
11 changed files with 14 additions and 19 deletions
|
|
@ -729,6 +729,7 @@ export class Core {
|
|||
if (data?.uris?.length) {
|
||||
for (const uri of data.uris) {
|
||||
// Listen for file changes in the workspace
|
||||
// URI TODO is this equality statement valid?
|
||||
const filePath = getFullPath(uri);
|
||||
if (filePath === getConfigJsonPath()) {
|
||||
// Trigger a toast notification to provide UI feedback that config
|
||||
|
|
|
|||
|
|
@ -216,8 +216,8 @@ export class ContinueGUIWebviewViewProvider
|
|||
<script>window.fullColorTheme = ${JSON.stringify(currentTheme)}</script>
|
||||
<script>window.colorThemeName = "dark-plus"</script>
|
||||
<script>window.workspacePaths = ${JSON.stringify(
|
||||
vscode.workspace.workspaceFolders?.map(
|
||||
(folder) => folder.uri.fsPath,
|
||||
vscode.workspace.workspaceFolders?.map((folder) =>
|
||||
folder.uri.toString(),
|
||||
) || [],
|
||||
)}</script>
|
||||
<script>window.isFullScreen = ${isFullScreen}</script>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function startPythonLanguageServer(context: ExtensionContext): LanguageClient {
|
|||
const command = `cd ${path.join(
|
||||
extensionPath,
|
||||
"scripts",
|
||||
)} && source env/bin/activate.fish && python -m pyls`;
|
||||
)} && source ${path.join("env", "bin", "activate.fish")} && python -m pyls`;
|
||||
const serverOptions: ServerOptions = {
|
||||
command: command,
|
||||
args: ["-vv"],
|
||||
|
|
@ -113,4 +113,3 @@ async function startPylance(context: ExtensionContext) {
|
|||
);
|
||||
return client;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,10 +9,7 @@ export class ConfigPyCodeLensProvider implements vscode.CodeLensProvider {
|
|||
): vscode.CodeLens[] | Thenable<vscode.CodeLens[]> {
|
||||
const codeLenses: vscode.CodeLens[] = [];
|
||||
|
||||
if (
|
||||
!document.uri.fsPath.endsWith(".continue/config.json") &&
|
||||
!document.uri.fsPath.endsWith(".continue\\config.json")
|
||||
) {
|
||||
if (!document.uri.path.endsWith(".continue/config.json")) {
|
||||
return codeLenses;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ export class DiffViewerCodeLensProvider implements vscode.CodeLensProvider {
|
|||
if (path.dirname(document.uri.fsPath) === DIFF_DIRECTORY) {
|
||||
const codeLenses: vscode.CodeLens[] = [];
|
||||
let range = new vscode.Range(0, 0, 1, 0);
|
||||
const diffInfo = this.diffManager.diffAtNewFilepath(document.uri.fsPath);
|
||||
const diffInfo = this.diffManager.diffAtNewFilepath(
|
||||
document.uri.toString(),
|
||||
);
|
||||
if (diffInfo) {
|
||||
range = diffInfo.range;
|
||||
}
|
||||
|
|
@ -23,12 +25,12 @@ export class DiffViewerCodeLensProvider implements vscode.CodeLensProvider {
|
|||
new vscode.CodeLens(range, {
|
||||
title: `Accept All ✅ (${getMetaKeyLabel()}⇧⏎)`,
|
||||
command: "continue.acceptDiff",
|
||||
arguments: [document.uri.fsPath],
|
||||
arguments: [document.uri.toString()],
|
||||
}),
|
||||
new vscode.CodeLens(range, {
|
||||
title: `Reject All ❌ (${getMetaKeyLabel()}⇧⌫)`,
|
||||
command: "continue.rejectDiff",
|
||||
arguments: [document.uri.fsPath],
|
||||
arguments: [document.uri.toString()],
|
||||
}),
|
||||
);
|
||||
return codeLenses;
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ export class VerticalDiffCodeLensProvider implements vscode.CodeLensProvider {
|
|||
document: vscode.TextDocument,
|
||||
_: vscode.CancellationToken,
|
||||
): vscode.CodeLens[] | Thenable<vscode.CodeLens[]> {
|
||||
const filepath = document.uri.fsPath;
|
||||
const blocks = this.editorToVerticalDiffCodeLens.get(filepath);
|
||||
const uri = document.uri.toString();
|
||||
const blocks = this.editorToVerticalDiffCodeLens.get(uri);
|
||||
|
||||
if (!blocks) {
|
||||
return [];
|
||||
|
|
@ -45,12 +45,12 @@ export class VerticalDiffCodeLensProvider implements vscode.CodeLensProvider {
|
|||
new vscode.CodeLens(range, {
|
||||
title: `Accept`,
|
||||
command: "continue.acceptVerticalDiffBlock",
|
||||
arguments: [filepath, i],
|
||||
arguments: [uri, i],
|
||||
}),
|
||||
new vscode.CodeLens(range, {
|
||||
title: `Reject`,
|
||||
command: "continue.rejectVerticalDiffBlock",
|
||||
arguments: [filepath, i],
|
||||
arguments: [uri, i],
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
import * as vscode from "vscode";
|
||||
|
||||
import { VsCodeIde } from "../VsCodeIde";
|
||||
|
||||
const os = require("node:os");
|
||||
|
||||
function charIsEscapedAtIndex(index: number, str: string): boolean {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue