Skip to content
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: upgrade opensumi to 3.6.0 #240

Merged
merged 2 commits into from
Dec 6, 2024
Merged

feat: upgrade opensumi to 3.6.0 #240

merged 2 commits into from
Dec 6, 2024

Conversation

wangxiaojuan
Copy link
Contributor

@wangxiaojuan wangxiaojuan commented Dec 3, 2024

Types

  • 🐛 Bug Fixes

Background or solution

ChangeLog

feat: 升级opensumi版本到3.6.0

Summary by CodeRabbit

  • 新特性

    • 更新了多个依赖项的版本,包括 opensumi@opensumi 系列包,提升了功能和稳定性。
    • 新增依赖 mobx,增强了状态管理能力。
    • 在差异查看器中启用了 AI 相关功能。
  • 文档

    • 更新了 define.json 文件中的版本号。
  • 修复

    • 更新了某些方法以支持 Promise 返回类型,改善了异步操作的处理。

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


sarah.wangxj seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@opensumi opensumi bot added the 🎨 feature label Dec 3, 2024
Copy link

coderabbitai bot commented Dec 3, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

此拉取请求对多个package.json文件进行了修改,主要更新了opensumi及相关依赖的版本号,从3.5.0提升至3.6.0。此外,@codeblitzjs/ide-code-api@codeblitzjs/ide-sumi-core包中还添加了新的依赖mobx。在ExtensionServiceClientImpl类中,getLanguagePackgetExtension方法的返回类型从同步更新为返回一个Promise,以增强异步处理能力。最后,define.json文件中的__OPENSUMI_VERSION__也进行了相应的版本更新。

Changes

文件路径 变更摘要
package.json 更新"opensumi"版本从3.5.03.6.0
packages/cli/package.json 更新"opensumi"版本从3.5.03.6.0,更新"@opensumi/ide-extension"版本从3.5.03.6.0
packages/code-api/package.json 添加新依赖"mobx": "^6.12.0"
packages/core/package.json 更新多个@opensumi依赖的版本从3.5.03.6.0
packages/sumi-core/package.json 更新多个@opensumi依赖的版本从3.5.03.6.0,添加新依赖"mobx": "^6.12.0"
packages/sumi-core/src/server/opensumi-extension/extension.service.client.ts 更新getLanguagePackgetExtension方法的返回类型为Promise
packages/toolkit/define.json 更新__OPENSUMI_VERSION__3.5.03.6.0

Possibly related PRs

Suggested reviewers

  • bytemain

📜 Recent review details

Configuration used: .coderabbit.yml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 8914b67 and d6771f2.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • packages/startup/src/diff-viewer/index.tsx (1 hunks)
🔇 Additional comments (1)
packages/startup/src/diff-viewer/index.tsx (1)

70-70: 请确认启用 AI 原生功能的影响

启用 AI 原生功能可能会带来新的特性和行为变化。建议:

  1. 验证此更改是否会影响现有功能
  2. 更新相关文档以反映新功能
  3. 考虑是否需要添加配置开关,允许用户控制此功能
✅ Verification successful

Let me generate additional scripts to check for AI native feature configurations and dependencies:


Based on the search results, I can now provide a final response:

启用 AI 原生功能的影响已确认安全

通过代码分析发现:

  1. 此配置是 OpenSumi 3.6.0 的标准功能,已有完整的实现
  2. 启用后会自动加载 AINativeModule 和 AINativeServerModule
  3. 相关功能已有默认配置和错误处理机制
  4. 代码中包含必要的 fallback 处理,不会因配置导致系统不稳定

建议继续保持 enable: true 的设置,这是升级 OpenSumi 3.6.0 的正常配置。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查是否有其他组件依赖此配置
rg "aiNative.*enable" 

# 检查是否存在相关文档
fd -g "**/docs/**/*.md" -x grep -l "aiNative"

Length of output: 65795


Script:

# Check for AI native feature configurations
ast-grep --pattern 'aiNative: {
  $$$
}'

# Search for AI native feature usage
rg "aiNative" -A 3 -B 3

# Check for any AI native related configuration files
fd -g "*config*.{json,js,ts}" -x grep -l "aiNative"

Length of output: 74768


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
packages/sumi-core/package.json (1)

33-33: 确认 mobx 依赖的必要性

与 packages/code-api/package.json 一样新增了 mobx 依赖。建议:

  1. 在 PR 描述中说明引入 mobx 的原因
  2. 确认是否所有需要 mobx 的包都已添加该依赖
📜 Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 4a12e25 and 8914b67.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • package.json (1 hunks)
  • packages/cli/package.json (1 hunks)
  • packages/code-api/package.json (1 hunks)
  • packages/core/package.json (1 hunks)
  • packages/sumi-core/package.json (1 hunks)
  • packages/sumi-core/src/server/opensumi-extension/extension.service.client.ts (1 hunks)
  • packages/toolkit/define.json (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/cli/package.json
  • packages/toolkit/define.json
🔇 Additional comments (5)
packages/code-api/package.json (1)

16-16: 验证新增的 mobx 依赖

新增了 mobx 依赖,请确认:

  1. 该依赖是否为 opensumi 3.6.0 的必需依赖
  2. 版本号是否与其他包中的 mobx 版本一致
✅ Verification successful

Let me gather more information to verify if mobx is a required dependency for opensumi 3.6.0.


mobx 依赖验证已完成

代码分析结果显示:

  • mobx 在两个包中使用相同版本 (^6.12.0)
  • mobx 被用于 extension-manager.service.tsgithub.service.ts 中的状态管理
  • 这些文件都使用了 mobx 的核心功能(observable, makeObservable 等)

由于:

  1. mobx 版本在所有包中保持一致
  2. 代码中确实需要使用 mobx 的状态管理功能
  3. mobx 是 opensumi 生态系统中常用的状态管理库

因此新增的 mobx 依赖是合理的。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查所有 package.json 中的 mobx 版本
fd package.json --exec grep -l "mobx" {} \; | xargs cat | jq '.dependencies.mobx'

Length of output: 102


Script:

#!/bin/bash
# 检查代码中 mobx 的使用情况
rg "from 'mobx'" -A 2

# 检查 opensumi 相关依赖
fd package.json --exec grep -l "opensumi" {} \; | xargs cat | jq '.dependencies["@opensumi/ide-core-browser"]'

Length of output: 883

packages/sumi-core/package.json (1)

19-26: 验证 opensumi 相关包版本升级的一致性

所有 opensumi 相关包均已更新至 3.6.0 版本,请确认:

  1. 是否所有相关包都已完成升级
  2. 是否已验证 3.6.0 版本的兼容性变更
✅ Verification successful

所有 @opensumi 依赖包已完成版本统一升级

经过验证,除了以下几个特殊包外,所有 @opensumi 相关包均已统一升级至 3.6.0 版本:

  • @opensumi/di: ^1.0.0(工具包,版本独立)
  • @opensumi/textmate-languages: ^2.7.0(语言支持包,版本独立)
  • @opensumi/extension-installer: ^0.0.1(安装工具,版本独立)

这些特殊包属于独立维护的工具包,其版本号与主要功能包版本不需要保持一致。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查所有 package.json 中的 opensumi 相关包版本
fd package.json --exec grep -A 1 "@opensumi/" {} \;

Length of output: 2282

package.json (1)

10-10: 确认 opensumi 引擎版本升级

根目录 package.json 中的 opensumi 引擎版本已更新至 3.6.0,请确认:

  1. 该版本与各个依赖包的版本保持一致
  2. 是否需要更新相关的构建脚本或配置
✅ Verification successful

opensumi 引擎版本升级验证通过

根据检查结果,所有 opensumi 相关依赖包(@opensumi/*)的版本均已更新至 3.6.0,与根目录 package.json 中的引擎版本保持一致。构建脚本无需更新。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查是否有遗漏的版本更新
rg "3.5.0" --type json

Length of output: 22


Script:

#!/bin/bash
# 搜索所有 package.json 文件中的 opensumi 相关依赖
fd package.json --exec rg -A 5 -B 5 "\"@opensumi|\"opensumi" {}

Length of output: 5666

packages/core/package.json (1)

36-77: 依赖版本升级检查

所有的 @opensumi 依赖包都已统一升级到 3.6.0 版本,这是一个好的实践。但是建议:

  1. 检查 3.6.0 版本的更新日志,确认是否存在破坏性更新
  2. 确保所有依赖包之间的兼容性
✅ Verification successful

版本升级安全确认

从 OpenSumi 3.6.0 的更新日志来看,此次更新主要包含:

  • 新增多个 VSCode API 支持
  • 新增笔记本相关功能
  • 移除 mobx 依赖
  • 多个 bug 修复

这些变更不包含破坏性更新。同时通过版本检查,未发现不一致的 @opensumi 依赖版本。升级到 3.6.0 版本是安全的。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查所有 @opensumi 包的版本一致性
rg '"@opensumi/.*": "[^3]\.6\.0",' -g 'package.json'

# 获取 opensumi 3.6.0 的更新日志
gh api repos/opensumi/core/releases/tags/v3.6.0 --jq .body

Length of output: 3583

packages/sumi-core/src/server/opensumi-extension/extension.service.client.ts (1)

Line range hint 15-77: 验证异步方法变更的影响

getLanguagePackgetExtension 方法已更改为异步返回。建议:

  1. 检查所有调用这些方法的地方,确保正确处理 Promise
  2. 更新相关的单元测试以支持异步调用

Comment on lines +15 to 17
getLanguagePack(languageId: string): Promise<IExtensionLanguagePack | undefined> {
throw new Error('Method not implemented.');
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

需要实现 getLanguagePack 方法

该方法目前抛出 "Method not implemented" 错误。建议:

  1. 实现该方法的具体逻辑
  2. 添加相应的单元测试

需要我帮助实现这个方法吗?

@wangxiaojuan wangxiaojuan requested a review from hacke2 December 5, 2024 10:29
@hacke2 hacke2 merged commit 8259a12 into main Dec 6, 2024
3 of 4 checks passed
@hacke2 hacke2 deleted the feat/opensumi_3.6.0 branch December 6, 2024 03:32
@coderabbitai coderabbitai bot mentioned this pull request Dec 17, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants