mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-04 00:03:59 +00:00
fix(webui): capture all-channel chat history and correct input source
- handleChat now injects with source=webui so the LLM no longer sees cli as the input channel - subscribe to EventRawInput/EventAgentOutput to persist every conversation turn from all channels (cli/qq/webui), replacing the manual webui-only addChatMsg to avoid duplicates - ChatMsg gains a source field; GUI shows a channel badge for non-webui messages
This commit is contained in:
@ -371,6 +371,9 @@ function renderChat() {
|
||||
});
|
||||
}
|
||||
var body = rc + tcs + '<div class="text">' + c + '</div>';
|
||||
if (m.source && m.source !== 'webui') {
|
||||
body = '<div class="msg-source">' + escHtml(__('通道','Channel')) + ': ' + escHtml(m.source) + '</div>' + body;
|
||||
}
|
||||
if (role === 'system') {
|
||||
html += '<div class="msg msg-system"><div class="msg-bubble">' + body + '</div></div>';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user