feat: add message audit foundation
This commit is contained in:
@@ -167,6 +167,9 @@ func TestHandleDirectTextCallsQAAndRepliesAnswer(t *testing.T) {
|
||||
if req.Query != "hello world" {
|
||||
t.Fatalf("Query = %q, want trimmed 'hello world'", req.Query)
|
||||
}
|
||||
if req.MessageType != "text" {
|
||||
t.Fatalf("MessageType = %q, want text", req.MessageType)
|
||||
}
|
||||
if req.ExternalChatID != "" {
|
||||
t.Fatalf("ExternalChatID should be empty for direct, got %q", req.ExternalChatID)
|
||||
}
|
||||
@@ -531,6 +534,9 @@ func TestHandleRichTextMixedDownloadsAndCallsQAWithRealQuery(t *testing.T) {
|
||||
if !qa.called || len(qa.lastReq.Images) != 1 || qa.lastReq.Images[0] != image {
|
||||
t.Fatalf("QA request did not receive image: %+v", qa.lastReq)
|
||||
}
|
||||
if qa.lastReq.MessageType != "picture" {
|
||||
t.Fatalf("MessageType=%q, want raw DingTalk type picture", qa.lastReq.MessageType)
|
||||
}
|
||||
// Key assert: mixed uses real query, not default imageQuery
|
||||
if qa.lastReq.Query != "请分析这张截图中的错误" {
|
||||
t.Fatalf("richText mixed query=%q, want real query", qa.lastReq.Query)
|
||||
|
||||
Reference in New Issue
Block a user