From 57a156ad56e8080262e0110fb03c32fa250cea00 Mon Sep 17 00:00:00 2001 From: Parker Smith Date: Sun, 23 Feb 2025 08:03:35 +0000 Subject: [PATCH 1/2] Add support for VSCode remote servers if on linux --- src/utils.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 890d450..6d38f3b 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -37,7 +37,9 @@ const SITE_PATH = : "https://codewrap.dev/view/"; const cursorPath = generateEditorPath("Cursor"); + const codePath = generateEditorPath("Code"); +const codeRemotePath = generateEditorPath("Code", true); export async function main() { intro(`Welcome to codewrap by cawd!`); @@ -82,6 +84,13 @@ export async function main() { name: "Code", path: codePath, }); + + if (process.platform === 'linux' && existsSync(codeRemotePath)) { + IDEPaths.push({ + name: "Code - Remote", + path: codeRemotePath + }) + } } } @@ -185,7 +194,7 @@ function getEntriesForEditor(editorPath: string) { .filter(isNotNull); } -function generateEditorPath(appName: string) { +function generateEditorPath(appName: string, remoteServer = false) { const platform = process.platform; if (platform === "darwin") { @@ -205,6 +214,10 @@ function generateEditorPath(appName: string) { return join(homedir(), "AppData", "Roaming", appName, "User", "History"); } + if (remoteServer) { + return join(homedir(), ".vscode-server", "data", "User", "History") + } + // Default fallback to Linux-style path return join(homedir(), ".config", appName, "User", "History"); } From 9aea87e69f32af38bc68f8daf405cb995008b7a2 Mon Sep 17 00:00:00 2001 From: Parker Smith Date: Sun, 23 Feb 2025 08:04:16 +0000 Subject: [PATCH 2/2] Bump version, adds support for remote VSCode on linux --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ce1beb1..920f891 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codewrap", - "version": "0.0.14", + "version": "0.0.15", "description": "Get a personalized year in review for any VSCode based editor", "keywords": [], "license": "MIT",