feat: GitHub token settings card in the Plugins settings page - #6
Merged
PerryLink merged 1 commit intoAug 22, 2026
Merged
Conversation
Adds a collapsible 'GitHub' card to the settings -> Plugins section where the GitHub token can be filled directly. The token literal is written through the credentials domain (default ref GITHUB_TOKEN), never into the settings document, and is resolved per operation — so it takes effect immediately, without a restart. Host half registers the 'dsh-github' settings namespace (tokenRef/tokenSource schema) through the optional settings service. Browser half ships a __ModuleLoader__ bundle (lib/client.js, source in src/client.ts) that contributes a settings.plugin.item card mirroring the host PluginCard chrome and using the shared primitives (Button, IconChevronDownOutline14), matching the style of the other plugin cards and the market card.
Owner
|
感谢这个 PR,功能完整,设计很克制——token 走 credentials 域、绝不进 settings 文档,与仓库现有的审批模型一致。 我已本地复核(head 目前 fork PR 的 CI 停在 action_required(首次贡献需批准 workflow 运行)——我已批准运行,CI 全绿后合并,并随下一版本发布、在 release notes 中鸣谢。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: GitHub token settings card in the Plugins settings page
在「设置 → 插件」页新增 GitHub Token 配置卡
给 dsh-github 加了一张可折叠的 GitHub 配置卡(
设置 → 插件 → 插件配置),可以直接在页面上填写 GitHub Token。特性
PluginCard的设计 token,按钮与图标使用共享 primitives 组件)GITHUB_TOKEN),不进设置文件;宿主每次操作实时解析,保存后无需重启即可用实现
apply中通过可选 settings 服务注册dsh-github命名空间(tokenRef/tokenSourceschema,与Config对齐;token 字面量永不进设置文档)src/client.ts(源码)→lib/client.js(__ModuleLoader__bundle,提交产物),注册settings.plugin.item卡片(key =dsh-github),读取凭证域状态并写 tokenpackage.json:新增exports[./client]、dsh.client(platform web),peer/dev 依赖补充@deepseek-ai/dsh-settings验证
pnpm build(tsc)通过pnpm typecheck通过pnpm verify:self-contained通过在本地 0.6.2 上已实测:卡片正常渲染、token 保存后 GitHub 工具立即可用。