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", 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"); }