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(bots): D5 remove the reserved line above remote teammate settings

nana7190eceefec8
diff --git a/apps/desktop/src/renderer/features/bots/RemoteTeammateSettings.tsx b/apps/desktop/src/renderer/features/bots/RemoteTeammateSettings.tsx
index 61db07509b..3f218d7876 100644
--- a/apps/desktop/src/renderer/features/bots/RemoteTeammateSettings.tsx
+++ b/apps/desktop/src/renderer/features/bots/RemoteTeammateSettings.tsx
@@ -180,18 +180,22 @@ function RemoteSettingsPages({ bot, ops, initialPage: requestedPage = 'home', be
return (
<BotSettingsTargetContext.Provider value={handle.target}>
<BotPronounProvider bot={profile as BotProfile}>
- {/* The status line keeps its height whether or not it has text, so the pages never jump. */}
- <p role="status" className="shrink-0 truncate px-5 pt-2 text-12 leading-5 text-[var(--text-secondary)] min-h-7">
- {!bot.online ? t('bots.remote.offlineDescription', { name: bot.name, device: bot.deviceName }) : ''}
- </p>
- <BotSettings
- key={`${bot.deviceId}:${bot.id}:${initialPage}`}
- initialPage={initialPage}
- beforeCloseRef={beforeCloseRef}
- bot={profile}
- onBack={onBack}
- onOpenSession={onOpenSession}
- />
+ {/* The pages sit exactly where the local ones do; the offline note floats over their bottom edge so neither its appearance nor its absence moves anything. */}
+ <div className="relative flex min-h-0 flex-1 flex-col">
+ {!bot.online ? (
+ <p role="status" className="absolute inset-x-0 bottom-0 z-10 border-t border-[var(--border-default)] bg-[var(--surface-elevated)] px-5 py-2 text-12 leading-5 text-[var(--text-secondary)]">
+ {t('bots.remote.offlineDescription', { name: bot.name, device: bot.deviceName })}
+ </p>
+ ) : null}
+ <BotSettings
+ key={`${bot.deviceId}:${bot.id}:${initialPage}`}
+ initialPage={initialPage}
+ beforeCloseRef={beforeCloseRef}
+ bot={profile}
+ onBack={onBack}
+ onOpenSession={onOpenSession}
+ />
+ </div>
</BotPronounProvider>
</BotSettingsTargetContext.Provider>
);
diff --git a/docs/product-rules/cindy-bots-runtime.md b/docs/product-rules/cindy-bots-runtime.md
index 08fa494333..9975c59161 100644
--- a/docs/product-rules/cindy-bots-runtime.md
+++ b/docs/product-rules/cindy-bots-runtime.md
@@ -298,7 +298,7 @@ Cindy 应用,也不取消伙伴已委派的独立任务。操作中禁用重
连接与微信状态没有推送,远程页打开且窗口可见时每 5 秒重读一次。
- 提升权限仍保留既有确认:设置页本来没有权限档入口,设置主机的写入口拒绝 `permissions`,权限修改只在通用表单页(带确认)。
-离线、对方未响应、动作不支持与冲突都不引起布局跳动:状态行固定占位,页面保留已读内容;写入失败沿用自动保存的失败与重试,
+离线、对方未响应、动作不支持与冲突都不引起布局跳动:离线提示浮在页面底部边缘(不占位,在线时页面与本机设置在同一位置),页面保留已读内容;写入失败沿用自动保存的失败与重试,
记忆 / 例行任务的 revision 冲突沿用各自页面的冲突提示(失败以数据形式返回,保留 `PRECONDITION_FAILED` 与冲突标记)。
实现见 `RemoteTeammateSettings.tsx`、`remoteBotSettingsTarget.ts`、`localBotSettingsTarget.ts`、`BotSettingsDrawer.tsx`,
主机侧见 `main/localDb/ipc/botRemoteSettingsHost.ts` 与 `botRemoteSettingsOps.ts`;手机见 Mobile `CompanionProfileSheet.tsx`。