MCPcopy Index your code
hub / github.com/Stevenic/codepilot / setKeys

Method setKeys

lib/CodeIndex.js:299–308  ·  view source on GitHub ↗

* Updates the OpenAI keys for the index. * @param keys Keys to use.

(keys)

Source from the content-addressed store, hash-verified

297 * @param keys Keys to use.
298 */
299 setKeys(keys) {
300 return __awaiter(this, void 0, void 0, function* () {
301 if (!(yield this.isCreated())) {
302 throw new Error('Index has not been created yet. Please run `codepilot create` first.');
303 }
304 // Overwrite keys file
305 yield fs.writeFile(path.join(this.folderPath, 'vectra.keys'), JSON.stringify(keys));
306 this._keys = keys;
307 });
308 }
309 /**
310 * Updates the code index configuration.
311 * @param config Settings to update.

Callers 1

runFunction · 0.95

Calls 1

isCreatedMethod · 0.95

Tested by

no test coverage detected