codeep 1.1.24 → 1.1.26
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/dist/renderer/App.js
CHANGED
|
@@ -1287,6 +1287,22 @@ 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
|
+
const { spawn } = require('child_process');
|
|
1299
|
+
const child = spawn(cmd, [provider.subscribeUrl], { detached: true, stdio: 'ignore' });
|
|
1300
|
+
child.unref();
|
|
1301
|
+
}
|
|
1302
|
+
catch { /* ignore */ }
|
|
1303
|
+
}
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1290
1306
|
// Handle paste detection (fast input)
|
|
1291
1307
|
if (event.isPaste && event.key.length > 1) {
|
|
1292
1308
|
this.loginApiKey += event.key.trim();
|
|
@@ -1602,7 +1618,7 @@ export class App {
|
|
|
1602
1618
|
else if (this.loginOpen) {
|
|
1603
1619
|
bottomPanelHeight = this.loginStep === 'provider'
|
|
1604
1620
|
? Math.min(this.loginProviders.length + 5, 14)
|
|
1605
|
-
:
|
|
1621
|
+
: 8; // Login dialog
|
|
1606
1622
|
}
|
|
1607
1623
|
else if (this.menuOpen) {
|
|
1608
1624
|
bottomPanelHeight = Math.min(this.menuItems.length + 4, 14);
|
|
@@ -2751,19 +2767,18 @@ export class App {
|
|
|
2751
2767
|
this.screen.write(0, y, 'Key: ', fg.white);
|
|
2752
2768
|
this.screen.write(5, y, maskedKey, this.loginApiKey.length > 0 ? fg.green : fg.gray);
|
|
2753
2769
|
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
2770
|
// Error message
|
|
2761
2771
|
if (this.loginError) {
|
|
2762
2772
|
y++;
|
|
2763
2773
|
this.screen.writeLine(y, this.loginError, fg.red);
|
|
2764
2774
|
}
|
|
2765
2775
|
y++;
|
|
2766
|
-
|
|
2776
|
+
const hints = ['Ctrl+V Paste'];
|
|
2777
|
+
if (selectedProvider.subscribeUrl) {
|
|
2778
|
+
hints.push('Ctrl+O Get API key');
|
|
2779
|
+
}
|
|
2780
|
+
hints.push('Enter Submit', 'Esc Back');
|
|
2781
|
+
this.screen.writeLine(y, hints.join(' • '), fg.gray);
|
|
2767
2782
|
}
|
|
2768
2783
|
}
|
|
2769
2784
|
/**
|
|
@@ -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 { spawn } 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
|
-
|
|
118
|
-
// Footer
|
|
119
|
-
const footerY = height - 2;
|
|
123
|
+
const helpParts = ['Ctrl+T: Toggle visibility'];
|
|
120
124
|
if (this.options.subscribeUrl) {
|
|
121
|
-
|
|
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,21 @@ 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
|
+
const child = spawn(cmd, [url], { detached: true, stdio: 'ignore' });
|
|
151
|
+
child.unref();
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
// Silently fail if browser can't be opened
|
|
155
|
+
}
|
|
156
|
+
}
|
|
140
157
|
/**
|
|
141
158
|
* Provider selection screen
|
|
142
159
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.26",
|
|
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",
|