Compare commits

...

2 Commits

Author SHA1 Message Date
devops 85f3400076 chore: bump version to v0.2.38 [skip ci] 2026-06-09 23:12:40 +00:00
developer a5cbe98f25 fix: Chat-Messages Merge + Session-Key agent:iris:main
CI - Build & Test / Backend (.NET) (push) Successful in 23s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 16s
CI - Build & Test / Security Check (push) Successful in 3s
- fetchChatMessages merged statt replace (verhindert Poll-wipe)
- Chat/Send bereits korrekt via agentId=iris
- Chat/Messages nutzt jetzt agent:iris:main als Session-Key
- Cron-Job deaktiviert (verhinderte Selbst-Konversation)
2026-06-10 01:11:52 +02:00
3 changed files with 15 additions and 8 deletions
+1 -1
View File
@@ -1 +1 @@
0.2.37 0.2.38
+1 -1
View File
@@ -119,7 +119,7 @@ public class DashboardController(OpenClawGatewayClient gateway, ILogger<Dashboar
{ {
try try
{ {
var key = string.IsNullOrWhiteSpace(sessionKey) ? "iris" : sessionKey.Trim(); var key = string.IsNullOrWhiteSpace(sessionKey) ? "agent:iris:main" : sessionKey.Trim();
var messages = await gateway.GetSessionHistoryAsync(key, Math.Clamp(limit, 1, 200), Math.Max(0, offset)); var messages = await gateway.GetSessionHistoryAsync(key, Math.Clamp(limit, 1, 200), Math.Max(0, offset));
// Filter: only user and assistant messages (exclude tool/system) // Filter: only user and assistant messages (exclude tool/system)
+13 -6
View File
@@ -280,12 +280,19 @@ async function fetchChatMessages(): Promise<void> {
const res = await apiFetch('/api/dashboard/chat/messages?limit=50') const res = await apiFetch('/api/dashboard/chat/messages?limit=50')
if (!res.ok) return if (!res.ok) return
const data: DashboardChatMessage[] = await res.json() const data: DashboardChatMessage[] = await res.json()
chatMessages.value = data.map((msg, idx) => ({ // Merge instead of replace — only add messages not already present
id: `msg-${idx}`, const existingTexts = new Set(chatMessages.value.map(m => m.text))
sender: msg.role === 'assistant' ? 'iris' : 'user', const existingTimestamps = new Set(chatMessages.value.map(m => m.timestamp))
text: msg.content, for (const msg of data) {
timestamp: new Date(msg.timestamp).getTime(), const msgTime = new Date(msg.timestamp).getTime()
})) if (existingTexts.has(msg.content) && existingTimestamps.has(msgTime)) continue
chatMessages.value.push({
id: `msg-${msgTime}-${msg.role}`,
sender: msg.role === 'assistant' ? 'iris' : 'user',
text: msg.content,
timestamp: msgTime,
})
}
} catch { } catch {
// API unreachable keep current values // API unreachable keep current values
} }