mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -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
|
// 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) {
|
if (config.getAllowedTools() !== undefined) {
|
||||||
setTimeout(() => {
|
coreEvents.emitFeedback(
|
||||||
coreEvents.emitFeedback(
|
'warning',
|
||||||
'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/`,
|
||||||
`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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.isInteractive() && config.storage && config.getDebugMode()) {
|
if (config.isInteractive() && config.storage && config.getDebugMode()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user