codeep 1.1.29 → 1.1.30
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.
|
@@ -5,6 +5,7 @@ import { LineEditor } from '../Input.js';
|
|
|
5
5
|
import { fg, style } from '../ansi.js';
|
|
6
6
|
import { createBox, centerBox } from './Box.js';
|
|
7
7
|
import { spawn } from 'child_process';
|
|
8
|
+
import clipboardy from 'clipboardy';
|
|
8
9
|
// Primary color: #f02a30 (Codeep red)
|
|
9
10
|
const PRIMARY_COLOR = fg.rgb(240, 42, 48);
|
|
10
11
|
const PRIMARY_BRIGHT = fg.rgb(255, 80, 85);
|
|
@@ -39,6 +40,17 @@ export class LoginScreen {
|
|
|
39
40
|
openUrl(this.options.subscribeUrl);
|
|
40
41
|
return true;
|
|
41
42
|
}
|
|
43
|
+
// Ctrl+V paste from clipboard
|
|
44
|
+
if (event.ctrl && event.key === 'v') {
|
|
45
|
+
this.pasteFromClipboard();
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
// Paste detection (fast input)
|
|
49
|
+
if (event.isPaste && event.key.length > 1) {
|
|
50
|
+
this.editor.setValue(event.key.trim());
|
|
51
|
+
this.render();
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
42
54
|
// Submit
|
|
43
55
|
if (event.key === 'enter') {
|
|
44
56
|
const value = this.editor.getValue().trim();
|
|
@@ -70,7 +82,7 @@ export class LoginScreen {
|
|
|
70
82
|
this.screen.write(titleX, 1, title, PRIMARY_COLOR + style.bold);
|
|
71
83
|
// Box dimensions
|
|
72
84
|
const boxWidth = Math.min(60, width - 4);
|
|
73
|
-
const boxHeight =
|
|
85
|
+
const boxHeight = 14;
|
|
74
86
|
const { x: boxX, y: boxY } = centerBox(width, height, boxWidth, boxHeight);
|
|
75
87
|
// Draw box
|
|
76
88
|
const boxLines = createBox({
|
|
@@ -120,17 +132,34 @@ export class LoginScreen {
|
|
|
120
132
|
contentY++;
|
|
121
133
|
}
|
|
122
134
|
// Help text
|
|
123
|
-
|
|
135
|
+
this.screen.write(contentX, contentY, 'Ctrl+V: Paste | Ctrl+T: Toggle visibility', fg.gray);
|
|
136
|
+
contentY++;
|
|
137
|
+
const helpParts2 = [];
|
|
124
138
|
if (this.options.subscribeUrl) {
|
|
125
|
-
|
|
139
|
+
helpParts2.push('Ctrl+B: Get API key');
|
|
126
140
|
}
|
|
127
|
-
|
|
128
|
-
this.screen.write(contentX, contentY,
|
|
141
|
+
helpParts2.push('Esc: Cancel');
|
|
142
|
+
this.screen.write(contentX, contentY, helpParts2.join(' | '), fg.gray);
|
|
129
143
|
// Position cursor
|
|
130
144
|
this.screen.setCursor(cursorX, boxY + 5);
|
|
131
145
|
this.screen.showCursor(true);
|
|
132
146
|
this.screen.fullRender();
|
|
133
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Paste from clipboard
|
|
150
|
+
*/
|
|
151
|
+
async pasteFromClipboard() {
|
|
152
|
+
try {
|
|
153
|
+
const text = await clipboardy.read();
|
|
154
|
+
if (text) {
|
|
155
|
+
this.editor.setValue(text.trim());
|
|
156
|
+
this.render();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
// Clipboard not available
|
|
161
|
+
}
|
|
162
|
+
}
|
|
134
163
|
/**
|
|
135
164
|
* Reset state
|
|
136
165
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeep",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.30",
|
|
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",
|