refactor: switch webchat from sse to websocket (#1808)

* refactor: switch webchat from sse to websocket

* perf: image preview dialog

* chore: remove console.log
This commit is contained in:
Junyan Qin (Chin)
2025-11-28 14:54:01 +08:00
committed by GitHub
parent 348620ac0a
commit d09b823c49
39 changed files with 2656 additions and 783 deletions
+3 -7
View File
@@ -59,9 +59,7 @@ export default function Register() {
router.push('/login');
}
})
.catch((err) => {
console.log('error at getIsInitialized: ', err);
});
.catch(() => {});
}
function onSubmit(values: z.infer<ReturnType<typeof formSchema>>) {
@@ -71,13 +69,11 @@ export default function Register() {
function handleRegister(username: string, password: string) {
httpClient
.initUser(username, password)
.then((res) => {
console.log('init user success: ', res);
.then(() => {
toast.success(t('register.initSuccess'));
router.push('/login');
})
.catch((err) => {
console.log('init user error: ', err);
.catch((err: Error) => {
toast.error(t('register.initFailed') + err.message);
});
}