Add OAuth provider runtime and providers UI

This commit is contained in:
lpf
2026-03-11 15:47:49 +08:00
parent d9872c3da7
commit 1c0e463d07
52 changed files with 9772 additions and 901 deletions

View File

@@ -18,6 +18,7 @@ import (
"regexp"
"runtime"
"sort"
"strconv"
"strings"
"sync"
"time"
@@ -772,6 +773,23 @@ func (al *AgentLoop) appendTaskAuditEvent(taskID string, msg bus.InboundMessage,
"provider": al.getSessionProvider(msg.SessionKey),
"model": al.model,
}
if msg.Metadata != nil {
if v := strings.TrimSpace(msg.Metadata["context_extra_chars"]); v != "" {
if n, err := strconv.Atoi(v); err == nil {
row["context_extra_chars"] = n
}
}
if v := strings.TrimSpace(msg.Metadata["context_ekg_chars"]); v != "" {
if n, err := strconv.Atoi(v); err == nil {
row["context_ekg_chars"] = n
}
}
if v := strings.TrimSpace(msg.Metadata["context_memory_chars"]); v != "" {
if n, err := strconv.Atoi(v); err == nil {
row["context_memory_chars"] = n
}
}
}
if al.ekg != nil {
al.ekg.Record(ekg.Event{
TaskID: taskID,