Repository navigation
fix(core): 修复 censor 的模块导入路径 - #1056
Conversation
将 censor.ts 中的 isMessageContentText 导入改为包导出路径,修复 CommonJS 构建后相对路径失效导致 core 无法加载的问题。
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
Walkthrough聊天审查中间件现在从 Changes聊天审查导入调整
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
Bump koishi-plugin-chatluna from 1.4.1 to 1.4.2 so the censor middleware import path fix in this branch can be published to npm. Verified with `yarn fast-build` (exit 0).
问题与修复
Close #1055
censor 中的相对导入在打包进 CommonJS 入口后被保留,导致启动时报
Cannot find module '../../utils/langchain',core 无法加载。将isMessageContentText的导入改为koishi-plugin-chatluna/utils/langchain,通过包导出解析正确的构建产物验证
yarn fast-build core通过。