diff --git a/src/lib/apis/audio/index.ts b/src/lib/apis/audio/index.ts index 5cd6ab949..f6354da77 100644 --- a/src/lib/apis/audio/index.ts +++ b/src/lib/apis/audio/index.ts @@ -15,7 +15,7 @@ export const getAudioConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -52,7 +52,7 @@ export const updateAudioConfig = async (token: string, payload: OpenAIConfigForm return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -83,7 +83,7 @@ export const transcribeAudio = async (token: string, file: File) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -120,7 +120,7 @@ export const synthesizeOpenAISpeech = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -152,7 +152,7 @@ export const getModels = async (token: string = ''): Promise { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -180,7 +180,7 @@ export const getVoices = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/auths/index.ts b/src/lib/apis/auths/index.ts index 75252fd71..a23e4cdc6 100644 --- a/src/lib/apis/auths/index.ts +++ b/src/lib/apis/auths/index.ts @@ -15,7 +15,7 @@ export const getAdminDetails = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -42,7 +42,7 @@ export const getAdminConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -70,7 +70,7 @@ export const updateAdminConfig = async (token: string, body: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -98,7 +98,7 @@ export const getSessionUser = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -129,7 +129,7 @@ export const ldapUserSignIn = async (user: string, password: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; @@ -157,7 +157,7 @@ export const getLdapConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -187,7 +187,7 @@ export const updateLdapConfig = async (token: string = '', enable_ldap: boolean) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -214,7 +214,7 @@ export const getLdapServer = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -242,7 +242,7 @@ export const updateLdapServer = async (token: string = '', body: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -273,7 +273,7 @@ export const userSignIn = async (email: string, password: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; @@ -312,7 +312,7 @@ export const userSignUp = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -339,7 +339,7 @@ export const userSignOut = async () => { return res; }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -378,7 +378,7 @@ export const addUser = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -409,7 +409,7 @@ export const updateUserProfile = async (token: string, name: string, profileImag return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -440,7 +440,7 @@ export const updateUserPassword = async (token: string, password: string, newPas return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -467,7 +467,7 @@ export const getSignUpEnabledStatus = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -494,7 +494,7 @@ export const getDefaultUserRole = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -524,7 +524,7 @@ export const updateDefaultUserRole = async (token: string, role: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -551,7 +551,7 @@ export const toggleSignUpEnabledStatus = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -578,7 +578,7 @@ export const getJWTExpiresDuration = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -608,7 +608,7 @@ export const updateJWTExpiresDuration = async (token: string, duration: string) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -635,7 +635,7 @@ export const createAPIKey = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -660,7 +660,7 @@ export const getAPIKey = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -685,7 +685,7 @@ export const deleteAPIKey = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); diff --git a/src/lib/apis/channels/index.ts b/src/lib/apis/channels/index.ts index cd46410c7..548572c6f 100644 --- a/src/lib/apis/channels/index.ts +++ b/src/lib/apis/channels/index.ts @@ -28,7 +28,7 @@ export const createNewChannel = async (token: string = '', channel: ChannelForm) }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -59,7 +59,7 @@ export const getChannels = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -90,7 +90,7 @@ export const getChannelById = async (token: string = '', channel_id: string) => }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -126,7 +126,7 @@ export const updateChannelById = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -157,7 +157,7 @@ export const deleteChannelById = async (token: string = '', channel_id: string) }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -196,7 +196,7 @@ export const getChannelMessages = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -236,7 +236,7 @@ export const getChannelThreadMessages = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -275,7 +275,7 @@ export const sendMessage = async (token: string = '', channel_id: string, messag }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -315,7 +315,7 @@ export const updateMessage = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -355,7 +355,7 @@ export const addReaction = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -395,7 +395,7 @@ export const removeReaction = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -429,7 +429,7 @@ export const deleteMessage = async (token: string = '', channel_id: string, mess }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/chats/index.ts b/src/lib/apis/chats/index.ts index 02bdd4eb3..0ff56ea23 100644 --- a/src/lib/apis/chats/index.ts +++ b/src/lib/apis/chats/index.ts @@ -21,7 +21,7 @@ export const createNewChat = async (token: string, chat: object) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -61,7 +61,7 @@ export const importChat = async ( }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -97,7 +97,7 @@ export const getChatList = async (token: string = '', page: number | null = null }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -131,7 +131,7 @@ export const getChatListByUserId = async (token: string = '', userId: string) => }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -165,7 +165,7 @@ export const getArchivedChatList = async (token: string = '') => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -196,7 +196,7 @@ export const getAllChats = async (token: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -231,7 +231,7 @@ export const getChatListBySearchText = async (token: string, text: string, page: }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -265,7 +265,7 @@ export const getChatsByFolderId = async (token: string, folderId: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -296,7 +296,7 @@ export const getAllArchivedChats = async (token: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -327,7 +327,7 @@ export const getAllUserChats = async (token: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -358,7 +358,7 @@ export const getAllTags = async (token: string) => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -389,7 +389,7 @@ export const getPinnedChatList = async (token: string = '') => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -426,7 +426,7 @@ export const getChatListByTagName = async (token: string = '', tagName: string) }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -461,7 +461,7 @@ export const getChatById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -493,7 +493,7 @@ export const getChatByShareId = async (token: string, share_id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -531,7 +531,7 @@ export const getChatPinnedStatusById = async (token: string, id: string) => { error = err; } - console.log(err); + console.error(err); return null; }); @@ -569,7 +569,7 @@ export const toggleChatPinnedStatusById = async (token: string, id: string) => { error = err; } - console.log(err); + console.error(err); return null; }); @@ -610,7 +610,7 @@ export const cloneChatById = async (token: string, id: string, title?: string) = error = err; } - console.log(err); + console.error(err); return null; }); @@ -648,7 +648,7 @@ export const cloneSharedChatById = async (token: string, id: string) => { error = err; } - console.log(err); + console.error(err); return null; }); @@ -680,7 +680,7 @@ export const shareChatById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -715,7 +715,7 @@ export const updateChatFolderIdById = async (token: string, id: string, folderId .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -747,7 +747,7 @@ export const archiveChatById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -779,7 +779,7 @@ export const deleteSharedChatById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -814,7 +814,7 @@ export const updateChatById = async (token: string, id: string, chat: object) => .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -846,7 +846,7 @@ export const deleteChatById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -878,7 +878,7 @@ export const getTagsById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -912,7 +912,7 @@ export const addTagById = async (token: string, id: string, tagName: string) => }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -947,7 +947,7 @@ export const deleteTagById = async (token: string, id: string, tagName: string) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -978,7 +978,7 @@ export const deleteTagsById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -1010,7 +1010,7 @@ export const deleteAllChats = async (token: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -1042,7 +1042,7 @@ export const archiveAllChats = async (token: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/configs/index.ts b/src/lib/apis/configs/index.ts index 5872303f6..26dec26c9 100644 --- a/src/lib/apis/configs/index.ts +++ b/src/lib/apis/configs/index.ts @@ -19,7 +19,7 @@ export const importConfig = async (token: string, config) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -46,7 +46,7 @@ export const exportConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -73,7 +73,7 @@ export const getDirectConnectionsConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -103,7 +103,7 @@ export const setDirectConnectionsConfig = async (token: string, config: object) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -130,7 +130,7 @@ export const getToolServerConnections = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -160,7 +160,7 @@ export const setToolServerConnections = async (token: string, connections: objec return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -190,7 +190,7 @@ export const verifyToolServerConnection = async (token: string, connection: obje return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -217,7 +217,7 @@ export const getCodeExecutionConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -247,7 +247,7 @@ export const setCodeExecutionConfig = async (token: string, config: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -274,7 +274,7 @@ export const getModelsConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -304,7 +304,7 @@ export const setModelsConfig = async (token: string, config: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -334,7 +334,7 @@ export const setDefaultPromptSuggestions = async (token: string, promptSuggestio return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -361,7 +361,7 @@ export const getBanners = async (token: string): Promise => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -391,7 +391,7 @@ export const setBanners = async (token: string, banners: Banner[]) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); diff --git a/src/lib/apis/evaluations/index.ts b/src/lib/apis/evaluations/index.ts index f6f35f7c1..96a689fcb 100644 --- a/src/lib/apis/evaluations/index.ts +++ b/src/lib/apis/evaluations/index.ts @@ -20,7 +20,7 @@ export const getConfig = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const updateConfig = async (token: string, config: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -82,7 +82,7 @@ export const getAllFeedbacks = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -113,7 +113,7 @@ export const exportAllFeedbacks = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -144,7 +144,7 @@ export const createNewFeedback = async (token: string, feedback: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -175,7 +175,7 @@ export const getFeedbackById = async (token: string, feedbackId: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -206,7 +206,7 @@ export const updateFeedbackById = async (token: string, feedbackId: string, feed }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -234,7 +234,7 @@ export const deleteFeedbackById = async (token: string, feedbackId: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/files/index.ts b/src/lib/apis/files/index.ts index 6a42ec614..261fe56db 100644 --- a/src/lib/apis/files/index.ts +++ b/src/lib/apis/files/index.ts @@ -19,7 +19,7 @@ export const uploadFile = async (token: string, file: File) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -76,7 +76,7 @@ export const getFiles = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -107,7 +107,7 @@ export const getFileById = async (token: string, id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -141,7 +141,7 @@ export const updateFileDataContentById = async (token: string, id: string, conte }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -168,7 +168,7 @@ export const getFileContentById = async (id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -200,7 +200,7 @@ export const deleteFileById = async (token: string, id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -231,7 +231,7 @@ export const deleteAllFiles = async (token: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/folders/index.ts b/src/lib/apis/folders/index.ts index f1a1f5b48..21ec426b0 100644 --- a/src/lib/apis/folders/index.ts +++ b/src/lib/apis/folders/index.ts @@ -50,7 +50,7 @@ export const getFolders = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -81,7 +81,7 @@ export const getFolderById = async (token: string, id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -115,7 +115,7 @@ export const updateFolderNameById = async (token: string, id: string, name: stri }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -153,7 +153,7 @@ export const updateFolderIsExpandedById = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -187,7 +187,7 @@ export const updateFolderParentIdById = async (token: string, id: string, parent }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -226,7 +226,7 @@ export const updateFolderItemsById = async (token: string, id: string, items: Fo }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -257,7 +257,7 @@ export const deleteFolderById = async (token: string, id: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/functions/index.ts b/src/lib/apis/functions/index.ts index ed3306b32..f1a9bf5a0 100644 --- a/src/lib/apis/functions/index.ts +++ b/src/lib/apis/functions/index.ts @@ -20,7 +20,7 @@ export const createNewFunction = async (token: string, func: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const getFunctions = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -82,7 +82,7 @@ export const exportFunctions = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -114,7 +114,7 @@ export const getFunctionById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -149,7 +149,7 @@ export const updateFunctionById = async (token: string, id: string, func: object .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -181,7 +181,7 @@ export const deleteFunctionById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -213,7 +213,7 @@ export const toggleFunctionById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -245,7 +245,7 @@ export const toggleGlobalById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -277,7 +277,7 @@ export const getFunctionValvesById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -309,7 +309,7 @@ export const getFunctionValvesSpecById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -344,7 +344,7 @@ export const updateFunctionValvesById = async (token: string, id: string, valves .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -376,7 +376,7 @@ export const getUserValvesById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -408,7 +408,7 @@ export const getUserValvesSpecById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -443,7 +443,7 @@ export const updateUserValvesById = async (token: string, id: string, valves: ob .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/groups/index.ts b/src/lib/apis/groups/index.ts index b7d4f8ef9..c55f477af 100644 --- a/src/lib/apis/groups/index.ts +++ b/src/lib/apis/groups/index.ts @@ -20,7 +20,7 @@ export const createNewGroup = async (token: string, group: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const getGroups = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -83,7 +83,7 @@ export const getGroupById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -118,7 +118,7 @@ export const updateGroupById = async (token: string, id: string, group: object) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -150,7 +150,7 @@ export const deleteGroupById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/images/index.ts b/src/lib/apis/images/index.ts index 2e6510437..a58d16085 100644 --- a/src/lib/apis/images/index.ts +++ b/src/lib/apis/images/index.ts @@ -16,7 +16,7 @@ export const getConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -51,7 +51,7 @@ export const updateConfig = async (token: string = '', config: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -83,7 +83,7 @@ export const verifyConfigUrl = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -115,7 +115,7 @@ export const getImageGenerationConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -148,7 +148,7 @@ export const updateImageGenerationConfig = async (token: string = '', config: ob return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -180,7 +180,7 @@ export const getImageGenerationModels = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -215,7 +215,7 @@ export const imageGenerations = async (token: string = '', prompt: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { diff --git a/src/lib/apis/index.ts b/src/lib/apis/index.ts index 3892afeb8..710179c12 100644 --- a/src/lib/apis/index.ts +++ b/src/lib/apis/index.ts @@ -25,7 +25,7 @@ export const getModels = async ( }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -173,7 +173,7 @@ export const chatCompleted = async (token: string, body: ChatCompletedForm) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -212,7 +212,7 @@ export const chatAction = async (token: string, action_id: string, body: ChatAct return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -244,7 +244,7 @@ export const stopTask = async (token: string, id: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -276,7 +276,7 @@ export const getTaskIdsByChatId = async (token: string, chat_id: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -315,7 +315,7 @@ export const getToolServerData = async (token: string, url: string) => { } }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -491,7 +491,7 @@ export const getTaskConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -520,7 +520,7 @@ export const updateTaskConfig = async (token: string, config: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -562,7 +562,7 @@ export const generateTitle = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -634,7 +634,7 @@ export const generateTags = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -706,7 +706,7 @@ export const generateEmoji = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -756,7 +756,7 @@ export const generateQueries = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -828,7 +828,7 @@ export const generateAutoCompletion = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -892,7 +892,7 @@ export const generateMoACompletion = async ( stream: true }) }).catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -920,7 +920,7 @@ export const getPipelinesList = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -954,7 +954,7 @@ export const uploadPipeline = async (token: string, file: File, urlIdx: string) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -990,7 +990,7 @@ export const downloadPipeline = async (token: string, url: string, urlIdx: strin return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -1026,7 +1026,7 @@ export const deletePipeline = async (token: string, id: string, urlIdx: string) return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -1063,7 +1063,7 @@ export const getPipelines = async (token: string, urlIdx?: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1100,7 +1100,7 @@ export const getPipelineValves = async (token: string, pipeline_id: string, urlI return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1136,7 +1136,7 @@ export const getPipelineValvesSpec = async (token: string, pipeline_id: string, return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1178,7 +1178,7 @@ export const updatePipelineValves = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; @@ -1210,7 +1210,7 @@ export const getBackendConfig = async () => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1236,7 +1236,7 @@ export const getChangelog = async () => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1263,7 +1263,7 @@ export const getVersionUpdates = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1290,7 +1290,7 @@ export const getModelFilterConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1325,7 +1325,7 @@ export const updateModelFilterConfig = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1352,7 +1352,7 @@ export const getWebhookUrl = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1382,7 +1382,7 @@ export const updateWebhookUrl = async (token: string, url: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1409,7 +1409,7 @@ export const getCommunitySharingEnabledStatus = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1436,7 +1436,7 @@ export const toggleCommunitySharingEnabledStatus = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -1463,7 +1463,7 @@ export const getModelConfig = async (token: string): Promise return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -1511,7 +1511,7 @@ export const updateModelConfig = async (token: string, config: GlobalModelConfig return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); diff --git a/src/lib/apis/knowledge/index.ts b/src/lib/apis/knowledge/index.ts index 92fda2a95..c01c986a2 100644 --- a/src/lib/apis/knowledge/index.ts +++ b/src/lib/apis/knowledge/index.ts @@ -27,7 +27,7 @@ export const createNewKnowledge = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -58,7 +58,7 @@ export const getKnowledgeBases = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -89,7 +89,7 @@ export const getKnowledgeBaseList = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -121,7 +121,7 @@ export const getKnowledgeById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -166,7 +166,7 @@ export const updateKnowledgeById = async (token: string, id: string, form: Knowl .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -201,7 +201,7 @@ export const addFileToKnowledgeById = async (token: string, id: string, fileId: .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -236,7 +236,7 @@ export const updateFileFromKnowledgeById = async (token: string, id: string, fil .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -271,7 +271,7 @@ export const removeFileFromKnowledgeById = async (token: string, id: string, fil .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -303,7 +303,7 @@ export const resetKnowledgeById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -335,7 +335,7 @@ export const deleteKnowledgeById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -363,7 +363,7 @@ export const reindexKnowledgeFiles = async (token: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/memories/index.ts b/src/lib/apis/memories/index.ts index 3fd83ca9e..d8fdc638f 100644 --- a/src/lib/apis/memories/index.ts +++ b/src/lib/apis/memories/index.ts @@ -17,7 +17,7 @@ export const getMemories = async (token: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -48,7 +48,7 @@ export const addNewMemory = async (token: string, content: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -79,7 +79,7 @@ export const updateMemoryById = async (token: string, id: string, content: strin }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -110,7 +110,7 @@ export const queryMemory = async (token: string, content: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -142,7 +142,7 @@ export const deleteMemoryById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -174,7 +174,7 @@ export const deleteMemoriesByUserId = async (token: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/models/index.ts b/src/lib/apis/models/index.ts index 9cf625d03..3e6e0d0c0 100644 --- a/src/lib/apis/models/index.ts +++ b/src/lib/apis/models/index.ts @@ -20,7 +20,7 @@ export const getModels = async (token: string = '') => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const getBaseModels = async (token: string = '') => { }) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -80,7 +80,7 @@ export const createNewModel = async (token: string, model: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -115,7 +115,7 @@ export const getModelById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -150,7 +150,7 @@ export const toggleModelById = async (token: string, id: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -186,7 +186,7 @@ export const updateModelById = async (token: string, id: string, model: object) .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); @@ -221,7 +221,7 @@ export const deleteModelById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -253,7 +253,7 @@ export const deleteAllModels = async (token: string) => { .catch((err) => { error = err; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/notes/index.ts b/src/lib/apis/notes/index.ts index 23bec36f2..df0be7262 100644 --- a/src/lib/apis/notes/index.ts +++ b/src/lib/apis/notes/index.ts @@ -28,7 +28,7 @@ export const createNewNote = async (token: string, note: NoteItem) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -59,7 +59,7 @@ export const getNotes = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -108,7 +108,7 @@ export const getNoteById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -143,7 +143,7 @@ export const updateNoteById = async (token: string, id: string, note: NoteItem) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -175,7 +175,7 @@ export const deleteNoteById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/ollama/index.ts b/src/lib/apis/ollama/index.ts index b96567e63..2f6278fe9 100644 --- a/src/lib/apis/ollama/index.ts +++ b/src/lib/apis/ollama/index.ts @@ -51,7 +51,7 @@ export const getOllamaConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -92,7 +92,7 @@ export const updateOllamaConfig = async (token: string = '', config: OllamaConfi return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -124,7 +124,7 @@ export const getOllamaUrls = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -159,7 +159,7 @@ export const updateOllamaUrls = async (token: string = '', urls: string[]) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -191,7 +191,7 @@ export const getOllamaVersion = async (token: string, urlIdx?: number) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -223,7 +223,7 @@ export const getOllamaModels = async (token: string = '', urlIdx: null | number return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -268,7 +268,7 @@ export const generatePrompt = async (token: string = '', model: string, conversa ` }) }).catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } @@ -408,11 +408,11 @@ export const deleteModel = async (token: string, tagName: string, urlIdx: string return res.json(); }) .then((json) => { - console.log(json); + console.debug(json); return true; }) .catch((err) => { - console.log(err); + console.error(err); error = err; if ('detail' in err) { @@ -445,7 +445,7 @@ export const pullModel = async (token: string, tagName: string, urlIdx: number | name: tagName }) }).catch((err) => { - console.log(err); + console.error(err); error = err; if ('detail' in err) { @@ -481,7 +481,7 @@ export const downloadModel = async ( }) } ).catch((err) => { - console.log(err); + console.error(err); error = err; if ('detail' in err) { @@ -512,7 +512,7 @@ export const uploadModel = async (token: string, file: File, urlIdx: string | nu body: formData } ).catch((err) => { - console.log(err); + console.error(err); error = err; if ('detail' in err) { diff --git a/src/lib/apis/openai/index.ts b/src/lib/apis/openai/index.ts index bab2d6e36..f6cf76a73 100644 --- a/src/lib/apis/openai/index.ts +++ b/src/lib/apis/openai/index.ts @@ -16,7 +16,7 @@ export const getOpenAIConfig = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -58,7 +58,7 @@ export const updateOpenAIConfig = async (token: string = '', config: OpenAIConfi return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -90,7 +90,7 @@ export const getOpenAIUrls = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -125,7 +125,7 @@ export const updateOpenAIUrls = async (token: string = '', urls: string[]) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -157,7 +157,7 @@ export const getOpenAIKeys = async (token: string = '') => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -192,7 +192,7 @@ export const updateOpenAIKeys = async (token: string = '', keys: string[]) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); if ('detail' in err) { error = err.detail; } else { @@ -346,7 +346,7 @@ export const chatCompletion = async ( }, body: JSON.stringify(body) }).catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -409,7 +409,7 @@ export const synthesizeOpenAISpeech = async ( voice: speaker }) }).catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); diff --git a/src/lib/apis/prompts/index.ts b/src/lib/apis/prompts/index.ts index f1c54b109..4129ea62a 100644 --- a/src/lib/apis/prompts/index.ts +++ b/src/lib/apis/prompts/index.ts @@ -28,7 +28,7 @@ export const createNewPrompt = async (token: string, prompt: PromptItem) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -59,7 +59,7 @@ export const getPrompts = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -90,7 +90,7 @@ export const getPromptList = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -122,7 +122,7 @@ export const getPromptByCommand = async (token: string, command: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -158,7 +158,7 @@ export const updatePromptByCommand = async (token: string, prompt: PromptItem) = .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -192,7 +192,7 @@ export const deletePromptByCommand = async (token: string, command: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/retrieval/index.ts b/src/lib/apis/retrieval/index.ts index f4b937b68..8fa6578ed 100644 --- a/src/lib/apis/retrieval/index.ts +++ b/src/lib/apis/retrieval/index.ts @@ -15,7 +15,7 @@ export const getRAGConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -77,7 +77,7 @@ export const updateRAGConfig = async (token: string, payload: RAGConfigForm) => return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -104,7 +104,7 @@ export const getQuerySettings = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -140,7 +140,7 @@ export const updateQuerySettings = async (token: string, settings: QuerySettings return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -167,7 +167,7 @@ export const getEmbeddingConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -209,7 +209,7 @@ export const updateEmbeddingConfig = async (token: string, payload: EmbeddingMod return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -236,7 +236,7 @@ export const getRerankingConfig = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -270,7 +270,7 @@ export const updateRerankingConfig = async (token: string, payload: RerankingMod return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -313,7 +313,7 @@ export const processFile = async ( }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -344,7 +344,7 @@ export const processYoutubeVideo = async (token: string, url: string) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -376,7 +376,7 @@ export const processWeb = async (token: string, collection_name: string, url: st }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -410,7 +410,7 @@ export const processWebSearch = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); diff --git a/src/lib/apis/tools/index.ts b/src/lib/apis/tools/index.ts index d1dc11c16..52501a0e0 100644 --- a/src/lib/apis/tools/index.ts +++ b/src/lib/apis/tools/index.ts @@ -20,7 +20,7 @@ export const createNewTool = async (token: string, tool: object) => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -51,7 +51,7 @@ export const getTools = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -82,7 +82,7 @@ export const getToolList = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -113,7 +113,7 @@ export const exportTools = async (token: string = '') => { }) .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -145,7 +145,7 @@ export const getToolById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -180,7 +180,7 @@ export const updateToolById = async (token: string, id: string, tool: object) => .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -212,7 +212,7 @@ export const deleteToolById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -244,7 +244,7 @@ export const getToolValvesById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -276,7 +276,7 @@ export const getToolValvesSpecById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -311,7 +311,7 @@ export const updateToolValvesById = async (token: string, id: string, valves: ob .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -343,7 +343,7 @@ export const getUserValvesById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -375,7 +375,7 @@ export const getUserValvesSpecById = async (token: string, id: string) => { .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); @@ -410,7 +410,7 @@ export const updateUserValvesById = async (token: string, id: string, valves: ob .catch((err) => { error = err.detail; - console.log(err); + console.error(err); return null; }); diff --git a/src/lib/apis/users/index.ts b/src/lib/apis/users/index.ts index be82454c2..f8ab88ff5 100644 --- a/src/lib/apis/users/index.ts +++ b/src/lib/apis/users/index.ts @@ -16,7 +16,7 @@ export const getUserGroups = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -43,7 +43,7 @@ export const getUserDefaultPermissions = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -73,7 +73,7 @@ export const updateUserDefaultPermissions = async (token: string, permissions: o return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -104,7 +104,7 @@ export const updateUserRole = async (token: string, id: string, role: string) => return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -154,7 +154,7 @@ export const getUsers = async ( return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -182,7 +182,7 @@ export const getAllUsers = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -208,7 +208,7 @@ export const getUserSettings = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -238,7 +238,7 @@ export const updateUserSettings = async (token: string, settings: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -265,7 +265,7 @@ export const getUserById = async (token: string, userId: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -291,7 +291,7 @@ export const getUserInfo = async (token: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -321,7 +321,7 @@ export const updateUserInfo = async (token: string, info: object) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -335,7 +335,7 @@ export const updateUserInfo = async (token: string, info: object) => { export const getAndUpdateUserLocation = async (token: string) => { const location = await getUserPosition().catch((err) => { - console.log(err); + console.error(err); return null; }); @@ -343,7 +343,7 @@ export const getAndUpdateUserLocation = async (token: string) => { await updateUserInfo(token, { location: location }); return location; } else { - console.log('Failed to get user location'); + console.info('Failed to get user location'); return null; } }; @@ -363,7 +363,7 @@ export const deleteUserById = async (token: string, userId: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -403,7 +403,7 @@ export const updateUserById = async (token: string, userId: string, user: UserUp return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); diff --git a/src/lib/apis/utils/index.ts b/src/lib/apis/utils/index.ts index 64db56124..1fc30ddbb 100644 --- a/src/lib/apis/utils/index.ts +++ b/src/lib/apis/utils/index.ts @@ -15,7 +15,7 @@ export const getGravatarUrl = async (token: string, email: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -41,7 +41,7 @@ export const executeCode = async (token: string, code: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; if (err.detail) { @@ -75,7 +75,7 @@ export const formatPythonCode = async (token: string, code: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; if (err.detail) { @@ -110,7 +110,7 @@ export const downloadChatAsPDF = async (token: string, title: string, messages: return res.blob(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -136,7 +136,7 @@ export const getHTMLFromMarkdown = async (token: string, md: string) => { return res.json(); }) .catch((err) => { - console.log(err); + console.error(err); error = err; return null; }); @@ -170,7 +170,7 @@ export const downloadDatabase = async (token: string) => { window.URL.revokeObjectURL(url); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); @@ -206,7 +206,7 @@ export const downloadLiteLLMConfig = async (token: string) => { window.URL.revokeObjectURL(url); }) .catch((err) => { - console.log(err); + console.error(err); error = err.detail; return null; }); diff --git a/src/lib/components/admin/Functions/FunctionEditor.svelte b/src/lib/components/admin/Functions/FunctionEditor.svelte index 9b2355fe4..1ef7bddc1 100644 --- a/src/lib/components/admin/Functions/FunctionEditor.svelte +++ b/src/lib/components/admin/Functions/FunctionEditor.svelte @@ -277,7 +277,7 @@ class Pipe: await tick(); if (res) { - console.log('Code formatted successfully'); + console.info('Code formatted successfully'); saveHandler(); } diff --git a/src/lib/components/admin/Settings/Documents.svelte b/src/lib/components/admin/Settings/Documents.svelte index 498ff2c1e..3a3c361cf 100644 --- a/src/lib/components/admin/Settings/Documents.svelte +++ b/src/lib/components/admin/Settings/Documents.svelte @@ -91,7 +91,7 @@ return; } - console.log('Update embedding model attempt:', embeddingModel); + console.debug('Update embedding model attempt:', embeddingModel); updateEmbeddingModelLoading = true; const res = await updateEmbeddingConfig(localStorage.token, { @@ -114,7 +114,7 @@ updateEmbeddingModelLoading = false; if (res) { - console.log('embeddingModelUpdateHandler:', res); + console.debug('embeddingModelUpdateHandler:', res); if (res.status === true) { toast.success($i18n.t('Embedding model set to "{{embedding_model}}"', res), { duration: 1000 * 10 diff --git a/src/lib/components/admin/Settings/General.svelte b/src/lib/components/admin/Settings/General.svelte index 86cc876ef..85f21824f 100644 --- a/src/lib/components/admin/Settings/General.svelte +++ b/src/lib/components/admin/Settings/General.svelte @@ -59,10 +59,10 @@ }; }); - console.log(version); + console.info(version); updateAvailable = compareVersion(version.latest, version.current); - console.log(updateAvailable); + console.info(updateAvailable); }; const updateLdapServerHandler = async () => { diff --git a/src/lib/components/admin/Settings/Images.svelte b/src/lib/components/admin/Settings/Images.svelte index 64fa249dc..003b991a0 100644 --- a/src/lib/components/admin/Settings/Images.svelte +++ b/src/lib/components/admin/Settings/Images.svelte @@ -198,14 +198,14 @@ 2 ); } catch (e) { - console.log(e); + console.error(e); } } requiredWorkflowNodes = requiredWorkflowNodes.map((node) => { const n = config.comfyui.COMFYUI_WORKFLOW_NODES.find((n) => n.type === node.type) ?? node; - console.log(n); + console.debug(n); return { type: n.type, diff --git a/src/lib/components/admin/Settings/Interface.svelte b/src/lib/components/admin/Settings/Interface.svelte index c70259983..53d4f29e4 100644 --- a/src/lib/components/admin/Settings/Interface.svelte +++ b/src/lib/components/admin/Settings/Interface.svelte @@ -90,7 +90,7 @@ } }); - console.log('models', models); + console.debug('models', models); }; diff --git a/src/lib/components/admin/Settings/Models.svelte b/src/lib/components/admin/Settings/Models.svelte index d5b2fc627..5775abf85 100644 --- a/src/lib/components/admin/Settings/Models.svelte +++ b/src/lib/components/admin/Settings/Models.svelte @@ -166,7 +166,7 @@ hidden: !(model?.meta?.hidden ?? false) }; - console.log(model); + console.debug(model); toast.success( model.meta.hidden diff --git a/src/lib/components/admin/Settings/Models/Manage/ManageOllama.svelte b/src/lib/components/admin/Settings/Models/Manage/ManageOllama.svelte index feb5010d2..51f45df5a 100644 --- a/src/lib/components/admin/Settings/Models/Manage/ManageOllama.svelte +++ b/src/lib/components/admin/Settings/Models/Manage/ManageOllama.svelte @@ -66,7 +66,7 @@ const updateModelsHandler = async () => { for (const model of ollamaModels) { - console.log(model); + console.debug(model); updateModelId = model.id; const [res, controller] = await pullModel(localStorage.token, model.id, urlIdx).catch( @@ -114,8 +114,8 @@ } } } - } catch (error) { - console.log(error); + } catch (err) { + console.error(err); } } } @@ -215,13 +215,13 @@ } } } - } catch (error) { - console.log(error); - if (typeof error !== 'string') { - error = error.message; + } catch (err) { + console.error(err); + if (typeof err !== 'string') { + err = err.message; } - toast.error(`${error}`); + toast.error(`${err}`); // opts.callback({ success: false, error, modelName: opts.modelName }); } } @@ -319,8 +319,8 @@ } } } - } catch (error) { - console.log(error); + } catch (err) { + console.error(err); } } } else { @@ -382,9 +382,9 @@ } } } - } catch (error) { - console.log(error); - toast.error(`${error}`); + } catch (err) { + console.error(err); + toast.error(`${err}`); } } } @@ -514,9 +514,9 @@ } } } - } catch (error) { - console.log(error); - toast.error(`${error}`); + } catch (err) { + console.error(err); + toast.error(`${err}`); } } } diff --git a/src/lib/components/admin/Settings/Pipelines.svelte b/src/lib/components/admin/Settings/Pipelines.svelte index e37d39748..635a83df5 100644 --- a/src/lib/components/admin/Settings/Pipelines.svelte +++ b/src/lib/components/admin/Settings/Pipelines.svelte @@ -104,7 +104,7 @@ valves_spec = null; if (PIPELINES_LIST.length > 0) { - console.log(selectedPipelinesUrlIdx); + console.debug(selectedPipelinesUrlIdx); pipelines = await getPipelines(localStorage.token, selectedPipelinesUrlIdx); if (pipelines.length > 0) { @@ -151,7 +151,7 @@ const res = await uploadPipeline(localStorage.token, file, selectedPipelinesUrlIdx).catch( (error) => { - console.log(error); + console.error(error); toast.error('Something went wrong :/'); return null; } diff --git a/src/lib/components/admin/Users/Groups.svelte b/src/lib/components/admin/Users/Groups.svelte index 5847ebbb1..70e5832ea 100644 --- a/src/lib/components/admin/Users/Groups.svelte +++ b/src/lib/components/admin/Users/Groups.svelte @@ -106,7 +106,7 @@ }; const updateDefaultPermissionsHandler = async (group) => { - console.log(group.permissions); + console.debug(group.permissions); const res = await updateUserDefaultPermissions(localStorage.token, group.permissions).catch( (error) => { diff --git a/src/lib/components/admin/Users/Groups/AddGroupModal.svelte b/src/lib/components/admin/Users/Groups/AddGroupModal.svelte index b37da5a18..12cddf398 100644 --- a/src/lib/components/admin/Users/Groups/AddGroupModal.svelte +++ b/src/lib/components/admin/Users/Groups/AddGroupModal.svelte @@ -31,10 +31,6 @@ description = ''; userIds = []; }; - - onMount(() => { - console.log('mounted'); - }); diff --git a/src/lib/components/admin/Users/Groups/EditGroupModal.svelte b/src/lib/components/admin/Users/Groups/EditGroupModal.svelte index 5b6bf6aab..8cc353064 100644 --- a/src/lib/components/admin/Users/Groups/EditGroupModal.svelte +++ b/src/lib/components/admin/Users/Groups/EditGroupModal.svelte @@ -91,7 +91,6 @@ } onMount(() => { - console.log(tabs); selectedTab = tabs[0]; init(); }); diff --git a/src/lib/components/admin/Users/UserList/AddUserModal.svelte b/src/lib/components/admin/Users/UserList/AddUserModal.svelte index 8b3d74c52..cad799eb5 100644 --- a/src/lib/components/admin/Users/UserList/AddUserModal.svelte +++ b/src/lib/components/admin/Users/UserList/AddUserModal.svelte @@ -73,7 +73,7 @@ for (const [idx, row] of rows.entries()) { const columns = row.split(',').map((col) => col.trim()); - console.log(idx, columns); + console.debug(idx, columns); if (idx > 0) { if ( diff --git a/src/lib/components/channel/MessageInput.svelte b/src/lib/components/channel/MessageInput.svelte index d60851fc8..2ad4faa93 100644 --- a/src/lib/components/channel/MessageInput.svelte +++ b/src/lib/components/channel/MessageInput.svelte @@ -80,7 +80,7 @@ const inputFilesHandler = async (inputFiles) => { inputFiles.forEach((file) => { - console.log('Processing file:', { + console.info('Processing file:', { name: file.name, type: file.type, size: file.size, @@ -91,7 +91,7 @@ ($config?.file?.max_size ?? null) !== null && file.size > ($config?.file?.max_size ?? 0) * 1024 * 1024 ) { - console.log('File exceeds max size limit:', { + console.error('File exceeds max size limit:', { fileSize: file.size, maxSize: ($config?.file?.max_size ?? 0) * 1024 * 1024 }); @@ -163,14 +163,14 @@ const uploadedFile = await uploadFile(localStorage.token, file); if (uploadedFile) { - console.log('File upload completed:', { + console.info('File upload completed:', { id: uploadedFile.id, name: fileItem.name, collection: uploadedFile?.meta?.collection_name }); if (uploadedFile.error) { - console.warn('File upload warning:', uploadedFile.error); + console.error('File upload warning:', uploadedFile.error); toast.warning(uploadedFile.error); } @@ -193,7 +193,6 @@ const handleKeyDown = (event: KeyboardEvent) => { if (event.key === 'Escape') { - console.log('Escape'); draggedOver = false; } }; @@ -215,7 +214,6 @@ const onDrop = async (e) => { e.preventDefault(); - console.log(e); if (e.dataTransfer?.files) { const inputFiles = Array.from(e.dataTransfer?.files); @@ -270,7 +268,6 @@ }); onDestroy(() => { - console.log('destroy'); window.removeEventListener('keydown', handleKeyDown); const dropzoneElement = document.getElementById('channel-container'); @@ -479,12 +476,12 @@ } if (e.key === 'Escape') { - console.log('Escape'); + console.info('Escape'); } }} on:paste={async (e) => { e = e.detail.event; - console.log(e); + console.info(e); }} /> diff --git a/src/lib/components/channel/Messages.svelte b/src/lib/components/channel/Messages.svelte index e1bc326b3..9a2bf4cb2 100644 --- a/src/lib/components/channel/Messages.svelte +++ b/src/lib/components/channel/Messages.svelte @@ -51,7 +51,7 @@ {#if !top} { - console.log('visible'); + console.info('visible'); if (!messagesLoading) { loadMoreMessages(); } diff --git a/src/lib/components/channel/Thread.svelte b/src/lib/components/channel/Thread.svelte index 287c7b06a..0b328dc23 100644 --- a/src/lib/components/channel/Thread.svelte +++ b/src/lib/components/channel/Thread.svelte @@ -54,7 +54,7 @@ }; const channelEventHandler = async (event) => { - console.log(event); + console.debug(event); if (event.channel_id === channel.id) { const type = event?.data?.type ?? null; const data = event?.data?.data ?? null; diff --git a/src/lib/components/chat/Artifacts.svelte b/src/lib/components/chat/Artifacts.svelte index b15f38d22..f53e75507 100644 --- a/src/lib/components/chat/Artifacts.svelte +++ b/src/lib/components/chat/Artifacts.svelte @@ -154,7 +154,7 @@ url.pathname + url.search + url.hash ); } else { - console.log('External navigation blocked:', url.href); + console.info('External navigation blocked:', url.href); } } },