Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions src/services/code-index/config-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,46 +30,11 @@ export class CodeIndexConfigManager {
private searchMinScore?: number
private searchMaxResults?: number

// kilocode_change start: Kilo org indexing props
private _kiloOrgProps: {
organizationId: string
kilocodeToken: string
projectId: string
} | null = null
// kilocode_change end

constructor(private readonly contextProxy: ContextProxy) {
// Initialize with current configuration to avoid false restart triggers
this._loadAndSetConfiguration()
}

// kilocode_change start: Kilo org indexing methods
/**
* Sets Kilo organization properties for cloud-based indexing
*/
public setKiloOrgProps(props: { organizationId: string; kilocodeToken: string; projectId: string }) {
this._kiloOrgProps = props
}

/**
* Gets Kilo organization properties
*/
public getKiloOrgProps() {
return this._kiloOrgProps
}

/**
* Checks if Kilo org mode is available (has valid credentials)
*/
public get isKiloOrgMode(): boolean {
return !!(
this._kiloOrgProps?.organizationId &&
this._kiloOrgProps?.kilocodeToken &&
this._kiloOrgProps?.projectId
)
}
// kilocode_change end

/**
* Gets the context proxy instance
*/
Expand Down Expand Up @@ -264,15 +229,8 @@ export class CodeIndexConfigManager {

/**
* Checks if the service is properly configured based on the embedder type.
* kilocode_change: Also returns true if Kilo org mode is available
*/
public isConfigured(): boolean {
// kilocode_change start: Allow Kilo org mode as configured
if (this.isKiloOrgMode) {
return true
}
// kilocode_change end

if (this.embedderProvider === "openai") {
const openAiKey = this.openAiOptions?.openAiNativeApiKey
const qdrantUrl = this.qdrantUrl
Expand Down
19 changes: 0 additions & 19 deletions src/services/code-index/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,25 +367,6 @@ export class CodeIndexManager {
rooIgnoreController,
)

// kilocode_change start: Handle Kilo org mode (no embedder/vector store validation needed)
const isKiloOrgMode = this._configManager!.isKiloOrgMode

if (!isKiloOrgMode) {
// Only validate the embedder if it matches the currently configured provider
const config = this._configManager!.getConfig()
const shouldValidate = embedder && embedder.embedderInfo.name === config.embedderProvider

if (shouldValidate) {
const validationResult = await this._serviceFactory.validateEmbedder(embedder)
if (!validationResult.valid) {
const errorMessage = validationResult.error || "Embedder configuration validation failed"
this._stateManager.setSystemState("Error", errorMessage)
throw new Error(errorMessage)
}
}
}
// kilocode_change end

// (Re)Initialize orchestrator
this._orchestrator = new CodeIndexOrchestrator(
this._configManager!,
Expand Down
Loading