MCPcopy Index your code
hub / github.com/continuedev/continue / buildConfigTsandReadConfigJs

Function buildConfigTsandReadConfigJs

core/config/load.ts:764–789  ·  view source on GitHub ↗
(ide: IDE, ideType: IdeType)

Source from the content-addressed store, hash-verified

762}
763
764async function buildConfigTsandReadConfigJs(ide: IDE, ideType: IdeType) {
765 const configTsPath = getConfigTsPath();
766
767 if (!fs.existsSync(configTsPath)) {
768 return;
769 }
770
771 const currentContent = fs.readFileSync(configTsPath, "utf8");
772
773 // If the user hasn't modified the default config.ts, don't bother building
774 if (currentContent.trim() === DEFAULT_CONFIG_TS_CONTENTS.trim()) {
775 return;
776 }
777
778 // Only bother with esbuild if config.ts is actually customized
779 if (currentContent.trim() !== DEFAULT_CONFIG_TS_CONTENTS.trim()) {
780 const ok = await handleEsbuildInstallation(ide, ideType);
781 if (!ok) {
782 // esbuild not available → we already showed a friendly message; skip building
783 return;
784 }
785 await tryBuildConfigTs();
786 }
787
788 return readConfigJs();
789}
790
791async function loadContinueConfigFromJson(
792 ide: IDE,

Callers 1

Calls 4

getConfigTsPathFunction · 0.90
tryBuildConfigTsFunction · 0.85
readConfigJsFunction · 0.85

Tested by

no test coverage detected