-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat(cli): show dangerous command once per session #7919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uinstinct could you show a video of this in action? I'm wondering if it wouldn't just immediately hide the warning on any other prop updating
|
That was a very good catch! Yes the warning disappeared on prop change - used state to persist. feat.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, idea for simplification:
const [initialHasShownDangerousCommand] = useState(hasShownDangerousCommandWarning);
hasShownDangerousCommandWarning = false
const showDynamicWarning =
hasDynamicEvaluation && !initialHasShownDangerousCommand;
|
It would be nice to have something like this in the vscode and IntelliJ extensions as well. |
|
@chezsmithy agree the dangerous warning in the extensions is pretty noisy. I think the difference is that this message in CLI is talking about commands that are auto-blocked e.g. I'll open a PR that makes that message less noisy for starters |
…instinct/cli-danger-command
|
🎉 This PR is included in version 1.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.22.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.21.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Show the warning for dangerous commands in the cli only once per session.
resolves CON-4021
AI Code Review
@continue-general-reviewor@continue-detailed-reviewChecklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Show the dangerous command warning only once per CLI session to reduce noise while keeping blocking behavior unchanged. Aligns with CON-4021.