feat: Implement auto-linked content updates in wiki page management
- Introduced UpdateAutoLinkedContent method to persist changes from machine-only link decorators without incrementing the version number, ensuring user-facing revisions remain consistent. - Updated existing methods to utilize the new auto-linked content update logic, enhancing the handling of cross-link injection and dead-link cleanup. - Enhanced the KnowledgeBase and WikiBrowser components to improve user experience during wiki operations, including status tracking and indexing indicators. - Added scheduling for wiki status probes to provide timely feedback on indexing processes after user-triggered actions.
This commit is contained in:
@@ -460,7 +460,7 @@ func (s *wikiIngestService) cleanDeadLinks(ctx context.Context, kbID string) {
|
||||
|
||||
if changed {
|
||||
p.Content = content
|
||||
if _, err := s.wikiService.UpdatePage(ctx, p); err != nil {
|
||||
if err := s.wikiService.UpdateAutoLinkedContent(ctx, p); err != nil {
|
||||
logger.Warnf(ctx, "wiki: failed to clean dead links in page %s: %v", p.Slug, err)
|
||||
} else {
|
||||
cleaned++
|
||||
@@ -509,7 +509,7 @@ func (s *wikiIngestService) injectCrossLinks(ctx context.Context, kbID string, a
|
||||
continue
|
||||
}
|
||||
p.Content = newContent
|
||||
if _, err := s.wikiService.UpdatePage(ctx, p); err != nil {
|
||||
if err := s.wikiService.UpdateAutoLinkedContent(ctx, p); err != nil {
|
||||
logger.Warnf(ctx, "wiki ingest: cross-link injection failed for %s: %v", p.Slug, err)
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user