Skip to content

Commit 01bb7fb

Browse files
authored
Merge branch 'master' into minor-aichat-patch
2 parents be22a68 + 97b21b7 commit 01bb7fb

File tree

6 files changed

+14
-0
lines changed

6 files changed

+14
-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/app/src/lib/remix-app/components/modals/managePreferences.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ const ManagePreferencesDialog = (props) => {
118118
settings.updateMatomoAnalyticsChoice(true) // Always true for matomo Anonymous analytics
119119
settings.updateMatomoPerfAnalyticsChoice(switcherState.current.matPerfSwitch) // Enable/Disable Matomo Performance analytics
120120
settings.updateCopilotChoice(switcherState.current.remixAISwitch) // Enable/Disable RemixAI copilot
121+
_paq.push(['trackEvent', 'landingPage', 'MatomoAIModal', `MatomoPerfStatus: ${switcherState.current.matPerfSwitch}`])
122+
_paq.push(['trackEvent', 'landingPage', 'MatomoAIModal', `AICopilotStatus: ${switcherState.current.remixAISwitch}`])
121123
setVisible(false)
122124
props.savePreferencesFn()
123125
}

libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,17 @@ const MatomoDialog = (props: MatomoDialogProps) => {
6666
}, [visible])
6767

6868
const handleAcceptAllClick = async () => {
69+
_paq.push(['setConsentGiven']) // default consent to process their anonymous data
6970
settings.updateMatomoAnalyticsChoice(true) // Enable Matomo Anonymous analytics
7071
settings.updateMatomoPerfAnalyticsChoice(true) // Enable Matomo Performance analytics
7172
settings.updateCopilotChoice(true) // Enable RemixAI copilot
73+
_paq.push(['trackEvent', 'landingPage', 'MatomoAIModal', 'AcceptClicked'])
7274
setVisible(false)
7375
props.acceptAllFn()
7476
}
7577

7678
const handleManagePreferencesClick = async () => {
79+
_paq.push(['trackEvent', 'landingPage', 'MatomoAIModal', 'ManagePreferencesClicked'])
7780
setVisible(false)
7881
props.managePreferencesFn()
7982
}

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
@@ -130,6 +130,7 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
130130
const refreshContext = useCallback(async (choice: typeof contextChoice) => {
131131
try {
132132
let files: string[] = []
133+
_paq.push(['trackEvent', 'remixAI', 'AddingAIContext', choice])
133134
switch (choice) {
134135
case 'none':
135136
await props.plugin.call('remixAI', 'setContextFiles', { context: 'none' })
@@ -373,6 +374,7 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
373374
setMessages([])
374375
sendPrompt(`/setAssistant ${assistantChoice}`)
375376
setAssistantChoice(assistantChoice || 'mistralai')
377+
_paq.push(['trackEvent', 'remixAI', 'SetAIProvider', assistantChoice])
376378
}
377379
}
378380
fetchAssistantChoice()
@@ -410,6 +412,7 @@ export const RemixUiRemixAiAssistant = React.forwardRef<
410412

411413
if (description && description.trim()) {
412414
sendPrompt(`/generate ${description.trim()}`)
415+
_paq.push(['trackEvent', 'remixAI', 'GenerateNewAIWorkspaceFromModal', description])
413416
}
414417
} catch {
415418
/* user cancelled */

0 commit comments

Comments
 (0)