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): 群时间线未知作者的任务卡按快照显示;话题回复数的复数键对齐

Chrise4167ce9f1e4
diff --git a/apps/desktop/src/renderer/features/bots/BotGroupTimelineItem.tsx b/apps/desktop/src/renderer/features/bots/BotGroupTimelineItem.tsx
index f318211c24..017eedb89c 100644
--- a/apps/desktop/src/renderer/features/bots/BotGroupTimelineItem.tsx
+++ b/apps/desktop/src/renderer/features/bots/BotGroupTimelineItem.tsx
@@ -283,6 +283,12 @@ function SystemLine({ children, testId }: { children: ReactNode; testId?: string
);
}
+/** A task card is live only for a member of this group whose teammate is mine; unknown authors are snapshots. */
+export function botGroupTaskOwned(authorBotId: string | null, members: readonly BotGroupMemberView[]): boolean {
+ const author = authorBotId ? members.find((member) => member.botId === authorBotId) : undefined;
+ return author !== undefined && author.isOwned !== false;
+}
+
function BotGroupTimelineItemImpl(props: BotGroupTimelineItemProps) {
const { t } = useTranslation();
const { message, continued, authorName, members, mentionLabels, locale, shareScope, sharing } = props;
@@ -437,12 +443,11 @@ function BotGroupTimelineItemImpl(props: BotGroupTimelineItemProps) {
) : (
<div className="flex min-w-0 flex-col gap-1">
{quote}
- {/* A task this teammate started from the group; mine is live, another owner's is a snapshot. */}
+ {/* A task this teammate started from the group; mine is live, another owner's is a snapshot.
+ An author no longer in the group is unknown: its task may run on another computer, so
+ it stays a snapshot rather than a lookup on this one. */}
{message.task ? (
- <BotGroupTaskCard
- task={message.task}
- owned={props.members.find(m => m.botId === message.authorBotId)?.isOwned !== false}
- />
+ <BotGroupTaskCard task={message.task} owned={botGroupTaskOwned(message.authorBotId, members)} />
) : null}
{hasText ? (
<div className={`min-w-0 text-[var(--msg-assistant-text)] ${BOT_GROUP_BODY_CLASS}`}>
diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.json
index 46eb4915b0..b034ba5767 100644
--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json
@@ -9215,7 +9215,7 @@
"openTopic": "スレッドを表示 · {{count}} 件の返信",
"topic": "スレッド",
"replies": "返信",
- "replyCount": "返信 {{count}} 件",
+ "replyCount_other": "返信 {{count}} 件",
"replyPlaceholder": "このメッセージに返信。@ でパートナーを指定できます…",
"sendReply": "返信を送信",
"addReaction": "リアクションを追加",
diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.json
index a57b045ceb..bf3d1d172c 100644
--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json
@@ -9215,7 +9215,7 @@
"openTopic": "스레드 보기 · 답글 {{count}}개",
"topic": "스레드",
"replies": "답글",
- "replyCount": "답글 {{count}}개",
+ "replyCount_other": "답글 {{count}}개",
"replyPlaceholder": "이 메시지에 답글을 쓰세요. @로 파트너를 멘션할 수 있어요…",
"sendReply": "답글 보내기",
"addReaction": "이모지 반응 추가",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
index 22585b8bfb..eb9da08227 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json
@@ -9215,7 +9215,7 @@
"openTopic": "查看话题 · {{count}} 条回复",
"topic": "话题",
"replies": "回复",
- "replyCount": "{{count}} 条回复",
+ "replyCount_other": "{{count}} 条回复",
"replyPlaceholder": "回复这条消息,可用 @ 点名伙伴…",
"sendReply": "发送回复",
"addReaction": "添加表情回应",
diff --git a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
index c0e122ea59..1a4aa45481 100644
--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json
@@ -9215,7 +9215,7 @@
"openTopic": "查看話題 · {{count}} 則回覆",
"topic": "話題",
"replies": "回覆",
- "replyCount": "{{count}} 則回覆",
+ "replyCount_other": "{{count}} 則回覆",
"replyPlaceholder": "回覆這則訊息,可用 @ 點名夥伴…",
"sendReply": "傳送回覆",
"addReaction": "新增表情回應",