added solcoder events to matamo

pull/4554/head
Stéphane Tetsing 8 months ago
parent 157f84a942
commit ef6589edec
  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('///', '')})
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 item: monacoTypes.languages.InlineCompletion = {
@ -93,6 +94,7 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
let result
try {
const output = await this.props.plugin.call('solcoder', 'code_completion', word)
_paq.push(['trackEvent', 'ai', 'solcoder', 'code_completion'])
const generatedText = output[0]
let clean = generatedText

@ -288,7 +288,10 @@ export const TabsUI = (props: TabsUIProps) => {
id="remix_ai_docs"
className="btn ai-docs"
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>
<span

Loading…
Cancel
Save