Skip to content

Conversation

@dingyi222666
Copy link
Member

Summary

This PR bumps all package versions to 1.3.14, including core version updates and adapter dependency updates to reflect recent fixes and improvements.

Bug fixes

Other Changes

  • Core: 1.3.13 -> 1.3.14
  • Shared adapter: 1.0.21 -> 1.0.22
  • All adapter packages bumped to latest patch versions
  • All peerDependencies updated to use new core and shared-adapter versions

Replace references to ctx.chatluna.config.isLog with ctx.chatluna.currentConfig.isLog
to use the active configuration instead of the static config object.

Also simplify type filters in image content filtering by removing unnecessary
type guards that were redundant after null filtering.
Bump all package versions:
- Core: 1.3.13 -> 1.3.14
- Shared adapter: 1.0.21 -> 1.0.22
- All adapters: bump patch version
- Update peerDependencies to use new core/shared-adapter versions

This release includes image fetch error handling improvements and
non-blocking log file operations.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

在多个包中统一将配置访问点从 config 切换为 currentConfig(包括构造函数签名变更),并将多处对 imageContents 的类型守卫过滤替换为简单的非空检查;共享适配器的错误处理处也向本地日志跟踪传入了 logger 函数参数。

Changes

内聚组 / 文件(s) 变更摘要
核心服务与构造签名
packages/core/src/services/chat.ts, packages/core/src/llm-core/chat/app.ts
将对配置的引用由 config 改为 currentConfigChatLunaService 构造函数签名从 config 改为 currentConfig,相关依赖实例化改用 currentConfig
适配器与请求器 — 配置访问调整
packages/adapter-gemini/src/requester.ts, packages/adapter-qwen/src/requester.ts, packages/shared-adapter/src/requester.ts
错误处理catch块中检查日志开关由 this.ctx.chatluna.config.isLog/requestContext.ctx.chatluna.config 改为 ...currentConfig.isLog;shared-adapter 的 trackLogToLocal 调用新增传入 logger 函数参数
适配器工具 — 图像内容过滤简化
packages/adapter-hunyuan/src/utils.ts, packages/adapter-qwen/src/utils.ts, packages/adapter-zhipu/src/utils.ts, packages/shared-adapter/src/utils.ts
将对 imageContents 的类型守卫过滤器替换为简单的非空 (!= null) 检查;运行时行为保持相同,但 TypeScript 的类型缩小被放宽
其他微调
相关文件内的少量行调整(+/-)
多处只是小范围属性名替换或过滤器形式替换,无接口/导出签名(除 ChatLunaService 构造器外)变化

Sequence Diagram(s)

(此变更为配置属性替换与类型过滤简化,未引入新的跨组件控制流或新功能,故省略序列图)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

我是一只兔子在代码园,
配置跳跃换了新房间,
过滤更轻巧,日志带上弦,
小改动里藏着清晨光,
啾啾一笑,提交已成行 🐇✨

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive PR标题声称这是版本号的发布更新,但实际代码变更涉及重构配置引用、类型守卫替换等实质性改动,这些超出了简单版本号更新的范围。 建议将PR标题更改为更准确的描述,如'refactor: rename config to currentConfig and update type filters',以更好地反映实际的代码变更。
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed PR描述与代码变更相关,记录了版本更新和相关的bug修复,但没有完整说明涉及的配置重构和类型守卫替换等主要代码改动。

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/bump-version

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dingyi222666, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request is a routine maintenance release that bumps the versions of all chatluna packages to 1.3.14. It integrates recent bug fixes and improvements, ensuring better stability and performance across the core library and its various adapters. The changes primarily involve updating package versions and refining configuration access and data processing logic.

Highlights

  • Version Bumps: All packages within the chatluna ecosystem, including the core library and various adapters, have been updated to their latest patch versions. The core koishi-plugin-chatluna is now at 1.3.14, and the v1-shared-adapter is at 1.0.22. All adapter packages have also received patch version increments.
  • Dependency Updates: The peerDependencies for koishi-plugin-chatluna have been updated across all relevant packages to reflect the new ^1.3.14 version. Additionally, all adapter packages now depend on the updated ^1.0.22 version of @chatluna/v1-shared-adapter.
  • Logging Configuration Fix: Several requester files (packages/adapter-gemini/src/requester.ts, packages/adapter-qwen/src/requester.ts, packages/shared-adapter/src/requester.ts) have been updated to correctly access the isLog configuration from this.ctx.chatluna.currentConfig instead of this.ctx.chatluna.config.
  • Image Content Filtering Simplification: The logic for filtering image contents in packages/adapter-hunyuan/src/utils.ts, packages/adapter-qwen/src/utils.ts, packages/adapter-zhipu/src/utils.ts, and packages/shared-adapter/src/utils.ts has been simplified, removing redundant type assertions.
  • Bug Fixes Incorporated: This release incorporates fixes for image fetch failures no longer breaking message processing (PR fix(adapters): handle image fetch failures gracefully #701) and log file operations becoming non-blocking (PR refactor(core): make log file operations non-blocking #700).

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request primarily focuses on bumping package versions for a new release, 1.3.14. It includes updates to the core package, shared adapter, and all other adapter packages. The changes also incorporate a few bug fixes, such as using currentConfig instead of config for logging, which ensures runtime configuration changes are respected. Additionally, there are some code simplifications. My review focuses on a recurring simplification pattern that might reduce type safety.

Rename the ChatLunaService.config property to currentConfig for better
clarity about its role as the active configuration instance.

Update all references throughout the codebase:
- ChatInterface class: infiniteContext, rawOnCensor, infiniteContextThreshold
- ChatLunaService: all internal service instantiations
- ChatInterfaceWrapper: reasoning content and config initialization

This aligns with the naming convention established in adapters for
distinguishing between static and active configuration instances.
@dingyi222666 dingyi222666 merged commit e92a249 into v1-dev Jan 28, 2026
2 checks passed
@dingyi222666 dingyi222666 deleted the chore/bump-version branch January 28, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant