codeep 1.1.24 → 1.1.25

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.
@@ -1287,6 +1287,20 @@ export class App {
1287
1287
  this.pasteApiKey();
1288
1288
  return;
1289
1289
  }
1290
+ // Ctrl+O to open subscribe URL
1291
+ if (event.ctrl && event.key === 'o') {
1292
+ const provider = this.loginProviders[this.loginProviderIndex];
1293
+ if (provider.subscribeUrl) {
1294
+ try {
1295
+ const cmd = process.platform === 'darwin' ? 'open'
1296
+ : process.platform === 'win32' ? 'start'
1297
+ : 'xdg-open';
1298
+ require('child_process').execSync(`${cmd} "${provider.subscribeUrl}"`, { stdio: 'ignore' });
1299
+ }
1300
+ catch { /* ignore */ }
1301
+ }
1302
+ return;
1303
+ }
1290
1304
  // Handle paste detection (fast input)
1291
1305
  if (event.isPaste && event.key.length > 1) {
1292
1306
  this.loginApiKey += event.key.trim();
@@ -1602,7 +1616,7 @@ export class App {
1602
1616
  else if (this.loginOpen) {
1603
1617
  bottomPanelHeight = this.loginStep === 'provider'
1604
1618
  ? Math.min(this.loginProviders.length + 5, 14)
1605
- : 10; // Login dialog
1619
+ : 8; // Login dialog
1606
1620
  }
1607
1621
  else if (this.menuOpen) {
1608
1622
  bottomPanelHeight = Math.min(this.menuItems.length + 4, 14);
@@ -2751,19 +2765,18 @@ export class App {
2751
2765
  this.screen.write(0, y, 'Key: ', fg.white);
2752
2766
  this.screen.write(5, y, maskedKey, this.loginApiKey.length > 0 ? fg.green : fg.gray);
2753
2767
  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
- }
2760
2768
  // Error message
2761
2769
  if (this.loginError) {
2762
2770
  y++;
2763
2771
  this.screen.writeLine(y, this.loginError, fg.red);
2764
2772
  }
2765
2773
  y++;
2766
- this.screen.writeLine(y, 'Ctrl+V Paste • Enter Submit • Esc Back', fg.gray);
2774
+ const hints = ['Ctrl+V Paste'];
2775
+ if (selectedProvider.subscribeUrl) {
2776
+ hints.push('Ctrl+O Get API key');
2777
+ }
2778
+ hints.push('Enter Submit', 'Esc Back');
2779
+ this.screen.writeLine(y, hints.join(' • '), fg.gray);
2767
2780
  }
2768
2781
  }
2769
2782
  /**
@@ -4,6 +4,7 @@
4
4
  import { LineEditor } from '../Input.js';
5
5
  import { fg, style } from '../ansi.js';
6
6
  import { createBox, centerBox } from './Box.js';
7
+ import { execSync } from 'child_process';
7
8
  // Primary color: #f02a30 (Codeep red)
8
9
  const PRIMARY_COLOR = fg.rgb(240, 42, 48);
9
10
  const PRIMARY_BRIGHT = fg.rgb(255, 80, 85);
@@ -33,6 +34,11 @@ export class LoginScreen {
33
34
  this.render();
34
35
  return true;
35
36
  }
37
+ // Open subscribe URL in browser
38
+ if (event.ctrl && event.key === 'o' && this.options.subscribeUrl) {
39
+ openUrl(this.options.subscribeUrl);
40
+ return true;
41
+ }
36
42
  // Submit
37
43
  if (event.key === 'enter') {
38
44
  const value = this.editor.getValue().trim();
@@ -114,16 +120,12 @@ export class LoginScreen {
114
120
  contentY++;
115
121
  }
116
122
  // Help text
117
- this.screen.write(contentX, contentY, 'Ctrl+T: Toggle visibility | Esc: Cancel', fg.gray);
118
- // Footer
119
- const footerY = height - 2;
123
+ const helpParts = ['Ctrl+T: Toggle visibility'];
120
124
  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);
125
+ helpParts.push('Ctrl+O: Get API key');
126
126
  }
127
+ helpParts.push('Esc: Cancel');
128
+ this.screen.write(contentX, contentY, helpParts.join(' | '), fg.gray);
127
129
  // Position cursor
128
130
  this.screen.setCursor(cursorX, boxY + 5);
129
131
  this.screen.showCursor(true);
@@ -137,6 +139,20 @@ export class LoginScreen {
137
139
  this.showKey = false;
138
140
  }
139
141
  }
142
+ /**
143
+ * Open URL in the default browser
144
+ */
145
+ function openUrl(url) {
146
+ try {
147
+ const cmd = process.platform === 'darwin' ? 'open'
148
+ : process.platform === 'win32' ? 'start'
149
+ : 'xdg-open';
150
+ execSync(`${cmd} "${url}"`, { stdio: 'ignore' });
151
+ }
152
+ catch {
153
+ // Silently fail if browser can't be opened
154
+ }
155
+ }
140
156
  /**
141
157
  * Provider selection screen
142
158
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeep",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
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",