118
*/
119
getOrCreateSandboxEngine(): TerminalSandboxEngine {
121
>
const sessionId = this._sessionUri.path.split('/').pop() ?? generateUuid();
122
>
const engine = createAgentHostSandboxEngine(
123
>
this._instantiationService,
124
>
this._environmentService,
125
>
this._productService,
126
>
this._agentConfigurationService,
127
>
this._sandboxHelper,
128
>
sessionId,
129
>
this.workingDirectory,
130
>
);
131
>
this._register(engine);
132
>
this._register(toDisposable(() => {
133
>
void engine.cleanupTempDir().catch(err => this._logService.warn('[ShellManager] Sandbox temp dir cleanup failed', err));
134
>
}));
135
>
this._sandboxEngine = engine;
136
>
}
137
>
return this._sandboxEngine;
138
>
}
139
140
/**