@edge-sky/dsh-oauth-adapter 0.1.2-beta.0 → 0.1.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +2 -2
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/lib/client.js +5 -6
- package/lib/protocol.d.ts +0 -5
- package/lib/protocol.js +0 -4
- package/lib/types/protocol.d.ts +0 -5
- package/package.json +1 -1
package/README.i18n.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
# Bilingual-pair consistency record: the git blob hash of each side as of the
|
|
2
2
|
# last confirmed-consistent state. Both languages carry equal authority.
|
|
3
|
-
README.md:
|
|
4
|
-
README.zh.md:
|
|
3
|
+
README.md: c4642ceaea18fbc2482a1a121893d9e5ee2662c4
|
|
4
|
+
README.zh.md: 7641d4bdcd89a0bfa9a247a4dc59013c0614e434
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-
An OAuth account page for the DSH Web profile.
|
|
5
|
+
An OAuth account page for the DSH Web profile. It supports:
|
|
6
6
|
|
|
7
7
|
| Provider | pi-ai sign-in path |
|
|
8
8
|
| --- | --- |
|
|
@@ -47,4 +47,4 @@ DSH integrates pi-ai through the `@deepseek-ai/dsh-llm-pi-ai` adapter, but does
|
|
|
47
47
|
|
|
48
48
|
Because DSH does not currently mount the `ctx.authorization` service, this plugin also mounts it manually.
|
|
49
49
|
|
|
50
|
-
The plugin itself does not
|
|
50
|
+
The plugin itself does not manage OAuth credentials or maintain login state. Maybe DSH support this sign-in method in the future; but for now, this plugin lets you enjoy it.
|
package/README.zh.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-
为 DSH Web profile 提供独立的 OAuth
|
|
5
|
+
为 DSH Web profile 提供独立的 OAuth 账户页面。当前支持:
|
|
6
6
|
|
|
7
7
|
| 提供商 | pi-ai 登录路径 |
|
|
8
8
|
| --- | --- |
|
|
@@ -47,4 +47,4 @@ DSH 通过 `@deepseek-ai/dsh-llm-pi-ai` 适配器接入 pi-ai,但并没有提
|
|
|
47
47
|
|
|
48
48
|
由于 DSH 目前并没有挂载`ctx.authorization`服务,因此该插件同时手动对其进行了挂载
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
插件本身并不承担 OAuth 凭证管理与维持登录态的职责,或许将来 DSH 会官方支持这一登录方式,但至少现在你可以通过这个插件体验它
|
package/lib/client.js
CHANGED
|
@@ -41,12 +41,6 @@ window.__ModuleLoader__.load({
|
|
|
41
41
|
fallbackLabel: "OpenRouter",
|
|
42
42
|
modelGroupLabel: "OpenRouter (OAuth)"
|
|
43
43
|
},
|
|
44
|
-
{
|
|
45
|
-
id: "radius",
|
|
46
|
-
key: "llm-pi-ai/radius",
|
|
47
|
-
fallbackLabel: "Radius",
|
|
48
|
-
modelGroupLabel: "Radius (OAuth)"
|
|
49
|
-
},
|
|
50
44
|
{
|
|
51
45
|
id: "xai",
|
|
52
46
|
key: "llm-pi-ai/xai",
|
|
@@ -681,6 +675,7 @@ window.__ModuleLoader__.load({
|
|
|
681
675
|
//#endregion
|
|
682
676
|
//#region src/client/index.ts
|
|
683
677
|
const NS = "settings.oauth-accounts";
|
|
678
|
+
const MODEL_SETTINGS_VISIBILITY = "modelSettingsVisibility";
|
|
684
679
|
/** Required browser services for settings placement and localized copy. */
|
|
685
680
|
const inject = ["slots", "locale"];
|
|
686
681
|
/** Register the OAuth account page and its app-lifetime connection controller. */
|
|
@@ -702,6 +697,10 @@ window.__ModuleLoader__.load({
|
|
|
702
697
|
ctx.effect(() => () => {
|
|
703
698
|
controller.dispose();
|
|
704
699
|
}, "dsh-oauth-adapter: controller");
|
|
700
|
+
ctx.inject([MODEL_SETTINGS_VISIBILITY], (scope) => {
|
|
701
|
+
const visibility = scope.get(MODEL_SETTINGS_VISIBILITY);
|
|
702
|
+
scope.effect(() => visibility.registerHiddenProviders(PROVIDERS.map((provider) => provider.id)), "dsh-oauth-adapter: hide OAuth providers from Models settings");
|
|
703
|
+
});
|
|
705
704
|
const t = ctx.locale.bind(NS);
|
|
706
705
|
ctx.slots.inject("settings.section", () => ctx.slots.register({
|
|
707
706
|
name: "settings.section",
|
package/lib/protocol.d.ts
CHANGED
|
@@ -28,11 +28,6 @@ export declare const PROVIDERS: readonly [{
|
|
|
28
28
|
readonly key: "llm-pi-ai/openrouter";
|
|
29
29
|
readonly fallbackLabel: "OpenRouter";
|
|
30
30
|
readonly modelGroupLabel: "OpenRouter (OAuth)";
|
|
31
|
-
}, {
|
|
32
|
-
readonly id: "radius";
|
|
33
|
-
readonly key: "llm-pi-ai/radius";
|
|
34
|
-
readonly fallbackLabel: "Radius";
|
|
35
|
-
readonly modelGroupLabel: "Radius (OAuth)";
|
|
36
31
|
}, {
|
|
37
32
|
readonly id: "xai";
|
|
38
33
|
readonly key: "llm-pi-ai/xai";
|
package/lib/protocol.js
CHANGED
|
@@ -24,10 +24,6 @@ export const PROVIDERS = [
|
|
|
24
24
|
id: 'openrouter', key: 'llm-pi-ai/openrouter', fallbackLabel: 'OpenRouter',
|
|
25
25
|
modelGroupLabel: 'OpenRouter (OAuth)',
|
|
26
26
|
},
|
|
27
|
-
{
|
|
28
|
-
id: 'radius', key: 'llm-pi-ai/radius', fallbackLabel: 'Radius',
|
|
29
|
-
modelGroupLabel: 'Radius (OAuth)',
|
|
30
|
-
},
|
|
31
27
|
{
|
|
32
28
|
id: 'xai', key: 'llm-pi-ai/xai', fallbackLabel: 'xAI',
|
|
33
29
|
modelGroupLabel: 'xAI (OAuth)',
|
package/lib/types/protocol.d.ts
CHANGED
|
@@ -28,11 +28,6 @@ export declare const PROVIDERS: readonly [{
|
|
|
28
28
|
readonly key: "llm-pi-ai/openrouter";
|
|
29
29
|
readonly fallbackLabel: "OpenRouter";
|
|
30
30
|
readonly modelGroupLabel: "OpenRouter (OAuth)";
|
|
31
|
-
}, {
|
|
32
|
-
readonly id: "radius";
|
|
33
|
-
readonly key: "llm-pi-ai/radius";
|
|
34
|
-
readonly fallbackLabel: "Radius";
|
|
35
|
-
readonly modelGroupLabel: "Radius (OAuth)";
|
|
36
31
|
}, {
|
|
37
32
|
readonly id: "xai";
|
|
38
33
|
readonly key: "llm-pi-ai/xai";
|
package/package.json
CHANGED