diff --git a/src/services/code-index/vector-store/__tests__/qdrant-client.spec.ts b/src/services/code-index/vector-store/__tests__/qdrant-client.spec.ts index 822832d17c..643cc94278 100644 --- a/src/services/code-index/vector-store/__tests__/qdrant-client.spec.ts +++ b/src/services/code-index/vector-store/__tests__/qdrant-client.spec.ts @@ -532,6 +532,12 @@ describe("QdrantVectorStore", () => { vectors: { size: mockVectorSize, distance: "Cosine", // Assuming 'Cosine' is the DISTANCE_METRIC + on_disk: true, + }, + hnsw_config: { + m: 64, + ef_construct: 512, + on_disk: true, }, }) expect(mockQdrantClientInstance.deleteCollection).not.toHaveBeenCalled() @@ -610,6 +616,12 @@ describe("QdrantVectorStore", () => { vectors: { size: mockVectorSize, // Should use the new, correct vector size distance: "Cosine", + on_disk: true, + }, + hnsw_config: { + m: 64, + ef_construct: 512, + on_disk: true, }, }) @@ -903,6 +915,12 @@ describe("QdrantVectorStore", () => { vectors: { size: newVectorSize, // Should create with new 768 dimensions distance: "Cosine", + on_disk: true, + }, + hnsw_config: { + m: 64, + ef_construct: 512, + on_disk: true, }, }) expect(mockQdrantClientInstance.createPayloadIndex).toHaveBeenCalledTimes(5) @@ -1248,7 +1266,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1299,7 +1317,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1325,7 +1343,7 @@ describe("QdrantVectorStore", () => { score_threshold: customMinScore, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1349,7 +1367,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: customMaxResults, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1496,7 +1514,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1561,7 +1579,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1587,7 +1605,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1611,7 +1629,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1635,7 +1653,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1659,7 +1677,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1690,7 +1708,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -1721,7 +1739,7 @@ describe("QdrantVectorStore", () => { score_threshold: DEFAULT_SEARCH_MIN_SCORE, limit: DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { diff --git a/src/services/code-index/vector-store/qdrant-client.ts b/src/services/code-index/vector-store/qdrant-client.ts index 50f39666c4..0ca257aca5 100644 --- a/src/services/code-index/vector-store/qdrant-client.ts +++ b/src/services/code-index/vector-store/qdrant-client.ts @@ -155,6 +155,12 @@ export class QdrantVectorStore implements IVectorStore { vectors: { size: this.vectorSize, distance: this.DISTANCE_METRIC, + on_disk: true, + }, + hnsw_config: { + m: 64, + ef_construct: 512, + on_disk: true, }, }) created = true @@ -244,6 +250,12 @@ export class QdrantVectorStore implements IVectorStore { vectors: { size: this.vectorSize, distance: this.DISTANCE_METRIC, + on_disk: true, + }, + hnsw_config: { + m: 64, + ef_construct: 512, + on_disk: true, }, }) console.log(`[QdrantVectorStore] Successfully created new collection ${this.collectionName}`) @@ -404,7 +416,7 @@ export class QdrantVectorStore implements IVectorStore { score_threshold: minScore ?? DEFAULT_SEARCH_MIN_SCORE, limit: maxResults ?? DEFAULT_MAX_SEARCH_RESULTS, params: { - hnsw_ef: 128, + hnsw_ef: 256, exact: false, }, with_payload: { @@ -491,8 +503,13 @@ export class QdrantVectorStore implements IVectorStore { // Include first few file paths for debugging (avoid logging too many) samplePaths: filePaths.slice(0, 3), }) + console.error( + `[QdrantVectorStore] Deletion error occurred Stack trace:`, + error?.stack || "No stack trace available", + ) - throw error + // Don't throw - allow the operation to continue despite deletion failure + // This prevents workflow disruption when vector store cleanup fails } } diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index 5135eca2f2..d99fe7c931 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -947,7 +947,8 @@ const ChatTextArea = forwardRef( "bg-transparent border-none p-1.5", "rounded-md min-w-[28px] min-h-[28px]", "text-vscode-foreground opacity-85", - "transition-all duration-150", + // Fixed: Use specific transition to prevent flashing + "transition-opacity duration-100", "hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", "active:bg-[rgba(255,255,255,0.1)]", @@ -969,7 +970,8 @@ const ChatTextArea = forwardRef( "bg-transparent border-none p-1.5", "rounded-md min-w-[28px] min-h-[28px]", "text-vscode-foreground opacity-85", - "transition-all duration-150", + // Fixed: Use specific transition to prevent flashing + "transition-opacity duration-100", "hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", "active:bg-[rgba(255,255,255,0.1)]", @@ -1101,8 +1103,9 @@ const ChatTextArea = forwardRef( "relative inline-flex items-center justify-center", "bg-transparent border-none p-1.5", "rounded-md min-w-[28px] min-h-[28px]", - "opacity-60 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", - "transition-all duration-150", + // Fixed: Consistent with send button fix to prevent flashing + "opacity-75 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", + "transition-opacity duration-100", "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", "active:bg-[rgba(255,255,255,0.1)]", @@ -1124,8 +1127,12 @@ const ChatTextArea = forwardRef( "relative inline-flex items-center justify-center", "bg-transparent border-none p-1.5", "rounded-md min-w-[28px] min-h-[28px]", - "opacity-60 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", - "transition-all duration-150", + // Fixed: Removed opacity transitions that were causing flashing + // Changed from opacity-60 to opacity-75 for better visibility + // Removed transition-all to prevent unwanted animations + "opacity-75 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", + // Use transition only for specific properties to avoid flashing + "transition-opacity duration-100", "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", "active:bg-[rgba(255,255,255,0.1)]", diff --git a/webview-ui/src/components/chat/EditModeControls.tsx b/webview-ui/src/components/chat/EditModeControls.tsx index 82906bf1a3..fce6138e2b 100644 --- a/webview-ui/src/components/chat/EditModeControls.tsx +++ b/webview-ui/src/components/chat/EditModeControls.tsx @@ -76,8 +76,8 @@ export const EditModeControls: React.FC = ({ "relative inline-flex items-center justify-center", "bg-transparent border-none p-1.5", "rounded-md min-w-[28px] min-h-[28px]", - "opacity-60 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", - "transition-all duration-150", + "opacity-75 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", + "transition-opacity duration-100", "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", "active:bg-[rgba(255,255,255,0.1)]", @@ -97,8 +97,8 @@ export const EditModeControls: React.FC = ({ "relative inline-flex items-center justify-center", "bg-transparent border-none p-1.5", "rounded-md min-w-[28px] min-h-[28px]", - "opacity-60 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", - "transition-all duration-150", + "opacity-75 hover:opacity-100 text-vscode-descriptionForeground hover:text-vscode-foreground", + "transition-opacity duration-100", "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", "active:bg-[rgba(255,255,255,0.1)]", diff --git a/webview-ui/src/components/chat/IconButton.tsx b/webview-ui/src/components/chat/IconButton.tsx index 75d8bc4b0b..7763950898 100644 --- a/webview-ui/src/components/chat/IconButton.tsx +++ b/webview-ui/src/components/chat/IconButton.tsx @@ -24,7 +24,7 @@ export const IconButton: React.FC = ({ "bg-transparent border-none p-1.5", "rounded-md min-w-[28px] min-h-[28px]", "text-vscode-foreground opacity-85", - "transition-all duration-150", + "transition-opacity duration-100", "hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", "active:bg-[rgba(255,255,255,0.1)]", diff --git a/webview-ui/src/components/chat/IndexingStatusBadge.tsx b/webview-ui/src/components/chat/IndexingStatusBadge.tsx index 2462780b1d..a739ea60b1 100644 --- a/webview-ui/src/components/chat/IndexingStatusBadge.tsx +++ b/webview-ui/src/components/chat/IndexingStatusBadge.tsx @@ -118,7 +118,7 @@ export const IndexingStatusBadge: React.FC = ({ classN "bg-transparent border-none p-1.5", "rounded-md min-w-[28px] min-h-[28px]", "opacity-85 text-vscode-foreground", - "transition-all duration-150", + "transition-opacity duration-100", "hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]", "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder", "active:bg-[rgba(255,255,255,0.1)]",