Commit bd1aa7b
committed
refactor(@angular/cli): add logging and HTML removal to doc search tool
This commit enhances the `search_documentation` MCP tool by improving its error handling and the quality of the data it returns.
The key changes are:
- **Error Logging:** The content fetching logic now logs a warning if it fails to retrieve or parse the documentation page, providing better visibility for debugging without crashing the tool.
- **HTML Removal:** The fetched HTML content now has all tags removed, providing the AI with clean, plain-text content. This reduces noise, lowers the token count, and improves the quality of the input for the language model.1 parent c3dd67e commit bd1aa7b
1 file changed
+27
-9
lines changedLines changed: 27 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
136 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
| 141 | + | |
| 142 | + | |
139 | 143 | | |
140 | | - | |
141 | | - | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| |||
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
178 | 196 | | |
179 | 197 | | |
180 | 198 | | |
| |||
0 commit comments