File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
core/src/main/resources/genius/zh/code
java/src/main/kotlin/cc/unitmesh/idea/util Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -105,10 +105,19 @@ Here is an example output to the USER:
105
105
//..
106
106
</tool.response2>
107
107
<you.answer3>
108
+ // 当你获取到了足够的上下文信息后,你应该对系统的现状做一个总结,然后提供迁移方案。
109
+ 现在我已经了解了项目的目录结构和组件列表,您当前使用的是 xx 框架,项目的规模适中,依赖关系较为简单。如下是使用 C4 架构模型(Context-Container-Component-Code)
110
+ 生成的项目架构图:
111
+
112
+ ```mermaid
113
+ // xxx
114
+ ```
115
+ </you.answer3>
116
+ <you.answer4>
108
117
// 根据先前的信息,你得考虑是否需要调整迁移计划。
109
118
// 在手动修改代码之前,你应该考虑各种自动化工具的可能性,比如 Java 里的 OpenRewrite (直接生成 Yaml Receipt 即可),JS 里的 jscodeshift(生成 JS 代码即可)
110
119
// 在获取到足够的信息后,你可以开始提供迁移方案;由于用户使用的是 IDEA,所以需要考虑相关的能力,比如修改完 build.gradle.kts 后,是否需要同步到 IDEA 中。
111
- 现在我已经了解了项目的目录结构和组件列表, 接下来我将为您提供迁移方案。我将先使用 Mermaid 生成迁移方案图:
120
+ 接下来我将为您提供迁移方案。我将先使用 Mermaid 生成迁移方案图:
112
121
```mermaid
113
122
//
114
123
```
@@ -118,19 +127,19 @@ Here is an example output to the USER:
118
127
/run:build --refresh-dependencies [注释:需要,用户先打 patch,再刷新项目依赖]
119
128
</devin>
120
129
121
- </you.answer3 >
122
- <user.answer3 >
130
+ </you.answer4 >
131
+ <user.answer4 >
123
132
//xxx
124
- </user.answer3 >
125
- <your.answer4 >
133
+ </user.answer4 >
134
+ <your.answer5 >
126
135
// ... 优先使用 DevIns 指令来修改代码和提供范例
127
136
现在,我将读取 xx 文件,然后为您提供迁移示例:
128
137
<devin>
129
138
```patch
130
139
//
131
140
```
132
141
</devin>
133
- </your.answer4 >
142
+ </your.answer5 >
134
143
</example>
135
144
<example id="2">
136
145
<user.question>
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ object JavaCallHelper {
23
23
method.accept(object : JavaRecursiveElementVisitor () {
24
24
override fun visitMethodCallExpression (expression : PsiMethodCallExpression ) {
25
25
super .visitMethodCallExpression(expression)
26
- calledMethods.add(expression.resolveMethod() ? : return )
26
+ val resolveMethod = runReadAction { expression.resolveMethod() }
27
+ calledMethods.add(resolveMethod ? : return )
27
28
}
28
29
})
29
30
You can’t perform that action at this time.
0 commit comments