@@ -16,7 +16,7 @@ export class DatabaseManager {
1616 log . info ( "Opening database..." ) ;
1717 this . db = new Database ( dbPath ) ;
1818 log . info ( "Database opened successfully" ) ;
19-
19+
2020 log . info ( "Setting journal mode..." ) ;
2121 this . db . pragma ( "journal_mode = WAL" ) ;
2222 log . info ( "Journal mode set" ) ;
@@ -26,10 +26,14 @@ export class DatabaseManager {
2626 let loadablePath = sqliteVec . getLoadablePath ( ) ;
2727
2828 // Fix path for Electron asar packaging
29- if ( loadablePath . includes ( ' .asar' ) ) {
29+ if ( loadablePath . includes ( " .asar" ) ) {
3030 loadablePath = loadablePath . replace (
31- 'app.asar' + ( process . platform === 'win32' ? '\\' : '/' ) + 'node_modules' ,
32- 'app.asar.unpacked' + ( process . platform === 'win32' ? '\\' : '/' ) + 'node_modules'
31+ "app.asar" +
32+ ( process . platform === "win32" ? "\\" : "/" ) +
33+ "node_modules" ,
34+ "app.asar.unpacked" +
35+ ( process . platform === "win32" ? "\\" : "/" ) +
36+ "node_modules"
3337 ) ;
3438 }
3539
@@ -162,6 +166,11 @@ export class DatabaseManager {
162166 return stmt . all ( `%${ query } %` , limit ) as ClipboardItem [ ] ;
163167 }
164168
169+ clearAllHistory ( ) : void {
170+ this . db . exec ( "DELETE FROM clipboard_items" ) ;
171+ log . info ( "Clipboard history cleared" ) ;
172+ }
173+
165174 semanticSearch (
166175 queryEmbedding : number [ ] ,
167176 limit : number = 10
0 commit comments