|
2 | 2 |
|
3 | 3 | I'll help fix import statements that broke after moving or renaming files. |
4 | 4 |
|
5 | | -I'll use native tools to analyze your project systematically: |
| 5 | +## Strategic Thinking Process |
| 6 | + |
| 7 | +<think> |
| 8 | +To fix imports effectively, I need to consider: |
| 9 | + |
| 10 | +1. **Import Analysis** |
| 11 | + - What type of imports are broken (relative, absolute, aliased)? |
| 12 | + - Were files moved, renamed, or deleted? |
| 13 | + - Are there multiple possible matches for the import? |
| 14 | + - Could the import be from external packages? |
| 15 | + |
| 16 | +2. **Resolution Strategy** |
| 17 | + - Search for exact filename matches first |
| 18 | + - Check for similar names (might be typos) |
| 19 | + - Look for the exported symbols in other files |
| 20 | + - Consider if the import should be removed entirely |
| 21 | + |
| 22 | +3. **Project Import Patterns** |
| 23 | + - Does the project use path aliases (@/, ~/, etc)? |
| 24 | + - Are there barrel exports (index files)? |
| 25 | + - What's the convention for internal vs external imports? |
| 26 | + - Are there any import sorting rules? |
| 27 | + |
| 28 | +4. **Safety Considerations** |
| 29 | + - Could fixing this import break other imports? |
| 30 | + - Are there circular dependency risks? |
| 31 | + - Should I update all instances at once? |
| 32 | + - Do test files need different handling? |
| 33 | +</think> |
| 34 | + |
| 35 | +Based on this analysis, I'll use native tools to analyze your project systematically: |
6 | 36 | - **Glob tool** to find files with import patterns |
7 | 37 | - **Grep tool** to search for broken import references |
8 | 38 | - **Read tool** to analyze import syntax and context |
|
0 commit comments