@@ -71,6 +71,7 @@ import { deleteFromContextDirectory } from "@utils/delete-helper"
7171import { isLocalMcp , getLocalMcpDetails , getLocalMcp , getAllLocalMcps } from "@utils/local-mcp-registry"
7272import { getStarCount } from "../../services/github/github"
7373import { openFile } from "@integrations/misc/open-file"
74+ import { posthogClientProvider } from "@/services/posthog/PostHogClientProvider"
7475
7576/*
7677https://github.com/microsoft/vscode-webview-ui-toolkit-samples/blob/main/default/weather-webview/src/providers/WeatherViewProvider.ts
@@ -263,7 +264,6 @@ export class Controller {
263264 await this . postStateToWebview ( )
264265 break
265266 case "webviewDidLaunch" :
266- await this . updateHaiRulesState ( )
267267 this . postStateToWebview ( )
268268 this . workspaceTracker ?. populateFilePaths ( ) // don't await
269269 getTheme ( ) . then ( ( theme ) =>
@@ -742,9 +742,6 @@ export class Controller {
742742 ollamaEmbeddingModels,
743743 } )
744744 break
745- case "checkHaiRules" :
746- await this . updateHaiRulesState ( true )
747- break
748745 case "showToast" :
749746 switch ( message . toast ?. toastType ) {
750747 case "info" :
@@ -1877,7 +1874,6 @@ Here is the project's README to help you get started:\n\n${mcpDetails.readmeCont
18771874 lastShownAnnouncementId,
18781875 customInstructions,
18791876 expertPrompt,
1880- isHaiRulesPresent,
18811877 taskHistory,
18821878 autoApprovalSettings,
18831879 browserSettings,
@@ -1907,7 +1903,6 @@ Here is the project's README to help you get started:\n\n${mcpDetails.readmeCont
19071903 apiConfiguration,
19081904 customInstructions,
19091905 expertPrompt,
1910- isHaiRulesPresent,
19111906 uriScheme : vscode . env . uriScheme ,
19121907 currentTaskItem : this . task ?. taskId ? ( taskHistory || [ ] ) . find ( ( item ) => item . id === this . task ?. taskId ) : undefined ,
19131908 checkpointTrackerErrorMessage : this . task ?. checkpointTrackerErrorMessage ,
@@ -2512,19 +2507,13 @@ Commit message:`
25122507 }
25132508 }
25142509
2515- async updateHaiRulesState ( postToWebview : boolean = false ) {
2516- const workspaceFolder = getWorkspacePath ( )
2517- if ( ! workspaceFolder ) {
2518- return
2519- }
2520- const haiRulesPath = path . join ( workspaceFolder , GlobalFileNames . clineRules )
2521- const isHaiRulePresent = await fileExistsAtPath ( haiRulesPath )
2522-
2523- await customUpdateState ( this . context , "isHaiRulesPresent" , isHaiRulePresent )
2510+ async updateTelemetryConfig ( ) {
2511+ // Create new posthost client
2512+ posthogClientProvider . initPostHogClient ( )
25242513
2525- if ( postToWebview ) {
2526- await this . postStateToWebview ( )
2527- }
2514+ // Update langfuse and posthog instance in telemetry
2515+ telemetryService . initPostHogClient ( )
2516+ telemetryService . initLangfuseClient ( )
25282517 }
25292518
25302519 async updateExpertPrompt ( prompt ?: string , expertName ?: string ) {
0 commit comments