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。

docs(companion): document take-over stalling on an empty default model chain

nana04a31a8ca0e0
diff --git a/apps/desktop/src/main/localDb/ipc/__tests__/botCanonicalSession.test.ts b/apps/desktop/src/main/localDb/ipc/__tests__/botCanonicalSession.test.ts
index df77efac94..713ce71804 100644
--- a/apps/desktop/src/main/localDb/ipc/__tests__/botCanonicalSession.test.ts
+++ b/apps/desktop/src/main/localDb/ipc/__tests__/botCanonicalSession.test.ts
@@ -950,6 +950,26 @@ describe('Bot canonical Session lifecycle', () => {
})).resolves.toMatchObject({ created: true });
});
+ // The take-over retries about once a minute, and each try builds the main task from the live
+ // default: a follow-default companion on a computer with only a custom provider stops at the
+ // model guidance until the owner picks the companions' default model, then goes through unrestarted.
+ it('retries into the main task once the owner sets the companions\' default model', async () => {
+ await invoke('local-db:bots:create', { id: 'bot-follow', name: 'Cindy', capabilities: {} });
+ h.providers = [{
+ id: 'custom-gateway', connected: true, source: 'user', agents: ['pi'], auth: { method: 'api-key' },
+ models: { pi: [{ id: 'custom-model', efforts: [], defaultEffort: null, defaultEnabled: true }] },
+ }] as unknown as ProviderView[];
+ const createMain = () => invoke('local-db:bots:create-canonical-session', {
+ botId: 'bot-follow', expectedCanonicalSessionId: null, expectedProfileVersion: 1 });
+ try {
+ await expect(createMain()).rejects.toThrow('请先连接模型供应商或选择伙伴模型');
+ await expect(createMain()).rejects.toThrow('请先连接模型供应商或选择伙伴模型');
+ await invoke('local-db:bots:model-chain-settings-set', { modelChain: [
+ { harness: 'pi', providerId: 'custom-gateway', model: 'custom-model', effort: '', fastMode: false }] });
+ await expect(createMain()).resolves.toMatchObject({ created: true, session: { model: 'custom-model' } });
+ } finally { await modelSettings.resetBotModelChainSettings(); }
+ });
+
it('keeps a finished meeting record', async () => {
unfinished('ready');
await updateStoredBotProfile({ id: 'bot-1', name: 'Cindy' }, undefined, undefined, { replacesUnfinishedMeeting: true });
diff --git a/docs/product-rules/cloud-companions.md b/docs/product-rules/cloud-companions.md
index cc6a64ab2e..57e130724d 100644
--- a/docs/product-rules/cloud-companions.md
+++ b/docs/product-rules/cloud-companions.md
@@ -242,6 +242,7 @@
- 手机换电脑后,只有在等待期间从目标电脑读到的列表行才算接管完成,缓存里的旧行不算。手机伙伴列表在列出的行变化
(新行出现或已有行内容更新)和下拉刷新时重新读取各伙伴的主力电脑,停留在列表上也能跟上别处发起的换电脑。
- 已知限制:主力电脑在第一次上传资料之前就离线时,其他电脑和手机暂时不能换电脑继续,要等主力电脑重新上线上传后。
+- 已知限制:伙伴跟随默认模型(云端没有它自己的模型链)、而这台电脑只连了产品推荐之外的供应商(自定义 / 第三方)时,没有可用的伙伴默认模型,接管建主任务会停在「请先连接模型供应商或选择伙伴模型」,副本保持降级,自动接管约每分钟重试。先在 设置 → 通用 → 伙伴 → 默认模型 选一个模型,下一轮自动重试就会读到它并完成接管,不需要重启或重装(接管每次按当前默认建主任务;回归见 `botCanonicalSession.test.ts`「retries into the main task once the owner sets the companions' default model」)。接管不为此回退到新任务草稿里选中的模型,以保持「伙伴默认模型与新任务选择独立」([cindy-bots-runtime.md](cindy-bots-runtime.md) 2026-10-21 裁决);一个可用模型都没有时同样如此。接管期间这台电脑上该伙伴暂时不显示(本机副本降级隐藏,主力电脑是本机时不补云端行);其他电脑和手机仍按云端补行显示离线入口。
- 已知限制:交出伙伴时,对话导入完成之后产生的对话,以及最后一轮上传之后、服务器改主力电脑的请求返回之前(一次请求往返)
写入的资料或记忆不会上传,只留在原电脑的本机副本里;不为此冻结伙伴的本机写入。原主力电脑仍在线时被别处「在这台电脑继续」接走,
它正在进行的那一轮上传(资料,或一批对话导入)可能在接走之后才写入云端;迟到的对话留在房间里,新主力电脑已完成的历史导入不会再吸收它,直到下次接管。资料方面:新主力电脑本机仍是接管时的值,且不会覆盖这次写入(首次同步只更新版本号,不把云端较新的值当成本机修改;本机真正改了这一项才会上传),下次接管时才拿到;