added solcoder events to matamo

pull/5370/head
Stéphane Tetsing 8 months ago
parent eb512eec21
commit 6401cdcc84
  1. 2
      libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts
  2. 5
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

@ -55,6 +55,7 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
this.props.plugin.call('terminal', 'log', {type: 'aitypewriterwarning', value: 'Solcoder - generating code for following comment: ' + ask.replace('///', '')}) this.props.plugin.call('terminal', 'log', {type: 'aitypewriterwarning', value: 'Solcoder - generating code for following comment: ' + ask.replace('///', '')})
const data = await this.props.plugin.call('solcoder', 'code_generation', word) const data = await this.props.plugin.call('solcoder', 'code_generation', word)
_paq.push(['trackEvent', 'ai', 'solcoder', 'code_generation'])
const parsedData = data[0].trimStart() //JSON.parse(data).trimStart() const parsedData = data[0].trimStart() //JSON.parse(data).trimStart()
const item: monacoTypes.languages.InlineCompletion = { const item: monacoTypes.languages.InlineCompletion = {
@ -93,6 +94,7 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
let result let result
try { try {
const output = await this.props.plugin.call('solcoder', 'code_completion', word) const output = await this.props.plugin.call('solcoder', 'code_completion', word)
_paq.push(['trackEvent', 'ai', 'solcoder', 'code_completion'])
const generatedText = output[0] const generatedText = output[0]
let clean = generatedText let clean = generatedText

@ -288,7 +288,10 @@ export const TabsUI = (props: TabsUIProps) => {
id="remix_ai_docs" id="remix_ai_docs"
className="btn ai-docs" className="btn ai-docs"
role='link' role='link'
onClick={()=>{window.open("https://remix-ide.readthedocs.io/en/latest/security.html")}} onClick={()=>{
window.open("https://remix-ide.readthedocs.io/en/latest/security.html")
_paq.push(['trackEvent', 'ai', 'solcoder', 'documentation'])
}}
> >
<i className="fa-solid fa-book text-ai"></i> <i className="fa-solid fa-book text-ai"></i>
<span <span

Loading…
Cancel
Save