Commit 0f5fd12
committed
fix(mpp-idea): fix prompt enhancement functionality
1. Add replaceText() method to IdeaDevInInput for setting text content
- Renamed from setText() to avoid conflict with EditorTextField.setText()
- Uses WriteCommandAction for proper document modification
2. Fix prompt enhancement in IdeaDevInInputArea:
- Use IntelliJ Logger instead of KLogger (not available in mpp-idea)
- Move logger to file-level to avoid Composable context issues
- Use Dispatchers.IO for LLM calls
- Use ApplicationManager.invokeLater for EDT updates
- Add proper logging for debugging
3. Add logging to IdeaPromptEnhancer:
- Log enhancement progress and results
- Log model configuration and LLM response details
- Log errors with stack traces1 parent 1b647b3 commit 0f5fd12
File tree
3 files changed
+61
-8
lines changed- mpp-idea/src/main/kotlin/cc/unitmesh/devins/idea
- editor
- toolwindow
3 files changed
+61
-8
lines changedLines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
245 | 256 | | |
246 | 257 | | |
247 | 258 | | |
| |||
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
| 39 | + | |
| 40 | + | |
35 | 41 | | |
| 42 | + | |
36 | 43 | | |
37 | 44 | | |
38 | 45 | | |
39 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
40 | 52 | | |
41 | 53 | | |
42 | 54 | | |
| |||
46 | 58 | | |
47 | 59 | | |
48 | 60 | | |
49 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
50 | 70 | | |
| 71 | + | |
51 | 72 | | |
52 | 73 | | |
53 | 74 | | |
| |||
Lines changed: 27 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
20 | 23 | | |
| 24 | + | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
| |||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
180 | 186 | | |
181 | 187 | | |
182 | 188 | | |
| 189 | + | |
| 190 | + | |
183 | 191 | | |
184 | 192 | | |
185 | | - | |
| 193 | + | |
186 | 194 | | |
| 195 | + | |
187 | 196 | | |
188 | 197 | | |
189 | | - | |
190 | | - | |
191 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
192 | 211 | | |
193 | 212 | | |
194 | | - | |
| 213 | + | |
195 | 214 | | |
196 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
197 | 218 | | |
198 | 219 | | |
199 | 220 | | |
| |||
0 commit comments