@ghl-ai/aw 0.1.36-beta.88 → 0.1.36-beta.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/init.mjs +11 -6
- package/package.json +1 -1
package/commands/init.mjs
CHANGED
|
@@ -104,9 +104,13 @@ function installIdeTasks() {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
|
-
* Write .vscode/settings.json so Cursor/VS Code always treats
|
|
108
|
-
* repository — even on first load
|
|
109
|
-
*
|
|
107
|
+
* Write .vscode/settings.json so Cursor/VS Code always treats ~/.aw as a git
|
|
108
|
+
* repository in the source-control panel — even on first load.
|
|
109
|
+
*
|
|
110
|
+
* VS Code does NOT follow symlinks when scanning for git repos, so pointing
|
|
111
|
+
* at the relative `.aw/` symlink never works. We must use the real absolute
|
|
112
|
+
* path to ~/.aw so VS Code/Cursor picks it up directly.
|
|
113
|
+
* Setting: `git.scanRepositories` (the correct VS Code setting name).
|
|
110
114
|
*/
|
|
111
115
|
function installVscodeGitSettings(projectDir) {
|
|
112
116
|
if (!projectDir || projectDir === HOME) return;
|
|
@@ -118,9 +122,10 @@ function installVscodeGitSettings(projectDir) {
|
|
|
118
122
|
if (existsSync(settingsPath)) {
|
|
119
123
|
try { settings = JSON.parse(readFileSync(settingsPath, 'utf8')); } catch { /* corrupted — overwrite */ }
|
|
120
124
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
// Use absolute real path — VS Code won't follow the .aw symlink
|
|
126
|
+
const repos = settings['git.scanRepositories'] || [];
|
|
127
|
+
if (!repos.includes(AW_HOME)) {
|
|
128
|
+
settings['git.scanRepositories'] = [...repos, AW_HOME];
|
|
124
129
|
writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
|
|
125
130
|
}
|
|
126
131
|
} catch { /* best effort */ }
|