feat: add Dreaming UI and gateway auto-fix startup flow

This commit is contained in:
晴天
2026-04-10 20:28:20 +08:00
parent 3105e56fd6
commit cfd00f043e
10 changed files with 989 additions and 31 deletions

View File

@@ -17,6 +17,7 @@ import security from './modules/security.js'
import communication from './modules/communication.js'
import channels from './modules/channels.js'
import memory from './modules/memory.js'
import dreaming from './modules/dreaming.js'
import cron from './modules/cron.js'
import usage from './modules/usage.js'
import skills from './modules/skills.js'
@@ -34,7 +35,7 @@ import engagement from './modules/engagement.js'
const MODULES = {
common, sidebar, instance, dashboard, services, settings,
models, agents, agentDetail, gateway, security, communication, channels,
memory, cron, usage, skills, chat, chatDebug, setup, about,
memory, dreaming, cron, usage, skills, chat, chatDebug, setup, about,
ext, logs, assistant, toast, modal, engagement,
}

View File

@@ -0,0 +1,71 @@
import { _ } from '../helper.js'
export default {
title: _('梦境模式', 'Dreaming'),
desc: _('查看 OpenClaw 4.9 的 Dreaming 状态、梦境日记与记忆沉淀情况', 'View OpenClaw 4.9 Dreaming status, dream diary, and memory consolidation'),
viewScene: _('场景', 'Scene'),
viewDiary: _('日记', 'Diary'),
refresh: _('刷新', 'Refresh'),
gwConnecting: _('Gateway 连接中...', 'Connecting to Gateway...'),
gwWait: _('等待 Gateway 就绪后自动加载 Dreaming 数据', 'Will auto-load Dreaming data once Gateway is ready'),
loadFailed: _('加载失败', 'Load failed'),
loadFailedHint: _('需要 OpenClaw 2026.4.9+ 且启用 memory-core Dreaming 功能', 'Requires OpenClaw 2026.4.9+ with memory-core Dreaming enabled'),
unsupportedHint: _('当前 Gateway 或记忆插件不支持 Dreaming 能力', 'The current Gateway or memory plugin does not support Dreaming'),
toggleOn: _('启用梦境模式', 'Enable Dreaming'),
toggleOff: _('关闭梦境模式', 'Disable Dreaming'),
enabled: _('梦境模式已启用', 'Dreaming enabled'),
disabled: _('梦境模式已关闭', 'Dreaming disabled'),
toggleFailed: _('切换失败', 'Toggle failed'),
backfill: _('回填梦境日记', 'Backfill Dream Diary'),
resetDiary: _('重置梦境日记', 'Reset Dream Diary'),
clearGrounded: _('清空 grounded 短期记忆', 'Clear grounded short-term memory'),
backfillDone: _('梦境日记已回填', 'Dream diary backfilled'),
resetDiaryDone: _('梦境日记已重置', 'Dream diary reset'),
clearGroundedDone: _('grounded 短期记忆已清空', 'Grounded short-term memory cleared'),
confirmResetDiary: _('确定要重置梦境日记吗?这会清空现有 DREAMS.md 内容。', 'Reset the dream diary? This will clear existing DREAMS.md content.'),
confirmClearGrounded: _('确定要清空 grounded 短期记忆吗?', 'Clear grounded short-term memory?'),
openMemory: _('打开记忆文件页', 'Open Memory Page'),
heroActive: _('正在整理上下文、筛选线索、沉淀长期记忆', 'Consolidating context, filtering signals, and promoting long-term memory'),
heroIdle: _('Dreaming 当前处于空闲状态,等待下一轮整理', 'Dreaming is idle and waiting for the next sweep'),
sceneTitle: _('梦境星图', 'Dream Constellation'),
sceneDesc: _('把短期记忆、grounded 信号与高频线索编织成长期记忆的可视化场景。', 'A visual scene where short-term memories, grounded signals, and recurring traces are woven into long-term memory.'),
sceneConstellation: _('梦境星簇', 'Constellation'),
sceneSignals: _('信号波纹', 'Signal Ripples'),
scenePromotions: _('提升轨迹', 'Promotion Trail'),
sceneQueue: _('待沉淀线索', 'Pending Traces'),
statusEnabled: _('已启用', 'Enabled'),
statusDisabled: _('未启用', 'Disabled'),
nextRun: _('下一次运行', 'Next run'),
timezone: _('时区', 'Timezone'),
storageMode: _('存储模式', 'Storage mode'),
promotedToday: _('今日提升', 'Promoted today'),
promotedTotal: _('累计提升', 'Promoted total'),
shortTerm: _('短期记忆', 'Short-term'),
grounded: _('Grounded', 'Grounded'),
signals: _('信号总数', 'Signals'),
diary: _('梦境日记', 'Dream Diary'),
diaryEmpty: _('还没有梦境日记', 'No dream diary yet'),
diaryEmptyHint: _('可以先运行一次回填,或等待 Dreaming 周期自然写入', 'Try backfilling once, or wait for the next Dreaming cycle to write entries'),
diaryLoadFailed: _('梦境日记加载失败', 'Dream diary failed to load'),
diarySections: _('梦境片段', 'Diary Sections'),
diaryRaw: _('原始 Markdown', 'Raw Markdown'),
diarySection: _('片段', 'Section'),
diaryPath: _('日记路径', 'Diary path'),
memoryPath: _('记忆文件', 'Memory file'),
phaseLight: _('Light', 'Light'),
phaseDeep: _('Deep', 'Deep'),
phaseRem: _('REM', 'REM'),
cron: _('计划', 'Schedule'),
notScheduled: _('未计划', 'Not scheduled'),
entriesShortTerm: _('短期条目', 'Short-term entries'),
entriesPromoted: _('已提升条目', 'Promoted entries'),
entriesSignals: _('高信号条目', 'High-signal entries'),
noEntries: _('暂无条目', 'No entries yet'),
phaseHits: _('阶段命中', 'Phase hits'),
groundedLed: _('grounded 主导', 'Grounded-led'),
source: _('来源', 'Source'),
retry: _('重试', 'Retry'),
configUnavailable: _('无法获取在线配置快照,请稍后重试', 'Unable to load live config snapshot, please retry'),
actionRunning: _('处理中...', 'Working...'),
pluginUnsupported: _('当前记忆插件可能不支持 Dreaming 配置', 'The current memory plugin may not support Dreaming config'),
}

View File

@@ -21,6 +21,7 @@ export default {
communication: _('通信与自动化', 'Communication', '通信與自動化', '通信と自動化', '통신 및 자동화', 'Truyền thông', 'Comunicación', 'Comunicação', 'Коммуникации', '', 'Kommunikation'),
security: _('安全设置', 'Security', '安全設定', 'セキュリティ', '보안 설정', 'Bảo mật', 'Seguridad', 'Segurança', 'Безопасность', 'Sécurité', 'Sicherheit'),
memory: _('记忆文件', 'Memory', '記憶檔案', 'メモリ', '메모리', 'Bộ nhớ', 'Memoria', 'Memória', 'Память', 'Mémoire', 'Speicher'),
dreaming: _('梦境模式', 'Dreaming', '夢境模式', 'ドリーミング', '드리밍', 'Dreaming', 'Dreaming', 'Dreaming', 'Dreaming', 'Dreaming', 'Dreaming'),
cron: _('定时任务', 'Cron Jobs', '定時任務', 'スケジュールタスク', '예약 작업', 'Tác vụ định kỳ', 'Tareas', 'Tarefas', 'Планировщик', 'Tâches planifiées', 'Geplante Aufgaben'),
usage: _('使用情况', 'Usage', '使用情況', '使用状況', '사용 현황', 'Sử dụng', 'Uso', 'Uso', 'Использование', 'Utilisation', 'Nutzung'),
skills: _('Skills', 'Skills'),