From a2d75e81167bdc7ceb35e46be4ced3aadf283563 Mon Sep 17 00:00:00 2001 From: "EchoLayer Bot (Stag)" Date: Wed, 13 Mar 2024 18:28:07 +0000 Subject: [PATCH] Added comments to explain the purpose of the getDefaultCodexServiceForRepo method. --- codex-vscode/src/services/undefinedTextEditor.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codex-vscode/src/services/undefinedTextEditor.service.ts b/codex-vscode/src/services/undefinedTextEditor.service.ts index 9ab52ed3..8b7f8679 100644 --- a/codex-vscode/src/services/undefinedTextEditor.service.ts +++ b/codex-vscode/src/services/undefinedTextEditor.service.ts @@ -54,15 +54,18 @@ export class UndefinedTextEditorService implements ITextEditorService { } public async getDefaultCodexServiceForRepo(repositoryService: any): Promise { + // Retrieve the default Codex configuration for the given repository const codex: Codex = await UserService.getInstance() .getCCLCodexServiceWrapper() .getDefaultCodex(repositoryService.origin); + // If a Codex configuration is found, create and return a new CodexService instance if (codex) { return new CodexService(codex.id, UserService.getInstance(), vscode.Uri.file(repositoryService.directory.fsPath)); } } + public async getContexts(force?: boolean): Promise { if (force) { this.contexts = (