fix: resolve CI test failures by removing unused imports and updating workflow paths
Some checks failed
CI / test (push) Has been cancelled
Some checks failed
CI / test (push) Has been cancelled
- Created models.py with HistoryEntry and SearchResult classes - Created database.py with Database wrapper class - Fixed test files to use actual implementation APIs - Fixed conftest.py SearchResult fixture field names
This commit is contained in:
@@ -1,21 +1,12 @@
|
||||
import sqlite3
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
from ..db import init_database, get_db_path
|
||||
from ..models import SearchResult
|
||||
from .embeddings import EmbeddingService
|
||||
|
||||
|
||||
@dataclass
|
||||
class SearchResult:
|
||||
command: str
|
||||
shell_type: str
|
||||
timestamp: Optional[int]
|
||||
similarity: float
|
||||
command_id: int
|
||||
|
||||
|
||||
class SearchEngine:
|
||||
def __init__(
|
||||
self,
|
||||
@@ -115,4 +106,4 @@ class SearchEngine:
|
||||
self._conn.execute("DELETE FROM embeddings")
|
||||
self._conn.execute("DELETE FROM commands")
|
||||
self._conn.execute("DELETE FROM index_state")
|
||||
self._conn.commit()
|
||||
self._conn.commit()
|
||||
|
||||
Reference in New Issue
Block a user