Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): 修正消息导航刻度样式生成

DavidShenf41dcf59476a
diff --git a/apps/desktop/src/renderer/components/chat/MessageNavRail.tsx b/apps/desktop/src/renderer/components/chat/MessageNavRail.tsx
index 9aa60593e5..61554559fa 100644
--- a/apps/desktop/src/renderer/components/chat/MessageNavRail.tsx
+++ b/apps/desktop/src/renderer/components/chat/MessageNavRail.tsx
@@ -561,10 +561,10 @@ export function MessageNavRail({
interactionDistance === 0
? 'opacity-100'
: interactionDistance !== null
- ? 'opacity-65'
+ ? 'opacity-[0.65]'
: isActive
? 'opacity-90'
- : 'opacity-65';
+ : 'opacity-[0.65]';
const markerProgress = planNavRailTickProgress(interactionDistance);
return (
<Tooltip.Root key={entry.id}>
diff --git a/apps/desktop/src/renderer/components/chat/messageNavRailModel.ts b/apps/desktop/src/renderer/components/chat/messageNavRailModel.ts
index ab34d77be4..fe786dca0a 100644
--- a/apps/desktop/src/renderer/components/chat/messageNavRailModel.ts
+++ b/apps/desktop/src/renderer/components/chat/messageNavRailModel.ts
@@ -358,20 +358,9 @@ export function planNavRailTickWidth(input: {
inView: boolean;
isAutomation?: boolean;
}): string {
- const automation = Boolean(input.isAutomation);
- // 交互态优先于阅读态:hover/scrub 会把目标置于渐进缩放的中心,
- // 不能让当前阅读项再次覆盖邻近刻度的宽度。
- if (input.distance !== null) {
- if (input.distance === 0) return 'w-[26px]';
- if (input.distance === 1) return 'w-[26px]';
- if (input.distance === 2) return 'w-[26px]';
- if (input.distance === 3) return 'w-[26px]';
- return 'w-[26px]';
- }
- /* ordinary state keeps every marker at the same baseline width */
- if (input.distance === null) return 'w-[26px]';
- // 普通态只保留细窄的地图基线;当前项由 isActive 单独强调,
- // 不再把整个可视范围渲染成连续粗线。
+ // 所有状态共享同一条 26px 轨道;hover/scrub 的渐进伸缩由渲染层
+ // 的 scaleX 负责,避免普通态出现不一致的横条长度。
+ void input;
return 'w-[26px]';
}