Files
ST-Amily2-Chat-Optimisation/core/super-memory/index.html

130 lines
7.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="amily2-header">
<div class="additional-features-title interactable" title="Amily2 究极长期记忆系统">
<i class="fas fa-brain"></i> 灵台 · 记忆中枢
</div>
<button id="amily2_back_to_main_from_super_memory" class="menu_button secondary small_button interactable">
返回主殿 <i class="fas fa-arrow-right"></i>
</button>
</div>
<hr class="header-divider">
<div id="sm-modal-container">
<div class="sm-intro-box">
<h3><i class="fas fa-microchip"></i> 究极长期记忆 (Super Memory)</h3>
<p>欢迎来到 Amily2 的核心记忆中枢。这里掌管着世界的记忆,连接着每一个角色、每一个物品与每一段传说。</p>
<p>通过“三级金字塔”注入策略,我们将实现极致的 Token 节省与无限的记忆深度。</p>
</div>
<div class="sm-navigation-deck">
<button class="sm-nav-item active" data-tab="dashboard">概览</button>
<button class="sm-nav-item" data-tab="config">配置</button>
<button class="sm-nav-item" data-tab="relation">关联网络</button>
</div>
<div class="sm-scroll">
<!-- Dashboard Tab -->
<div id="sm-dashboard-tab" class="sm-tab-pane active">
<fieldset class="sm-settings-group">
<legend><i class="fas fa-tachometer-alt"></i> 状态监控</legend>
<div class="sm-control-block">
<label>记忆系统状态:</label>
<span id="sm-system-status" class="sm-status-indicator">未初始化</span>
</div>
<div class="sm-control-block">
<label>当前索引 (Tier 1):</label>
<span id="sm-index-count">0 条目</span>
</div>
<div class="sm-control-block">
<label>已触发详情 (Tier 2):</label>
<span id="sm-detail-count">0 条目</span>
</div>
<div class="sm-button-group">
<button class="sm-action-button success" onclick="sm_initializeSystem()">初始化系统</button>
<button class="sm-action-button danger" onclick="sm_purgeMemory()">清空记忆</button>
</div>
</fieldset>
</div>
<!-- Config Tab -->
<div id="sm-config-tab" class="sm-tab-pane">
<fieldset class="sm-settings-group">
<legend><i class="fas fa-cogs"></i> 记忆策略配置</legend>
<div class="sm-control-block">
<label>启用 Super Memory (总开关):</label>
<label class="sm-toggle-switch">
<input type="checkbox" id="sm-system-enabled">
<span class="sm-slider"></span>
</label>
</div>
<div class="sm-control-block">
<label>启用世界书桥接:</label>
<label class="sm-toggle-switch">
<input type="checkbox" id="sm-bridge-enabled">
<span class="sm-slider"></span>
</label>
</div>
<div class="sm-control-block">
<label title="聊天消息数低于此值时,跳过记忆同步。表格未填写时同步是无意义的,设置合理的楼层数可以节省 Token。0 = 不限制。">最低触发楼层:</label>
<input type="number" id="sm-min-trigger-floor" min="0" step="1" style="background: rgba(0, 0, 0, 0.3); border: 1px solid #444; color: #e0e0e0; padding: 5px; border-radius: 4px; width: 80px;" value="0">
</div>
<small style="color: #888; font-size: 0.8em; display: block; margin-top: -5px; margin-bottom: 10px; padding-left: 5px;">
聊天楼层低于此数值时不触发记忆同步,避免表格空白期浪费 Token。设为 0 则不限制。
</small>
</fieldset>
<fieldset class="sm-settings-group">
<legend><i class="fas fa-list-alt"></i> 表格专属配置</legend>
<div class="sm-control-block" style="display: block;">
<p style="font-size: 0.9em; color: #aaa; margin-bottom: 10px;">在此处配置特定表格的同步策略。</p>
<div id="sm-table-settings-list" style="max-height: 300px; overflow-y: auto; padding-right: 5px;">
<!-- Table items will be injected here -->
<div style="text-align: center; color: #888; padding: 20px;">正在加载表格列表...</div>
</div>
<button id="sm-refresh-table-list" class="sm-action-button secondary" style="width: 100%; margin-top: 10px;">刷新表格列表</button>
</div>
</fieldset>
<fieldset class="sm-settings-group">
<legend><i class="fas fa-archive"></i> 历史归档配置</legend>
<div class="sm-control-block">
<label>启用自动归档:</label>
<label class="sm-toggle-switch">
<input type="checkbox" id="sm-archive-enabled">
<span class="sm-slider"></span>
</label>
</div>
<div class="sm-control-block">
<label>触发阈值 (行数):</label>
<input type="number" id="sm-archive-threshold" style="background: rgba(0, 0, 0, 0.3); border: 1px solid #444; color: #e0e0e0; padding: 5px; border-radius: 4px;" value="20">
</div>
<div class="sm-control-block">
<label title="每次触发归档时,一次性迁移的行数。">归档批次 (行数):</label>
<input type="number" id="sm-archive-batch-size" style="background: rgba(0, 0, 0, 0.3); border: 1px solid #444; color: #e0e0e0; padding: 5px; border-radius: 4px;" value="10">
</div>
<small style="color: #888; font-size: 0.8em; display: block; margin-top: -5px; margin-bottom: 10px; padding-left: 5px;">
阈值是 20批次是 10。当表格达到 21 行时,会把最早的 10 行向量化,表格与世界书剩下 11 条。
</small>
<div class="sm-control-block">
<label>目标表格名称:</label>
<input type="text" id="sm-archive-target-table" style="background: rgba(0, 0, 0, 0.3); border: 1px solid #444; color: #e0e0e0; padding: 5px; border-radius: 4px;" value="总结表">
</div>
</fieldset>
</div>
<!-- Relation Tab -->
<div id="sm-relation-tab" class="sm-tab-pane">
<fieldset class="sm-settings-group">
<legend><i class="fas fa-project-diagram"></i> 关联网络 (The Mesh)</legend>
<div class="sm-control-block">
<label>启用角色关联图谱:</label>
<label class="sm-toggle-switch">
<input type="checkbox" id="sm-relationship-graph-enabled">
<span class="sm-slider"></span>
</label>
</div>
<p>关联触发逻辑正在开发中...</p>
</fieldset>
</div>
</div>
</div>