Commit 272614a
committed
fix: address PR review comments for thread-safety and line number tracking
RendererModels.kt:
- Replace mutable idCounter with random-based ID generation for thread-safety
- Add documentation explaining copy() behavior with default parameters
AndroidCodeParserFactory.kt:
- Fix line number tracking in extractJvmImports, extractPythonImports, extractJsImports
to use actual line numbers from match positions instead of sequential counters
- Replace hashCode-based ID with deterministic composite ID (filePath:startLine:qualifiedName)
- Add comment explaining the approximate endLine calculation for regex-based parsing1 parent 7441c91 commit 272614a
File tree
2 files changed
+43
-14
lines changed- mpp-core/src
- androidMain/kotlin/cc/unitmesh/agent/tool/impl
- commonMain/kotlin/cc/unitmesh/agent/render
2 files changed
+43
-14
lines changedLines changed: 22 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | | - | |
92 | | - | |
| 93 | + | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
99 | | - | |
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
107 | | - | |
108 | | - | |
| 110 | + | |
| 111 | + | |
109 | 112 | | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| 117 | + | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
117 | 122 | | |
118 | | - | |
119 | | - | |
| 123 | + | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
| |||
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
128 | | - | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| 136 | + | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
135 | 141 | | |
136 | | - | |
137 | | - | |
| 142 | + | |
| 143 | + | |
138 | 144 | | |
139 | 145 | | |
140 | 146 | | |
| |||
228 | 234 | | |
229 | 235 | | |
230 | 236 | | |
| 237 | + | |
| 238 | + | |
231 | 239 | | |
232 | 240 | | |
233 | | - | |
| 241 | + | |
234 | 242 | | |
235 | 243 | | |
236 | 244 | | |
237 | 245 | | |
238 | 246 | | |
| 247 | + | |
| 248 | + | |
239 | 249 | | |
240 | 250 | | |
241 | 251 | | |
| |||
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
64 | 74 | | |
65 | 75 | | |
66 | 76 | | |
| |||
165 | 175 | | |
166 | 176 | | |
167 | 177 | | |
168 | | - | |
169 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
170 | 189 | | |
171 | 190 | | |
172 | 191 | | |
0 commit comments