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

Method createSingleton

core/indexing/docs/DocsService.ts:217–225  ·  view source on GitHub ↗
(
    configHandler: ConfigHandler,
    ide: IDE,
    messenger?: IMessenger<ToCoreProtocol, FromCoreProtocol>,
  )

Source from the content-addressed store, hash-verified

215 // Singleton pattern: only one service globally
216 private static instance?: DocsService;
217 static createSingleton(
218 configHandler: ConfigHandler,
219 ide: IDE,
220 messenger?: IMessenger<ToCoreProtocol, FromCoreProtocol>,
221 ) {
222 const docsService = new DocsService(configHandler, ide, messenger);
223 DocsService.instance = docsService;
224 return docsService;
225 }
226
227 static getSingleton() {
228 return DocsService.instance;

Callers 1

constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected