Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(bots): 群聊进行中条不把静默标记当成当前动作
Chris730e01c7607b
diff --git a/apps/desktop/src/renderer/features/bots/BotGroupLiveStatus.tsx b/apps/desktop/src/renderer/features/bots/BotGroupLiveStatus.tsxindex 332f86f195..e36700d291 100644--- a/apps/desktop/src/renderer/features/bots/BotGroupLiveStatus.tsx+++ b/apps/desktop/src/renderer/features/bots/BotGroupLiveStatus.tsx@@ -15,7 +15,7 @@ import { useTranslation } from 'react-i18next';import { Button } from '@/components/ui/button';import { cn } from '@/lib/utils';import { useAgentIslandActivity } from '@/state/agentIslandActivity';-import type { BotGroupMemberView, BotGroupSpeakerActivity, BotGroupSummary } from '../../../shared/botGroupChat';+import { isBotGroupNoReplyText, type BotGroupMemberView, type BotGroupSpeakerActivity, type BotGroupSummary } from '../../../shared/botGroupChat';import { BotAvatar } from './BotAvatar';import { BotGenerationLabel } from './BotGenerationLabel';import { formatBotGroupElapsed, useBotGroupNow } from './BotGroupElapsed';@@ -122,7 +122,10 @@ export function BotGroupProgressStrip({if (!step && (!lead || now - since < BOT_GROUP_PROGRESS_STRIP_DELAY_MS)) return null;const member = step ? step.member : lead?.member;const name = step ? step.displayName : lead?.displayName ?? '';- const action = live?.compactDetail?.trim() || '';+ // The Session's compact detail may still be the previous turn's silence marker (NO_REPLY);+ // that is not an action anyone should read.+ const rawAction = live?.compactDetail?.trim() || '';+ const action = isBotGroupNoReplyText(rawAction) ? '' : rawAction;const canView = !!sessionId && live?.phase === 'running';return (<div className="shrink-0 px-5 pt-2">diff --git a/apps/desktop/src/renderer/features/bots/__tests__/BotGroupChatView.test.tsx b/apps/desktop/src/renderer/features/bots/__tests__/BotGroupChatView.test.tsxindex aa2a46ee2a..45be72435b 100644--- a/apps/desktop/src/renderer/features/bots/__tests__/BotGroupChatView.test.tsx+++ b/apps/desktop/src/renderer/features/bots/__tests__/BotGroupChatView.test.tsx@@ -47,6 +47,8 @@ const mocks = vi.hoisted(() => ({getControlledState: vi.fn(),revoke: vi.fn(),thread: vi.fn(),+ /** Live activity of the speaking Session (null = not running on this machine). */+ activity: null as null | { compactDetail: string; startedAtMs: number | null; phase: string },}));// Partial: the shared attachment pieces pull in the app i18n instance, which needs initReactI18next.@@ -96,7 +98,7 @@ vi.mock('../BotAvatar', () => ({vi.mock('../BotGenerationLabel', () => ({BotGenerationLabel: ({ phase }: { phase?: string }) => <span>{`phase:${phase}`}</span>,}));-vi.mock('@/state/agentIslandActivity', () => ({ useAgentIslandActivity: () => null }));+vi.mock('@/state/agentIslandActivity', () => ({ useAgentIslandActivity: () => mocks.activity }));beforeAll(() => {// jsdom has no layout; scrolling is a no-op here.@@ -2324,6 +2326,30 @@ describe('Telegram / Slack-grade timeline', () => {await waitFor(() => expect(mocks.stopBotGroupRound).toHaveBeenCalledWith('g1'));});+ it('does not show the silence marker as the running step’s current action', async () => {+ const running = plan({+ status: 'running',+ currentStep: 0,+ steps: [{ ...plan().steps[0]!, status: 'running' }, plan().steps[1]!],+ });+ mocks.getBotGroup.mockResolvedValue({ ok: true, group: withPlan(running, [], {+ speakingBotIds: ['mimi'],+ round: { status: 'running', speakers: [{ botId: 'mimi', sessionId: 'plan-mimi', activity: 'step' }], canContinue: false },+ }) });+ mocks.activity = { compactDetail: 'NO_REPLY', startedAtMs: Date.now() - 5_000, phase: 'running' };+ try {+ renderView();+ const strip = await screen.findByTestId('bot-group-progress');+ expect(strip.textContent).toContain('想清楚这页讲什么');+ expect(strip.textContent).not.toContain('NO_REPLY');+ mocks.activity = { compactDetail: '正在读 README.md', startedAtMs: Date.now() - 5_000, phase: 'running' };+ fireEvent.click(within(strip).getByRole('button', { name: 'bots.groupChat.progress.viewProcess' }));+ await waitFor(() => expect(screen.getByTestId('bot-group-progress').textContent).toContain('正在读 README.md'));+ } finally {+ mocks.activity = null;+ }+ });+it('highlights @mentions of members in teammates’ messages too', async () => {const registry = new Map<string, { ranges: Range[] }>();vi.stubGlobal('Highlight', class { ranges: Range[]; constructor(...ranges: Range[]) { this.ranges = ranges; } });