Add comprehensive tests for vector/semantic search functionality

- Implement full coverage tests for Embedder model loading and embedding generation
- Add CRUD operations and caching tests for VectorStore
- Include cosine similarity computation tests
- Validate semantic search accuracy and relevance through various queries
- Establish performance benchmarks for embedding and search operations
- Ensure edge cases and error handling are covered
- Test thread safety and concurrent access scenarios
- Verify availability of semantic search dependencies
This commit is contained in:
catlog22
2025-12-14 17:17:09 +08:00
parent 8d542b8e45
commit 79a2953862
47 changed files with 11208 additions and 4336 deletions

View File

@@ -463,6 +463,26 @@ export class CliHistoryStore {
};
}
/**
* Get conversation with native session info
*/
getConversationWithNativeInfo(id: string): (ConversationRecord & {
hasNativeSession: boolean;
nativeSessionId?: string;
nativeSessionPath?: string;
}) | null {
const conv = this.getConversation(id);
if (!conv) return null;
const mapping = this.getNativeSessionMapping(id);
return {
...conv,
hasNativeSession: !!mapping,
nativeSessionId: mapping?.native_session_id,
nativeSessionPath: mapping?.native_session_path
};
}
/**
* Query execution history
*/