feat(channel): add QQ channel support and image message pipeline (#199)

* feat(channel): add qq adapter and outbound delivery

* feat(channel): ingest inbound qq messages

* feat(web): expose qq channel in management ui

* feat(channel): support qq attachment ingestion

* fix(mcp): fail read raw immediately for missing files

* fix(agent): parse inline image data into native image parts

* test(agent): align read_media tool tests with SDK options

* fix(channel): harden qq image delivery and reconnect loop

Avoid data URLs for qq channel images, reset reconnect backoff after healthy sessions, and fall back gracefully for malformed public image URLs.

* fix(channel): restore qq media delivery and target resolution

* fix(qq,mcp,agent): fix message/qq regressions and pass go lint

* fix(qq,agent): validate inline base64 and sync heartbeat seq

* fix(qq): validate remote voice mime for upload checks

* fix(qq): fall back intents and restore adapter wiring

* fix(qq): prevent final text leakage and dedupe persisted inbound query
This commit is contained in:
Ringo.Typowriter
2026-03-07 17:12:06 +08:00
committed by GitHub
parent 05d2240c16
commit e6a6dbe3f6
42 changed files with 4825 additions and 64 deletions
+6
View File
@@ -48,6 +48,9 @@ func TestNormalizeMime(t *testing.T) {
if got != "image/jpeg" {
t.Fatalf("NormalizeMime unexpected result: %q", got)
}
if got := NormalizeMime("file"); got != "" {
t.Fatalf("NormalizeMime should drop invalid mime token, got %q", got)
}
}
func TestMimeFromDataURL(t *testing.T) {
@@ -67,6 +70,9 @@ func TestResolveMime(t *testing.T) {
if got := ResolveMime(media.MediaTypeFile, "application/octet-stream", "application/pdf"); got != "application/pdf" {
t.Fatalf("ResolveMime file unexpected result: %q", got)
}
if got := ResolveMime(media.MediaTypeFile, "file", "text/plain"); got != "text/plain" {
t.Fatalf("ResolveMime should prefer sniffed mime for invalid source token, got %q", got)
}
if got := ResolveMime(media.MediaTypeImage, "", ""); got != "application/octet-stream" {
t.Fatalf("ResolveMime empty unexpected result: %q", got)
}