:zap: [Enhance] Use data instead of attr to store message content
Browse files
apps/llm_mixer/js/chat_operator.js
CHANGED
@@ -95,9 +95,9 @@ export function update_message(json_chunks, content_displayer = null) {
|
|
95 |
}
|
96 |
if (content) {
|
97 |
console.log(content);
|
98 |
-
content_displayer.
|
99 |
-
"
|
100 |
-
content_displayer.
|
101 |
);
|
102 |
get_active_messager_list().messagers.slice(-1)[0].message.content +=
|
103 |
content;
|
|
|
95 |
}
|
96 |
if (content) {
|
97 |
console.log(content);
|
98 |
+
content_displayer.data(
|
99 |
+
"raw_content",
|
100 |
+
content_displayer.data("raw_content") + content
|
101 |
);
|
102 |
get_active_messager_list().messagers.slice(-1)[0].message.content +=
|
103 |
content;
|
apps/llm_mixer/js/messager.js
CHANGED
@@ -31,7 +31,7 @@ export class MessagerViewer {
|
|
31 |
.addClass("content-displayer")
|
32 |
.addClass(`chat-${this.message.role}`)
|
33 |
.append(this.message.content);
|
34 |
-
this.content_displayer.
|
35 |
}
|
36 |
create_button_group() {
|
37 |
this.button_group = $("<div>")
|
|
|
31 |
.addClass("content-displayer")
|
32 |
.addClass(`chat-${this.message.role}`)
|
33 |
.append(this.message.content);
|
34 |
+
this.content_displayer.data("raw_content", "");
|
35 |
}
|
36 |
create_button_group() {
|
37 |
this.button_group = $("<div>")
|