feat(tool): unify extension registry#38
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (25)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR integrates extension-provided tools into the assistant's tool execution pipeline. A ChangesExtension Tool Integration
Sequence DiagramsequenceDiagram
participant Runtime
participant newToolRegistry
participant Registry
participant ExtensionProvider
participant AssistantClient
participant toolSchema
Runtime->>newToolRegistry: newToolRegistry(cwd, extensions)
newToolRegistry->>Registry: tool.NewRegistry(cwd)
alt extensions provided
newToolRegistry->>Registry: RegisterExtensions(runner, definitions)
Registry->>ExtensionProvider: iterate extension.Tool definitions
Registry->>ExtensionProvider: NewExtensionExecutor(definition, runner)
end
newToolRegistry-->>Runtime: *tool.Registry
Runtime->>AssistantClient: modelCompletionRequest(registry)
AssistantClient->>AssistantClient: set CompletionRequest.ToolRegistry
AssistantClient->>toolSchema: responseTools(request)
toolSchema->>toolSchema: requestToolDefinitions(request)
alt registry present
toolSchema-->>toolSchema: use registry definitions
else
toolSchema-->>toolSchema: use global tool.AllDefinitions()
end
toolSchema-->>AssistantClient: []map[string]any tools
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
91b5010 to
04f5073
Compare
|



Summary
Validation
Stacked after #35.