gm-gc 2.0.241 → 2.0.242
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/gemini-extension.json
CHANGED
|
@@ -283,17 +283,19 @@ const run = () => {
|
|
|
283
283
|
} else {
|
|
284
284
|
const hasClose = lines.some(l => { const w = (parseAbLine(l).rest[0]||'').toLowerCase(); return ['close','quit','exit'].includes(w); });
|
|
285
285
|
const batchGlobals = firstParsed.globalArgs;
|
|
286
|
-
const
|
|
286
|
+
const results = [];
|
|
287
|
+
for (const l of lines) {
|
|
287
288
|
const { globalArgs, rest } = parseAbLine(l);
|
|
288
289
|
const mergedGlobals = [...batchGlobals.filter(f => !globalArgs.includes(f)), ...globalArgs];
|
|
289
290
|
const w = (rest[0]||'').toLowerCase();
|
|
290
291
|
if (['open','goto','navigate'].includes(w)) sessions[sessionName] = { url: rest[1]||'?', ts: Date.now() };
|
|
291
292
|
if (['close','quit','exit'].includes(w)) delete sessions[sessionName];
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
const args = AB_CMDS.has(w) ? [...mergedGlobals, ...rest] : [...mergedGlobals, 'eval', '--stdin'];
|
|
294
|
+
const stdin = AB_CMDS.has(w) ? undefined : l.trim();
|
|
295
|
+
results.push(spawnAb(abBin, args, stdin));
|
|
296
|
+
}
|
|
295
297
|
writeAbSessions(sessions);
|
|
296
|
-
result =
|
|
298
|
+
result = results.filter(Boolean).join('\n');
|
|
297
299
|
if (!hasClose && openSessions.length > 0) result += `\n\n[tab] Browser session "${sessionName}" still open. Close when done:\n agent-browser:\n close`;
|
|
298
300
|
}
|
|
299
301
|
} else {
|