ai-extension-preview 0.1.1 → 0.1.2
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.
|
@@ -132,7 +132,11 @@ exit
|
|
|
132
132
|
return true;
|
|
133
133
|
}
|
|
134
134
|
else {
|
|
135
|
+
// Standard Windows / Linux Launch
|
|
135
136
|
await ctx.actions.runAction('core:log', { level: 'info', message: `SPAWN: ${chromePath}` });
|
|
137
|
+
// On Windows, ensure we quote paths correctly if they have spaces?
|
|
138
|
+
// Node's spawn handles argument quoting automatically usually.
|
|
139
|
+
// But let's log them to be sure
|
|
136
140
|
await ctx.actions.runAction('core:log', { level: 'info', message: `ARGS: ${args.join(' ')}` });
|
|
137
141
|
const subprocess = spawn(executable, args, {
|
|
138
142
|
detached: true,
|
|
@@ -145,6 +149,12 @@ exit
|
|
|
145
149
|
ctx.actions.registerAction({
|
|
146
150
|
id: 'browser:start',
|
|
147
151
|
handler: async () => {
|
|
152
|
+
// On Windows (including Git Bash), web-ext is unreliable for loading extensions correctly.
|
|
153
|
+
// We force detached mode to ensure the extension loads.
|
|
154
|
+
if (process.platform === 'win32') {
|
|
155
|
+
await ctx.actions.runAction('core:log', { level: 'warning', message: 'Windows detected: Forcing Detached Mode for reliability.' });
|
|
156
|
+
return await launchDetached();
|
|
157
|
+
}
|
|
148
158
|
await ctx.actions.runAction('core:log', { level: 'info', message: 'Launching browser...' });
|
|
149
159
|
try {
|
|
150
160
|
// Try web-ext first
|