Skip to content

Commit cecf5f0

Browse files
committed
Merge branch 'feat/creator-mode'
2 parents a0cd623 + 0195cc2 commit cecf5f0

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/activate/registerPearListener.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as vscode from "vscode"
22
import { ClineProvider } from "../core/webview/ClineProvider"
33
import { assert } from "../utils/util"
44
import { PEARAI_CREATOR_MODE_WEBAPP_MANAGER_SLUG } from "../shared/modes"
5+
import { PearAIExtensionExports } from "@pearai/core"
56

67
export 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
3031
export 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;

src/core/webview/ClineProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/services/telemetry/PostHogClient.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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: {

src/shared/pearaiApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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

77
import {
88
anthropicModels,

0 commit comments

Comments
 (0)