[Fix] stabilize conversation ordering and bump alpha.6#831
[Fix] stabilize conversation ordering and bump alpha.6#831dingyi222666 merged 2 commits intov1-devfrom
Conversation
Release alpha.6 by updating package versions and peer dependency ranges across the workspace. This also stabilizes conversation ordering and route binding updates so numeric targets and preset-lane switches stay consistent.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 35 minutes and 7 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (26)
📒 Files selected for processing (1)
概述此拉取请求更新了对话类型定义和排序逻辑。导入 变更
代码审查工作量评估🎯 3 (中等) | ⏱️ ~25 分钟 可能相关的 PR
诗句
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the version of koishi-plugin-chatluna to 1.4.0-alpha.6 across multiple packages and modifies conversation management logic, specifically changing the sorting and sequence handling. Feedback highlights potential ID collisions when using sequence numbers for display across multiple lanes, logic errors in per-lane state synchronization during conversation switching, and the need for a secondary sort criterion to ensure deterministic ordering.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/core/src/services/conversation.ts`:
- Around line 748-749: The current code exposes raw seq values from
allocateConversationSeq(bindingKey) in displaySeq and sorts only by seq, which
causes duplicate seq across allPresetLanes/legacy+canonical merges and makes
targetConversation ambiguous; fix by assigning a stable, merged displaySeq after
combining lists: first deterministically sort merge keys (e.g., by bindingKey
then seq or by createdAt fallback) to stabilize order, then reassign incremental
displaySeq values (1,2,3...) across the merged array so displaySeq is unique and
used for UI ordering/targetConversation resolution (adjust usages in the merging
logic that references seq/displaySeq and ensure targetConversation comparisons
use the new displaySeq). Ensure the same approach is applied to the other merge
block referenced around the 756-759 region.
- Around line 844-849: The code unconditionally synchronizes an external
conversation ID into the current route binding when bindingKey differs, which
can cross route families; before calling setActiveConversation (the block using
current.bindingKey, bindingKey, conversation.id) add a guard that ensures the
target conversation belongs to the same route family as current (respecting
allPresetLanes logic) — e.g., compare the route-family portion of
current.bindingKey and bindingKey (or use an existing routeFamily property) and
only call setActiveConversation when they match, otherwise skip syncing the
binding.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2e84c174-e100-4aa4-be5d-b45b94f1817c
⛔ Files ignored due to path filters (26)
packages/adapter-azure-openai/package.jsonis excluded by!**/*.jsonpackages/adapter-claude/package.jsonis excluded by!**/*.jsonpackages/adapter-deepseek/package.jsonis excluded by!**/*.jsonpackages/adapter-dify/package.jsonis excluded by!**/*.jsonpackages/adapter-doubao/package.jsonis excluded by!**/*.jsonpackages/adapter-gemini/package.jsonis excluded by!**/*.jsonpackages/adapter-hunyuan/package.jsonis excluded by!**/*.jsonpackages/adapter-ollama/package.jsonis excluded by!**/*.jsonpackages/adapter-openai-like/package.jsonis excluded by!**/*.jsonpackages/adapter-openai/package.jsonis excluded by!**/*.jsonpackages/adapter-qwen/package.jsonis excluded by!**/*.jsonpackages/adapter-rwkv/package.jsonis excluded by!**/*.jsonpackages/adapter-spark/package.jsonis excluded by!**/*.jsonpackages/adapter-wenxin/package.jsonis excluded by!**/*.jsonpackages/adapter-zhipu/package.jsonis excluded by!**/*.jsonpackages/core/package.jsonis excluded by!**/*.jsonpackages/extension-agent/package.jsonis excluded by!**/*.jsonpackages/extension-long-memory/package.jsonis excluded by!**/*.jsonpackages/extension-tools/package.jsonis excluded by!**/*.jsonpackages/extension-variable/package.jsonis excluded by!**/*.jsonpackages/renderer-image/package.jsonis excluded by!**/*.jsonpackages/service-embeddings/package.jsonis excluded by!**/*.jsonpackages/service-multimodal/package.jsonis excluded by!**/*.jsonpackages/service-search/package.jsonis excluded by!**/*.jsonpackages/service-vector-store/package.jsonis excluded by!**/*.jsonpackages/shared-adapter/package.jsonis excluded by!**/*.json
📒 Files selected for processing (3)
packages/core/src/middlewares/chat/rollback_chat.tspackages/core/src/services/conversation.tspackages/core/tests/conversation-service.spec.ts
Release alpha.7 by updating workspace package versions and peer dependency ranges. This also keeps merged conversation listings stable by sorting within route families deterministically while preserving sequential display numbers for merged results.
description: |-
This pr bumps ChatLuna core to
1.4.0-alpha.6, updates workspace peer dependency ranges, and fixes conversation ordering and route binding behavior so numeric targets and cross-lane switches stay stable.New Features
None.
Bug fixes
seqordering instead of recent activity orderOther Changes
koishi-plugin-chatlunato1.4.0-alpha.6koishi-plugin-chatlunato the newalpha.6rangerollback_chatconversation type imports with the current lint rules