mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-07 02:58:15 +00:00
fix: remove configurable memory optimization settings as requested
- Remove useOnDiskStorage, memoryMapThreshold, and hnswEfSearch from CodeIndexConfig - Remove same fields from PreviousConfigSnapshot type - Remove unused QdrantMemoryOptimizationConfig import and interface - Update comment in service-factory.ts for clarity - Add documentation to clarify QDRANT_QUANTIZATION_CONFIG_DEFAULTS is for search operations Memory optimizations are now always enabled via constants as originally requested.
This commit is contained in:
parent
c519495201
commit
33c22f7745
3 changed files with 3 additions and 31 deletions
|
|
@ -101,7 +101,8 @@ export const QDRANT_OPTIMIZER_CONFIG_DEFAULTS = {
|
|||
} as const
|
||||
|
||||
/**
|
||||
* Quantization configuration for additional memory efficiency
|
||||
* Quantization configuration for search operations
|
||||
* These settings are applied during vector search queries to balance memory efficiency and search quality
|
||||
*/
|
||||
export const QDRANT_QUANTIZATION_CONFIG_DEFAULTS = {
|
||||
/**
|
||||
|
|
@ -119,23 +120,3 @@ export const QDRANT_QUANTIZATION_CONFIG_DEFAULTS = {
|
|||
*/
|
||||
OVERSAMPLING: 2.0,
|
||||
} as const
|
||||
|
||||
/**
|
||||
* Memory optimization configuration interface
|
||||
*/
|
||||
export interface QdrantMemoryOptimizationConfig {
|
||||
/**
|
||||
* Enable on-disk storage for vectors and indexes
|
||||
*/
|
||||
useOnDiskStorage?: boolean
|
||||
|
||||
/**
|
||||
* Number of vectors before using memory-mapped files
|
||||
*/
|
||||
memoryMapThreshold?: number
|
||||
|
||||
/**
|
||||
* HNSW search parameter (ef) - controls search quality vs memory usage
|
||||
*/
|
||||
hnswEfSearch?: number
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { ApiHandlerOptions } from "../../../shared/api" // Adjust path if needed
|
||||
import { EmbedderProvider } from "./manager"
|
||||
import { QdrantMemoryOptimizationConfig } from "@roo-code/types"
|
||||
|
||||
/**
|
||||
* Configuration state for the code indexing feature
|
||||
|
|
@ -19,10 +18,6 @@ export interface CodeIndexConfig {
|
|||
qdrantApiKey?: string
|
||||
searchMinScore?: number
|
||||
searchMaxResults?: number
|
||||
// Memory optimization settings
|
||||
useOnDiskStorage?: boolean
|
||||
memoryMapThreshold?: number
|
||||
hnswEfSearch?: number
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -42,8 +37,4 @@ export type PreviousConfigSnapshot = {
|
|||
mistralApiKey?: string
|
||||
qdrantUrl?: string
|
||||
qdrantApiKey?: string
|
||||
// Memory optimization settings
|
||||
useOnDiskStorage?: boolean
|
||||
memoryMapThreshold?: number
|
||||
hnswEfSearch?: number
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ export class CodeIndexServiceFactory {
|
|||
throw new Error(t("embeddings:serviceFactory.qdrantUrlMissing"))
|
||||
}
|
||||
|
||||
// Create QdrantVectorStore with memory optimization always enabled
|
||||
// Create QdrantVectorStore (memory optimization is always enabled via constants)
|
||||
return new QdrantVectorStore(this.workspacePath, config.qdrantUrl, vectorSize, config.qdrantApiKey)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue