-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support editor action arguments #4254
base: main
Are you sure you want to change the base?
Conversation
Warning There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure. 🔧 eslint
warning [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options. 概述演练这个拉取请求包含了多个文件的修改,主要涉及编辑器命令服务、配置架构、本地化和首选项设置。主要变更包括扩展命令执行的灵活性、添加 Unicode 高亮的新配置选项、更新配置服务的方法,以及在不同语言中添加相应的本地化条目。这些修改旨在增强编辑器的配置和命令处理能力。 变更
可能相关的 PR
建议的标签
建议的审阅者
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/editor/src/browser/preference/schema.ts (1)
1449-1458
: Unicode 高亮配置的 Schema 定义完善!新增的 Schema 定义:
- 类型定义正确,使用 object 类型
- 默认值设置合理,使用空对象
- 包含了可本地化的描述文本
建议:考虑为这两个配置项添加具体的属性验证规则,以确保用户输入的值符合预期格式。
建议添加以下验证规则:
'editor.unicodeHighlight.allowedCharacters': { type: 'object', default: {}, + additionalProperties: { + type: 'boolean' + }, description: '%editor.configuration.unicodeHighlight.allowedCharacters%', }, 'editor.unicodeHighlight.allowedLocales': { type: 'object', default: {}, + additionalProperties: { + type: 'boolean' + }, description: '%editor.configuration.unicodeHighlight.allowedLocales%', },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
packages/editor/src/browser/monaco-contrib/command/command.service.ts
(2 hunks)packages/editor/src/browser/preference/schema.ts
(1 hunks)packages/i18n/src/common/editor/en-US.ts
(1 hunks)packages/i18n/src/common/editor/zh-CN.ts
(1 hunks)packages/monaco/src/browser/monaco.context-key.service.ts
(1 hunks)packages/preferences/src/browser/preference-settings.service.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/i18n/src/common/editor/zh-CN.ts
🔇 Additional comments (5)
packages/i18n/src/common/editor/en-US.ts (1)
3-6
: 本地化条目添加正确!
新增的 Unicode 高亮配置的本地化条目描述清晰准确。
packages/editor/src/browser/monaco-contrib/command/command.service.ts (2)
411-414
: 命令执行参数支持实现正确!
execute 方法现在正确地将参数传递给 runAction 方法。
425-429
: 动作运行方法更新合理!
runAction 方法已更新以支持可变参数,并正确传递给 action.run()。
packages/monaco/src/browser/monaco.context-key.service.ts (1)
64-65
: 配置服务扩展实现完善!
正确绑定了 updateValue 和 inspect 方法到 monacoConfigService,增强了配置服务的功能。
packages/preferences/src/browser/preference-settings.service.ts (1)
734-735
: 新增的 Unicode 高亮配置选项符合预期!
新增的两个配置项 editor.unicodeHighlight.allowedCharacters
和 editor.unicodeHighlight.allowedLocales
扩展了编辑器的 Unicode 高亮功能,使其更加灵活可配置。
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4254 +/- ##
==========================================
- Coverage 53.73% 53.72% -0.01%
==========================================
Files 1622 1622
Lines 98562 98564 +2
Branches 20150 20150
==========================================
- Hits 52958 52951 -7
- Misses 37900 37908 +8
- Partials 7704 7705 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Types
Background or solution
Changelog
Summary by CodeRabbit