Replace spawn with execFile for memory-safe command execution (#1068)

This commit is contained in:
tanzhenxin
2025-11-20 15:04:00 +08:00
committed by GitHub
parent a15b84e2a1
commit 442a9aed58
20 changed files with 620 additions and 969 deletions

View File

@@ -38,6 +38,7 @@ import type {
ModelSlashCommandEvent,
ExtensionDisableEvent,
AuthEvent,
RipgrepFallbackEvent,
} from '../types.js';
import { EndSessionEvent } from '../types.js';
import type {
@@ -778,8 +779,16 @@ export class QwenLogger {
this.flushIfNeeded();
}
logRipgrepFallbackEvent(): void {
const rumEvent = this.createActionEvent('misc', 'ripgrep_fallback', {});
logRipgrepFallbackEvent(event: RipgrepFallbackEvent): void {
const rumEvent = this.createActionEvent('misc', 'ripgrep_fallback', {
snapshots: JSON.stringify({
platform: process.platform,
arch: process.arch,
use_ripgrep: event.use_ripgrep,
use_builtin_ripgrep: event.use_builtin_ripgrep,
error: event.error ?? undefined,
}),
});
this.enqueueLogEvent(rumEvent);
this.flushIfNeeded();