feat(phase7): pattern search, health check, keyboard shortcuts

- KeyList: pattern input for Redis MATCH, local filter, Go button
- ConnectionStore: health check interval (5s ping), healthOk state
- StatusBar: health indicator (unstable = yellow pulse)
- RedisService: ping, isConnected methods
- Sidebar: Delete key (Del), deselect (Esc), refresh (F5)
- useKeyboard: expanded shortcut map
This commit is contained in:
2026-07-04 19:39:22 +08:00
parent 0ac0436cfd
commit 7c0cce3e64
9 changed files with 147 additions and 17 deletions
+6
View File
@@ -207,4 +207,10 @@ export function registerIpcHandlers(): void {
ipcMain.handle('redis:existsKey', async (_e, id: string, key: string) => {
return redisService.existsKey(id, key)
})
ipcMain.handle('redis:ping', async (_e, id: string) => {
return redisService.ping(id)
})
ipcMain.handle('redis:isConnected', (_e, id: string) => {
return redisService.isConnected(id)
})
}
+11
View File
@@ -337,3 +337,14 @@ export async function existsKey(id: string, key: string): Promise<boolean> {
if (!client) throw new Error(`Client ${id} not found`)
return (await client.exists(key)) === 1
}
export async function ping(id: string): Promise<string> {
const client = clients.get(id)
if (!client) throw new Error(`Client ${id} not found`)
return client.ping()
}
export function isConnected(id: string): boolean {
const client = clients.get(id)
return client?.status === 'ready'
}