ropilot 0.1.25 → 0.1.27
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/config.js +3 -0
- package/lib/proxy.js +9 -0
- package/lib/setup.js +3 -3
- package/package.json +1 -1
package/lib/config.js
CHANGED
|
@@ -84,6 +84,9 @@ export function saveProjectConfig(config) {
|
|
|
84
84
|
export function setProjectApiKey(apiKey) {
|
|
85
85
|
const config = loadProjectConfig() || {};
|
|
86
86
|
config.apiKey = apiKey;
|
|
87
|
+
if (config.autoUpdate === undefined) {
|
|
88
|
+
config.autoUpdate = true; // Default to true, user can set to false to disable
|
|
89
|
+
}
|
|
87
90
|
saveProjectConfig(config);
|
|
88
91
|
}
|
|
89
92
|
|
package/lib/proxy.js
CHANGED
|
@@ -118,6 +118,15 @@ async function processRequest(apiKey, request) {
|
|
|
118
118
|
*/
|
|
119
119
|
function runBackgroundUpdate() {
|
|
120
120
|
try {
|
|
121
|
+
// Check if auto-update is disabled in .ropilot.json
|
|
122
|
+
const configPath = join(process.cwd(), '.ropilot.json');
|
|
123
|
+
if (existsSync(configPath)) {
|
|
124
|
+
const config = JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
125
|
+
if (config.autoUpdate === false) {
|
|
126
|
+
return; // User disabled auto-update
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
121
130
|
const child = spawn('npx', ['ropilot', 'update'], {
|
|
122
131
|
cwd: process.cwd(),
|
|
123
132
|
detached: true,
|
package/lib/setup.js
CHANGED
|
@@ -240,7 +240,7 @@ async function downloadPrompts(apiKey) {
|
|
|
240
240
|
*/
|
|
241
241
|
function getDefaultPrompts() {
|
|
242
242
|
return {
|
|
243
|
-
'CLAUDE.md': `@
|
|
243
|
+
'CLAUDE.md': `@ROPILOT.md\n`,
|
|
244
244
|
'ROPILOT.md': `# Ropilot\n\nRoblox Studio AI assistant. Use ropilot_* MCP tools to interact with Studio.\n`
|
|
245
245
|
};
|
|
246
246
|
}
|
|
@@ -265,8 +265,8 @@ function setupProjectPrompts(pkg) {
|
|
|
265
265
|
if (existsSync(fullPath)) {
|
|
266
266
|
if (fullPath === 'CLAUDE.md') {
|
|
267
267
|
const existing = readFileSync(fullPath, 'utf-8');
|
|
268
|
-
if (!existing.includes('@
|
|
269
|
-
writeFileSync(fullPath, existing.trimEnd() + '\n\n@
|
|
268
|
+
if (!existing.includes('@ROPILOT.md')) {
|
|
269
|
+
writeFileSync(fullPath, existing.trimEnd() + '\n\n@ROPILOT.md\n');
|
|
270
270
|
updated++;
|
|
271
271
|
} else {
|
|
272
272
|
skipped++;
|