Skip to content

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

:art: Improve text https://github.com/siyuan-note/siyuan/issues/14414

Daniel06065475cdcf
diff --git a/kernel/job/cron.go b/kernel/job/cron.go
index 46214c9d55..c9a5825661 100644
--- a/kernel/job/cron.go
+++ b/kernel/job/cron.go
@@ -47,7 +47,9 @@ func StartCron() {
go every(24*time.Hour, model.AutoPurgeRepoJob)
go every(30*time.Minute, model.AutoCheckMicrosoftDefenderJob)
go every(24*time.Hour, model.ClearOutdatedHistoryDirJob)
- go every(7*time.Second, model.AutoConsumeShorthandsJob)
+ if util.ContainerAndroid == util.Container || util.ContainerIOS == util.Container || util.ContainerHarmony == util.Container {
+ go every(7*time.Second, model.AutoConsumeShorthandsJob)
+ }
}
func every(interval time.Duration, f func(), name ...string) {
diff --git a/kernel/model/shortcuts.go b/kernel/model/shortcuts.go
index 0b399f2368..8562b8660b 100644
--- a/kernel/model/shortcuts.go
+++ b/kernel/model/shortcuts.go
@@ -204,6 +204,10 @@ func MoveLocalShorthands(boxID string) (retIDs []string, err error) {
}
func consumeShorthands() {
+ if util.ContainerAndroid != util.Container && util.ContainerIOS != util.Container && util.ContainerHarmony != util.Container {
+ return
+ }
+
defer logging.Recover()
shorthandsDir := filepath.Join(util.ShortcutsPath, "shorthands")