Commit 938b255
* fix: display only enabled tools in startup table (#171)
This commit fixes issue #171 and consolidates tool management into a
single registry, eliminating code duplication.
## Changes
1. **Fixed Issue #171**: Startup table now correctly shows only enabled tools
- Renamed ToolRegistry.getToolsForSource() → getEnabledToolConfigs()
- Updated getToolsForSource() in tool-metadata.ts to respect registry
2. **Unified tool handling**: Eliminated separate code paths for built-in vs custom tools
- Refactored getToolsForSource() to use uniform iteration pattern
- Single loop processes all tool types consistently
3. **Consolidated validation**: Removed CustomToolRegistry entirely
- Moved all validation logic into ToolRegistry
- Deleted custom-tool-registry.ts (220 lines)
- Simplified server initialization
## Impact
- Net reduction: 77 lines removed
- Single source of truth for all tool management
- All 357 unit tests pass
- Backward compatible
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: initialize ToolRegistry in sources.integration.test.ts
The sources API integration test was failing because it didn't initialize
the ToolRegistry before making API calls. The test now properly initializes
the registry with the fixture config in beforeAll.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent a8474d9 commit 938b255
File tree
6 files changed
+208
-280
lines changed- src
- api/__tests__
- tools
- utils
6 files changed
+208
-280
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | 110 | | |
130 | 111 | | |
131 | 112 | | |
| |||
135 | 116 | | |
136 | 117 | | |
137 | 118 | | |
138 | | - | |
| 119 | + | |
139 | 120 | | |
140 | 121 | | |
141 | 122 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
0 commit comments