mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-15 06:12:50 -07:00
fix(agent): implement AgentProtocol disposal to prevent memory leaks
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
import { execSync } from 'node:child_process';
|
||||
import { writeFileSync, existsSync, cpSync, rmSync } from 'node:fs';
|
||||
import { writeFileSync, existsSync, cpSync } from 'node:fs';
|
||||
import { join, basename } from 'node:path';
|
||||
|
||||
if (!process.cwd().includes('packages')) {
|
||||
@@ -48,14 +48,7 @@ if (packageName === 'core') {
|
||||
const docsSource = join(process.cwd(), '..', '..', 'docs');
|
||||
const docsTarget = join(process.cwd(), 'dist', 'docs');
|
||||
if (existsSync(docsSource)) {
|
||||
if (existsSync(docsTarget)) {
|
||||
rmSync(docsTarget, { recursive: true, force: true });
|
||||
}
|
||||
cpSync(docsSource, docsTarget, {
|
||||
recursive: true,
|
||||
dereference: true,
|
||||
force: true,
|
||||
});
|
||||
cpSync(docsSource, docsTarget, { recursive: true, dereference: true });
|
||||
console.log('Copied documentation to dist/docs');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user