gm-gc 2.0.512 → 2.0.514
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
|
@@ -47,12 +47,12 @@ const run = () => {
|
|
|
47
47
|
const plugkitJs = path.join(pluginRoot, 'bin', 'plugkit.js');
|
|
48
48
|
let result;
|
|
49
49
|
if (rawLang === 'browser') {
|
|
50
|
-
result = spawnSync('node', [plugkitJs, 'exec', '--lang', 'browser', code], { encoding: 'utf-8', timeout: 300000 });
|
|
50
|
+
result = spawnSync('node', [plugkitJs, 'exec', '--lang', 'browser', code], { encoding: 'utf-8', timeout: 300000, windowsHide: true });
|
|
51
51
|
} else if (rawLang === 'codesearch') {
|
|
52
52
|
const projectDir = process.env.GEMINI_PROJECT_DIR || process.cwd();
|
|
53
|
-
result = spawnSync('node', [plugkitJs, 'search', '--path', projectDir, code], { encoding: 'utf-8', timeout: 60000 });
|
|
53
|
+
result = spawnSync('node', [plugkitJs, 'search', '--path', projectDir, code], { encoding: 'utf-8', timeout: 60000, windowsHide: true });
|
|
54
54
|
} else {
|
|
55
|
-
result = spawnSync('node', [plugkitJs, 'exec', '--lang', rawLang, code], { encoding: 'utf-8', timeout: 120000 });
|
|
55
|
+
result = spawnSync('node', [plugkitJs, 'exec', '--lang', rawLang, code], { encoding: 'utf-8', timeout: 120000, windowsHide: true });
|
|
56
56
|
}
|
|
57
57
|
const output = (result.stdout || '') + (result.stderr || '');
|
|
58
58
|
return { deny: true, reason: 'exec:' + rawLang + ' output:\n\n' + output };
|
|
@@ -11,7 +11,7 @@ const readStdinPrompt = () => {
|
|
|
11
11
|
const runCodeinsight = () => {
|
|
12
12
|
if (!projectDir || !fs.existsSync(projectDir)) return '';
|
|
13
13
|
try {
|
|
14
|
-
const r = spawnSync('node', [plugkitBin, 'codeinsight', projectDir], { encoding: 'utf-8', stdio: 'pipe', cwd: projectDir, timeout: 10000 });
|
|
14
|
+
const r = spawnSync('node', [plugkitBin, 'codeinsight', projectDir], { encoding: 'utf-8', stdio: 'pipe', windowsHide: true, cwd: projectDir, timeout: 10000 });
|
|
15
15
|
const out = (r.stdout || '').trim();
|
|
16
16
|
if (!out || out.startsWith('Error') || r.status !== 0) return '';
|
|
17
17
|
return out;
|
|
@@ -20,7 +20,7 @@ const runCodeinsight = () => {
|
|
|
20
20
|
const runSearch = (query) => {
|
|
21
21
|
if (!query || !projectDir) return '';
|
|
22
22
|
try {
|
|
23
|
-
const r = spawnSync('node', [plugkitBin, 'search', '--path', projectDir, query.substring(0, 200)], { encoding: 'utf-8', stdio: 'pipe', cwd: projectDir, timeout: 5000 });
|
|
23
|
+
const r = spawnSync('node', [plugkitBin, 'search', '--path', projectDir, query.substring(0, 200)], { encoding: 'utf-8', stdio: 'pipe', windowsHide: true, cwd: projectDir, timeout: 5000 });
|
|
24
24
|
const out = (r.stdout || '').trim();
|
|
25
25
|
if (!out || r.status !== 0) return '';
|
|
26
26
|
return out;
|