Skip to content

Commit a6dddce

Browse files
authored
Merge pull request #6148 from ethereum/ai_matomo_logs
adding matomo logs and versioning request params
2 parents da2b194 + 76ba28f commit a6dddce

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

apps/remix-ide/src/app/plugins/remixAIPlugin.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ export class RemixAIPlugin extends Plugin {
189189
params.stream_result = false // enforce no stream result
190190
params.threadId = newThreadID
191191
params.provider = this.assistantProvider
192+
_paq.push(['trackEvent', 'ai', 'remixAI', 'GenerateNewAIWorkspace'])
192193

193194
if (useRag) {
194195
try {
@@ -226,6 +227,7 @@ export class RemixAIPlugin extends Plugin {
226227
params.stream_result = false // enforce no stream result
227228
params.threadId = newThreadID
228229
params.provider = this.assistantProvider
230+
_paq.push(['trackEvent', 'ai', 'remixAI', 'WorkspaceAgentEdit'])
229231
if (useRag) {
230232
try {
231233
let ragContext = ""

libs/remix-ai-core/src/types/models.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const CompletionParams:IParams = {
5959
max_new_tokens: 15,
6060
stream_result: false,
6161
max_tokens: 200,
62+
version: '1.0.0'
6263
}
6364

6465
const InsertionParams:IParams = {
@@ -69,6 +70,7 @@ const InsertionParams:IParams = {
6970
stream_result: false,
7071
stream: false,
7172
model: "",
73+
version: '1.0.0',
7274
}
7375

7476
const GenerationParams:IParams = {
@@ -81,6 +83,7 @@ const GenerationParams:IParams = {
8183
model: "",
8284
repeat_penalty: 1.2,
8385
terminal_output: false,
86+
version: '1.0.0',
8487
}
8588

8689
const AssistantParams:IParams = GenerationParams

libs/remix-ai-core/src/types/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export interface IParams {
8989
model?: string;
9090
stop?: string[];
9191
chatHistory?: any[];
92+
version: string;
9293
}
9394

9495
export enum AIRequestType {

libs/remix-ui/remix-ai-assistant/src/components/remix-ui-remix-ai-assistant.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
126126
const refreshContext = useCallback(async (choice: typeof contextChoice) => {
127127
try {
128128
let files: string[] = []
129+
_paq.push(['trackEvent', 'remixAI', 'AddingAIContext', choice])
129130
switch (choice) {
130131
case 'none':
131132
await props.plugin.call('remixAI', 'setContextFiles', { context: 'none' })
@@ -369,6 +370,7 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
369370
setMessages([])
370371
sendPrompt(`/setAssistant ${assistantChoice}`)
371372
setAssistantChoice(assistantChoice || 'mistralai')
373+
_paq.push(['trackEvent', 'remixAI', 'SetAIProvider', assistantChoice])
372374
}
373375
}
374376
fetchAssistantChoice()
@@ -406,6 +408,7 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
406408

407409
if (description && description.trim()) {
408410
sendPrompt(`/generate ${description.trim()}`)
411+
_paq.push(['trackEvent', 'remixAI', 'GenerateNewAIWorkspaceFromModal', description])
409412
}
410413
} catch {
411414
/* user cancelled */

0 commit comments

Comments
 (0)