refactor: Enhance wiki page management and index rebuilding

- Introduced a new method to list all wiki pages without pagination, facilitating index rebuilding and cross-linking.
- Updated the wiki ingest and retract processes to include document summaries, improving clarity in log entries and index updates.
- Enhanced the cleanup process for deleted knowledge, ensuring accurate summary retention and index regeneration.
- Streamlined the handling of page updates and deletions, optimizing the overall wiki management workflow.

These changes improve the efficiency and reliability of wiki content management and indexing.
This commit is contained in:
wizardchen
2026-04-08 16:50:38 +08:00
parent f00b2a176b
commit ec8a5fc392
5 changed files with 479 additions and 286 deletions
+4
View File
@@ -52,6 +52,10 @@ type WikiPageService interface {
// RebuildLinks re-parses all pages and rebuilds bidirectional link references.
RebuildLinks(ctx context.Context, kbID string) error
// ListAllPages retrieves all wiki pages in a knowledge base without pagination.
// Used for index rebuild, graph generation, cross-link injection, etc.
ListAllPages(ctx context.Context, kbID string) ([]*types.WikiPage, error)
// SearchPages performs full-text search over wiki pages.
SearchPages(ctx context.Context, kbID string, query string, limit int) ([]*types.WikiPage, error)
}