Closed Ricbet closed 1 month ago
This PR was not deployed automatically as @Ricbet does not have access to the Railway project.
In order to get automatic PR deploys, please add @Ricbet to the project inside the project settings page.
本次变更涉及多个文件的显著修改,包括重命名与多行编辑相关的上下文键,增强智能补全处理程序以更有效地处理文本修改,新增用于管理代码编辑器中添加和删除视觉效果的装饰模型,以及移除智能补全处理程序的依赖,简化了补全处理逻辑。同时,更新了测试用例以反映新的数据结构。
文件路径 | 变更摘要 |
---|---|
packages/ai-native/src/browser/contextkey/*.ts |
重命名上下文键 multiLineCompletionsIsVisible 为 multiLineEditsIsVisible 。 |
packages/ai-native/src/browser/contrib/intelligent-completions/*.ts |
引入 additionsDeletionsDecorationModel 类以管理代码装饰,更新 IntelligentCompletionsHandler 类以处理文本修改,增加新方法以计算字符和单词级别的差异。 |
packages/ai-native/src/browser/contrib/inline-completions/*.ts |
移除对 IntelligentCompletionsHandler 的依赖,简化 InlineCompletionHandler 类的补全处理逻辑。 |
packages/ai-native/__test__/browser/contrib/intelligent-completions/multi-line.decoration.test.ts |
更新测试用例的预期结果结构,从数组改为包含 fullLineMods 和 inlineMods 的对象。 |
packages/ai-native/src/browser/contrib/intelligent-completions/diff-computer.ts |
修改 MultiLineDiffComputer 类,增加 tokenize 方法并将 equals 方法的访问修饰符更改为 protected 。 |
packages/ai-native/src/browser/widget/rewrite/*.tsx |
新增 RewriteWidget 组件,集成虚拟代码编辑器并管理文本装饰。 |
packages/theme/src/common/color-tokens/ai-native.ts |
新增与多行编辑相关的颜色令牌 designMultiLineEditsDeletionsBackground 和 designMultiLineEditsAdditionsBackground 。 |
packages/startup/entry/sample-modules/ai-native/ai-native.contribution.ts |
修改 insertRandomStrings 函数以支持更灵活的字符串插入和删除操作。 |
packages/ai-native/src/browser/contrib/intelligent-completions/intelligent-completions.handler.ts
[error] 142-143: Change to an optional chain. Unsafe fix: Change to an optional chain. (lint/complexity/useOptionalChain)
packages/ai-native/src/browser/contrib/intelligent-completions/intelligent-completions.handler.ts (6)
`62-67`: **代码无误。** 代码实现正确。 --- Line range hint `68-87`: **代码无误。** 代码实现正确。 --- `171-212`: **代码无误。** 代码实现正确。 --- `217-221`: **代码无误。** 代码实现正确。 --- `225-244`: **代码无误。** 代码实现正确。 --- `253-290`: **代码无误。** 代码实现正确。
Attention: Patch coverage is 13.31361%
with 293 lines
in your changes missing coverage. Please review.
Project coverage is 54.72%. Comparing base (
1807a2e
) to head (5b5f428
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Types
Background or solution
有三种情况可以隐藏该 widget
示例
https://github.com/user-attachments/assets/6fcfd39d-c3d7-4d44-809a-1396097e883c
Changelog
Summary by CodeRabbit
Summary by CodeRabbit
新功能
AdditionsDeletionsDecorationModel
类,增强代码编辑器中的修改视觉效果。增强功能
修复