Skip to content

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

:art: Update av

Daniel2af611351538
diff --git a/kernel/api/transaction.go b/kernel/api/transaction.go
index e6e814a0f5..74c3f899fb 100644
--- a/kernel/api/transaction.go
+++ b/kernel/api/transaction.go
@@ -19,6 +19,7 @@ package api
import (
"fmt"
"net/http"
+ "strings"
"time"
"github.com/88250/gulu"
@@ -75,7 +76,14 @@ func performTransactions(c *gin.Context) {
}
func pushTransactions(app, session string, transactions []*model.Transaction) {
- evt := util.NewCmdResult("transactions", 0, util.PushModeBroadcastExcludeSelf)
+ pushMode := util.PushModeBroadcastExcludeSelf
+ if 0 < len(transactions) && 0 < len(transactions[0].DoOperations) {
+ if strings.Contains(strings.ToLower(transactions[0].DoOperations[0].Action), "attrview") {
+ pushMode = util.PushModeBroadcast
+ }
+ }
+
+ evt := util.NewCmdResult("transactions", 0, pushMode)
evt.AppId = app
evt.SessionId = session
evt.Data = transactions
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index a32f9414a1..93f0d4fe12 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -19,7 +19,6 @@ package model
import (
"errors"
"fmt"
-
"github.com/88250/lute/ast"
"github.com/88250/lute/parse"
"github.com/siyuan-note/logging"