Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
feat(contacts): 智能通讯录对 local 模式开放,补设置深链锚点与未开启引导 (#1066)
Chris Zhanged57cc0985ab
diff --git a/apps/desktop/src/renderer/components/settings/SettingsView.tsx b/apps/desktop/src/renderer/components/settings/SettingsView.tsxindex 5bbcbeef05..babf32f7ec 100644--- a/apps/desktop/src/renderer/components/settings/SettingsView.tsx+++ b/apps/desktop/src/renderer/components/settings/SettingsView.tsx@@ -162,7 +162,7 @@ export function SettingsView() {[canAccessBilling, isMac],);- // deep-link: ?section=... → scroll to a section inside General settings.+ // deep-link: ?section=... → scroll to a section inside the active tab.useEffect(() => {const section = searchParams.get('section');const sectionId =@@ -170,7 +170,9 @@ export function SettingsView() {? 'settings-collaboration': section === 'notifications'? 'settings-notifications'- : null;+ : section === 'contacts'+ ? 'settings-contacts'+ : null;if (!sectionId) return;const el = document.getElementById(sectionId);if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' });@@ -363,11 +365,14 @@ export function SettingsView() {<section className="pb-[18px]" aria-label={t('settings.sections.subagentModels')}><SubagentModelSection key={`subagent-models:${mode}:${dataOwnerId ?? 'none'}`} /></section>- {mode !== 'local' && (- <section className="pb-[18px]" aria-label={t('settings.contacts.title')}>- <ContactsSection key={`contacts:${dataOwnerId ?? 'none'}`} />- </section>- )}+ {/* 通讯录是本机全局库(数据与开关都不依赖云端账号),local 模式同样可用 */}+ <section+ id="settings-contacts"+ className="pb-[18px]"+ aria-label={t('settings.contacts.title')}+ >+ <ContactsSection key={`contacts:${dataOwnerId ?? 'none'}`} />+ </section><section className="pb-[18px]" aria-label={t('settings.sections.compaction')}><CompactionSection key={`compaction:${mode}:${dataOwnerId ?? 'none'}`} /></section>diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.jsonindex 5e0a152e46..2c734386f7 100644--- a/apps/desktop/src/renderer/i18n/locales/en/common.json+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json@@ -2891,7 +2891,7 @@},"contacts": {"title": "Smart Contacts",- "description": "A people and organization directory built for agents: cross-platform identity resolution (email / Feishu / Slack / GitHub id → who is this), relationship context, and dated event records. Agents collect entries as they work; low-confidence ones land in a pending queue for your review.",+ "description": "A people and organization directory built for agents: cross-platform identity resolution (email / Feishu / Slack / GitHub id → who is this), relationship context, and dated event records. Agents collect entries as they work; low-confidence ones land in a pending queue for your review. Data is stored on this device only; lookups and organizing are processed through your own model.","enable": {"label": "Enable Smart Contacts","description": "When on, agents can look up and automatically collect contact information (uncertain entries go to pending review). Turning it off does not affect browsing or managing existing data here.",diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.jsonindex a19bd85925..91400cf638 100644--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json@@ -2890,7 +2890,7 @@},"contacts": {"title": "スマート連絡先",- "description": "エージェントのための人物・組織データベース。プラットフォーム横断の身元照合(メール / Feishu / Slack / GitHub id → この人は誰か)、関係性の背景、日付付きイベント記録を備えています。エージェントが作業中に自動で収集し、確度の低い項目は確認待ちキューに入ります。",+ "description": "エージェントのための人物・組織データベース。プラットフォーム横断の身元照合(メール / Feishu / Slack / GitHub id → この人は誰か)、関係性の背景、日付付きイベント記録を備えています。エージェントが作業中に自動で収集し、確度の低い項目は確認待ちキューに入ります。データの保存先はこの端末のみで、検索や整理はお使いのモデルを通じて処理されます。","enable": {"label": "スマート連絡先を有効にする","description": "オンにすると、エージェントが連絡先情報を検索・自動収集できます(不確かな項目は確認待ちへ)。オフにしても、ここでの閲覧や管理には影響しません。",diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.jsonindex a343d68534..47f3ac1180 100644--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json@@ -2890,7 +2890,7 @@},"contacts": {"title": "스마트 연락처",- "description": "에이전트를 위한 인물·조직 데이터베이스입니다. 플랫폼 간 신원 조회(이메일 / Feishu / Slack / GitHub id → 이 사람이 누구인지), 관계 배경, 날짜별 이벤트 기록을 제공합니다. 에이전트가 작업 중 자동으로 수집하며, 확신도가 낮은 항목은 확인 대기 큐로 들어갑니다.",+ "description": "에이전트를 위한 인물·조직 데이터베이스입니다. 플랫폼 간 신원 조회(이메일 / Feishu / Slack / GitHub id → 이 사람이 누구인지), 관계 배경, 날짜별 이벤트 기록을 제공합니다. 에이전트가 작업 중 자동으로 수집하며, 확신도가 낮은 항목은 확인 대기 큐로 들어갑니다. 데이터는 이 기기에만 저장되며, 조회와 정리는 사용자의 모델을 통해 처리됩니다.","enable": {"label": "스마트 연락처 사용","description": "켜면 에이전트가 연락처 정보를 조회하고 자동으로 수집할 수 있습니다(불확실한 항목은 확인 대기로 이동). 꺼도 여기에서 기존 데이터를 보고 관리하는 데는 영향이 없습니다.",diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.jsonindex 727e0b75a6..f972035724 100644--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json@@ -2890,7 +2890,7 @@},"contacts": {"title": "智能通讯录",- "description": "为 Agent 建立的人物与组织档案库:跨平台身份反查(邮箱 / 飞书 / Slack / GitHub id → 这是谁)、关系背景与带日期的事件记录。Agent 在工作中自动沉淀,低置信条目进入待确认队列由你裁决。",+ "description": "为 Agent 建立的人物与组织档案库:跨平台身份反查(邮箱 / 飞书 / Slack / GitHub id → 这是谁)、关系背景与带日期的事件记录。Agent 在工作中自动沉淀,低置信条目进入待确认队列由你裁决。数据只保存在本机,查询与整理会经由你自己的模型处理。","enable": {"label": "启用智能通讯录","description": "开启后 Agent 可以查询并自动采集人物信息(不确定的条目会进入待确认)。关闭不影响在此浏览和管理已有数据。",diff --git a/packages/lizi-mcps/src/cindy_contactsMcpServer.ts b/packages/lizi-mcps/src/cindy_contactsMcpServer.tsindex 21925147c8..97cf942900 100644--- a/packages/lizi-mcps/src/cindy_contactsMcpServer.ts+++ b/packages/lizi-mcps/src/cindy_contactsMcpServer.ts@@ -54,7 +54,7 @@ const D_LIST_TOOLS =const D_CALL_TOOL ='调用智能通讯录(cindy_contacts)中的某个具体工具。先用 list_tools 拿工具名 + 简介, 再用本工具执行。' +'错误码: ' +- '`CONTACTS_NOT_READY` = 通讯录未在设置中开启, 提示用户去设置开启; ' ++ '`CONTACTS_NOT_READY` = 通讯录未开启, 提示用户可在 设置→个性化→智能通讯录 开启; ' +'`NOT_FOUND` = 指定 contact/identity/event/group 不存在; ' +'`ALREADY_EXISTS` = 身份已在本人名下 / 组名撞名; ' +'`IDENTITY_CONFLICT` = 该身份已属于另一个人(data 带 conflictContactId, 应改为更新那份档案或询问用户是否 merge); ' +diff --git a/packages/lizi-mcps/src/contacts/_shared.ts b/packages/lizi-mcps/src/contacts/_shared.tsindex 71e92104ca..470ba3714c 100644--- a/packages/lizi-mcps/src/contacts/_shared.ts+++ b/packages/lizi-mcps/src/contacts/_shared.ts@@ -38,7 +38,13 @@ export async function withContacts(try {if (deps.isEnabled && !deps.isEnabled()) {return buildJsonResult(- { ok: false, code: 'CONTACTS_NOT_READY', message: 'smart contacts disabled in settings' },+ {+ ok: false,+ code: 'CONTACTS_NOT_READY',+ message:+ 'Smart Contacts is disabled — the user can turn it on in ' ++ 'Settings → Personalization → Smart Contacts (设置 → 个性化 → 智能通讯录)',+ },true,);}