@snapcommit/cli 3.8.2 ā 3.8.4
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/dist/repl/index.js +27 -1
- package/dist/repl/interpreter.js +3 -3
- package/package.json +1 -1
package/dist/repl/index.js
CHANGED
|
@@ -67,7 +67,14 @@ async function startREPL() {
|
|
|
67
67
|
});
|
|
68
68
|
rl.prompt();
|
|
69
69
|
rl.on('line', async (input) => {
|
|
70
|
-
|
|
70
|
+
let trimmed = input.trim();
|
|
71
|
+
// Strip "snap" prefix if user types it (they're already in snap!)
|
|
72
|
+
if (trimmed.startsWith('snap ')) {
|
|
73
|
+
trimmed = trimmed.substring(5).trim();
|
|
74
|
+
}
|
|
75
|
+
else if (trimmed.startsWith('snapcommit ')) {
|
|
76
|
+
trimmed = trimmed.substring(11).trim();
|
|
77
|
+
}
|
|
71
78
|
// Exit commands
|
|
72
79
|
if (trimmed === 'exit' || trimmed === 'quit' || trimmed === 'q') {
|
|
73
80
|
console.log(chalk_1.default.gray('\nš Great session! Keep building!\n'));
|
|
@@ -102,6 +109,25 @@ async function startREPL() {
|
|
|
102
109
|
rl.prompt();
|
|
103
110
|
return;
|
|
104
111
|
}
|
|
112
|
+
// GitHub commands
|
|
113
|
+
if (trimmed === 'github connect' || trimmed === 'connect github') {
|
|
114
|
+
const { githubConnectCommand } = await Promise.resolve().then(() => __importStar(require('../commands/github-connect')));
|
|
115
|
+
await githubConnectCommand();
|
|
116
|
+
rl.prompt();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (trimmed === 'github status' || trimmed === 'github info') {
|
|
120
|
+
const { githubStatusCommand } = await Promise.resolve().then(() => __importStar(require('../commands/github-connect')));
|
|
121
|
+
await githubStatusCommand();
|
|
122
|
+
rl.prompt();
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (trimmed === 'github disconnect') {
|
|
126
|
+
const { githubDisconnectCommand } = await Promise.resolve().then(() => __importStar(require('../commands/github-connect')));
|
|
127
|
+
await githubDisconnectCommand();
|
|
128
|
+
rl.prompt();
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
105
131
|
// Switch repo by name or index
|
|
106
132
|
const switchRepoMatch = trimmed.match(/^(?:switch to|cd|goto) (.+)$/i);
|
|
107
133
|
if (switchRepoMatch) {
|
package/dist/repl/interpreter.js
CHANGED
|
@@ -41,7 +41,6 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
41
41
|
const child_process_1 = require("child_process");
|
|
42
42
|
const git_interpreter_1 = require("../ai/git-interpreter");
|
|
43
43
|
const gemini_client_1 = require("../ai/gemini-client");
|
|
44
|
-
const quick_1 = require("../commands/quick");
|
|
45
44
|
const stats_1 = require("../commands/stats");
|
|
46
45
|
const readline_1 = __importDefault(require("readline"));
|
|
47
46
|
const github = __importStar(require("../lib/github"));
|
|
@@ -156,12 +155,13 @@ function normalizeInput(input, context) {
|
|
|
156
155
|
*/
|
|
157
156
|
async function tryQuickCommands(input, context) {
|
|
158
157
|
const lower = input.toLowerCase();
|
|
159
|
-
// Commit commands
|
|
158
|
+
// Commit commands - Use Cursor-style handler!
|
|
160
159
|
if (lower === 'commit' ||
|
|
161
160
|
lower === 'commit my changes' ||
|
|
162
161
|
lower === 'commit my work' ||
|
|
163
162
|
lower.startsWith('commit ')) {
|
|
164
|
-
await (
|
|
163
|
+
const { executeCursorStyle } = await Promise.resolve().then(() => __importStar(require('../commands/cursor-style')));
|
|
164
|
+
await executeCursorStyle(input);
|
|
165
165
|
context.lastAction = 'commit';
|
|
166
166
|
return true;
|
|
167
167
|
}
|