fix(canvas): 创作工作台 - 恢复连续对话并完善附件、媒体占位与生成分辨率

Fixes #231

Fixes #233
This commit is contained in:
ddCat committed 2026-08-15 22:01:42 +08:00
1 parent 11d9d469f5
commit 7804574f9f
15 files changed
+753 -115

No files matched your search

@@ -62,3 +62,23 @@ func TestValidateImageTaskEnforcesGPTImage2CustomSizeLimits(t *testing.T) {
})
}
}
func TestDefaultVideoCapabilityUsesProtocolSpecificResolutionTiers(t *testing.T) {
tests := map[string][]string{
"newapi-channel-2": {"480p", "720p", "1080p", "1440p", "2160p"},
"volcengine-ark-video": {"480p", "720p", "1080p"},
"volcengine-jimeng-video": {"720p"},
"gemini-veo": {"720p", "1080p"},
}
for protocol, want := range tests {
t.Run(protocol, func(t *testing.T) {
profile := DefaultModelCapabilityConfigForModel(protocol, "")
if profile == nil || profile.Video == nil {
t.Fatalf("DefaultModelCapabilityConfigForModel(%q) video profile = nil", protocol)
}
if fmt.Sprint(profile.Video.Resolutions) != fmt.Sprint(want) {
t.Fatalf("resolutions = %v, want %v", profile.Video.Resolutions, want)
}
})
}
}