Commit 6e5d421
refactor: fold BreadcrumbSource into KNOWN_AGENTS (#4)
## Summary
- Moves `breadcrumb_dir` and `breadcrumb_ext` fields directly into the
`Agent` struct, eliminating the separate `BreadcrumbSource` struct and
`SOURCES` constant
- Removes the `find_agent()` helper that matched agents by email prefix
— no longer needed since we iterate `KNOWN_AGENTS` directly
- Makes it easier to add breadcrumb support for new agents by keeping
all agent metadata in one place
- Simplifies the breadcrumb fallback section in README
Addresses
#3 (comment)
## Test plan
- [x] `cargo test` — all 16 tests pass
- [x] `./scripts/aittributor --debug` — breadcrumb fallback still works
correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent e8d5ca4 commit 6e5d421
4 files changed
+47
-53
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| 30 | + | |
| 31 | + | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
27 | 35 | | |
28 | 36 | | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | 40 | | |
31 | 41 | | |
32 | 42 | | |
33 | 43 | | |
| 44 | + | |
| 45 | + | |
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
| 51 | + | |
| 52 | + | |
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
42 | 56 | | |
43 | 57 | | |
| 58 | + | |
| 59 | + | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
47 | 63 | | |
48 | 64 | | |
| 65 | + | |
| 66 | + | |
49 | 67 | | |
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
53 | 71 | | |
| 72 | + | |
| 73 | + | |
54 | 74 | | |
55 | 75 | | |
56 | 76 | | |
57 | 77 | | |
58 | 78 | | |
| 79 | + | |
| 80 | + | |
59 | 81 | | |
60 | 82 | | |
61 | 83 | | |
62 | 84 | | |
63 | 85 | | |
| 86 | + | |
| 87 | + | |
64 | 88 | | |
65 | 89 | | |
66 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | 13 | | |
36 | 14 | | |
37 | 15 | | |
| |||
46 | 24 | | |
47 | 25 | | |
48 | 26 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 27 | | |
54 | 28 | | |
55 | 29 | | |
| |||
116 | 90 | | |
117 | 91 | | |
118 | 92 | | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
127 | 105 | | |
128 | 106 | | |
129 | | - | |
| 107 | + | |
130 | 108 | | |
131 | 109 | | |
132 | 110 | | |
133 | 111 | | |
134 | 112 | | |
135 | 113 | | |
136 | | - | |
| 114 | + | |
137 | 115 | | |
138 | 116 | | |
139 | | - | |
| 117 | + | |
140 | 118 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 119 | + | |
| 120 | + | |
148 | 121 | | |
| 122 | + | |
| 123 | + | |
149 | 124 | | |
150 | 125 | | |
151 | 126 | | |
| |||
156 | 131 | | |
157 | 132 | | |
158 | 133 | | |
159 | | - | |
160 | | - | |
| 134 | + | |
| 135 | + | |
161 | 136 | | |
162 | 137 | | |
163 | 138 | | |
| |||
0 commit comments