mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-11 02:20:48 -07:00
fix(cli): resolve devtools build issues and update third-party notices
This commit is contained in:
@@ -230,9 +230,8 @@ export async function toggleDevToolsPanel(
|
||||
}
|
||||
|
||||
try {
|
||||
const { openBrowserSecurely, shouldLaunchBrowser } = await import(
|
||||
'@google/gemini-cli-core'
|
||||
);
|
||||
const { openBrowserSecurely, shouldLaunchBrowser } =
|
||||
await import('@google/gemini-cli-core');
|
||||
const url = await startDevToolsServer(config);
|
||||
if (shouldLaunchBrowser()) {
|
||||
try {
|
||||
@@ -257,3 +256,18 @@ export function resetForTesting() {
|
||||
serverStartPromise = null;
|
||||
connectedUrl = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops the DevTools server if it was started by this process.
|
||||
*/
|
||||
export async function stopDevTools() {
|
||||
try {
|
||||
const mod = await import('@google/gemini-cli-devtools');
|
||||
const devtools: IDevTools = mod.DevTools.getInstance();
|
||||
await devtools.stop();
|
||||
serverStartPromise = null;
|
||||
connectedUrl = null;
|
||||
} catch (err) {
|
||||
debugLogger.debug('Failed to stop DevTools:', err);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user