mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 07:01:09 -07:00
fix: Use coreEvents.emitFeedback directly for deprecation warning
Removes the unnecessary setTimeout wrapper when emitting the allowedTools deprecation warning, leveraging the built-in event backlog mechanism of CoreEventEmitter.
This commit is contained in:
@@ -520,12 +520,10 @@ export async function main() {
|
||||
|
||||
// Show deprecation warning only for allowedTools as that's the only one set by the user currently via command line args
|
||||
if (config.getAllowedTools() !== undefined) {
|
||||
setTimeout(() => {
|
||||
coreEvents.emitFeedback(
|
||||
'warning',
|
||||
`The allowed-tools cli argument is deprecated and will be removed in Gemini CLI 1.0: Please use the Policy Engine to manage tool permissions instead: https://geminicli.com/docs/core/policy-engine/`,
|
||||
);
|
||||
}, 0);
|
||||
coreEvents.emitFeedback(
|
||||
'warning',
|
||||
`The allowed-tools cli argument is deprecated and will be removed in Gemini CLI 1.0: Please use the Policy Engine to manage tool permissions instead: https://geminicli.com/docs/core/policy-engine/`,
|
||||
);
|
||||
}
|
||||
|
||||
if (config.isInteractive() && config.storage && config.getDebugMode()) {
|
||||
|
||||
Reference in New Issue
Block a user