diff --git a/core/util/paths.ts b/core/util/paths.ts index f8b70159f..ba27daf4d 100644 --- a/core/util/paths.ts +++ b/core/util/paths.ts @@ -1,7 +1,7 @@ import * as fs from "fs"; import * as os from "os"; +import { pathToFileURL } from "url"; import * as path from "path"; - import * as JSONC from "comment-json"; import dotenv from "dotenv"; @@ -41,6 +41,9 @@ export function getGlobalContinueIgnorePath(): string { return continueIgnorePath; } +/* + Deprecated, replace with getContinueGlobalUri where possible +*/ export function getContinueGlobalPath(): string { // This is ~/.continue on mac/linux const continuePath = CONTINUE_GLOBAL_DIR; @@ -50,6 +53,10 @@ export function getContinueGlobalPath(): string { return continuePath; } +export function getContinueGlobalUri(): string { + return pathToFileURL(CONTINUE_GLOBAL_DIR).href; +} + export function getSessionsFolderPath(): string { const sessionsPath = path.join(getContinueGlobalPath(), "sessions"); if (!fs.existsSync(sessionsPath)) { @@ -94,6 +101,10 @@ export function getConfigJsonPath(ideType: IdeType = "vscode"): string { return p; } +export function getConfigJsonUri(): string { + return getContinueGlobalUri() + "/config.json"; +} + export function getConfigTsPath(): string { const p = path.join(getContinueGlobalPath(), "config.ts"); if (!fs.existsSync(p)) { diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 62ec83ea7..a155a0618 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -257,6 +257,13 @@ "title": "Navigate to a path", "group": "Continue" }, + { + "command": "continue.openMorePage", + "category": "Continue", + "title": "More", + "icon": "$(ellipsis)", + "group": "Continue" + }, { "command": "continue.writeCommentsForCode", "category": "Continue", @@ -316,6 +323,24 @@ "category": "Continue", "title": "Focus Continue Chat", "group": "Continue" + }, + { + "command": "continue.signOut", + "title": "Sign Out", + "category": "Continue", + "group": "Continue" + }, + { + "command": "continue.useLocalConfig", + "title": "Local Config", + "category": "Continue", + "group": "Continue" + }, + { + "command": "continue.useTeamConfig", + "title": "Team Config", + "category": "Continue", + "group": "Continue" } ], "keybindings": [ @@ -410,6 +435,11 @@ { "id": "continue.continueSubMenu", "label": "Continue" + }, + { + "id": "continue.accountSubmenu", + "label": "Account", + "icon": "$(account)" } ], "menus": { @@ -504,6 +534,16 @@ "command": "continue.openConfig", "group": "navigation@4", "when": "view == continue.continueGUIView" + }, + { + "submenu": "continue.accountSubmenu", + "group": "navigation@5", + "when": "view == continue.continueGUIView" + }, + { + "command": "continue.openMorePage", + "group": "navigation@6", + "when": "view == continue.continueGUIView" } ], "editor/title": [ @@ -523,6 +563,23 @@ "command": "continue.debugTerminal", "group": "navigation@top" } + ], + "continue.accountSubmenu": [ + { + "command": "continue.useLocalConfig", + "title": "Local Config", + "group": "Config@1" + }, + { + "command": "continue.useTeamConfig", + "title": "Team Config", + "group": "Config@2" + }, + { + "command": "continue.signOut", + "title": "Sign Out", + "group": "Other@1" + } ] }, "viewsContainers": { diff --git a/extensions/vscode/src/commands.ts b/extensions/vscode/src/commands.ts index 518dfd3fa..1cf4cd7bd 100644 --- a/extensions/vscode/src/commands.ts +++ b/extensions/vscode/src/commands.ts @@ -826,6 +826,9 @@ const commandsMap: ( client.sendFeedback(feedback, lastLines); } }, + "continue.openMorePage": () => { + vscode.commands.executeCommand("continue.navigateTo", "/more"); + }, "continue.navigateTo": (path: string) => { sidebar.webviewProtocol?.request("navigateTo", { path }); focusGUI(); diff --git a/gui/src/components/Footer.tsx b/gui/src/components/Footer.tsx index ff25d97c6..f836935e3 100644 --- a/gui/src/components/Footer.tsx +++ b/gui/src/components/Footer.tsx @@ -48,7 +48,7 @@ function Footer() { if (defaultModel?.provider === "free-trial") { return ( -