codeep 1.1.22 → 1.1.24

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.
@@ -24,6 +24,7 @@ export interface ProviderConfig {
24
24
  defaultModel: string;
25
25
  defaultProtocol: 'openai' | 'anthropic';
26
26
  envKey?: string;
27
+ subscribeUrl?: string;
27
28
  }
28
29
  export declare const PROVIDERS: Record<string, ProviderConfig>;
29
30
  export type ProviderId = keyof typeof PROVIDERS;
@@ -32,6 +33,7 @@ export declare function getProviderList(): {
32
33
  id: string;
33
34
  name: string;
34
35
  description: string;
36
+ subscribeUrl?: string;
35
37
  }[];
36
38
  export declare function getProviderModels(providerId: string): {
37
39
  id: string;
@@ -24,6 +24,7 @@ export const PROVIDERS = {
24
24
  defaultModel: 'glm-4.7',
25
25
  defaultProtocol: 'openai',
26
26
  envKey: 'ZAI_API_KEY',
27
+ subscribeUrl: 'https://z.ai/subscribe?ic=NXYNXZOV14',
27
28
  },
28
29
  'minimax': {
29
30
  name: 'MiniMax',
@@ -46,6 +47,7 @@ export const PROVIDERS = {
46
47
  defaultModel: 'MiniMax-M2.1',
47
48
  defaultProtocol: 'anthropic',
48
49
  envKey: 'MINIMAX_API_KEY',
50
+ subscribeUrl: 'https://platform.minimax.io/subscribe/coding-plan?code=2lWvoWUhrp&source=link',
49
51
  },
50
52
  };
51
53
  export function getProvider(id) {
@@ -56,6 +58,7 @@ export function getProviderList() {
56
58
  id,
57
59
  name: config.name,
58
60
  description: config.description,
61
+ subscribeUrl: config.subscribeUrl,
59
62
  }));
60
63
  }
61
64
  export function getProviderModels(providerId) {
@@ -253,6 +253,7 @@ export declare class App {
253
253
  showLogin(providers: Array<{
254
254
  id: string;
255
255
  name: string;
256
+ subscribeUrl?: string;
256
257
  }>, callback: (result: {
257
258
  providerId: string;
258
259
  apiKey: string;
@@ -1602,7 +1602,7 @@ export class App {
1602
1602
  else if (this.loginOpen) {
1603
1603
  bottomPanelHeight = this.loginStep === 'provider'
1604
1604
  ? Math.min(this.loginProviders.length + 5, 14)
1605
- : 8; // Login dialog
1605
+ : 10; // Login dialog
1606
1606
  }
1607
1607
  else if (this.menuOpen) {
1608
1608
  bottomPanelHeight = Math.min(this.menuItems.length + 4, 14);
@@ -2751,6 +2751,12 @@ export class App {
2751
2751
  this.screen.write(0, y, 'Key: ', fg.white);
2752
2752
  this.screen.write(5, y, maskedKey, this.loginApiKey.length > 0 ? fg.green : fg.gray);
2753
2753
  y++;
2754
+ // Subscribe URL
2755
+ if (selectedProvider.subscribeUrl) {
2756
+ y++;
2757
+ this.screen.write(0, y, 'Get key: ', fg.gray);
2758
+ this.screen.write(9, y, selectedProvider.subscribeUrl, fg.cyan);
2759
+ }
2754
2760
  // Error message
2755
2761
  if (this.loginError) {
2756
2762
  y++;
@@ -8,6 +8,7 @@ export interface LoginOptions {
8
8
  onCancel: () => void;
9
9
  providerName: string;
10
10
  error?: string;
11
+ subscribeUrl?: string;
11
12
  }
12
13
  /**
13
14
  * Login screen component
@@ -117,7 +117,13 @@ export class LoginScreen {
117
117
  this.screen.write(contentX, contentY, 'Ctrl+T: Toggle visibility | Esc: Cancel', fg.gray);
118
118
  // Footer
119
119
  const footerY = height - 2;
120
- this.screen.write(2, footerY, 'Get your API key from your provider\'s dashboard', fg.gray);
120
+ if (this.options.subscribeUrl) {
121
+ this.screen.write(2, footerY, 'Get your API key: ', fg.gray);
122
+ this.screen.write(20, footerY, this.options.subscribeUrl, fg.cyan);
123
+ }
124
+ else {
125
+ this.screen.write(2, footerY, 'Get your API key from your provider\'s dashboard', fg.gray);
126
+ }
121
127
  // Position cursor
122
128
  this.screen.setCursor(cursorX, boxY + 5);
123
129
  this.screen.showCursor(true);
@@ -731,7 +731,7 @@ function handleCommand(command, args) {
731
731
  // Login/Logout
732
732
  case 'login': {
733
733
  const providers = getProviderList();
734
- app.showLogin(providers.map(p => ({ id: p.id, name: p.name })), async (result) => {
734
+ app.showLogin(providers.map(p => ({ id: p.id, name: p.name, subscribeUrl: p.subscribeUrl })), async (result) => {
735
735
  if (result) {
736
736
  setProvider(result.providerId);
737
737
  await setApiKey(result.apiKey);
@@ -1354,6 +1354,7 @@ async function showLoginFlow() {
1354
1354
  loginScreen = new LoginScreen(screen, input, {
1355
1355
  providerName: selectedProvider.name,
1356
1356
  error: loginError,
1357
+ subscribeUrl: selectedProvider.subscribeUrl,
1357
1358
  onSubmit: async (key) => {
1358
1359
  // Validate and save key
1359
1360
  if (key.length < 10) {
@@ -1361,6 +1362,7 @@ async function showLoginFlow() {
1361
1362
  loginScreen = new LoginScreen(screen, input, {
1362
1363
  providerName: selectedProvider.name,
1363
1364
  error: loginError,
1365
+ subscribeUrl: selectedProvider.subscribeUrl,
1364
1366
  onSubmit: () => { },
1365
1367
  onCancel: () => {
1366
1368
  cleanup();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.1.22",
3
+ "version": "1.1.24",
4
4
  "description": "AI-powered coding assistant built for the terminal. Multiple LLM providers, project-aware context, and a seamless development workflow.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",