Skip to content

Commit 11daf16

Browse files
fix
1 parent f04fc6f commit 11daf16

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

src/components/chat/hooks/useChatComposerState.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ interface UseChatComposerStateArgs {
3737
currentSessionId: string | null;
3838
provider: SessionProvider;
3939
permissionMode: PermissionMode | string;
40+
isYoloAllowed: boolean;
4041
cyclePermissionMode: () => void;
4142
cursorModel: string;
4243
claudeModel: string;
@@ -88,6 +89,7 @@ export function useChatComposerState({
8889
currentSessionId,
8990
provider,
9091
permissionMode,
92+
isYoloAllowed,
9193
cyclePermissionMode,
9294
cursorModel,
9395
claudeModel,
@@ -471,7 +473,7 @@ export function useChatComposerState({
471473
) => {
472474
event.preventDefault();
473475
const currentInput = inputValueRef.current;
474-
if (!currentInput.trim() || isLoading || !selectedProject) {
476+
if (!currentInput.trim() || isLoading || !selectedProject || (permissionMode === 'bypassPermissions' && !isYoloAllowed)) {
475477
return;
476478
}
477479

@@ -665,6 +667,7 @@ export function useChatComposerState({
665667
cursorModel,
666668
executeCommand,
667669
isLoading,
670+
isYoloAllowed,
668671
onSessionActive,
669672
pendingViewSessionRef,
670673
permissionMode,

src/components/chat/view/ChatInterface.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ function ChatInterface({
173173
currentSessionId,
174174
provider,
175175
permissionMode,
176+
isYoloAllowed,
176177
cyclePermissionMode,
177178
cursorModel,
178179
claudeModel,

src/i18n/locales/en/chat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"default": "Default Mode",
8484
"acceptEdits": "Accept Edits",
8585
"bypassPermissions": "Bypass Permissions",
86-
"notYolo": "Not YOLO",
86+
"notYolo": "No YOLO",
8787
"plan": "Plan Mode"
8888
},
8989
"descriptions": {

0 commit comments

Comments
 (0)