ropilot 0.1.25 → 0.1.26
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/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,
|