dsh-plugin-subscriptions 0.4.2 → 0.5.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.
Files changed (44) hide show
  1. package/README.md +19 -6
  2. package/README.zh.md +18 -6
  3. package/lib/auth/device-flow.d.ts +64 -0
  4. package/lib/auth/device-flow.js +176 -0
  5. package/lib/auth/oauth-flow.js +1 -1
  6. package/lib/auth/rpc.d.ts +21 -2
  7. package/lib/auth/rpc.js +23 -3
  8. package/lib/auth/store.d.ts +20 -2
  9. package/lib/auth/store.js +45 -9
  10. package/lib/client/ImageGallery.d.ts +54 -0
  11. package/lib/client/ImageGallery.js +112 -0
  12. package/lib/client/ImageGenerateToolview.d.ts +1 -1
  13. package/lib/client/ImageGenerateToolview.js +2 -2
  14. package/lib/client/SpeedSelect.d.ts +48 -0
  15. package/lib/client/SpeedSelect.js +173 -0
  16. package/lib/client/SubscriptionsSection.d.ts +10 -1
  17. package/lib/client/SubscriptionsSection.js +48 -5
  18. package/lib/client/index.d.ts +1 -0
  19. package/lib/client/index.js +42 -0
  20. package/lib/client/locales.d.ts +22 -0
  21. package/lib/client/locales.js +22 -0
  22. package/lib/client.js +679 -77
  23. package/lib/client.js.map +1 -1
  24. package/lib/index.d.ts +3 -2
  25. package/lib/index.js +1868 -183
  26. package/lib/providers/catalog-store.js +19 -0
  27. package/lib/providers/claude.d.ts +20 -1
  28. package/lib/providers/claude.js +58 -31
  29. package/lib/providers/codex.d.ts +27 -0
  30. package/lib/providers/codex.js +117 -27
  31. package/lib/providers/common.d.ts +34 -1
  32. package/lib/providers/common.js +48 -1
  33. package/lib/providers/copilot.d.ts +315 -0
  34. package/lib/providers/copilot.js +786 -0
  35. package/lib/providers/grok.d.ts +7 -2
  36. package/lib/providers/grok.js +46 -18
  37. package/lib/tools/image-generate.js +3 -10
  38. package/lib/translate/anthropic.d.ts +47 -6
  39. package/lib/translate/anthropic.js +135 -20
  40. package/lib/translate/chat-completions.d.ts +120 -0
  41. package/lib/translate/chat-completions.js +363 -0
  42. package/lib/translate/responses.d.ts +49 -5
  43. package/lib/translate/responses.js +40 -7
  44. package/package.json +6 -3
@@ -19,6 +19,10 @@ export declare const en: {
19
19
  manualPlaceholder: string;
20
20
  submit: string;
21
21
  loginMissingUrl: string;
22
+ deviceCodePrompt: string;
23
+ deviceCodeCopy: string;
24
+ deviceCodeCopied: string;
25
+ deviceCodeOpenPage: string;
22
26
  usageTitle: string;
23
27
  usageRefresh: string;
24
28
  usageLoading: string;
@@ -40,6 +44,13 @@ export declare const en: {
40
44
  generatingVideo: string;
41
45
  videoLoading: string;
42
46
  videoLoadFailed: string;
47
+ speed: string;
48
+ speedStandard: string;
49
+ speedStandardDescription: string;
50
+ speedFast: string;
51
+ speedFastDescription: string;
52
+ commandFast: string;
53
+ commandFastUnavailable: string;
43
54
  };
44
55
  /** zh strings, one per {@link en} key. */
45
56
  export declare const zh: {
@@ -61,6 +72,10 @@ export declare const zh: {
61
72
  manualPlaceholder: string;
62
73
  submit: string;
63
74
  loginMissingUrl: string;
75
+ deviceCodePrompt: string;
76
+ deviceCodeCopy: string;
77
+ deviceCodeCopied: string;
78
+ deviceCodeOpenPage: string;
64
79
  usageTitle: string;
65
80
  usageRefresh: string;
66
81
  usageLoading: string;
@@ -82,6 +97,13 @@ export declare const zh: {
82
97
  generatingVideo: string;
83
98
  videoLoading: string;
84
99
  videoLoadFailed: string;
100
+ speed: string;
101
+ speedStandard: string;
102
+ speedStandardDescription: string;
103
+ speedFast: string;
104
+ speedFastDescription: string;
105
+ commandFast: string;
106
+ commandFastUnavailable: string;
85
107
  };
86
108
  /** The Subscriptions namespace key union (en is the key-set source of truth). */
87
109
  export type SubscriptionsKey = keyof typeof en;
@@ -19,6 +19,10 @@ export const en = {
19
19
  manualPlaceholder: 'Paste the callback URL or code',
20
20
  submit: 'Submit',
21
21
  loginMissingUrl: 'login answered without an authorizeUrl',
22
+ deviceCodePrompt: 'Enter this code on the GitHub verification page:',
23
+ deviceCodeCopy: 'Copy code',
24
+ deviceCodeCopied: 'Copied',
25
+ deviceCodeOpenPage: 'Open GitHub verification page',
22
26
  usageTitle: 'Usage',
23
27
  usageRefresh: 'Refresh',
24
28
  usageLoading: 'Loading usage…',
@@ -40,6 +44,13 @@ export const en = {
40
44
  generatingVideo: 'Generating video…',
41
45
  videoLoading: 'Loading video…',
42
46
  videoLoadFailed: 'Video failed to load: {message}',
47
+ speed: 'Speed',
48
+ speedStandard: 'Standard',
49
+ speedStandardDescription: 'Default speed',
50
+ speedFast: 'Fast',
51
+ speedFastDescription: '1.5x speed, more usage',
52
+ commandFast: 'Switch the Codex speed tier (Standard/Fast)',
53
+ commandFastUnavailable: 'The current model has no fast tier; /fast only works on Codex models whose catalog advertises one',
43
54
  };
44
55
  /** zh strings, one per {@link en} key. */
45
56
  export const zh = {
@@ -61,6 +72,10 @@ export const zh = {
61
72
  manualPlaceholder: '粘贴回调 URL 或授权码',
62
73
  submit: '提交',
63
74
  loginMissingUrl: 'login 响应缺少 authorizeUrl',
75
+ deviceCodePrompt: '在 GitHub 验证页面输入此验证码:',
76
+ deviceCodeCopy: '复制验证码',
77
+ deviceCodeCopied: '已复制',
78
+ deviceCodeOpenPage: '打开 GitHub 验证页面',
64
79
  usageTitle: '用量',
65
80
  usageRefresh: '刷新',
66
81
  usageLoading: '用量加载中…',
@@ -82,4 +97,11 @@ export const zh = {
82
97
  generatingVideo: '正在生成视频…',
83
98
  videoLoading: '视频加载中…',
84
99
  videoLoadFailed: '视频加载失败:{message}',
100
+ speed: '速度',
101
+ speedStandard: '标准',
102
+ speedStandardDescription: '默认速度',
103
+ speedFast: '快速',
104
+ speedFastDescription: '约 1.5 倍速度,消耗更多用量',
105
+ commandFast: '切换 Codex 速度档(标准/快速)',
106
+ commandFastUnavailable: '当前模型不支持快速档;/fast 仅对目录声明了 fast tier 的 Codex 模型可用',
85
107
  };