fix(teams): show task_number in create result and allow search to satisfy gate

This commit is contained in:
viettranx committed 2026-03-17 17:11:22 +07:00
1 parent de2eca9acb
commit 6106d3d04f
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -185,7 +185,7 @@ func (t *TeamTasksTool) executeCreate(ctx context.Context, args map[string]any)
if err := t.manager.teamStore.AssignTask(ctx, task.ID, assigneeID, team.ID); err != nil {
slog.Warn("executeCreate: fallback assign failed", "task_id", task.ID, "error", err)
} else {
t.manager.broadcastTeamEvent(protocol.EventTeamTaskAssigned, protocol.TeamTaskEventPayload{
t.manager.broadcastTeamEvent(protocol.EventTeamTaskDispatched, protocol.TeamTaskEventPayload{
TeamID: team.ID.String(),
TaskID: task.ID.String(),
TaskNumber: task.TaskNumber,
@@ -203,7 +203,7 @@ func (t *TeamTasksTool) executeCreate(ctx context.Context, args map[string]any)
}
}
return NewResult(fmt.Sprintf("Task created: %s (id=%s, identifier=%s, status=%s)", subject, task.ID, task.Identifier, status))
return NewResult(fmt.Sprintf("Task created: %s (id=%s, task_number=%d, status=%s)", subject, task.ID, task.TaskNumber, status))
}
func (t *TeamTasksTool) executeComment(ctx context.Context, args map[string]any) *Result {
+1 -1
View File
@@ -169,7 +169,7 @@ func (t *TeamTasksTool) executeList(ctx context.Context, args map[string]any) *R
ptd.MarkListed()
}
tasks, err := t.manager.teamStore.ListTasks(ctx, team.ID, "priority", statusFilter, filterUserID, "", listChatID, offset)
tasks, err := t.manager.teamStore.ListTasks(ctx, team.ID, "priority", statusFilter, filterUserID, "", listChatID, 0, offset)
if err != nil {
return ErrorResult("failed to list tasks: " + err.Error())
}