feat: CLI SUBSCRIBE/MONITOR streaming mode

- New pubsub.ts: startSubscribe/stopSubscribe/startMonitor/stopMonitor
- IPC: redis:subscribe, redis:unsubscribe, redis:monitor, redis:monitorStop
- Streaming messages pushed via webContents.send
- Preload: onSubscribeMessage/onMonitorMessage callbacks
- CliView: detect SUBSCRIBE/PSUBSCRIBE/MONITOR, switch to streaming mode
- Stop button with pulsing indicator (green=subscribe, yellow=monitor)
- Real-time message display with timestamps
- Auto-cleanup on unmount
- i18n keys (zh-CN + en)
This commit is contained in:
2026-07-07 21:07:57 +08:00
parent 742c62517c
commit c7e47c4d5b
9 changed files with 280 additions and 28 deletions
+5
View File
@@ -137,6 +137,11 @@ export default {
title: 'CLI',
welcome: 'Redis CLI - 在下方输入命令',
placeholder: '输入 Redis 命令...',
stopSubscribe: '停止订阅',
stopMonitor: '停止监控',
subscribed: '已订阅,等待消息...',
monitoring: '监控中,等待命令...',
subscribedTo: '已订阅频道: {channels}',
},
slowlog: {
title: '慢日志',