matomo back in

pull/5241/head
STetsing 1 month ago
parent 707699bc23
commit b237be8460
  1. 5
      libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts
  2. 2
      libs/remix-ui/remix-ai/src/lib/components/Default.tsx

@ -75,6 +75,7 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
this.props.plugin.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'RemixAI - generating code for following comment: ' + ask.replace('///', '') })
const data = await this.props.plugin.call('remixAI', 'code_insertion', word, word_after)
_paq.push(['trackEvent', 'ai', 'remixAI', 'code_generation'])
this.task = 'code_generation'
console.log("data: " + this.task, data)
@ -107,6 +108,8 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
// Code insertion
try {
const output = await this.props.plugin.call('remixAI', 'code_insertion', word, word_after)
_paq.push(['trackEvent', 'ai', 'remixAI', 'code_insertion'])
const generatedText = output // no need to clean it. should already be
this.task = 'code_insertion'
@ -133,7 +136,7 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli
// Code completion
this.task = 'code_completion'
const output = await this.props.plugin.call('remixAI', 'code_completion', word, word_after)
_paq.push(['trackEvent', 'ai', 'remixAI', this.task])
_paq.push(['trackEvent', 'ai', 'remixAI', 'code_completion'])
const generatedText = output
let clean = generatedText

@ -29,7 +29,7 @@ export const Default = (props) => {
if (GenerationParams.return_stream_response) HandleStreamResponse(response,
(text) => {observer.next(text)},
(result) => {
observer.next(' ') // Add a space to flush
observer.next(' ') // Add a space to flush the last message
ChatHistory.pushHistory(prompt, result)
observer.complete()
}

Loading…
Cancel
Save