MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / enable

Method enable

lib/ai.js:58–71  ·  view source on GitHub ↗
(config = {})

Source from the content-addressed store, hash-verified

56 }
57
58 async enable(config = {}) {
59 debug('Enabling AI assistant')
60 this.isEnabled = true
61
62 const { html, prompts, ...aiConfig } = config
63
64 this.config = Object.assign(this.config, aiConfig)
65 this.htmlConfig = Object.assign(defaultHtmlConfig, html)
66
67 const loadedPrompts = await loadPrompts()
68 this.prompts = Object.assign(loadedPrompts, prompts || {})
69
70 debug('Config', this.config)
71 }
72
73 reset() {
74 this.numTokens = 0

Callers 2

createMethod · 0.80
ai_test.jsFile · 0.80

Calls 2

debugFunction · 0.85
loadPromptsFunction · 0.85

Tested by

no test coverage detected