feat(knowledge): enhance activity logging for FAQ imports

- Added new actions for FAQ import lifecycle: `faq.import_started`, `faq.import_completed`, and `faq.import_failed`.
- Updated activity details to include success, failure, and skipped counts for FAQ imports.
- Enhanced UI to display additional activity information, including filtering options and clearer summaries.
- Implemented tests to validate the new FAQ import outcomes and activity details.

This commit improves the tracking and visibility of FAQ import activities within the knowledge base, ensuring better audit trails and user feedback.
This commit is contained in:
wizardchen
2026-07-22 20:08:31 +08:00
committed by lyingbug
parent a3a0308b62
commit 5af8eae81d
14 changed files with 650 additions and 100 deletions
@@ -3419,7 +3419,7 @@ func (s *knowledgeService) ProcessKnowledgeListReparse(ctx context.Context, t *a
}
ctx = payload.Initiator.Apply(ctx)
taskID, _ := asynq.GetTaskID(ctx)
ctx = withKBActivityTask(ctx, taskID, "user")
ctx = withKBActivityTask(ctx, taskID, kbActivityTrigger(ctx))
logger.Infof(ctx, "Processing knowledge list reparse task for %d knowledge items", len(payload.KnowledgeIDs))