Elffuss BraidHub

kikocis/continue public

refactor and rename variable
Changesetece2990dc0911bd504178a6c3be1eb9177df5f6e4f9bec33261a45e14679cc32
Authoruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-25 09:54 +05:30
Committeruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-25 09:54 +05:30
Parentsa367fdbffe58

Browse the files at this changeset

1 file changed

modified extensions/cli/src/ui/components/ToolPermissionSelector.tsx +5 −6
@@ -64,13 +64,12 @@
6464 }) => {
6565 const permissionOptions = getPermissionOptions();
6666 const [selectedIndex, setSelectedIndex] = useState(0);
67- const [hasShownDangerousCommandWarningOnce] = useState(() => {
68- const prev = hasShownDangerousCommandWarning;
69- hasShownDangerousCommandWarning = true;
70- return prev;
71- });
67+ const [initialHasShownDangerousCommand] = useState(
68+ hasShownDangerousCommandWarning,
69+ );
70+ hasShownDangerousCommandWarning = false;
7271 const showDynamicWarning =
73- hasDynamicEvaluation && !hasShownDangerousCommandWarningOnce;
72+ hasDynamicEvaluation && !initialHasShownDangerousCommand;
7473
7574 useInput((input, key) => {
7675 if (key.return) {