Commit a0aebdd
feat: Auto-detect transport type from config files
When launching the inspector with --config, automatically set the transport
dropdown and server URL based on the config file contents. This eliminates
the need to manually switch between stdio/sse/streamable-http in the UI.
- Use discriminated union for ServerConfig to properly type different transports
- Detect transport type and URL from config, pass via query params
- Maintain backwards compatibility for configs without explicit 'type' field
- Add comprehensive tests for the new functionality
Improves UX by making the config file the single source of truth for
server settings.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent fd0b962 commit a0aebdd
2 files changed
+81
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
| |||
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
77 | 96 | | |
78 | 97 | | |
79 | 98 | | |
| |||
217 | 236 | | |
218 | 237 | | |
219 | 238 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
226 | 266 | | |
227 | 267 | | |
228 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
17 | 24 | | |
18 | 25 | | |
19 | 26 | | |
| |||
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
27 | 40 | | |
28 | 41 | | |
29 | 42 | | |
| |||
123 | 136 | | |
124 | 137 | | |
125 | 138 | | |
| 139 | + | |
| 140 | + | |
126 | 141 | | |
127 | 142 | | |
128 | 143 | | |
| |||
140 | 155 | | |
141 | 156 | | |
142 | 157 | | |
| 158 | + | |
| 159 | + | |
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
| |||
173 | 190 | | |
174 | 191 | | |
175 | 192 | | |
| 193 | + | |
| 194 | + | |
176 | 195 | | |
177 | 196 | | |
178 | 197 | | |
| |||
187 | 206 | | |
188 | 207 | | |
189 | 208 | | |
| 209 | + | |
| 210 | + | |
190 | 211 | | |
191 | 212 | | |
192 | 213 | | |
| |||
208 | 229 | | |
209 | 230 | | |
210 | 231 | | |
| 232 | + | |
| 233 | + | |
211 | 234 | | |
212 | 235 | | |
213 | 236 | | |
| |||
233 | 256 | | |
234 | 257 | | |
235 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
236 | 263 | | |
237 | 264 | | |
238 | 265 | | |
| |||
292 | 319 | | |
293 | 320 | | |
294 | 321 | | |
| 322 | + | |
| 323 | + | |
295 | 324 | | |
296 | 325 | | |
297 | 326 | | |
| |||
0 commit comments