feat(notion): implement Connector interface, markdown renderer, and DI registration

- Implement Validate, ListResources, FetchAll, FetchIncremental
- Per-record database sync with individual knowledge items
- Incremental sync with record-level change detection for databases
- Tree-structured resource listing with parent-child relationships
- Markdown renderer for all Notion block types including nested content
- Register NotionConnector in DI container
- Add unit tests for connector and markdown
This commit is contained in:
nullkey
2026-04-06 23:31:46 +08:00
committed by lyingbug
parent 9f35abafff
commit 2cd979e1ea
6 changed files with 1992 additions and 1 deletions
+4 -1
View File
@@ -52,6 +52,7 @@ import (
"github.com/Tencent/WeKnora/internal/database"
"github.com/Tencent/WeKnora/internal/datasource"
feishuConnector "github.com/Tencent/WeKnora/internal/datasource/connector/feishu"
notionConnector "github.com/Tencent/WeKnora/internal/datasource/connector/notion"
"github.com/Tencent/WeKnora/internal/event"
"github.com/Tencent/WeKnora/internal/handler"
"github.com/Tencent/WeKnora/internal/handler/session"
@@ -1277,8 +1278,10 @@ func initConnectorRegistry() *datasource.ConnectorRegistry {
// Register Feishu connector
_ = registry.Register(feishuConnector.NewConnector())
// Register Notion connector
_ = registry.Register(notionConnector.NewConnector())
// Future connectors will be registered here:
// _ = registry.Register(notionConnector.NewConnector())
// _ = registry.Register(confluenceConnector.NewConnector())
// _ = registry.Register(yuqueConnector.NewConnector())
// _ = registry.Register(githubConnector.NewConnector())