Commit 4ff40ac
refactor: align snippet file ref handling with repository/files pattern
getSnippetFileRawContent now takes an explicit ref string instead of a
raw_url to parse. The ref-extraction logic is factored into a standalone
extractSnippetRef helper, resolved once at the call site rather than
once per file inside the fetch function.
get_snippet also gains an optional ref parameter (matching get_file_contents)
so callers can override the ref directly without relying on raw_url parsing.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent d378284 commit 4ff40ac
3 files changed
Lines changed: 86 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8380 | 8380 | | |
8381 | 8381 | | |
8382 | 8382 | | |
8383 | | - | |
8384 | | - | |
8385 | | - | |
| 8383 | + | |
| 8384 | + | |
| 8385 | + | |
8386 | 8386 | | |
8387 | | - | |
8388 | | - | |
8389 | | - | |
8390 | | - | |
8391 | | - | |
8392 | | - | |
8393 | | - | |
8394 | | - | |
| 8387 | + | |
8395 | 8388 | | |
8396 | 8389 | | |
8397 | 8390 | | |
| |||
8403 | 8396 | | |
8404 | 8397 | | |
8405 | 8398 | | |
8406 | | - | |
| 8399 | + | |
| 8400 | + | |
| 8401 | + | |
| 8402 | + | |
| 8403 | + | |
| 8404 | + | |
| 8405 | + | |
| 8406 | + | |
| 8407 | + | |
| 8408 | + | |
| 8409 | + | |
| 8410 | + | |
| 8411 | + | |
| 8412 | + | |
8407 | 8413 | | |
8408 | 8414 | | |
8409 | 8415 | | |
| |||
10570 | 10576 | | |
10571 | 10577 | | |
10572 | 10578 | | |
| 10579 | + | |
| 10580 | + | |
| 10581 | + | |
10573 | 10582 | | |
10574 | | - | |
10575 | | - | |
10576 | | - | |
10577 | | - | |
| 10583 | + | |
| 10584 | + | |
| 10585 | + | |
| 10586 | + | |
10578 | 10587 | | |
10579 | 10588 | | |
10580 | 10589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3353 | 3353 | | |
3354 | 3354 | | |
3355 | 3355 | | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
3356 | 3360 | | |
3357 | 3361 | | |
3358 | 3362 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
299 | 337 | | |
300 | 338 | | |
301 | 339 | | |
| |||
550 | 588 | | |
551 | 589 | | |
552 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
553 | 610 | | |
554 | 611 | | |
555 | 612 | | |
| |||
0 commit comments