refactor(notion): rename src/copy.ts to src/locales.ts

The repository names a package's localized text module locales.ts, as dsh-mcp-account and the four CLI connector apps do. The export COPY keeps its name, which matches the registration's copy field.
This commit is contained in:
gengruilin committed 2026-11-18 16:54:44 +08:00
1 parent 9a8443c5cf
commit 4459751fdb
6 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -30,8 +30,8 @@
en: 74b045a61a3fec72
zh: 69d64b33e8d1812e
/deepseek-ai-dsh-notion/understand-the-implementation:
en: e77a86f91f35dd9e
zh: d25c4a96b49d80b2
en: 5a12bb3e000c4cc9
zh: 6431dcb502c1d7af
/deepseek-ai-dsh-notion/further-exploration:
en: ed7d1edadf2feef5
zh: 6746823e51e4f4f3
+1 -1
View File
@@ -75,7 +75,7 @@ The generated [config catalog](../../../docs/config-catalog.md#deepseek-aidsh-no
[`cordis.patch.yml`](cordis.patch.yml) inserts one row with id `notion` naming this package, so the package is both the bundle and its only row; `config` overrides target that id. The Host half, [`src/index.ts`](src/index.ts), makes two registrations, both effects of the plugin's fiber: `ctx.mcpManager.register('notion', …)` adds a Streamable HTTP entry with the configured `url` and OAuth credential key, and `ctx.systemPrompt.section()` adds the naming guidance at the `MCP_SERVERS` order. The server name fixes the `mcp__notion__` tool namespace, and the credential key fixes the grant address, so a reloaded or reinstalled plugin reaches the same tools and grant. The manager validates the entry when it is registered; a configured or registered server that already uses the name or key makes the plugin fail to load before the guidance is added.
While the account registry runs, the plugin also calls `ctx.mcpAccounts.register({ server: 'notion', packageName: '@deepseek-ai/dsh-notion', copy })`, where [`src/copy.ts`](src/copy.ts) holds the text that names Notion in every shipped language; [`dsh-mcp-account`](../../mcp/mcp-account/README.md) then registers the account with the connector account registry, which renders the section, guidance, tag, and toast described above. A composition without the registry, such as a headless profile, loads the plugin without the account section.
While the account registry runs, the plugin also calls `ctx.mcpAccounts.register({ server: 'notion', packageName: '@deepseek-ai/dsh-notion', copy })`, where [`src/locales.ts`](src/locales.ts) holds the text that names Notion in every shipped language; [`dsh-mcp-account`](../../mcp/mcp-account/README.md) then registers the account with the connector account registry, which renders the section, guidance, tag, and toast described above. A composition without the registry, such as a headless profile, loads the plugin without the account section.
</details>
+1 -1
View File
@@ -75,7 +75,7 @@ bundle patch 在 profile 其他层之后插入 `notion` 行。插件需要 `mcpM
[`cordis.patch.yml`](cordis.patch.yml) 插入一行 id 为 `notion` 的条目,指向本包,因此本包既是 bundle,也是其唯一的一行;`config` 覆盖以该 id 为目标。Host 侧的 [`src/index.ts`](src/index.ts) 进行两项注册,二者都是插件 fiber 的 effect:`ctx.mcpManager.register('notion', …)` 以配置的 `url` 和 OAuth 凭据 key 添加一个 Streamable HTTP 条目,`ctx.systemPrompt.section()` 在 `MCP_SERVERS` 排序位置添加称呼指引。服务器名固定了 `mcp__notion__` 工具命名空间,凭据 key 固定了 grant 地址,因此重新加载或重新安装的插件会得到同样的工具和 grant。管理器在注册时校验条目;如果已配置或已注册的服务器占用了该名称或 key,插件会在添加指引之前加载失败。
账号注册表运行时,插件还调用 `ctx.mcpAccounts.register({ server: 'notion', packageName: '@deepseek-ai/dsh-notion', copy })`,其中 [`src/copy.ts`](src/copy.ts) 以每种已发布语言保存指明 Notion 的文案;随后由 [`dsh-mcp-account`](../../mcp/mcp-account/README.zh.md) 把账号登记到连接器账号注册表,由注册表渲染上文所述的区块、引导、标签与 toast。没有注册表的组合(如 headless profile)加载插件时不带账号区块。
账号注册表运行时,插件还调用 `ctx.mcpAccounts.register({ server: 'notion', packageName: '@deepseek-ai/dsh-notion', copy })`,其中 [`src/locales.ts`](src/locales.ts) 以每种已发布语言保存指明 Notion 的文案;随后由 [`dsh-mcp-account`](../../mcp/mcp-account/README.zh.md) 把账号登记到连接器账号注册表,由注册表渲染上文所述的区块、引导、标签与 toast。没有注册表的组合(如 headless profile)加载插件时不带账号区块。
</details>
+1 -1
View File
@@ -13,7 +13,7 @@ import z from '@deepseek-ai/schemastery'
import type {} from '@deepseek-ai/dsh-mcp-account'
import type {} from '@deepseek-ai/dsh-mcp-manager'
import type {} from '@deepseek-ai/dsh-system-prompt'
import { COPY } from './copy.ts'
import { COPY } from './locales.ts'
export const name = 'notion'
export const inject = ['mcpManager', 'systemPrompt']
@@ -15,7 +15,7 @@ import { createScope } from '@deepseek-ai/dsh-scope'
import { renderPrompt } from '@deepseek-ai/dsh-system-prompt'
import { callback, oauthWorld, phase } from '../../../mcp/mcp-client/tests/oauth-fixture.ts'
import { managerProfile } from '../../../mcp/mcp-manager/tests/profile-fixture.ts'
import { COPY } from '../src/copy.ts'
import { COPY } from '../src/locales.ts'
import * as Notion from '../src/index.ts'
// Verbatim pin of the model-visible guidance in src/index.ts.