Skip to content

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

:art: Refresh block updated time when updating task list item marker (#17529)

Jiachenge9f92d2a0616
diff --git a/kernel/api/block_op.go b/kernel/api/block_op.go
index 94487d9057..7ee23b74e0 100644
--- a/kernel/api/block_op.go
+++ b/kernel/api/block_op.go
@@ -73,6 +73,8 @@ func buildUpdatedTaskListItemBlockDOM(id, marker string, luteEngine *lute.Lute)
markerNode.TaskListItemMarker = liMarker
markerNode.TaskListItemChecked = ' ' != markerNode.TaskListItemMarker
+ li.SetIALAttr("updated", util.CurrentTimeSecondsStr())
+
return luteEngine.RenderNodeBlockDOM(li), nil
}
@@ -107,11 +109,7 @@ func updateTaskListItemMarker(c *gin.Context) {
transactions := []*model.Transaction{
{
DoOperations: []*model.Operation{
- {
- Action: "update",
- ID: id,
- Data: data,
- },
+ {Action: "update", ID: id, Data: data},
},
},
}
@@ -172,11 +170,7 @@ func batchUpdateTaskListItemMarker(c *gin.Context) {
return
}
- ops = append(ops, &model.Operation{
- Action: "update",
- ID: id,
- Data: data,
- })
+ ops = append(ops, &model.Operation{Action: "update", ID: id, Data: data})
}
tx := &model.Transaction{DoOperations: ops}