patchcord 0.5.71 → 0.5.72
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/bin/patchcord.mjs +3 -3
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -1367,7 +1367,8 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1367
1367
|
// Create session
|
|
1368
1368
|
let sessionId = "";
|
|
1369
1369
|
try {
|
|
1370
|
-
const
|
|
1370
|
+
const folder = basename(process.cwd());
|
|
1371
|
+
const resp = run(`curl -sf --max-time 10 -X POST "${apiUrl}/api/connect/session" -H "Content-Type: application/json" -d '{"tool":"${choice}","folder":"${folder}"}'`);
|
|
1371
1372
|
if (resp) {
|
|
1372
1373
|
const data = JSON.parse(resp);
|
|
1373
1374
|
sessionId = data.session_id || "";
|
|
@@ -1405,8 +1406,7 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
1405
1406
|
// page skips its type picker (the user already chose on the
|
|
1406
1407
|
// dashboard tile).
|
|
1407
1408
|
const toolParam = toolSlug ? `&tool=${encodeURIComponent(toolSlug)}` : "";
|
|
1408
|
-
const
|
|
1409
|
-
const connectUrl = `https://patchcord.dev/connect?session=${sessionId}${toolParam}${cwdParam}`;
|
|
1409
|
+
const connectUrl = `https://patchcord.dev/connect?session=${sessionId}${toolParam}`;
|
|
1410
1410
|
|
|
1411
1411
|
if (canOpenBrowser()) {
|
|
1412
1412
|
const opened = openBrowser(connectUrl);
|