Skip to content

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

:sparkles: Command Line Interface https://github.com/siyuan-note/siyuan/issues/17674

Danielbc5145412eca
diff --git a/kernel/cli/cmd/root.go b/kernel/cli/cmd/root.go
index 4ba504154d..41e17c43f0 100644
--- a/kernel/cli/cmd/root.go
+++ b/kernel/cli/cmd/root.go
@@ -67,7 +67,6 @@ var rootCmd = &cobra.Command{
util.Mode = "prod"
util.InitWorkspace(workspacePath, util.WorkingDir)
- os.MkdirAll(util.QueueDir, 0755)
logging.SetLogPath(filepath.Join(util.TempDir, "siyuan-cli.log"))
logging.SetLogToStdout(false)
diff --git a/kernel/util/working.go b/kernel/util/working.go
index c5ca9d471e..c2db796cd1 100644
--- a/kernel/util/working.go
+++ b/kernel/util/working.go
@@ -457,6 +457,11 @@ func initPathDir() {
logging.LogFatalf(logging.ExitCodeInitWorkspaceErr, "create data emojis folder [%s] failed: %s", emojis, err)
}
+ queueDir := filepath.Join(TempDir, "queue")
+ if err := os.MkdirAll(queueDir, 0755); err != nil && !os.IsExist(err) {
+ logging.LogFatalf(logging.ExitCodeInitWorkspaceErr, "create queue folder [%s] failed: %s", queueDir, err)
+ }
+
// Support directly access `data/public/*` contents via URL link https://github.com/siyuan-note/siyuan/issues/8593
public := filepath.Join(DataDir, "public")
if err := os.MkdirAll(public, 0755); err != nil && !os.IsExist(err) {