update condition save

This commit is contained in:
Admin 2025-08-07 14:00:39 +07:00
parent 5fb2658571
commit 1ec0700a5d
3 changed files with 40 additions and 36 deletions

View File

@ -12,8 +12,12 @@ dist
dist-ssr
*.local
.env
.env.*
.env.development.local
.env.test.local
.env.production.local
.env.local
# Editor directories and files
.vscode/*

File diff suppressed because one or more lines are too long

View File

@ -359,26 +359,26 @@ export class ContentService {
await typeingService.send(message);
// Sroll xuống
this.service._scrollToBottomByXPath();
// // Sroll xuống
// this.service._scrollToBottomByXPath();
const initialMessages = await this._waitForMessagesToAppear(3000); // Đợi có item đầu tiên
console.log("Initial messages:", initialMessages);
// const initialMessages = await this._waitForMessagesToAppear(3000); // Đợi có item đầu tiên
// console.log("Initial messages:", initialMessages);
const newMessages = await this._waitForNewMessages(initialMessages, 3000);
console.log("New messages appeared:", newMessages);
// const newMessages = await this._waitForNewMessages(initialMessages, 3000);
// console.log("New messages appeared:", newMessages);
await this._waitToloadMessages();
// await this._waitToloadMessages();
// Lấy hết message mới nhất
const data = this.service.extractAllMessages();
// // Lấy hết message mới nhất
// const data = this.service.extractAllMessages();
// Gửi lên server cập nhật
this.port.postMessage({
type: "socket-response",
event: EVENTS.RECEIVE_CONVERSATION,
data,
} as IMsg<any>);
// // Gửi lên server cập nhật
// this.port.postMessage({
// type: "socket-response",
// event: EVENTS.RECEIVE_CONVERSATION,
// data,
// } as IMsg<any>);
});
}
@ -417,26 +417,26 @@ export class ContentService {
await typeingService.send(message);
if (!initialMessages) return;
// if (!initialMessages) return;
// Sroll xuống
this.service._scrollToBottomByXPath();
// // Sroll xuống
// this.service._scrollToBottomByXPath();
// Theo dỗi lấy detech new message
const newMessages = await this._waitForNewMessages(initialMessages, 3000);
console.log("New messages appeared:", newMessages);
// // Theo dỗi lấy detech new message
// const newMessages = await this._waitForNewMessages(initialMessages, 3000);
// console.log("New messages appeared:", newMessages);
await this._waitToloadMessages();
// await this._waitToloadMessages();
// Lấy hết message mới nhất
const data = this.service.extractAllMessages();
// // Lấy hết message mới nhất
// const data = this.service.extractAllMessages();
// Gửi lên server cập nhật
this.port.postMessage({
type: "socket-response",
event: EVENTS.RECEIVE_CONVERSATION,
data,
} as IMsg<any>);
// // Gửi lên server cập nhật
// this.port.postMessage({
// type: "socket-response",
// event: EVENTS.RECEIVE_CONVERSATION,
// data,
// } as IMsg<any>);
});
}