Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Update kernel HTTP User-Agent

Daniel85ad37af0aa9
diff --git a/kernel/util/working.go b/kernel/util/working.go
index 354b922c73..df22baddc1 100644
--- a/kernel/util/working.go
+++ b/kernel/util/working.go
@@ -24,6 +24,7 @@ import (
"mime"
"os"
"path/filepath"
+ "runtime"
"strconv"
"strings"
"sync"
@@ -88,7 +89,7 @@ func Boot() {
msStoreFilePath := filepath.Join(WorkingDir, "ms-store")
ISMicrosoftStore = gulu.File.IsExist(msStoreFilePath)
- UserAgent = UserAgent + " " + Container
+ UserAgent = UserAgent + " " + Container + "/" + runtime.GOOS
httpclient.SetUserAgent(UserAgent)
initWorkspaceDir(*workspacePath)
diff --git a/kernel/util/working_mobile.go b/kernel/util/working_mobile.go
index 823b7a884b..4c11c4e140 100644
--- a/kernel/util/working_mobile.go
+++ b/kernel/util/working_mobile.go
@@ -20,6 +20,7 @@ import (
"math/rand"
"os"
"path/filepath"
+ "runtime"
"time"
"github.com/88250/gulu"
@@ -35,7 +36,7 @@ func BootMobile(container, appDir, workspaceBaseDir, lang string) {
initHttpClient()
ServerPort = FixedPort
Container = container
- UserAgent = UserAgent + " " + Container
+ UserAgent = UserAgent + " " + Container + "/" + runtime.GOOS
httpclient.SetUserAgent(UserAgent)
Lang = lang