@toothfairyai/tfcode 1.0.0-beta.5 → 1.0.0-beta.6

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 (2) hide show
  1. package/bin/tfcode.js +12 -39
  2. package/package.json +1 -1
package/bin/tfcode.js CHANGED
@@ -284,50 +284,23 @@ async function interactiveSetup() {
284
284
 
285
285
  log('');
286
286
 
287
- // Step 2: API Key (hidden)
287
+ // Step 2: API Key
288
288
  log(`${COLORS.bold}Step 2: API Key${COLORS.reset}`);
289
- log(`${COLORS.dim}Your API key will be hidden as you type${COLORS.reset}`);
289
+ log(`${COLORS.dim}Paste or type your API key${COLORS.reset}`);
290
290
  log('');
291
291
 
292
292
  const apiKey = await new Promise((resolve) => {
293
- if (!process.stdin.isTTY) {
294
- const rl = readline.createInterface({
295
- input: process.stdin,
296
- output: process.stdout
297
- });
298
- rl.question('Enter your API Key: ', (answer) => {
299
- rl.close();
300
- resolve(answer.trim());
301
- });
302
- return;
303
- }
304
-
305
- process.stdout.write('Enter your API Key: ');
306
- let input = '';
307
- const stdin = process.stdin;
308
-
309
- stdin.setRawMode(true);
310
- stdin.setEncoding('utf8');
311
- stdin.resume();
312
-
313
- const onKeypress = (str) => {
314
- if (str === '\n' || str === '\r' || str === '\u0004') {
315
- stdin.setRawMode(false);
316
- stdin.pause();
317
- stdin.removeListener('data', onKeypress);
318
- process.stdout.write('\n');
319
- resolve(input);
320
- } else if (str === '\u0003') {
321
- process.stdout.write('\n');
322
- process.exit();
323
- } else if (str === '\u007F' || str === '\b') {
324
- input = input.slice(0, -1);
325
- } else if (str.length === 1 && str.charCodeAt(0) >= 32) {
326
- input += str;
327
- }
328
- };
293
+ const rl = readline.createInterface({
294
+ input: process.stdin,
295
+ output: process.stdout
296
+ });
329
297
 
330
- stdin.on('data', onKeypress);
298
+ // Simple approach - just show the input (API keys are long anyway)
299
+ // This allows paste and works reliably
300
+ rl.question('Enter your API Key: ', (answer) => {
301
+ rl.close();
302
+ resolve(answer.trim());
303
+ });
331
304
  });
332
305
 
333
306
  if (!apiKey) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toothfairyai/tfcode",
3
- "version": "1.0.0-beta.5",
3
+ "version": "1.0.0-beta.6",
4
4
  "description": "ToothFairyAI's official AI coding agent",
5
5
  "keywords": ["toothfairyai", "ai", "coding", "cli"],
6
6
  "author": "ToothFairyAI",