feat(canvas): 前端重构与渠道兼容 - 重构工作区、任务中心等多页面,修复智能体对话与节点生成

Co-authored-by: sikongyue <3155157671@qq.com>
Original-PR: https://github.com/ddcat-ai/open-ai-canvas/pull/217
This commit is contained in:
爱笑的毛毛虫andsikongyue authored and GitHub committed 2026-08-14 12:01:21 +08:00
1 parent fb2a54b345
commit cfdf08d05f
37 files changed
+4599 -912

No files matched your search

+6 -1
View File
@@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"mime"
"net/http"
@@ -170,7 +171,11 @@ func writeCustomRelayError(c *gin.Context, resp *http.Response, apiKey string, m
c.Data(resp.StatusCode, "application/json; charset=utf-8", body)
return
}
fail(c, resp.StatusCode, errors.New("自定义渠道上游请求失败"))
snippet := strings.TrimSpace(string(body))
if len(snippet) > 200 {
snippet = snippet[:200] + "..."
}
fail(c, resp.StatusCode, fmt.Errorf("自定义渠道上游请求失败(%s)%s", resp.Status, snippet))
}
func copyCustomRelayStream(c *gin.Context, source io.Reader, apiKey string, maxBytes int64) {
+1 -1
View File
@@ -143,7 +143,7 @@ func (s *Service) publicResourceBaseURL() (*url.URL, error) {
}
raw := firstNonEmpty(setting.PublicBaseURL, os.Getenv("CANVAS_PUBLIC_BASE_URL"))
if raw == "" {
return nil, BadAuthRequest("服务器本地存储尚未配置服务器访问地址")
return nil, BadAuthRequest("服务器本地存储尚未配置服务器访问地址,请设置 CANVAS_PUBLIC_BASE_URL 或在存储设置中配置公网访问地址(或改用 OSS 存储)")
}
return validatePublicResourceBaseURL(raw)
}