vcode-cli 1.0.3 → 1.0.5
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/lib/commands/start.js +10 -4
- package/package.json +1 -1
package/lib/commands/start.js
CHANGED
|
@@ -38,19 +38,25 @@ export async function start(opts = {}) {
|
|
|
38
38
|
|
|
39
39
|
const serverUrl = process.env.VCODE_WS_URL ||
|
|
40
40
|
(process.env.VCODE_LOCAL === 'false' ? 'wss://vynthen.com/api/vcode-ws' : 'ws://localhost:3001');
|
|
41
|
+
const displayUrl = process.env.VCODE_LOCAL === 'false' ? 'vynthen.com' : 'localhost:3001';
|
|
41
42
|
const autoStartServer = opts.server !== false && opts.server !== undefined;
|
|
42
43
|
|
|
43
44
|
// Try to find the server script
|
|
44
45
|
const serverScript = path.join(process.cwd(), 'lib', 'server.js');
|
|
45
46
|
const serverExists = fs.existsSync(serverScript);
|
|
46
47
|
|
|
48
|
+
const globalLibDir = path.join(path.dirname(process.execPath), '..', 'lib', 'node_modules', 'vcode-cli');
|
|
49
|
+
const globalServerScript = path.join(globalLibDir, 'lib', 'server.js');
|
|
50
|
+
const finalServerScript = serverExists ? serverScript : (fs.existsSync(globalServerScript) ? globalServerScript : null);
|
|
51
|
+
|
|
47
52
|
// Start the WebSocket server automatically if not already running
|
|
48
53
|
let serverProcess = null;
|
|
49
54
|
|
|
50
|
-
if (autoStartServer &&
|
|
55
|
+
if (autoStartServer && finalServerScript) {
|
|
56
|
+
console.log(chalk.gray(` Server script: ${finalServerScript}`));
|
|
51
57
|
console.log(chalk.gray(' Starting V Code WebSocket server...'));
|
|
52
58
|
|
|
53
|
-
serverProcess = spawn('node', [
|
|
59
|
+
serverProcess = spawn('node', [finalServerScript], {
|
|
54
60
|
stdio: 'inherit',
|
|
55
61
|
detached: false
|
|
56
62
|
});
|
|
@@ -67,12 +73,12 @@ export async function start(opts = {}) {
|
|
|
67
73
|
|
|
68
74
|
console.log('');
|
|
69
75
|
console.log(chalk.gray(' ─────────────────────────────────────────────────────'));
|
|
70
|
-
console.log(chalk.hex('#a855f7').bold(' Vynthen V Code —
|
|
76
|
+
console.log(chalk.hex('#a855f7').bold(' Vynthen V Code — Bridge'));
|
|
71
77
|
console.log(chalk.gray(' ─────────────────────────────────────────────────────'));
|
|
72
78
|
console.log('');
|
|
73
79
|
console.log(chalk.white(' User: ') + chalk.cyan(user || 'authenticated'));
|
|
74
80
|
console.log(chalk.white(' Mode: ') + chalk.gray(opts.approveAll ? 'Auto-approve' : 'Human-in-the-loop'));
|
|
75
|
-
console.log(chalk.white(' Endpoint: ') + chalk.gray(
|
|
81
|
+
console.log(chalk.white(' Endpoint: ') + chalk.gray(displayUrl));
|
|
76
82
|
console.log('');
|
|
77
83
|
|
|
78
84
|
let currentWorkingDir = process.cwd();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vcode-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Connect your local machine to Vynthen V Code — a powerful AI code agent with full system control, secure keychain auth, and human-in-the-loop permissions.",
|
|
6
6
|
"main": "bin/vcode.js",
|