fix(canvas): 画布引用 - 统一角色与图片编号并保持生成资源顺序

This commit is contained in:
ddcat666 committed 2026-10-08 14:20:45 +08:00
1 parent ef82ca1b62
commit 9ef10b7b2d
12 files changed
+368 -130

No files matched your search

@@ -47,7 +47,7 @@ func TestCloudAgentMediaReferencePrompt(t *testing.T) {
}
}
func TestCloudAgentMediaComposerPromptSeparatesCharacterAndImageSlots(t *testing.T) {
func TestCloudAgentMediaComposerPromptUsesUnifiedImageSlots(t *testing.T) {
refs := map[string]any{
"referenceImages": []any{
map[string]any{"storageKey": "resource:character", "canvasReferenceKind": "character"},
@@ -57,7 +57,7 @@ func TestCloudAgentMediaComposerPromptSeparatesCharacterAndImageSlots(t *testing
"referenceAudios": []any{map[string]any{"storageKey": "resource:voice"}},
}
prompt := "@图片1、@图片2、@图片3 和 @音频1"
want := "@角色1、@图片1、@角色2 和 @音频1"
want := "@角色1、@图片2、@角色3 和 @音频1"
if got := cloudAgentMediaComposerPrompt(prompt, refs); got != want {
t.Fatalf("composer prompt = %q, want %q", got, want)
}