genbox 1.0.148 → 1.0.149

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.
@@ -45,7 +45,8 @@ const child_process_1 = require("child_process");
45
45
  const os = __importStar(require("os"));
46
46
  const path = __importStar(require("path"));
47
47
  const fs = __importStar(require("fs"));
48
- const inquirer_1 = __importDefault(require("inquirer"));
48
+ const select_1 = __importDefault(require("@inquirer/select"));
49
+ const confirm_1 = __importDefault(require("@inquirer/confirm"));
49
50
  function getPrivateSshKey() {
50
51
  const home = os.homedir();
51
52
  const potentialKeys = [
@@ -119,17 +120,20 @@ async function selectSession(sessions, allowNew = true) {
119
120
  name: chalk_1.default.dim('Cancel'),
120
121
  value: '__cancel__',
121
122
  });
122
- const { session } = await inquirer_1.default.prompt([
123
- {
124
- type: 'list',
125
- name: 'session',
123
+ try {
124
+ const session = await (0, select_1.default)({
126
125
  message: allowNew ? 'Select a session or create new:' : 'Select a session to attach:',
127
126
  choices,
128
- pageSize: 15,
129
- loop: false,
130
- },
131
- ]);
132
- return session === '__cancel__' ? null : session;
127
+ });
128
+ return session === '__cancel__' ? null : session;
129
+ }
130
+ catch (error) {
131
+ // Handle Ctrl+C
132
+ if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
133
+ return null;
134
+ }
135
+ throw error;
136
+ }
133
137
  }
134
138
  function generateSessionName() {
135
139
  const adjectives = ['swift', 'bright', 'calm', 'bold', 'keen', 'warm', 'cool', 'quick'];
@@ -166,15 +170,19 @@ async function createClaudeSession(ipAddress, keyPath, sessionName) {
166
170
  }
167
171
  }
168
172
  async function promptCreateSession() {
169
- const { create } = await inquirer_1.default.prompt([
170
- {
171
- type: 'confirm',
172
- name: 'create',
173
+ try {
174
+ return await (0, confirm_1.default)({
173
175
  message: 'No active sessions found. Create a new Claude session?',
174
176
  default: true,
175
- },
176
- ]);
177
- return create;
177
+ });
178
+ }
179
+ catch (error) {
180
+ // Handle Ctrl+C
181
+ if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
182
+ return false;
183
+ }
184
+ throw error;
185
+ }
178
186
  }
179
187
  async function ensureTmuxConfig(ipAddress, keyPath) {
180
188
  const configPath = '/home/dev/.tmux.conf';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.148",
3
+ "version": "1.0.149",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {