summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--continuedev/src/continuedev/core/context.py5
-rw-r--r--continuedev/src/continuedev/server/meilisearch_server.py1
-rw-r--r--docs/docs/troubleshooting.md4
-rw-r--r--extension/package-lock.json11
-rw-r--r--extension/package.json1
-rw-r--r--extension/src/continueIdeClient.ts8
-rw-r--r--extension/src/debugPanel.ts3
-rw-r--r--extension/src/extension.ts5
-rw-r--r--extension/src/util/vscode.ts9
9 files changed, 37 insertions, 10 deletions
diff --git a/continuedev/src/continuedev/core/context.py b/continuedev/src/continuedev/core/context.py
index ffe22d63..bfb89561 100644
--- a/continuedev/src/continuedev/core/context.py
+++ b/continuedev/src/continuedev/core/context.py
@@ -225,10 +225,7 @@ class ContextManager:
await self.load_index(sdk.ide.workspace_directory)
logger.debug("Loaded Meilisearch index")
except asyncio.TimeoutError:
- logger.warning("MeiliSearch did not start within 20 seconds")
- logger.warning(
- "MeiliSearch not running, avoiding any dependent context providers"
- )
+ logger.warning("Meilisearch is not running. As of now, Continue does not attempt to download Meilisearch on Windows because the download process is more involved. If you'd like install Meilisearch (which allows you to reference context by typing '@' (e.g. files, GitHub issues, etc.)), follow the instructions here: https://www.meilisearch.com/docs/learn/getting_started/installation. Alternatively, you can track our progress on support for Meilisearch on Windows here: https://github.com/continuedev/continue/issues/408.")
create_async_task(start_meilisearch(context_providers))
diff --git a/continuedev/src/continuedev/server/meilisearch_server.py b/continuedev/src/continuedev/server/meilisearch_server.py
index 98b48685..037ce8fa 100644
--- a/continuedev/src/continuedev/server/meilisearch_server.py
+++ b/continuedev/src/continuedev/server/meilisearch_server.py
@@ -67,7 +67,6 @@ async def check_meilisearch_running() -> bool:
return False
return True
except Exception as e:
- logger.debug(e)
return False
except Exception:
return False
diff --git a/docs/docs/troubleshooting.md b/docs/docs/troubleshooting.md
index 70dec2bf..2f7c12ae 100644
--- a/docs/docs/troubleshooting.md
+++ b/docs/docs/troubleshooting.md
@@ -50,6 +50,10 @@ If your Continue server is not setting up, try checking the console logs:
3. Select `Console`
4. Read the console logs
+## Meilisearch on Windows
+
+As of now Windows users must manually download and start Meilisearch to use the '@' context referencing feature. To do so, follow the instructions here: https://www.meilisearch.com/docs/learn/getting_started/installation. Alternatively, you can track our progress on support for Meilisearch on Windows here: https://github.com/continuedev/continue/issues/408. Once Meilisearch is up and running on http://localhost:7700, Continue should be able to automatically connect. You may just have to reload the VS Code window first.
+
## Still having trouble?
Create a GitHub issue [here](https://github.com/continuedev/continue/issues/new?assignees=&labels=bug&projects=&template=bug-report-%F0%9F%90%9B.md&title=), leaving the details of your problem, and we'll be able to more quickly help you out.
diff --git a/extension/package-lock.json b/extension/package-lock.json
index 525706d3..c56528c4 100644
--- a/extension/package-lock.json
+++ b/extension/package-lock.json
@@ -16,6 +16,7 @@
"fkill": "^8.1.0",
"highlight.js": "^11.7.0",
"highlightable": "^1.3.0-beta.0",
+ "node-machine-id": "^1.1.12",
"posthog-node": "^3.1.2",
"react-markdown": "^8.0.7",
"react-redux": "^8.0.5",
@@ -8604,6 +8605,11 @@
"dev": true,
"peer": true
},
+ "node_modules/node-machine-id": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/node-machine-id/-/node-machine-id-1.1.12.tgz",
+ "integrity": "sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ=="
+ },
"node_modules/node-releases": {
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz",
@@ -18158,6 +18164,11 @@
"dev": true,
"peer": true
},
+ "node-machine-id": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/node-machine-id/-/node-machine-id-1.1.12.tgz",
+ "integrity": "sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ=="
+ },
"node-releases": {
"version": "2.0.12",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz",
diff --git a/extension/package.json b/extension/package.json
index 6dadf4b5..9f959ae7 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -249,6 +249,7 @@
"fkill": "^8.1.0",
"highlight.js": "^11.7.0",
"highlightable": "^1.3.0-beta.0",
+ "node-machine-id": "^1.1.12",
"posthog-node": "^3.1.2",
"react-markdown": "^8.0.7",
"react-redux": "^8.0.5",
diff --git a/extension/src/continueIdeClient.ts b/extension/src/continueIdeClient.ts
index 3fa8dec1..94997d76 100644
--- a/extension/src/continueIdeClient.ts
+++ b/extension/src/continueIdeClient.ts
@@ -3,7 +3,11 @@ import {
showSuggestion as showSuggestionInEditor,
SuggestionRanges,
} from "./suggestions";
-import { openEditorAndRevealRange, uriFromFilePath } from "./util/vscode";
+import {
+ getUniqueId,
+ openEditorAndRevealRange,
+ uriFromFilePath,
+} from "./util/vscode";
import { FileEdit } from "../schema/FileEdit";
import { RangeInFile } from "../schema/RangeInFile";
import * as vscode from "vscode";
@@ -367,7 +371,7 @@ class IdeProtocolClient {
}
getUniqueId() {
- return vscode.env.machineId;
+ return getUniqueId();
}
// ------------------------------------ //
diff --git a/extension/src/debugPanel.ts b/extension/src/debugPanel.ts
index dbec45ea..961eb150 100644
--- a/extension/src/debugPanel.ts
+++ b/extension/src/debugPanel.ts
@@ -3,6 +3,7 @@ import { getContinueServerUrl } from "./bridge";
import {
getExtensionUri,
getNonce,
+ getUniqueId,
openEditorAndRevealRange,
} from "./util/vscode";
import { RangeInFile } from "../schema/RangeInFile";
@@ -183,7 +184,7 @@ export function setupDebugPanel(
const sessionId = await sessionIdPromise;
panel.webview.postMessage({
type: "onLoad",
- vscMachineId: vscode.env.machineId,
+ vscMachineId: getUniqueId(),
apiUrl: getContinueServerUrl(),
workspacePaths: vscode.workspace.workspaceFolders?.map(
(folder) => folder.uri.fsPath
diff --git a/extension/src/extension.ts b/extension/src/extension.ts
index 7fab9ed9..20af2be6 100644
--- a/extension/src/extension.ts
+++ b/extension/src/extension.ts
@@ -4,6 +4,7 @@
import * as vscode from "vscode";
import { getExtensionVersion } from "./activation/environmentSetup";
+import { getUniqueId } from "./util/vscode";
let client: any = undefined;
async function capture(args: any) {
@@ -21,7 +22,7 @@ async function dynamicImportAndActivate(context: vscode.ExtensionContext) {
if (!context.globalState.get("hasBeenInstalled")) {
context.globalState.update("hasBeenInstalled", true);
capture({
- distinctId: vscode.env.machineId,
+ distinctId: getUniqueId(),
event: "install",
properties: {
extensionVersion: getExtensionVersion(),
@@ -57,7 +58,7 @@ export function activate(context: vscode.ExtensionContext) {
export function deactivate() {
capture({
- distinctId: vscode.env.machineId,
+ distinctId: getUniqueId(),
event: "deactivate",
properties: {
extensionVersion: getExtensionVersion(),
diff --git a/extension/src/util/vscode.ts b/extension/src/util/vscode.ts
index 78870330..899c9348 100644
--- a/extension/src/util/vscode.ts
+++ b/extension/src/util/vscode.ts
@@ -1,4 +1,5 @@
import * as vscode from "vscode";
+import { machineIdSync } from "node-machine-id";
export function translate(range: vscode.Range, lines: number): vscode.Range {
return new vscode.Range(
@@ -115,3 +116,11 @@ export function uriFromFilePath(filepath: string): vscode.Uri {
return vscode.Uri.file(filepath);
}
}
+
+export function getUniqueId() {
+ const id = vscode.env.machineId;
+ if (id === "someValue.machineId") {
+ return machineIdSync();
+ }
+ return vscode.env.machineId;
+}