fix build error

This commit is contained in:
duanfuxiang
2025-04-15 23:32:29 +08:00
parent bde7df8b77
commit 2d418c3cdd
4 changed files with 52 additions and 13 deletions

View File

@@ -50,8 +50,8 @@ export class CommandManager {
}
async searchCommands(query: string): Promise<SelectTemplate[]> {
const templates = await this.findAllCommands()
const results = fuzzysort.go(query, templates, {
const commands = await this.findAllCommands()
const results = fuzzysort.go(query, commands, {
keys: ['name'],
threshold: 0.2,
limit: 20,

View File

@@ -31,7 +31,7 @@ export class CommandRepository {
if (!this.db) {
throw new DatabaseNotInitializedException()
}
const result = await this.db.liveQuery<SelectTemplate>(
const result = await this.db.query<SelectTemplate>(
`SELECT * FROM "template"`
)
return result.rows