summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--continuedev/src/continuedev/core/sdk.py19
-rw-r--r--extension/package-lock.json4
-rw-r--r--extension/package.json2
-rw-r--r--extension/schema/FullState.d.ts2
-rw-r--r--extension/schema/History.d.ts2
-rw-r--r--extension/schema/HistoryNode.d.ts2
-rw-r--r--extension/src/activation/activate.ts48
-rw-r--r--extension/src/activation/environmentSetup.ts2
-rw-r--r--extension/src/extension.ts12
-rw-r--r--schema/json/FullState.json8
-rw-r--r--schema/json/History.json8
-rw-r--r--schema/json/HistoryNode.json8
12 files changed, 88 insertions, 29 deletions
diff --git a/continuedev/src/continuedev/core/sdk.py b/continuedev/src/continuedev/core/sdk.py
index 53214384..37a51efa 100644
--- a/continuedev/src/continuedev/core/sdk.py
+++ b/continuedev/src/continuedev/core/sdk.py
@@ -15,7 +15,7 @@ from ..libs.llm.anthropic import AnthropicLLM
from ..libs.llm.ggml import GGML
from .observation import Observation
from ..server.ide_protocol import AbstractIdeProtocolServer
-from .main import Context, ContinueCustomException, History, Step, ChatMessage
+from .main import Context, ContinueCustomException, History, HistoryNode, Step, ChatMessage
from ..steps.core.core import *
from ..libs.llm.proxy_server import ProxyServer
@@ -155,6 +155,23 @@ class ContinueSDK(AbstractContinueSDK):
@classmethod
async def create(cls, autopilot: Autopilot) -> "ContinueSDK":
sdk = ContinueSDK(autopilot)
+
+ try:
+ config = sdk._load_config()
+ sdk.config = config
+ except Exception as e:
+ print(e)
+ sdk.config = ContinueConfig()
+ msg_step = MessageStep(
+ name="Invalid Continue Config File", message=e.__repr__())
+ msg_step.description = e.__repr__()
+ sdk.history.add_node(HistoryNode(
+ step=msg_step,
+ observation=None,
+ depth=0,
+ active=False
+ ))
+
sdk.models = await Models.create(sdk)
return sdk
diff --git a/extension/package-lock.json b/extension/package-lock.json
index 107a7001..6818857b 100644
--- a/extension/package-lock.json
+++ b/extension/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "continue",
- "version": "0.0.179",
+ "version": "0.0.181",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "continue",
- "version": "0.0.179",
+ "version": "0.0.181",
"license": "Apache-2.0",
"dependencies": {
"@electron/rebuild": "^3.2.10",
diff --git a/extension/package.json b/extension/package.json
index 89c6daf5..b37bb1b6 100644
--- a/extension/package.json
+++ b/extension/package.json
@@ -14,7 +14,7 @@
"displayName": "Continue",
"pricing": "Free",
"description": "The open-source coding autopilot",
- "version": "0.0.179",
+ "version": "0.0.181",
"publisher": "Continue",
"engines": {
"vscode": "^1.67.0"
diff --git a/extension/schema/FullState.d.ts b/extension/schema/FullState.d.ts
index abb0832d..1b7b1f3b 100644
--- a/extension/schema/FullState.d.ts
+++ b/extension/schema/FullState.d.ts
@@ -21,6 +21,7 @@ export type ManageOwnChatContext = boolean;
export type Depth = number;
export type Deleted = boolean;
export type Active = boolean;
+export type Logs = string[];
export type Timeline = HistoryNode[];
export type CurrentIndex = number;
export type Active1 = boolean;
@@ -69,6 +70,7 @@ export interface HistoryNode {
depth: Depth;
deleted?: Deleted;
active?: Active;
+ logs?: Logs;
[k: string]: unknown;
}
export interface Step {
diff --git a/extension/schema/History.d.ts b/extension/schema/History.d.ts
index 6eb8ad81..90124f4a 100644
--- a/extension/schema/History.d.ts
+++ b/extension/schema/History.d.ts
@@ -21,6 +21,7 @@ export type ManageOwnChatContext = boolean;
export type Depth = number;
export type Deleted = boolean;
export type Active = boolean;
+export type Logs = string[];
export type Timeline = HistoryNode[];
export type CurrentIndex = number;
@@ -41,6 +42,7 @@ export interface HistoryNode {
depth: Depth;
deleted?: Deleted;
active?: Active;
+ logs?: Logs;
[k: string]: unknown;
}
export interface Step {
diff --git a/extension/schema/HistoryNode.d.ts b/extension/schema/HistoryNode.d.ts
index bc77be89..5ad32061 100644
--- a/extension/schema/HistoryNode.d.ts
+++ b/extension/schema/HistoryNode.d.ts
@@ -21,6 +21,7 @@ export type ManageOwnChatContext = boolean;
export type Depth = number;
export type Deleted = boolean;
export type Active = boolean;
+export type Logs = string[];
/**
* A point in history, a list of which make up History
@@ -31,6 +32,7 @@ export interface HistoryNode1 {
depth: Depth;
deleted?: Deleted;
active?: Active;
+ logs?: Logs;
[k: string]: unknown;
}
export interface Step {
diff --git a/extension/src/activation/activate.ts b/extension/src/activation/activate.ts
index 5c6ffa02..8ea08e89 100644
--- a/extension/src/activation/activate.ts
+++ b/extension/src/activation/activate.ts
@@ -36,22 +36,44 @@ export async function activateExtension(context: vscode.ExtensionContext) {
})
.catch((e) => console.log("Error checking for extension updates: ", e));
- // Start the Python server
- await new Promise((resolve, reject) => {
- vscode.window.withProgress(
- {
- location: vscode.ProgressLocation.Notification,
- title:
- "Starting Continue Server... (it may take a minute to download Python packages)",
- cancellable: false,
- },
- async (progress, token) => {
- await startContinuePythonServer();
- resolve(null);
+ // Wrap the server start logic in a new Promise
+ const serverStartPromise = new Promise((resolve, reject) => {
+ let serverStarted = false;
+
+ // Start the server and set serverStarted to true when done
+ startContinuePythonServer().then(() => {
+ serverStarted = true;
+ resolve(null);
+ });
+
+ // Wait for 2 seconds
+ setTimeout(() => {
+ // If the server hasn't started after 2 seconds, show the notification
+ if (!serverStarted) {
+ vscode.window.withProgress(
+ {
+ location: vscode.ProgressLocation.Notification,
+ title:
+ "Starting Continue Server... (it may take a minute to download Python packages)",
+ cancellable: false,
+ },
+ async (progress, token) => {
+ // Wait for the server to start
+ while (!serverStarted) {
+ await new Promise((innerResolve) =>
+ setTimeout(innerResolve, 1000)
+ );
+ }
+ return Promise.resolve();
+ }
+ );
}
- );
+ }, 2000);
});
+ // Await the server start promise
+ await serverStartPromise;
+
// Register commands and providers
sendTelemetryEvent(TelemetryEvent.ExtensionActivated);
registerAllCodeLensProviders(context);
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts
index 69a3b75a..c341db39 100644
--- a/extension/src/activation/environmentSetup.ts
+++ b/extension/src/activation/environmentSetup.ts
@@ -39,7 +39,7 @@ async function retryThenFail(
// Show corresponding error message depending on the platform
let msg =
- "Failed to set up Continue extension. Please email nate@continue.dev and we'll get this fixed ASAP!";
+ "Failed to set up Continue extension. Please email hi@continue.dev and we'll get this fixed ASAP!";
try {
switch (process.platform) {
case "win32":
diff --git a/extension/src/extension.ts b/extension/src/extension.ts
index 6959ec05..f2e580a1 100644
--- a/extension/src/extension.ts
+++ b/extension/src/extension.ts
@@ -17,15 +17,5 @@ async function dynamicImportAndActivate(context: vscode.ExtensionContext) {
}
export function activate(context: vscode.ExtensionContext) {
- // Only show progress if we have to setup
- vscode.window.withProgress(
- {
- location: vscode.ProgressLocation.Notification,
- title: "Setting up Continue extension...",
- cancellable: false,
- },
- async () => {
- dynamicImportAndActivate(context);
- }
- );
+ dynamicImportAndActivate(context);
}
diff --git a/schema/json/FullState.json b/schema/json/FullState.json
index 5a7e9d10..62ed337b 100644
--- a/schema/json/FullState.json
+++ b/schema/json/FullState.json
@@ -120,6 +120,14 @@
"title": "Active",
"default": true,
"type": "boolean"
+ },
+ "logs": {
+ "title": "Logs",
+ "default": [],
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
"required": [
diff --git a/schema/json/History.json b/schema/json/History.json
index ee797412..56415520 100644
--- a/schema/json/History.json
+++ b/schema/json/History.json
@@ -120,6 +120,14 @@
"title": "Active",
"default": true,
"type": "boolean"
+ },
+ "logs": {
+ "title": "Logs",
+ "default": [],
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
"required": [
diff --git a/schema/json/HistoryNode.json b/schema/json/HistoryNode.json
index d0e12ac5..81e239b3 100644
--- a/schema/json/HistoryNode.json
+++ b/schema/json/HistoryNode.json
@@ -120,6 +120,14 @@
"title": "Active",
"default": true,
"type": "boolean"
+ },
+ "logs": {
+ "title": "Logs",
+ "default": [],
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
}
},
"required": [