Disable check problems when autofix is not enabled (#563)
This commit is contained in:
@@ -208,7 +208,9 @@ export function ChatInput({ chatId }: { chatId?: number }) {
|
|||||||
setIsApproving(false);
|
setIsApproving(false);
|
||||||
setIsPreviewOpen(true);
|
setIsPreviewOpen(true);
|
||||||
refreshVersions();
|
refreshVersions();
|
||||||
checkProblems();
|
if (settings?.enableAutoFixProblems) {
|
||||||
|
checkProblems();
|
||||||
|
}
|
||||||
|
|
||||||
// Keep same as handleReject
|
// Keep same as handleReject
|
||||||
refreshProposal();
|
refreshProposal();
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import { useCountTokens } from "./useCountTokens";
|
|||||||
import { useUserBudgetInfo } from "./useUserBudgetInfo";
|
import { useUserBudgetInfo } from "./useUserBudgetInfo";
|
||||||
import { usePostHog } from "posthog-js/react";
|
import { usePostHog } from "posthog-js/react";
|
||||||
import { useCheckProblems } from "./useCheckProblems";
|
import { useCheckProblems } from "./useCheckProblems";
|
||||||
|
import { useSettings } from "./useSettings";
|
||||||
|
|
||||||
export function getRandomNumberId() {
|
export function getRandomNumberId() {
|
||||||
return Math.floor(Math.random() * 1_000_000_000_000_000);
|
return Math.floor(Math.random() * 1_000_000_000_000_000);
|
||||||
@@ -43,6 +44,7 @@ export function useStreamChat({
|
|||||||
const { countTokens } = useCountTokens();
|
const { countTokens } = useCountTokens();
|
||||||
const { refetchUserBudget } = useUserBudgetInfo();
|
const { refetchUserBudget } = useUserBudgetInfo();
|
||||||
const { checkProblems } = useCheckProblems(selectedAppId);
|
const { checkProblems } = useCheckProblems(selectedAppId);
|
||||||
|
const { settings } = useSettings();
|
||||||
const posthog = usePostHog();
|
const posthog = usePostHog();
|
||||||
let chatId: number | undefined;
|
let chatId: number | undefined;
|
||||||
|
|
||||||
@@ -95,7 +97,9 @@ export function useStreamChat({
|
|||||||
if (response.updatedFiles) {
|
if (response.updatedFiles) {
|
||||||
setIsPreviewOpen(true);
|
setIsPreviewOpen(true);
|
||||||
refreshAppIframe();
|
refreshAppIframe();
|
||||||
checkProblems();
|
if (settings?.enableAutoFixProblems) {
|
||||||
|
checkProblems();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (response.extraFiles) {
|
if (response.extraFiles) {
|
||||||
showExtraFilesToast({
|
showExtraFilesToast({
|
||||||
@@ -140,6 +144,7 @@ export function useStreamChat({
|
|||||||
checkProblems,
|
checkProblems,
|
||||||
selectedAppId,
|
selectedAppId,
|
||||||
refetchUserBudget,
|
refetchUserBudget,
|
||||||
|
settings,
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user