소스 검색

Merge pull request #11307 from wangtunan/fix/stop_task_func_need_use_async_await_syntax

fix: stopTask func need use async/await syntax
Timothy Jaeryang Baek 5 달 전
부모
커밋
12101fd26d
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/lib/components/chat/Chat.svelte

+ 3 - 2
src/lib/components/chat/Chat.svelte

@@ -1693,9 +1693,10 @@
 		history.messages[responseMessage.id] = responseMessage;
 	};
 
-	const stopResponse = () => {
+	const stopResponse = async () => {
 		if (taskId) {
-			const res = stopTask(localStorage.token, taskId).catch((error) => {
+			const res = await stopTask(localStorage.token, taskId).catch((error) => {
+				toast.error(`${error}`);
 				return null;
 			});