fix(*): 创作工作台 - 修复 Agent、资源引用、附件交互与 Agnes 视频协议
This commit is contained in:
1 parent
0e33cc805e
commit
4675cf4c99
33 files changed
+1218
-239
No files matched your search
@@ -17,6 +17,7 @@ import (
|
||||
"time"
|
||||
|
||||
"infinite-canvas/backend/internal/model"
|
||||
"infinite-canvas/backend/internal/protocol"
|
||||
)
|
||||
|
||||
const testReferenceImageDataURL = "data:image/png;base64,aGVsbG8="
|
||||
@@ -76,6 +77,16 @@ func TestChannelAPIURLForProtocolUsesGeminiDefault(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestProtocolRequestURLCanResolveSameOriginRootPath(t *testing.T) {
|
||||
got, err := protocolRequestURL("https://apihub.agnes-ai.com/v1", protocol.RequestSpec{Path: "/agnesapi?video_id=video-1&model_name=agnes-video-2.5", OriginPath: true})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got != "https://apihub.agnes-ai.com/agnesapi?video_id=video-1&model_name=agnes-video-2.5" {
|
||||
t.Fatalf("root path URL = %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestSystemChannelIDFromBaseURLSupportsShortAndLegacyProxyPaths(t *testing.T) {
|
||||
for _, test := range []struct{ base, want string }{
|
||||
{base: "/api/channel-1", want: "channel-1"},
|
||||
|
||||
Reference in new issue
Block a user