File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as vscode from "vscode"
22import { ClineProvider } from "../core/webview/ClineProvider"
33import { assert } from "../utils/util"
44import { PEARAI_CREATOR_MODE_WEBAPP_MANAGER_SLUG } from "../shared/modes"
5+ import { PearAIExtensionExports } from "@pearai/core"
56
67export const getPearaiExtension = async ( ) => {
78 const pearAiExtension = vscode . extensions . getExtension ( "pearai.pearai" )
@@ -16,7 +17,7 @@ export const getPearaiExtension = async () => {
1617}
1718
1819// TODO: TYPES
19- export const getpearAIExports = async ( ) => {
20+ export const getpearAIExports = async ( ) : Promise < PearAIExtensionExports > => {
2021 const pearAiExtension = await getPearaiExtension ( )
2122
2223 assert ( ! ! pearAiExtension . exports , "⚠️⚠️ Error, no PearAI Exports could be found :( ⚠️⚠️" ) ;
@@ -30,8 +31,7 @@ type CreatorModeState = "OVERLAY_CLOSED" | "OVERLAY_OPEN" | "OVERLAY_CLOSED_CREA
3031export const registerPearListener = async ( provider : ClineProvider ) => {
3132 // Getting the pear ai extension instance
3233 const exports = await getpearAIExports ( )
33-
34- exports . pearAPI . creatorMode . onDidRequestExecutePlan ( async ( msg : any ) => {
34+ exports . pearAPI . creatorMode . onDidRequestExecutePlan ( async ( msg ) => {
3535 console . dir ( `onDidRequestNewTask triggered with: ${ JSON . stringify ( msg ) } ` )
3636
3737 let canContinue = false ;
Original file line number Diff line number Diff line change @@ -1272,7 +1272,7 @@ export class ClineProvider extends EventEmitter<ClineProviderEvents> implements
12721272 ...baseApiConfiguration
12731273 }
12741274
1275- const telemetryKey = 'phc_RRjQ4roADRjH6xMbXDUDTA9WLeM5ePPvAJK19w3yj0z '
1275+ const telemetryKey = 'phc_EixCfQZYA5It6ZjtZG2C8THsUQzPzXZsdCsvR8AYhfh '
12761276 const machineId = vscode . env . machineId
12771277 const allowedCommands = vscode . workspace . getConfiguration ( "roo-cline" ) . get < string [ ] > ( "allowedCommands" ) || [ ]
12781278 const cwd = this . cwd
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export class PostHogClient {
5050 this . pearaiId = this . vscMachineId // Initialize with machine ID as fallback
5151 this . telemetryEnabled = true
5252 this . providerRef = null
53- this . client = new PostHog ( 'phc_RRjQ4roADRjH6xMbXDUDTA9WLeM5ePPvAJK19w3yj0z ' , { host : "https://us.i.posthog.com" } )
53+ this . client = new PostHog ( 'phc_EixCfQZYA5It6ZjtZG2C8THsUQzPzXZsdCsvR8AYhfh ' , { host : "https://us.i.posthog.com" } )
5454
5555 // getting the pearai id from the submodule
5656 void this . initializePearAIId ( )
@@ -59,8 +59,9 @@ export class PostHogClient {
5959 private async initializePearAIId ( ) : Promise < void > {
6060 try {
6161 const exports = await getpearAIExports ( )
62- if ( exports ) {
63- this . pearaiId = await exports . pearAPI . getUserId ( )
62+ const pearaiId = await exports . pearAPI . getUserId ( )
63+ if ( pearaiId ) {
64+ this . pearaiId = pearaiId
6465 this . client . identify ( {
6566 distinctId : this . vscMachineId ,
6667 properties : {
Original file line number Diff line number Diff line change 11// CHANGE AS NEEDED FOR DEVELOPMENT
22// PROD:
3- export const PEARAI_URL = "https://server.trypear.ai/pearai-server-api2/integrations/cline"
3+ // export const PEARAI_URL = "https://server.trypear.ai/pearai-server-api2/integrations/cline"
44// DEV:
5- // export const PEARAI_URL = "http://localhost:8000/integrations/cline"
5+ export const PEARAI_URL = "http://localhost:8000/integrations/cline"
66
77import {
88 anthropicModels ,
You can’t perform that action at this time.
0 commit comments