@@ -74,7 +74,6 @@ import { MarketplaceManager } from "../../services/marketplace"
7474import { ShadowCheckpointService } from "../../services/checkpoints/ShadowCheckpointService"
7575import { CodeIndexManager } from "../../services/code-index/manager"
7676import type { IndexProgressUpdate } from "../../services/code-index/interfaces/manager"
77- import { MdmService } from "../../services/mdm/MdmService"
7877import { SkillsManager } from "../../services/skills/SkillsManager"
7978
8079import { fileExistsAtPath } from "../../utils/fs"
@@ -143,7 +142,6 @@ export class ClineProvider
143142 protected mcpHub ?: McpHub // Change from private to protected
144143 protected skillsManager ?: SkillsManager
145144 private marketplaceManager : MarketplaceManager
146- private mdmService ?: MdmService
147145 private taskCreationCallback : ( task : Task ) => void
148146 private taskEventListeners : WeakMap < Task , Array < ( ) => void > > = new WeakMap ( )
149147 private currentWorkspacePath : string | undefined
@@ -178,14 +176,12 @@ export class ClineProvider
178176 private readonly outputChannel : vscode . OutputChannel ,
179177 private readonly renderContext : "sidebar" | "editor" = "sidebar" ,
180178 public readonly contextProxy : ContextProxy ,
181- mdmService ?: MdmService ,
182179 ) {
183180 super ( )
184181 this . currentWorkspacePath = getWorkspacePath ( )
185182
186183 ClineProvider . activeInstances . add ( this )
187184
188- this . mdmService = mdmService
189185 this . updateGlobalState ( "codebaseIndexModels" , EMBEDDING_MODEL_PROFILES )
190186
191187 // Initialize the per-task file-based history store.
@@ -1971,12 +1967,6 @@ export class ClineProvider
19711967 this . clineMessagesSeq ++
19721968 state . clineMessagesSeq = this . clineMessagesSeq
19731969 this . postMessageToWebview ( { type : "state" , state } )
1974-
1975- // Check MDM compliance and send user to account tab if not compliant
1976- // Only redirect if there's an actual MDM policy requiring authentication
1977- if ( this . mdmService ?. requiresCloudAuth ( ) && ! this . checkMdmCompliance ( ) ) {
1978- await this . postMessageToWebview ( { type : "action" , action : "cloudButtonClicked" } )
1979- }
19801970 }
19811971
19821972 /**
@@ -1993,11 +1983,6 @@ export class ClineProvider
19931983 state . clineMessagesSeq = this . clineMessagesSeq
19941984 const { taskHistory : _omit , ...rest } = state
19951985 this . postMessageToWebview ( { type : "state" , state : rest } )
1996-
1997- // Preserve existing MDM redirect behavior
1998- if ( this . mdmService ?. requiresCloudAuth ( ) && ! this . checkMdmCompliance ( ) ) {
1999- await this . postMessageToWebview ( { type : "action" , action : "cloudButtonClicked" } )
2000- }
20011986 }
20021987
20031988 /**
@@ -2015,11 +2000,6 @@ export class ClineProvider
20152000 const state = await this . getStateToPostToWebview ( )
20162001 const { clineMessages : _omitMessages , taskHistory : _omitHistory , ...rest } = state
20172002 this . postMessageToWebview ( { type : "state" , state : rest } )
2018-
2019- // Preserve existing MDM redirect behavior
2020- if ( this . mdmService ?. requiresCloudAuth ( ) && ! this . checkMdmCompliance ( ) ) {
2021- await this . postMessageToWebview ( { type : "action" , action : "cloudButtonClicked" } )
2022- }
20232003 }
20242004
20252005 /**
@@ -2335,9 +2315,6 @@ export class ClineProvider
23352315 codebaseIndexBedrockProfile : codebaseIndexConfig ?. codebaseIndexBedrockProfile ,
23362316 codebaseIndexOpenRouterSpecificProvider : codebaseIndexConfig ?. codebaseIndexOpenRouterSpecificProvider ,
23372317 } ,
2338- // Only set mdmCompliant if there's an actual MDM policy
2339- // undefined means no MDM policy, true means compliant, false means non-compliant
2340- mdmCompliant : this . mdmService ?. requiresCloudAuth ( ) ? this . checkMdmCompliance ( ) : undefined ,
23412318 profileThresholds : profileThresholds ?? { } ,
23422319 cloudApiUrl : getRooCodeApiUrl ( ) ,
23432320 hasOpenedModeSelector : this . getGlobalState ( "hasOpenedModeSelector" ) ?? false ,
@@ -2751,24 +2728,6 @@ export class ClineProvider
27512728 return this . skillsManager
27522729 }
27532730
2754- /**
2755- * Check if the current state is compliant with MDM policy
2756- * @returns true if compliant or no MDM policy exists, false if MDM policy exists and user is non-compliant
2757- */
2758- public checkMdmCompliance ( ) : boolean {
2759- if ( ! this . mdmService ) {
2760- return true // No MDM service, allow operation
2761- }
2762-
2763- const compliance = this . mdmService . isCompliant ( )
2764-
2765- if ( ! compliance . compliant ) {
2766- return false
2767- }
2768-
2769- return true
2770- }
2771-
27722731 /**
27732732 * Gets the CodeIndexManager for the current active workspace
27742733 * @returns CodeIndexManager instance for the current workspace or the default one
0 commit comments