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。

Merge remote-tracking branch 'upstream/main' into bot-group-single-speaker

zqchris94a4c401674e
diff --cc apps/desktop/src/main/maker-ipc/chatServer.ts
index 1296f0638e,ba71716265..bb628c7e4d
--- a/apps/desktop/src/main/maker-ipc/chatServer.ts
+++ b/apps/desktop/src/main/maker-ipc/chatServer.ts
@@@ -2179,12 -2156,10 +2206,14 @@@ function createChatServer(local: BotGro
const plans = await plansRead;
const openPlan = plans.find(p => ['proposed','running','waiting'].includes(p.status));
const proposed = openPlan?.status === 'proposed' && openPlan.creator_id === selfId;
- // A single-speaker server arranges turns itself (several named teammates, or the lead's
- // answer); the send no longer asks a helper model whether to divide the work first.
- if (i.division && openPlan && !proposed) throw new Error('PLAN_OPEN');
- const canTrigger = i.division || s.room.response_mode !== 'mentioned' || !namesNobody(i.mentions);
- const commentPlan = canTrigger && openPlan && openPlan.status !== 'proposed' && !i.mentions.botIds.length && !i.mentions.all && (openPlan.creator_id === selfId || s.members.some(m => m.id === selfId && ['owner','admin'].includes(m.role))) ? openPlan : undefined;
- const shouldPlan = canTrigger && !!deps.decidePlan && (i.division || (!i.mentions.botIds.length && (!proposed || !i.mentions.all)))
++ // A single-speaker server arranges turns itself (several named teammates, or everyone when
++ // nobody is named); the send no longer asks a helper model whether to divide the work first.
+ if (i.division && openPlan && !proposed && !singleSpeaker) throw new Error('PLAN_OPEN');
++ // A single-speaker server has no reply modes: every request is answered, named or not (§4.0).
++ const canTrigger = singleSpeaker || i.division || s.room.response_mode !== 'mentioned' || !namesNobody(i.mentions);
+ // A queue waiting for 继续 gives way to a new request; only a turn under way takes additions (§4.0).
- const commentPlan = openPlan && openPlan.status !== 'proposed' && !(singleSpeaker && openPlan.kind === 'talk' && openPlan.status === 'waiting') && !i.mentions.botIds.length && !i.mentions.all && (openPlan.creator_id === selfId || s.members.some(m => m.id === selfId && ['owner','admin'].includes(m.role))) ? openPlan : undefined;
- const shouldPlan = !singleSpeaker && !!deps.decidePlan && (i.division || (!i.mentions.botIds.length && (!proposed || !i.mentions.all)))
++ const commentPlan = canTrigger && openPlan && openPlan.status !== 'proposed' && !(singleSpeaker && openPlan.kind === 'talk' && openPlan.status === 'waiting') && !i.mentions.botIds.length && !i.mentions.all && (openPlan.creator_id === selfId || s.members.some(m => m.id === selfId && ['owner','admin'].includes(m.role))) ? openPlan : undefined;
++ const shouldPlan = canTrigger && !singleSpeaker && !!deps.decidePlan && (i.division || (!i.mentions.botIds.length && (!proposed || !i.mentions.all)))
&& (!openPlan || proposed);
const prepared = i.attachments?.length ? await deps.prepareAttachments?.({ groupId: i.groupId, attachments: i.attachments, controllerDeviceId: origin?.controllerDeviceId }) : undefined;
if (i.attachments?.length && (!prepared || !prepared.ok)) {