소스 검색

feat(desktop): Allow empty prompt with review comments (#11953)

Daniel Polito 2 주 전
부모
커밋
76381f33d5
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      packages/app/src/components/prompt-input.tsx

+ 2 - 2
packages/app/src/components/prompt-input.tsx

@@ -1132,7 +1132,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
     const images = imageAttachments().slice()
     const images = imageAttachments().slice()
     const mode = store.mode
     const mode = store.mode
 
 
-    if (text.trim().length === 0 && images.length === 0) {
+    if (text.trim().length === 0 && images.length === 0 && commentCount() === 0) {
       if (working()) abort()
       if (working()) abort()
       return
       return
     }
     }
@@ -2068,7 +2068,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
             >
             >
               <IconButton
               <IconButton
                 type="submit"
                 type="submit"
-                disabled={!prompt.dirty() && !working()}
+                disabled={!prompt.dirty() && !working() && commentCount() === 0}
                 icon={working() ? "stop" : "arrow-up"}
                 icon={working() ? "stop" : "arrow-up"}
                 variant="primary"
                 variant="primary"
                 class="h-6 w-4.5"
                 class="h-6 w-4.5"