🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@rajinthan17/dot-cli

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rajinthan17/dot-cli - npm Package Compare versions

Comparing version
1.0.8
to
1.0.9
+49
-3
index.js

@@ -220,4 +220,3 @@ #!/usr/bin/env node

const reviewFileName = path.basename(codeReviewPath);
const parts = stagedFiles.map((f) => ({ type: "tag", value: f }));
parts.push({ type: "tag", value: reviewFileName });
const filesToTag = [...stagedFiles, reviewFileName];

@@ -234,3 +233,50 @@ console.log(

);
openCursorChat(parts);
if (process.platform === "darwin") {
try {
spawn("open", ["-a", "Cursor"], { stdio: "ignore", detached: true });
} catch {
// ignore
}
const lines = [
'tell application "Cursor" to activate',
"delay 0.5",
'tell application "System Events"',
'keystroke "l" using {command down}',
"delay 0.3",
];
for (const fileName of filesToTag) {
// Perform tagging sequence: @ -> wait -> filename -> wait -> enter
lines.push('keystroke "@"');
lines.push("delay 0.4");
lines.push(`keystroke ${JSON.stringify(fileName)}`);
lines.push("delay 0.6");
lines.push("key code 36"); // Enter to select from picker
lines.push('keystroke " "'); // Space after chip
lines.push("delay 0.1");
}
lines.push("end tell");
const chatProcess = spawn("osascript", lines.flatMap((l) => ["-e", l]), {
stdio: "inherit",
});
chatProcess.on("exit", (code) => {
if (code === 0) {
console.log(chalk.green(`✔ Cursor Chat triggered with tags.\n`));
} else {
console.log(
chalk.red(
`✖ Couldn't trigger Cursor Chat (osascript exit code ${code}).\n`,
),
);
}
});
} else {
console.log(chalk.yellow("ℹ Tagging is currently only supported on macOS.\n"));
spawn("cursor", [], { stdio: "inherit" });
}
});

@@ -237,0 +283,0 @@

+1
-1
{
"name": "@rajinthan17/dot-cli",
"version": "1.0.8",
"version": "1.0.9",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",