genbox 1.0.160 → 1.0.161

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.
@@ -469,17 +469,18 @@ async function attachToSession(ipAddress, keyPath, sessionName, genboxName) {
469
469
  return;
470
470
  }
471
471
  lastClipboard = currentClipboard;
472
- // Debug: show that we detected a clipboard change (only if it looks like a path)
473
- if (currentClipboard.includes('/Users/') || currentClipboard.includes('/var/') || currentClipboard.includes('/tmp/')) {
474
- process.stderr.write(`\n${chalk_1.default.dim('📋 Clipboard changed, checking for image path...')}\n`);
475
- }
476
472
  // Try to extract a local image path
477
473
  const extractResult = extractLocalImagePath(currentClipboard);
478
474
  // If file path was detected but file doesn't exist (e.g., macOS temp file was cleaned up)
479
475
  if (extractResult.notFound) {
480
476
  const fileName = path.basename(extractResult.notFound);
481
- process.stderr.write(`\n${chalk_1.default.yellow('!')} Screenshot file was already deleted: ${chalk_1.default.dim(fileName)}\n`);
482
- process.stderr.write(chalk_1.default.dim(' Tip: Save screenshot to Desktop first, then drag into terminal.\n'));
477
+ // Use macOS notification since tmux obscures stderr
478
+ if (os.platform() === 'darwin') {
479
+ try {
480
+ (0, child_process_1.execSync)(`osascript -e 'display notification "File not found: ${fileName.replace(/'/g, "\\'")}" with title "Genbox" sound name "Basso"'`, { stdio: 'ignore' });
481
+ }
482
+ catch { }
483
+ }
483
484
  return;
484
485
  }
485
486
  if (!extractResult.path) {
@@ -490,19 +491,36 @@ async function attachToSession(ipAddress, keyPath, sessionName, genboxName) {
490
491
  if (uploadedPaths.has(localPath)) {
491
492
  return;
492
493
  }
493
- // Show that we found a valid image path
494
- process.stderr.write(`${chalk_1.default.yellow('⬆')} Uploading ${chalk_1.default.dim(path.basename(localPath))}...\n`);
494
+ // Show uploading notification
495
+ const fileName = path.basename(localPath);
496
+ if (os.platform() === 'darwin') {
497
+ try {
498
+ (0, child_process_1.execSync)(`osascript -e 'display notification "Uploading ${fileName.replace(/'/g, "\\'").substring(0, 50)}..." with title "Genbox"'`, { stdio: 'ignore' });
499
+ }
500
+ catch { }
501
+ }
495
502
  // Upload the file (this happens in background, might cause brief pause)
496
503
  const result = uploadFileSync(localPath, ipAddress, keyPath);
497
504
  if (result.success) {
498
505
  uploadedPaths.add(localPath);
499
506
  // Replace clipboard with remote path
500
507
  setClipboard(result.remotePath);
501
- // Use stderr to not interfere with terminal
502
- process.stderr.write(`\n${chalk_1.default.green('')} Uploaded ${chalk_1.default.dim(path.basename(localPath))} → clipboard has remote path. Just Cmd+V!\n`);
508
+ // Use macOS notification since tmux obscures stderr
509
+ if (os.platform() === 'darwin') {
510
+ try {
511
+ (0, child_process_1.execSync)(`osascript -e 'display notification "Clipboard now has remote path. Cmd+V to paste!" with title "✓ Image Uploaded" sound name "Glass"'`, { stdio: 'ignore' });
512
+ }
513
+ catch { }
514
+ }
503
515
  }
504
516
  else {
505
- process.stderr.write(`\n${chalk_1.default.red('x')} Failed to upload: ${chalk_1.default.dim(result.error || 'unknown error')}\n`);
517
+ // Notification for failure
518
+ if (os.platform() === 'darwin') {
519
+ try {
520
+ (0, child_process_1.execSync)(`osascript -e 'display notification "Upload failed: ${(result.error || 'unknown').replace(/'/g, "\\'")}" with title "Genbox" sound name "Basso"'`, { stdio: 'ignore' });
521
+ }
522
+ catch { }
523
+ }
506
524
  }
507
525
  }
508
526
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.160",
3
+ "version": "1.0.161",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {