From e98aa44f6be7e72781e006e6621fb4bb977cb26b Mon Sep 17 00:00:00 2001 From: Maevic Date: Sat, 23 May 2026 13:52:31 +0200 Subject: [PATCH] fix: No recent entries in current vscode versions The storage location of the state.vscdb has changed in recent vscode versions. This commit uses the new location with a fallback to the legacy one. --- __init__.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 1aecf68..1cb094e 100644 --- a/__init__.py +++ b/__init__.py @@ -47,11 +47,19 @@ class CachedConfig: class Plugin(PluginInstance, GeneratorQueryHandler): # Location of the database with recent entries - _stateDBPath = os.path.join( + # VSCode 1.118+ moved this to a shared storage location + _sharedStateDBPath = os.path.join( + os.environ["HOME"], + ".vscode-shared/sharedStorage/state.vscdb" + ) + + _legacyStateDBPath = os.path.join( os.environ["HOME"], ".config/Code/User/globalStorage/state.vscdb" ) + _stateDBPath = _sharedStateDBPath if os.path.exists(_sharedStateDBPath) else _legacyStateDBPath + # Location of the project manager configuration file _projectsPath = os.path.join( os.environ["HOME"],