File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,8 +104,9 @@ export async function addExtensionToRecommendations(): Promise<boolean> {
104104 */
105105export async function promptForWorkspaceRecommendation ( context : vscode . ExtensionContext ) : Promise < void > {
106106 // Check if we've already prompted for this workspace
107- const workspaceKey = vscode . workspace . workspaceFolders ?. [ 0 ] ?. uri . toString ( ) ?? '' ;
108- const storageKey = `recommendation-prompted-${ workspaceKey } ` ;
107+ const workspaceKey = vscode . workspace . workspaceFolders ?. [ 0 ] ?. uri . fsPath ?? '' ;
108+ // Use a safe storage key by replacing path separators with underscores
109+ const storageKey = `recommendation-prompted-${ workspaceKey . replace ( / [ / \\ : ] / g, '_' ) } ` ;
109110
110111 if ( context . globalState . get ( storageKey ) ) {
111112 // Already prompted for this workspace
You can’t perform that action at this time.
0 commit comments