An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 集市包下载进度没有展现 https://github.com/siyuan-note/siyuan/issues/6862
Liang Ding4cea235f9f77
diff --git a/kernel/bazaar/package.go b/kernel/bazaar/package.goindex d69d57eefb..e220abbfc7 100644--- a/kernel/bazaar/package.go+++ b/kernel/bazaar/package.go@@ -305,22 +305,21 @@ func downloadPackage(repoURLHash string, pushProgress bool, systemID string) (darepoURLHash = strings.TrimPrefix(repoURLHash, "https://github.com/")u := util.BazaarOSSServer + "/package/" + repoURLHashbuf := &bytes.Buffer{}- resp, err := httpclient.NewBrowserRequest().SetOutput(buf).SetDownloadCallback(func(info req.DownloadInfo) {+ resp, err := req.C().+ SetUserAgent(util.UserAgent).+ SetTimeout(30 * time.Second).+ DisableInsecureSkipVerify().+ R().SetRetryCount(1).+ SetOutput(buf).SetDownloadCallback(func(info req.DownloadInfo) {if pushProgress {- util.PushDownloadProgress(pushID, float32(info.DownloadedSize)/float32(info.Response.ContentLength))+ progress := float32(info.DownloadedSize) / float32(info.Response.ContentLength)+ logging.LogDebugf("downloading bazaar package [%d]", progress)+ util.PushDownloadProgress(pushID, progress)}}).Get(u)if nil != err {- u = util.BazaarOSSServer + "/package/" + repoURLHash- resp, err = httpclient.NewBrowserRequest().SetOutput(buf).SetDownloadCallback(func(info req.DownloadInfo) {- if pushProgress {- util.PushDownloadProgress(pushID, float32(info.DownloadedSize)/float32(info.Response.ContentLength))- }- }).Get(u)- if nil != err {- logging.LogErrorf("get bazaar package [%s] failed: %s", u, err)- return nil, errors.New("get bazaar package failed")- }+ logging.LogErrorf("get bazaar package [%s] failed: %s", u, err)+ return nil, errors.New("get bazaar package failed")}if 200 != resp.StatusCode {logging.LogErrorf("get bazaar package [%s] failed: %d", u, resp.StatusCode)