Skip to content
Merged
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
8 changes: 4 additions & 4 deletions src/core/webview/ClineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,7 @@ export class ClineProvider
terminalOutputLineLimit: terminalOutputLineLimit ?? 500,
terminalOutputCharacterLimit: terminalOutputCharacterLimit ?? DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
terminalShellIntegrationTimeout: terminalShellIntegrationTimeout ?? Terminal.defaultShellIntegrationTimeout,
terminalShellIntegrationDisabled: terminalShellIntegrationDisabled ?? false,
terminalShellIntegrationDisabled: terminalShellIntegrationDisabled ?? true,
terminalCommandDelay: terminalCommandDelay ?? 0,
terminalPowershellCounter: terminalPowershellCounter ?? false,
terminalZshClearEolMark: terminalZshClearEolMark ?? true,
Expand Down Expand Up @@ -2075,7 +2075,7 @@ export class ClineProvider
customCondensingPrompt,
codebaseIndexModels: codebaseIndexModels ?? EMBEDDING_MODEL_PROFILES,
codebaseIndexConfig: {
codebaseIndexEnabled: codebaseIndexConfig?.codebaseIndexEnabled ?? true,
codebaseIndexEnabled: codebaseIndexConfig?.codebaseIndexEnabled ?? false,
codebaseIndexQdrantUrl: codebaseIndexConfig?.codebaseIndexQdrantUrl ?? "http://localhost:6333",
codebaseIndexEmbedderProvider: codebaseIndexConfig?.codebaseIndexEmbedderProvider ?? "openai",
codebaseIndexEmbedderBaseUrl: codebaseIndexConfig?.codebaseIndexEmbedderBaseUrl ?? "",
Expand Down Expand Up @@ -2255,7 +2255,7 @@ export class ClineProvider
stateValues.terminalOutputCharacterLimit ?? DEFAULT_TERMINAL_OUTPUT_CHARACTER_LIMIT,
terminalShellIntegrationTimeout:
stateValues.terminalShellIntegrationTimeout ?? Terminal.defaultShellIntegrationTimeout,
terminalShellIntegrationDisabled: stateValues.terminalShellIntegrationDisabled ?? false,
terminalShellIntegrationDisabled: stateValues.terminalShellIntegrationDisabled ?? true,
terminalCommandDelay: stateValues.terminalCommandDelay ?? 0,
terminalPowershellCounter: stateValues.terminalPowershellCounter ?? false,
terminalZshClearEolMark: stateValues.terminalZshClearEolMark ?? true,
Expand Down Expand Up @@ -2301,7 +2301,7 @@ export class ClineProvider
customCondensingPrompt: stateValues.customCondensingPrompt,
codebaseIndexModels: stateValues.codebaseIndexModels ?? EMBEDDING_MODEL_PROFILES,
codebaseIndexConfig: {
codebaseIndexEnabled: stateValues.codebaseIndexConfig?.codebaseIndexEnabled ?? true,
codebaseIndexEnabled: stateValues.codebaseIndexConfig?.codebaseIndexEnabled ?? false,
codebaseIndexQdrantUrl:
stateValues.codebaseIndexConfig?.codebaseIndexQdrantUrl ?? "http://localhost:6333",
codebaseIndexEmbedderProvider:
Expand Down
6 changes: 3 additions & 3 deletions src/services/code-index/__tests__/config-manager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe("CodeIndexConfigManager", () => {
describe("constructor", () => {
it("should initialize with ContextProxy", () => {
expect(configManager).toBeDefined()
expect(configManager.isFeatureEnabled).toBe(true)
expect(configManager.isFeatureEnabled).toBe(false)
expect(configManager.currentEmbedderProvider).toBe("openai")
})
})
Expand Down Expand Up @@ -81,13 +81,13 @@ describe("CodeIndexConfigManager", () => {
expect(configManager.isFeatureEnabled).toBe(true)
})

it("should default to true when codebaseIndexEnabled is not set", async () => {
it("should default to false when codebaseIndexEnabled is not set", async () => {
mockContextProxy.getGlobalState.mockReturnValue({})
mockContextProxy.getSecret.mockReturnValue(undefined)

// Re-create instance to load the configuration
configManager = new CodeIndexConfigManager(mockContextProxy)
expect(configManager.isFeatureEnabled).toBe(true)
expect(configManager.isFeatureEnabled).toBe(false)
})
})

Expand Down
6 changes: 3 additions & 3 deletions src/services/code-index/config-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { getDefaultModelId, getModelDimension, getModelScoreThreshold } from "..
* Handles loading, validating, and providing access to configuration values.
*/
export class CodeIndexConfigManager {
private codebaseIndexEnabled: boolean = true
private codebaseIndexEnabled: boolean = false
private embedderProvider: EmbedderProvider = "openai"
private modelId?: string
private modelDimension?: number
Expand Down Expand Up @@ -46,7 +46,7 @@ export class CodeIndexConfigManager {
private _loadAndSetConfiguration(): void {
// Load configuration from storage
const codebaseIndexConfig = this.contextProxy?.getGlobalState("codebaseIndexConfig") ?? {
codebaseIndexEnabled: true,
codebaseIndexEnabled: false,
codebaseIndexQdrantUrl: "http://localhost:6333",
codebaseIndexEmbedderProvider: "openai",
codebaseIndexEmbedderBaseUrl: "",
Expand Down Expand Up @@ -80,7 +80,7 @@ export class CodeIndexConfigManager {
const openRouterApiKey = this.contextProxy?.getSecret("codebaseIndexOpenRouterApiKey") ?? ""

// Update instance variables with configuration
this.codebaseIndexEnabled = codebaseIndexEnabled ?? true
this.codebaseIndexEnabled = codebaseIndexEnabled ?? false
this.qdrantUrl = codebaseIndexQdrantUrl
this.qdrantApiKey = qdrantApiKey ?? ""
this.searchMinScore = codebaseIndexSearchMinScore
Expand Down
Loading