Migrate console to coreEvents.emitFeedback or debugLogger (#15219)

This commit is contained in:
Adib234
2025-12-29 15:46:10 -05:00
committed by GitHub
parent dcd2449b1a
commit 10ae84869a
66 changed files with 564 additions and 425 deletions
@@ -14,7 +14,7 @@ import type {
ResumedSessionData,
} from '@google/gemini-cli-core';
import type { Part } from '@google/genai';
import { partListUnionToString } from '@google/gemini-cli-core';
import { partListUnionToString, coreEvents } from '@google/gemini-cli-core';
import type { SessionInfo } from '../../utils/sessionUtils.js';
import { MessageType, ToolCallStatus } from '../types.js';
@@ -79,7 +79,7 @@ export const useSessionBrowser = (
resumedSessionData,
);
} catch (error) {
console.error('Error resuming session:', error);
coreEvents.emitFeedback('error', 'Error resuming session:', error);
setIsSessionBrowserOpen(false);
}
},
@@ -103,7 +103,7 @@ export const useSessionBrowser = (
chatRecordingService.deleteSession(session.file);
}
} catch (error) {
console.error('Error deleting session:', error);
coreEvents.emitFeedback('error', 'Error deleting session:', error);
throw error;
}
},