Skip to content

Commit f1027b2

Browse files
committed
docs: update for jetbrains
1 parent a737672 commit f1027b2

File tree

1 file changed

+38
-5
lines changed

1 file changed

+38
-5
lines changed

README.md

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,47 @@ BlogService 类信息,作为上下文(在注释中提供)提供给模型
320320
321321
## 步骤 1:构建 IDE 插件与度量体系设计
322322
323+
IDE、编辑器作为开发者的主要工具,其设计和学习成本也
324+
323325
相关资源:
324326
325-
- IDEA
326-
插件模板:[https://github.com/JetBrains/intellij-platform-plugin-template](https://github.com/JetBrains/intellij-platform-plugin-template)
327-
- VSCode
328-
插件模板:[https://code.visualstudio.com/api/get-started/your-first-extension](https://code.visualstudio.com/api/get-started/your-first-extension)
327+
- [IDEA 插件模板](https://github.com/JetBrains/intellij-platform-plugin-template)
328+
- [VSCode 插件模板](https://code.visualstudio.com/api/get-started/your-first-extension)
329329
330330
### JetBrains 插件
331331
332+
#### 补全模式:Inlay
333+
334+
在自动代码补全上,国内的厂商主要参考的是 GitHub Copilot 的实现,逻辑也不复杂,主要是:
335+
336+
```xml
337+
```
338+
339+
#### 日常辅助功能开发
340+
341+
结合
342+
343+
`<add-to-group group-id="ShowIntentionsGroup" relative-to-action="ShowIntentionActions" anchor="after"/>`
344+
345+
在不同的 Group中
346+
347+
| Group ID | AI 用途 | Description |
348+
|------------------------|---------------------|-----------------------------------------------------------------|
349+
| ShowIntentionsGroup | 代码重构、代码解释、代码生成、代码测试 | 用于在代码上下文中显示提示,以及通过 `Alt + Enter` 和 macOS 上的 `⌥ + Enter` 快捷键来访问。 |
350+
| ConsoleEditorPopupMenu | 修复错误 | 在控制台中显示的菜单,如程序运行结构的控制台。 |
351+
| Vcs.MessageActionGroup | 代码信息生成 | 用于在 VCS 中编写提交信息的菜单。 |
352+
| Vcs.Log.ContextMenu | 代码审查、代码解释、代码生成 | 用于在 VCS 中查看日志的菜单,可实现的功能:AI 检视代码、生成发布日志。 |
353+
| EditorPopupMenu | 皆可 | 右键菜单,还可添加对应的 ActionGroup |
354+
355+
在编写 ShowIntentionsGroup 时,我们可以参考 AutoDev 的实现来构建对应的 Group:
356+
357+
```xml
358+
<group id="AutoDevIntentionsActionGroup" class="cc.unitmesh.devti.intentions.IntentionsActionGroup"
359+
icon="cc.unitmesh.devti.AutoDevIcons.AI_COPILOT" searchable="false">
360+
<add-to-group group-id="ShowIntentionsGroup" relative-to-action="ShowIntentionActions" anchor="after"/>
361+
</group>
362+
```
363+
332364
### VSCode 插件
333365
334366
TODO
@@ -339,7 +371,8 @@ TODO
339371
340372
#### 开发者体验驱动
341373
342-
如微软和 GitHub 所构建的:[DevEx: What Actually Drives Productivity: The developer-centric approach to measuring and improving productivity](https://dl.acm.org/doi/10.1145/3595878)
374+
如微软和 GitHub
375+
所构建的:[DevEx: What Actually Drives Productivity: The developer-centric approach to measuring and improving productivity](https://dl.acm.org/doi/10.1145/3595878)
343376
344377
| - | 反馈回路 | 认知负荷 | 流畅状态 |
345378
|------------------|----------------------------------------------------------------|----------------------------------------------|-----------------------------------------------------|

0 commit comments

Comments
 (0)