Add more types
This commit is contained in:
parent
808933e4c1
commit
396d5a3bd5
4 changed files with 8 additions and 6 deletions
|
|
@ -36,9 +36,9 @@ function ApiInterceptor(): null {
|
|||
"Refresh the page",
|
||||
"Use a new flow tab",
|
||||
"Check if the backend is up",
|
||||
"Endpoint: " + error.config?.url,
|
||||
"Endpoint: " + (error as AxiosError).config?.url,
|
||||
],
|
||||
} as errorsVarType);
|
||||
});
|
||||
return Promise.reject(error);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import { CHAT_FORM_DIALOG_SUBTITLE } from "../../constants/constants";
|
|||
import { TabsContext } from "../../contexts/tabsContext";
|
||||
import { validateNodes } from "../../utils/reactflowUtils";
|
||||
import { TabsState, errorsVarType } from "../../types/tabs";
|
||||
import { AxiosError } from "axios";
|
||||
|
||||
export default function FormModal({
|
||||
flow,
|
||||
|
|
@ -316,8 +317,8 @@ export default function FormModal({
|
|||
} catch (error) {
|
||||
setErrorData({
|
||||
title: "There was an error sending the message",
|
||||
list: [error.message],
|
||||
} as errorsVarType);
|
||||
list: [(error as { message: string }).message],
|
||||
});
|
||||
setChatValue(data.inputs);
|
||||
connectWS();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default function GenericModal({
|
|||
const [wordsHighlight, setWordsHighlight] = useState<string[]>([]);
|
||||
const { setErrorData, setSuccessData, setNoticeData } =
|
||||
useContext(alertContext);
|
||||
const ref = useRef<RefObject<HTMLTextAreaElement>>();
|
||||
const ref = useRef();
|
||||
const divRef = useRef(null);
|
||||
const divRefPrompt = useRef(null);
|
||||
|
||||
|
|
@ -208,6 +208,7 @@ export default function GenericModal({
|
|||
<TextAreaContentView />
|
||||
) : type !== TypeModal.PROMPT ? (
|
||||
<Textarea
|
||||
//@ts-ignore
|
||||
ref={ref}
|
||||
className="form-input h-full w-full rounded-lg focus-visible:ring-1"
|
||||
value={inputValue}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"strict": false,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"module": "esnext",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue