mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 03:25:51 +00:00
Initial commit with CC BY-NC-ND 4.0 license
This commit is contained in:
190
assets/Amily2-TextOptimization.html
Normal file
190
assets/Amily2-TextOptimization.html
Normal file
@@ -0,0 +1,190 @@
|
||||
<div class="amily2-header">
|
||||
<div class="additional-features-title">
|
||||
<i class="fas fa-cogs"></i> 正文优化
|
||||
</div>
|
||||
<button id="amily2_back_to_main_from_text_optimization" class="menu_button secondary small_button interactable">
|
||||
返回主殿 <i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
<hr class="header-divider" style="margin-top: 5px; margin-bottom: 10px;">
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-cogs"></i> 正文优化</legend>
|
||||
<div class="control-pair-container" style="justify-content: space-around;">
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_optimization_enabled">启动优化</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_optimization_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<small class="notes">正文优化功能开关</small>
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_optimization_exclusion_enabled">内容排除</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_optimization_exclusion_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<small class="notes">正文优化排除开关</small>
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_greeting_optimization_enabled">暂未完成</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_greeting_optimization_enabled" type="checkbox" disabled />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<small class="notes">当前功能正在重构</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr style="border-style: dashed; margin: 10px 0;">
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_optimization_target_tag">御定优化标签</label>
|
||||
<input id="amily2_optimization_target_tag" type="text" class="text_pole" placeholder="例如: content, 正文" />
|
||||
<small class="notes">指定Amily2号精准优化的唯一XML标签名。若留空或未找到,则不执行优化。</small>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<input id="amily2_show_optimization_toast" type="checkbox">
|
||||
<label for="amily2_show_optimization_toast">显示优化通知</label>
|
||||
<small class="notes">启用后,将在优化完成后弹出通知。</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-network-wired"></i> API与模型配置</legend>
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_api_provider">API 提供商</label>
|
||||
<select id="amily2_api_provider" class="text_pole">
|
||||
<option value="openai">OpenAI 自定义兼容</option>
|
||||
<option value="openai_test">实验性全兼容</option>
|
||||
<option value="google">Google 直连</option>
|
||||
<option value="sillytavern_backend">SillyTavern 后端</option>
|
||||
<option value="sillytavern_preset">SillyTavern 预设</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- OpenAI兼容:需要API URL和API Key -->
|
||||
<div class="amily2_settings_block" id="amily2_api_url_wrapper">
|
||||
<label for="amily2_api_url">API URL</label>
|
||||
<input id="amily2_api_url" type="text" class="text_pole" placeholder="http://localhost:3000/v1" />
|
||||
</div>
|
||||
|
||||
<!-- API Key字段(OpenAI兼容和Google直连需要) -->
|
||||
<div class="amily2_settings_block" id="amily2_api_key_wrapper">
|
||||
<label for="amily2_api_key">API Key</label>
|
||||
<input id="amily2_api_key" type="password" class="text_pole" placeholder="sk-..." />
|
||||
</div>
|
||||
|
||||
<!-- SillyTavern预设选择器 -->
|
||||
<div class="amily2_settings_block" id="amily2_preset_wrapper" style="display: none;">
|
||||
<label for="amily2_preset_selector">选择预设</label>
|
||||
<select id="amily2_preset_selector" class="text_pole">
|
||||
<option value="">请选择预设...</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_model_selector">模型</label>
|
||||
<div class="flex-container" id="amily2_model_selector">
|
||||
|
||||
<div id="amily2_model_autofetch_wrapper" style="display: flex; flex: 1; gap: 5px;">
|
||||
<select id="amily2_model" class="text_pole" style="flex: 1;"></select>
|
||||
<button id="amily2_refresh_models" class="menu_button interactable"><i class="fas fa-sync-alt"></i> 刷新</button>
|
||||
</div>
|
||||
|
||||
<input id="amily2_manual_model_input" type="text" class="text_pole" style="flex: 1; display: none;" placeholder="请在此手动输入并保存模型ID"/>
|
||||
</div>
|
||||
<div id="amily2_model_notes" class="notes"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_max_tokens">最大Token数: <span id="amily2_max_tokens_value"></span></label>
|
||||
<input id="amily2_max_tokens" type="range" min="100" max="100000" step="50" />
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_temperature">思考活跃度: <span id="amily2_temperature_value"></span></label>
|
||||
<input id="amily2_temperature" type="range" min="0" max="2" step="0.1" />
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_context_messages">上下文参考数: <span id="amily2_context_messages_value"></span></label>
|
||||
<input id="amily2_context_messages" type="range" min="0" max="10" step="1" />
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-edit"></i> 统一提示词编辑器</legend>
|
||||
<div class="amily2_settings_block">
|
||||
<div class="label-with-button">
|
||||
<label for="amily2_prompt_selector">选择要编辑的设定:</label>
|
||||
<i id="amily2_expand_editor" class="editor_maximize fa-solid fa-maximize right_menu_button interactable" title="展开编辑器" tabindex="0"></i>
|
||||
</div>
|
||||
<select id="amily2_prompt_selector" class="text_pole">
|
||||
<option value="mainPrompt">破限提示词 (最高优先级)</option>
|
||||
<option value="systemPrompt">预设提示词(任务规则)</option>
|
||||
<option value="outputFormatPrompt">格式提示词 </option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block prompt-editor-area">
|
||||
<textarea id="amily2_unified_editor" class="text_pole" rows="4"></textarea>
|
||||
<div class="editor-buttons-panel">
|
||||
<button id="amily2_unified_save_button" class="menu_button accent small_button interactable"><i class="fas fa-save"></i> 保存当前</button>
|
||||
<button id="amily2_unified_restore_button" class="menu_button secondary small_button interactable"><i class="fas fa-undo"></i> 恢复默认</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-book-open"></i> 世界书档案司</legend>
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_wb_enabled">启用世界书</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_wb_enabled" type="checkbox">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
<small class="notes">启用后,将根据下方配置读取世界书内容作为参考。</small>
|
||||
</div>
|
||||
|
||||
<div id="amily2_wb_options_container" style="display: none;">
|
||||
<hr style="border-style: dashed; margin: 10px 0;">
|
||||
<div class="amily2_settings_block">
|
||||
<label>世界书来源:</label>
|
||||
<div class="radio-group">
|
||||
<input type="radio" id="amily2_wb_source_character" name="amily2_wb_source" value="character" checked>
|
||||
<label for="amily2_wb_source_character">角色世界书</label>
|
||||
<input type="radio" id="amily2_wb_source_manual" name="amily2_wb_source" value="manual">
|
||||
<label for="amily2_wb_source_manual">手动选择</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="amily2_wb_select_wrapper" style="display: none;">
|
||||
<div class="amily2_settings_block">
|
||||
<label>选择世界书:</label>
|
||||
<div style="display: flex; gap: 5px; margin-bottom: 5px; margin-top: 5px;">
|
||||
<input type="text" id="amily2_wb_book_search" class="text_pole" placeholder="搜索世界书..." style="flex-grow: 1;">
|
||||
<button id="amily2_wb_book_select_all" class="menu_button small_button" style="writing-mode: horizontal-tb;">全</button>
|
||||
<button id="amily2_wb_book_deselect_all" class="menu_button small_button" style="writing-mode: horizontal-tb;">禁</button>
|
||||
</div>
|
||||
<div id="amily2_wb_checkbox_list" class="checkbox-list-container" style="max-height: 120px; overflow-y: auto; border: 1px solid #444; padding: 5px; border-radius: 5px;">
|
||||
<!-- World book list will be populated here -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label>选择条目:</label>
|
||||
<div style="display: flex; gap: 5px; margin-bottom: 5px; margin-top: 5px;">
|
||||
<input type="text" id="amily2_wb_entry_search" class="text_pole" placeholder="搜索条目..." style="flex-grow: 1;">
|
||||
<button id="amily2_wb_entry_select_all" class="menu_button small_button" style="writing-mode: horizontal-tb;">全</button>
|
||||
<button id="amily2_wb_entry_deselect_all" class="menu_button small_button" style="writing-mode: horizontal-tb;">禁</button>
|
||||
</div>
|
||||
<div id="amily2_wb_entry_list" class="checkbox-list-container" style="max-height: 150px; overflow-y: auto; border: 1px solid #444; padding: 5px; border-radius: 5px;">
|
||||
<!-- Entry list will be populated here -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
287
assets/Amily2-optimization.html
Normal file
287
assets/Amily2-optimization.html
Normal file
@@ -0,0 +1,287 @@
|
||||
<div class="amily2-header">
|
||||
<div class="additional-features-title">
|
||||
<i class="fas fa-feather-alt"></i> 记忆管理
|
||||
</div>
|
||||
<button id="amily2_back_to_main_from_optimization" class="menu_button secondary small_button interactable">
|
||||
返回主殿 <i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
<hr class="header-divider" style="margin-top: 5px; margin-bottom: 10px;">
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-cogs"></i> 通用设置</legend>
|
||||
<div class="control-block-with-switch">
|
||||
<label for="amily2_opt_enabled"><strong>记忆管理开关</strong></label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_opt_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="control-block-with-switch">
|
||||
<label for="amily2_opt_ejs_enabled">EJS 预处理 <small style="color: #ffc107;">功能友情提供:Ducker</small></label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_opt_ejs_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="sinan-navigation-deck">
|
||||
<button class="sinan-nav-item active" data-tab="api-settings"><i class="fas fa-bolt"></i> API 设置</button>
|
||||
<button class="sinan-nav-item" data-tab="prompt-settings"><i class="fas fa-edit"></i> 提示词指令</button>
|
||||
<button class="sinan-nav-item" data-tab="context-settings"><i class="fas fa-book-open"></i> 上下文设置</button>
|
||||
</div>
|
||||
|
||||
<div class="sinan-content-wrapper">
|
||||
<!-- API Settings Tab -->
|
||||
<div id="sinan-api-settings-tab" class="sinan-tab-pane active">
|
||||
<fieldset class="settings-group">
|
||||
<legend>Jqyh API</legend>
|
||||
<div class="control-block-with-switch">
|
||||
<label for="amily2_jqyh_enabled"><strong>启用 Jqyh API</strong></label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_jqyh_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="amily2_jqyh_content" style="display: none;" class="inline-settings-grid">
|
||||
<label for="amily2_jqyh_api_mode">API 模式</label>
|
||||
<select id="amily2_jqyh_api_mode" class="text_pole">
|
||||
<option value="openai_test">全兼容模式</option>
|
||||
<option value="sillytavern_preset">SillyTavern 预设</option>
|
||||
</select>
|
||||
|
||||
<div id="amily2_jqyh_compatible_config" class="inline-settings-grid" style="grid-column: 1 / -1;">
|
||||
<label for="amily2_jqyh_api_url">API URL</label>
|
||||
<input type="text" id="amily2_jqyh_api_url" class="text_pole" placeholder="例如: https://api.openai.com/v1">
|
||||
<label for="amily2_jqyh_api_key">API Key</label>
|
||||
<input type="password" id="amily2_jqyh_api_key" class="text_pole" placeholder="请输入您的 API Key">
|
||||
<label for="amily2_jqyh_model">模型</label>
|
||||
<div class="amily2_opt_preset_selector_wrapper">
|
||||
<input type="text" id="amily2_jqyh_model" class="text_pole" placeholder="请先获取模型列表或手动输入">
|
||||
<select id="amily2_jqyh_model_select" class="text_pole" style="display: none;"></select>
|
||||
</div>
|
||||
<div class="jqyh-button-row" style="grid-column: 1 / -1;">
|
||||
<button id="amily2_jqyh_fetch_models" class="menu_button secondary" title="获取模型列表"><i class="fas fa-sync-alt"></i> 获取模型</button>
|
||||
<button id="amily2_jqyh_test_connection" class="menu_button primary"><i class="fas fa-plug"></i> 测试连接</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="amily2_jqyh_preset_config" class="inline-settings-grid" style="display: none; grid-column: 1 / -1;">
|
||||
<label for="amily2_jqyh_tavern_profile">选择酒馆预设</label>
|
||||
<select id="amily2_jqyh_tavern_profile" class="text_pole"></select>
|
||||
</div>
|
||||
|
||||
<label for="amily2_jqyh_max_tokens">最大 Tokens: <span id="amily2_jqyh_max_tokens_value">4000</span></label>
|
||||
<input type="range" id="amily2_jqyh_max_tokens" min="100" max="100000" step="100" value="4000">
|
||||
<label for="amily2_jqyh_temperature">温度: <span id="amily2_jqyh_temperature_value">0.7</span></label>
|
||||
<input type="range" id="amily2_jqyh_temperature" min="0" max="2" step="0.1" value="0.7">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend>并发 API (第二个LLM)</legend>
|
||||
<div class="control-block-with-switch">
|
||||
<label for="amily2_plotOpt_concurrentEnabled"><strong>启用并发调用</strong></label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_plotOpt_concurrentEnabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="amily2_concurrent_content" style="display: none;" class="inline-settings-grid">
|
||||
<label for="amily2_plotOpt_concurrentApiProvider">API 模式</label>
|
||||
<select id="amily2_plotOpt_concurrentApiProvider" class="text_pole">
|
||||
<option value="openai_test">全兼容模式</option>
|
||||
<option value="openai">OpenAI 兼容</option>
|
||||
</select>
|
||||
<label for="amily2_plotOpt_concurrentApiUrl">API URL</label>
|
||||
<input type="text" id="amily2_plotOpt_concurrentApiUrl" class="text_pole" placeholder="例如: https://api.openai.com/v1">
|
||||
<label for="amily2_plotOpt_concurrentApiKey">API Key</label>
|
||||
<input type="password" id="amily2_plotOpt_concurrentApiKey" class="text_pole" placeholder="请输入您的 API Key">
|
||||
<label for="amily2_plotOpt_concurrentModel">模型</label>
|
||||
<div class="amily2_opt_preset_selector_wrapper">
|
||||
<input type="text" id="amily2_plotOpt_concurrentModel" class="text_pole" placeholder="请先获取模型列表或手动输入">
|
||||
<select id="amily2_plotOpt_concurrentModel_select" class="text_pole" style="display: none;"></select>
|
||||
</div>
|
||||
<label for="amily2_plotOpt_concurrentMaxTokens">最大 Tokens: <span id="amily2_plotOpt_concurrentMaxTokens_value">8100</span></label>
|
||||
<input type="range" id="amily2_plotOpt_concurrentMaxTokens" min="100" max="100000" step="100" value="8100">
|
||||
<div class="jqyh-button-row" style="grid-column: 1 / -1;">
|
||||
<button id="amily2_plotOpt_concurrent_fetch_models" class="menu_button secondary" title="获取模型列表"><i class="fas fa-sync-alt"></i> 获取模型</button>
|
||||
<button id="amily2_plotOpt_concurrent_test_connection" class="menu_button primary"><i class="fas fa-plug"></i> 测试连接</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend>并发 API 世界书</legend>
|
||||
<div class="control-block-with-switch">
|
||||
<label for="amily2_plotOpt_concurrentWorldbookEnabled">启用世界书</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_plotOpt_concurrentWorldbookEnabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="amily2_concurrent_worldbook_content" style="display: none;">
|
||||
<div class="control-block-with-switch">
|
||||
<label>世界书来源</label>
|
||||
<div class="radio-group">
|
||||
<input type="radio" id="amily2_plotOpt_concurrentWorldbook_source_character" name="amily2_plotOpt_concurrentWorldbook_source" value="character" checked>
|
||||
<label for="amily2_plotOpt_concurrentWorldbook_source_character">角色</label>
|
||||
<input type="radio" id="amily2_plotOpt_concurrentWorldbook_source_manual" name="amily2_plotOpt_concurrentWorldbook_source" value="manual">
|
||||
<label for="amily2_plotOpt_concurrentWorldbook_source_manual">自定</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="amily2_plotOpt_concurrent_worldbook_select_wrapper" style="display: none;">
|
||||
<div class="worldbook-column">
|
||||
<div class="amily2_opt_label_with_button_wrapper">
|
||||
<label>选择世界书</label>
|
||||
<button id="amily2_plotOpt_concurrent_refresh_worldbooks" class="menu_button" title="刷新世界书列表"><i class="fa-solid fa-sync"></i></button>
|
||||
</div>
|
||||
<div id="amily2_plotOpt_concurrent_worldbook_checkbox_list" class="scrollable-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline-settings-grid">
|
||||
<label for="amily2_plotOpt_concurrentWorldbookCharLimit">世界书最大字符数: <span id="amily2_plotOpt_concurrentWorldbookCharLimit_value">60000</span></label>
|
||||
<input type="range" id="amily2_plotOpt_concurrentWorldbookCharLimit" min="1000" max="200000" step="1000" value="60000">
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<!-- Prompt Settings Tab -->
|
||||
<div id="sinan-prompt-settings-tab" class="sinan-tab-pane">
|
||||
<fieldset class="settings-group">
|
||||
<legend>并发API提示词</legend>
|
||||
<div class="unified-prompt-editor">
|
||||
<label for="amily2_concurrent_prompt_selector">选择编辑的提示词:</label>
|
||||
<select id="amily2_concurrent_prompt_selector" class="text_pole">
|
||||
<option value="main">主系统提示词 (并发)</option>
|
||||
<option value="system">拦截任务详细指令 (并发)</option>
|
||||
</select>
|
||||
<textarea id="amily2_concurrent_prompt_editor" class="text_pole" rows="6"></textarea>
|
||||
<div class="prompt-editor-buttons">
|
||||
<button id="amily2_opt_reset_concurrent_prompt" class="menu_button secondary">恢复当前并发提示词为默认</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="settings-group">
|
||||
<legend>提示词管理</legend>
|
||||
<div class="inline-settings-grid">
|
||||
<label for="amily2_opt_prompt_preset_select">加载预设</label>
|
||||
<div class="amily2_opt_preset_selector_wrapper">
|
||||
<select id="amily2_opt_prompt_preset_select" class="text_pole">
|
||||
<option value="">-- 选择一个预设 --</option>
|
||||
</select>
|
||||
<button id="amily2_opt_import_prompt_presets" class="menu_button" title="导入预设"><i class="fa-solid fa-download"></i></button>
|
||||
<button id="amily2_opt_export_prompt_presets" class="menu_button" title="导出预设"><i class="fa-solid fa-upload"></i></button>
|
||||
<button id="amily2_opt_save_prompt_preset" class="menu_button" title="保存当前提示词为预设"><i class="fa-solid fa-save"></i></button>
|
||||
<button id="amily2_opt_delete_prompt_preset" class="menu_button" title="删除当前选中的预设" style="display: none;"><i class="fa-solid fa-trash-alt"></i></button>
|
||||
<input type="file" id="amily2_opt_preset_file_input" style="display: none;" accept=".json">
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="settings-group">
|
||||
<legend>指令编辑</legend>
|
||||
<div class="unified-prompt-editor">
|
||||
<label for="amily2_opt_prompt_selector">选择编辑的提示词:</label>
|
||||
<select id="amily2_opt_prompt_selector" class="text_pole">
|
||||
<option value="main">主系统提示词 (主LLM)</option>
|
||||
<option value="system">拦截任务详细指令 (主LLM)</option>
|
||||
<option value="final_system">最终注入指令</option>
|
||||
</select>
|
||||
<textarea id="amily2_opt_prompt_editor" class="text_pole" rows="8"></textarea>
|
||||
<div class="prompt-editor-buttons">
|
||||
<button id="amily2_opt_reset_main_prompt" class="menu_button secondary">恢复主提示词</button>
|
||||
<button id="amily2_opt_reset_system_prompt" class="menu_button secondary">恢复拦截任务</button>
|
||||
<button id="amily2_opt_reset_final_system_directive" class="menu_button secondary">恢复注入指令</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="settings-group">
|
||||
<legend>匹配替换 (sulv)</legend>
|
||||
<div class="inline-settings-grid">
|
||||
<label for="amily2_opt_rate_main">主线剧情 (sulv1)</label>
|
||||
<input id="amily2_opt_rate_main" type="number" class="text_pole" step="0.05" value="1.0">
|
||||
<label for="amily2_opt_rate_personal">个人线 (sulv2)</label>
|
||||
<input id="amily2_opt_rate_personal" type="number" class="text_pole" step="0.05" value="1.0">
|
||||
<label for="amily2_opt_rate_erotic">留空 (sulv3)</label>
|
||||
<input id="amily2_opt_rate_erotic" type="number" class="text_pole" step="0.05" value="1.0">
|
||||
<label for="amily2_opt_rate_cuckold">留空 (sulv4)</label>
|
||||
<input id="amily2_opt_rate_cuckold" type="number" class="text_pole" step="0.05" value="1.0">
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<!-- Context Settings Tab -->
|
||||
<div id="sinan-context-settings-tab" class="sinan-tab-pane">
|
||||
<fieldset class="settings-group">
|
||||
<legend>内容源</legend>
|
||||
<div class="control-block-with-switch">
|
||||
<label for="amily2_opt_worldbook_enabled">启用世界书</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_opt_worldbook_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="control-block-with-switch">
|
||||
<label for="amily2_opt_table_enabled">表格发送目标</label>
|
||||
<select id="amily2_opt_table_enabled" class="text_pole">
|
||||
<option value="disabled">不发送</option>
|
||||
<option value="main">发送给主API</option>
|
||||
<option value="concurrent">发送给并发API</option>
|
||||
</select>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="settings-group">
|
||||
<legend>上下文参数</legend>
|
||||
<div class="inline-settings-grid">
|
||||
<label for="amily2_opt_context_limit">上下文条数: <span id="amily2_opt_context_limit_value">10</span></label>
|
||||
<input type="range" id="amily2_opt_context_limit" min="1" max="50" step="1" value="10">
|
||||
<label for="amily2_opt_worldbook_char_limit">世界书最大字符数: <span id="amily2_opt_worldbook_char_limit_value">60000</span></label>
|
||||
<input type="range" id="amily2_opt_worldbook_char_limit" min="1000" max="200000" step="1000" value="60000">
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="settings-group">
|
||||
<legend>世界书管理</legend>
|
||||
<div class="control-block-with-switch">
|
||||
<label for="amily2_opt_new_memory_logic_enabled">启用新记忆逻辑</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_opt_new_memory_logic_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="control-block-with-switch">
|
||||
<label>世界书来源</label>
|
||||
<div class="radio-group">
|
||||
<input type="radio" id="amily2_opt_worldbook_source_character" name="amily2_opt_worldbook_source" value="character" checked>
|
||||
<label for="amily2_opt_worldbook_source_character">角色</label>
|
||||
<input type="radio" id="amily2_opt_worldbook_source_manual" name="amily2_opt_worldbook_source" value="manual">
|
||||
<label for="amily2_opt_worldbook_source_manual">自定</label>
|
||||
</div>
|
||||
</div>
|
||||
<div id="amily2_opt_worldbook_select_wrapper" style="display: none;">
|
||||
<div class="worldbook-column">
|
||||
<div class="amily2_opt_label_with_button_wrapper">
|
||||
<label>选择世界书</label>
|
||||
<button id="amily2_opt_refresh_worldbooks" class="menu_button" title="刷新世界书列表"><i class="fa-solid fa-sync"></i></button>
|
||||
</div>
|
||||
<div id="amily2_opt_worldbook_checkbox_list" class="scrollable-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="worldbook-column">
|
||||
<div class="amily2_opt_label_with_controls_wrapper">
|
||||
<label>启用的世界书条目</label>
|
||||
<div id="amily2_opt_worldbook_entry_controls">
|
||||
<span id="amily2_opt_worldbook_entry_count"></span>
|
||||
<button id="amily2_opt_worldbook_entry_select_all" class="menu_button">全选</button>
|
||||
<button id="amily2_opt_worldbook_entry_deselect_all" class="menu_button">不选</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="amily2_opt_worldbook_entry_list_container" class="scrollable-container"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="amily2_opt_footer">
|
||||
</div>
|
||||
438
assets/amily-additional-features/Amily2-AdditionalFeatures.html
Normal file
438
assets/amily-additional-features/Amily2-AdditionalFeatures.html
Normal file
@@ -0,0 +1,438 @@
|
||||
|
||||
<div class="amily2-header">
|
||||
<button id="amily2_back_to_main_settings" class="menu_button secondary small_button interactable">
|
||||
<i class="fas fa-arrow-left"></i> 返回主殿
|
||||
</button>
|
||||
<div id="amily2_open_neige_tutorial" class="additional-features-title interactable" title="查看内阁使用教程" style="cursor: pointer;">
|
||||
<i class="fas fa-landmark-dome"></i> 内阁密室
|
||||
</div>
|
||||
</div>
|
||||
<hr class="header-divider">
|
||||
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-scroll"></i> 皇家史册管理员</legend>
|
||||
|
||||
<div class="control-pair-container">
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_auto_hide_enabled">按阈值自动隐藏</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_auto_hide_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_auto_hide_summarized_enabled">隐藏已总结楼层</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_auto_hide_summarized_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<button id="amily2_unhide_all_button" class="menu_button secondary small_button interactable" title="一键取消所有已隐藏的楼层">
|
||||
<i class="fas fa-folder-open"></i>
|
||||
<span>全部可见</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr style="border-style: dashed; margin: 10px 0;">
|
||||
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_auto_hide_threshold">保留最新消息层数: <span id="amily2_auto_hide_threshold_value">30</span></label>
|
||||
<input id="amily2_auto_hide_threshold" type="range" min="5" max="100" step="1" value="30" />
|
||||
<small class="notes">设定始终在你的上下文中保留的最新消息数量。</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-pen-ruler"></i> 手动敕令司</legend>
|
||||
|
||||
|
||||
<div class="manual-command-block">
|
||||
<label>隐藏范围:</label>
|
||||
<input type="number" id="amily2_manual_hide_from" class="manual-input" placeholder="起始层">
|
||||
<span class="manual-command-divider">-</span>
|
||||
<input type="number" id="amily2_manual_hide_to" class="manual-input" placeholder="结束层">
|
||||
<button id="amily2_manual_hide_confirm" class="menu_button primary small_button interactable">
|
||||
<i class="fas fa-eye-slash"></i> 确认隐藏
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="manual-command-block">
|
||||
<label>取消隐藏:</label>
|
||||
<input type="number" id="amily2_manual_unhide_from" class="manual-input" placeholder="起始层">
|
||||
<span class="manual-command-divider">-</span>
|
||||
<input type="number" id="amily2_manual_unhide_to" class="manual-input" placeholder="结束层">
|
||||
<button id="amily2_manual_unhide_confirm" class="menu_button accent small_button interactable">
|
||||
<i class="fas fa-eye"></i> 确认取消
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<small class="notes" style="text-align: center; display: block; margin-top: 10px;">
|
||||
提示:若“起始层”留空,则仅操作“结束层”所指定的单层。
|
||||
</small>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-gavel"></i> 总结与律法</legend>
|
||||
<div class="lore-config-grid">
|
||||
<!-- Left Column -->
|
||||
<div class="amily2_settings_block grid-left-col">
|
||||
<label>总结写入目标:</label>
|
||||
<div class="radio-group vertical">
|
||||
<input type="radio" id="amily2_target_main" name="amily2_lorebook_target" value="character_main" checked>
|
||||
<label for="amily2_target_main">写入【主世界书】</label>
|
||||
<input type="radio" id="amily2_target_dedicated" name="amily2_lorebook_target" value="dedicated">
|
||||
<label for="amily2_target_dedicated">写入【独立档案】</label>
|
||||
</div>
|
||||
<small class="notes">更推荐使用独立档案,会生成一个新的世界书执行总结逻辑。</small>
|
||||
</div>
|
||||
<!-- Right Column -->
|
||||
<div class="grid-right-col">
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_lore_activation_mode">默认激活模式:</label>
|
||||
<select id="amily2_lore_activation_mode" class="text_pole">
|
||||
<option value="always">🔵 蓝灯 (始终激活)</option>
|
||||
<option value="keyed">🟢 绿灯 (关键词触发)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_lore_insertion_position">默认插入位置:</label>
|
||||
<select id="amily2_lore_insertion_position" class="text_pole">
|
||||
<option value="before_char">角色定义之前</option>
|
||||
<option value="after_char">角色定义之后</option>
|
||||
<option value="before_an">作者注释之前</option>
|
||||
<option value="after_an">作者注释之后</option>
|
||||
<option value="at_depth">@D 注入指定深度</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="amily2_lore_depth_container" class="amily2_settings_block" style="display: none;">
|
||||
<label for="amily2_lore_depth_input">注入深度:</label>
|
||||
<input id="amily2_lore_depth_input" title="深度" class="text_pole" type="number" name="depth" placeholder="2" min="0" max="9999">
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<button id="amily2_save_lore_settings" class="menu_button"><i class="fas fa-save"></i> 确认敕令</button>
|
||||
<small id="amily2_lore_save_status" class="notes" style="text-align: center; width: 100%;"></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-satellite-dish"></i> Ngms API 调用系统</legend>
|
||||
<small class="notes" style="text-align: center; display: block; margin-bottom: 15px;">
|
||||
独立的API调用系统,可与主系统并行使用,支持全兼容和SillyTavern预设两种模式。
|
||||
</small>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_ngms_enabled">启用Ngms API系统</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_ngms_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block" id="amily2_ngms_content" style="display: none;">
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_api_mode">API调用模式:</label>
|
||||
<select id="amily2_ngms_api_mode" class="text_pole">
|
||||
<option value="openai_test">全兼容模式</option>
|
||||
<option value="sillytavern_preset">SillyTavern预设模式</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="amily2_ngms_config_panel" style="margin-top: 15px;">
|
||||
<!-- 全兼容模式配置 -->
|
||||
<div id="amily2_ngms_compatible_config">
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_api_url">API地址:</label>
|
||||
<input type="text" id="amily2_ngms_api_url" class="text_pole" placeholder="https://api.openai.com/v1" />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_api_key">API密钥:</label>
|
||||
<input type="password" id="amily2_ngms_api_key" class="text_pole" placeholder="sk-..." />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_model">模型:</label>
|
||||
<div class="select-with-refresh">
|
||||
<select id="amily2_ngms_model_select" class="text_pole" style="flex-grow: 1; display: none;">
|
||||
<option value="">-- 请选择模型 --</option>
|
||||
</select>
|
||||
<input type="text" id="amily2_ngms_model" class="text_pole" placeholder="gpt-4" style="flex-grow: 1;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SillyTavern预设模式配置 -->
|
||||
<div id="amily2_ngms_preset_config" style="display: none;">
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_tavern_profile">选择SillyTavern预设:</label>
|
||||
<select id="amily2_ngms_tavern_profile" class="text_pole">
|
||||
<option value="">-- 请选择预设 --</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 通用参数配置 -->
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_max_tokens">最大令牌数:<span id="amily2_ngms_max_tokens_value">4000</span></label>
|
||||
<input type="range" id="amily2_ngms_max_tokens" min="100" max="100000" step="100" value="4000" />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="amily2_ngms_temperature">温度:<span id="amily2_ngms_temperature_value">0.7</span></label>
|
||||
<input type="range" id="amily2_ngms_temperature" min="0" max="2" step="0.1" value="0.7" />
|
||||
</div>
|
||||
|
||||
<!-- 测试按钮组 - 水平排列 -->
|
||||
<div class="ngms-button-row" style="display: flex; gap: 10px; justify-content: center; margin-top: 15px;">
|
||||
<button id="amily2_ngms_test_connection" class="menu_button primary small_button interactable">
|
||||
<i class="fas fa-plug"></i> 测试连接
|
||||
</button>
|
||||
<button id="amily2_ngms_fetch_models" class="menu_button secondary small_button interactable" title="获取可用模型列表">
|
||||
<i class="fas fa-download"></i> 获取模型
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group" id="amily2_manual_historiography_bureau">
|
||||
<legend><i class="fas fa-gavel"></i> 手动敕史局</legend>
|
||||
<small class="notes" style="text-align: center; display: block; margin-bottom: 15px;">
|
||||
赋予你选取任意对话、熔铸为永恒史册的至高权力。
|
||||
</small>
|
||||
|
||||
|
||||
<fieldset class="settings-group" style="border-style: dashed;">
|
||||
<legend><EFBFBD> 微言录 (Small Summary)</legend>
|
||||
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<div class="label-with-button">
|
||||
<label for="amily2_mhb_small_prompt_selector">选择编辑的谕旨:</label>
|
||||
<i id="amily2_mhb_small_expand_editor" class="editor_maximize fa-solid fa-maximize right_menu_button interactable" title="展开编辑器" tabindex="0"></i>
|
||||
</div>
|
||||
<select id="amily2_mhb_small_prompt_selector" class="text_pole">
|
||||
<option value="jailbreak">小总结主要提示词</option>
|
||||
<option value="summary">小总结任务提示词</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="amily2_settings_block prompt-editor-area">
|
||||
<textarea id="amily2_mhb_small_editor" class="text_pole" rows="3"></textarea>
|
||||
<div class="editor-buttons-panel">
|
||||
<button id="amily2_mhb_small_save_button" class="menu_button accent small_button interactable"><i class="fas fa-save"></i> 保存当前</button>
|
||||
<button id="amily2_mhb_small_restore_button" class="menu_button secondary small_button interactable"><i class="fas fa-undo"></i> 恢复默认</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mhb-controls-wrapper">
|
||||
|
||||
<div class="manual-command-block">
|
||||
<label>手动总结范围:</label>
|
||||
<input type="number" id="amily2_mhb_small_start_floor" class="manual-input" placeholder="起始层">
|
||||
<span class="manual-command-divider">-</span>
|
||||
<input type="number" id="amily2_mhb_small_end_floor" class="manual-input" placeholder="结束层">
|
||||
<button id="amily2_mhb_small_manual_execute" class="menu_button primary small_button interactable">
|
||||
<i class="fas fa-fire"></i> 开始
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center; margin-top: 10px;">
|
||||
<label for="historiography-tag-extraction-toggle">标签提取</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="historiography-tag-extraction-toggle" data-setting-key="condensation.tagExtractionEnabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="historiography-tag-input-container" class="hly-control-block" style="display: none;">
|
||||
<label for="historiography-tag-input">输入标签 (以逗号分隔):</label>
|
||||
<textarea id="historiography-tag-input" class="hly-imperial-brush" rows="2" placeholder="例如: content,details" data-setting-key="condensation.tags" data-type="string"></textarea>
|
||||
</div>
|
||||
<div class="hly-button-group" style="justify-content: flex-start; margin-top: 10px; display: flex; align-items: center; gap: 20px;">
|
||||
<button id="historiography-exclusion-rules-btn" class="hly-action-button">内容排除</button>
|
||||
|
||||
<div class="auto-control-pair" style="margin-bottom: 0;">
|
||||
<label for="historiography_auto_summary_interactive" title="开启后,“自动巡录”将弹出交互窗口确认,而不是在后台静默运行。">交互式巡录:</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="historiography_auto_summary_interactive" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="auto-command-block" id="amily2_mhb_auto_command_block">
|
||||
|
||||
<button id="amily2_mhb_small_expedition_execute" class="menu_button primary small_button interactable" title="立即发动一次彻底的总结远征,将所有未归档的历史一次性清算。">
|
||||
<i class="fas fa-flag-checkered"></i> 自动批量
|
||||
</button>
|
||||
|
||||
|
||||
<div class="auto-control-pair">
|
||||
<label for="amily2_mhb_small_auto_enabled" title="在您聊天时,于后台默默守护史册的完整。">静默总结:</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_mhb_small_auto_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="auto-control-pair">
|
||||
<label for="historiography_write_to_lorebook" title="将生成的总结写入世界书。">存世界书:</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="historiography_write_to_lorebook" type="checkbox" checked />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="auto-control-pair">
|
||||
<label for="historiography_ingest_to_rag" title="将生成的总结存入翰林院进行向量化。">上传向量:</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="historiography_ingest_to_rag" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="auto-control-pair">
|
||||
<label for="amily2_mhb_small_trigger_count" title="“自动巡录”和“开始远征”的单次作战楼层数。">总结阈值:</label>
|
||||
<input id="amily2_mhb_small_trigger_count" type="number" min="1" class="text_pole" style="width: 70px;" placeholder="30">
|
||||
</div>
|
||||
|
||||
<div class="auto-control-pair">
|
||||
<label for="historiography_retention_count" title="保留最近的对话层数不参与自动总结。">保留层数:</label>
|
||||
<input id="historiography_retention_count" type="number" min="0" class="text_pole" style="width: 70px;" placeholder="5">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<small class="notes" style="text-align: center; display: block; margin-top: 5px;">
|
||||
【自动批量】将立即清算所有未记录的历史。 【静默总结】则在您聊天时,于后台默默守护史册的完整。
|
||||
</small>
|
||||
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<!-- 上下分割线 -->
|
||||
<hr class="header-divider" style="margin: 20px 0;">
|
||||
|
||||
<fieldset class="settings-group" style="border-style: dashed;">
|
||||
<legend>📚 史册归档与回溯</legend>
|
||||
<small class="notes" style="text-align: center; display: block; margin-bottom: 15px;">
|
||||
管理多条时间线的史册,随时封存或重启旧的历史。
|
||||
</small>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<button id="amily2_mhb_archive_current" class="menu_button secondary small_button interactable" style="width: 100%; margin-bottom: 10px;">
|
||||
<i class="fas fa-archive"></i> 归档当前【对话流水总帐】并停用
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="mhb-selector-container">
|
||||
<div class="mhb-selector-group">
|
||||
<label for="amily2_mhb_archive_selector">选择要回溯的旧史册</label>
|
||||
<div class="select-with-refresh">
|
||||
<select id="amily2_mhb_archive_selector" class="text_pole" style="flex-grow: 1;">
|
||||
<option value="">请刷新列表...</option>
|
||||
</select>
|
||||
<button id="amily2_mhb_refresh_archives" class="menu_button secondary small_button interactable" title="刷新归档列表">
|
||||
<i class="fas fa-sync-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="amily2_mhb_restore_archive" class="menu_button primary small_button interactable" style="margin-top: 10px; width: 100%;">
|
||||
<i class="fas fa-trash-restore"></i> 回溯选中史册 (自动归档当前)
|
||||
</button>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<!-- 上下分割线 -->
|
||||
<hr class="header-divider" style="margin: 20px 0;">
|
||||
|
||||
<fieldset class="settings-group" style="border-style: dashed;">
|
||||
<legend>💎 宏史卷 (史册精炼)</legend>
|
||||
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<div class="label-with-button">
|
||||
<label for="amily2_mhb_large_prompt_selector">选择编辑的谕旨:</label>
|
||||
<i id="amily2_mhb_large_expand_editor" class="editor_maximize fa-solid fa-maximize right_menu_button interactable" title="展开编辑器" tabindex="0"></i>
|
||||
</div>
|
||||
<select id="amily2_mhb_large_prompt_selector" class="text_pole">
|
||||
<option value="jailbreak">大总结主要提示词</option>
|
||||
<option value="summary">大总结任务提示词)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="amily2_settings_block prompt-editor-area">
|
||||
<textarea id="amily2_mhb_large_editor" class="text_pole" rows="4"></textarea>
|
||||
<div class="editor-buttons-panel">
|
||||
<button id="amily2_mhb_large_save_button" class="menu_button accent small_button interactable"><i class="fas fa-save"></i> 保存当前</button>
|
||||
<button id="amily2_mhb_large_restore_button" class="menu_button secondary small_button interactable"><i class="fas fa-undo"></i> 恢复默认</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mhb-controls-wrapper">
|
||||
|
||||
<div class="mhb-selector-container">
|
||||
|
||||
<div class="mhb-selector-group">
|
||||
<label for="amily2_mhb_large_worldbook_selector">目标国史馆 (世界书)</label>
|
||||
<div class="select-with-refresh">
|
||||
<select id="amily2_mhb_large_worldbook_selector" class="text_pole" style="flex-grow: 1;">
|
||||
<option value="">刷新列表...</option>
|
||||
</select>
|
||||
<button id="amily2_mhb_large_refresh_worldbooks" class="menu_button secondary small_button interactable" title="刷新世界书列表">
|
||||
<i class="fas fa-atlas"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mhb-selector-group">
|
||||
<label for="amily2_mhb_large_lore_selector">待精炼的史册条目</label>
|
||||
<div class="select-with-refresh">
|
||||
<select id="amily2_mhb_large_lore_selector" class="text_pole" style="flex-grow: 1;">
|
||||
<option value="">请先选择世界书...</option>
|
||||
</select>
|
||||
<button id="amily2_mhb_large_refresh_lores" class="menu_button secondary small_button interactable" title="刷新所选世界书的史册列表">
|
||||
<i class="fas fa-sync-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<button id="amily2_mhb_large_refine_execute" class="menu_button primary small_button interactable" style="margin-top: 15px; width: 100%;">
|
||||
<i class="fas fa-gem"></i> 开始精炼
|
||||
</button>
|
||||
|
||||
<div class="auto-control-pair" style="margin-top: 10px; justify-content: center;">
|
||||
<label for="amily2_vectorize_summary_content">将前段的大总结内容自动送去向量化。</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="amily2_vectorize_summary_content" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<div id="amily2_mhb_hidden_prompts" style="display:none;">
|
||||
<textarea id="amily2_mhb_small_jailbreak_prompt"></textarea>
|
||||
<textarea id="amily2_mhb_small_summary_prompt"></textarea>
|
||||
<textarea id="amily2_mhb_large_jailbreak_prompt"></textarea>
|
||||
<textarea id="amily2_mhb_large_summary_prompt"></textarea>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
428
assets/amily-data-table/Memorisation-forms.html
Normal file
428
assets/amily-data-table/Memorisation-forms.html
Normal file
@@ -0,0 +1,428 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Amily2 表格编辑器</title>
|
||||
<link rel="stylesheet" href="table.css">
|
||||
<style>
|
||||
.worldbook-selection-container {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.worldbook-column {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0; /* Prevents flex items from overflowing */
|
||||
}
|
||||
|
||||
.scrollable-container {
|
||||
border: 1px solid var(--input-border-color, #444);
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
height: 150px;
|
||||
overflow-y: auto;
|
||||
background-color: var(--input-bg-color, #222);
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.scrollable-container .checkbox-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.scrollable-container .checkbox-item input[type="checkbox"] {
|
||||
margin-right: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.scrollable-container .checkbox-item label {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
select.text_pole {
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 8px center;
|
||||
background-size: 1.2em;
|
||||
padding-right: 2em !important;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="amily2-header">
|
||||
<div class="additional-features-title">
|
||||
<i class="fas fa-table"></i> 内存储司 · 表格核心
|
||||
</div>
|
||||
<button id="amily2_back_to_main_from_forms" class="menu_button secondary small_button interactable">
|
||||
返回主殿 <i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
<hr class="header-divider" style="margin-top: 5px; margin-bottom: 10px;">
|
||||
|
||||
<div id="upper-controls-wrapper">
|
||||
<fieldset class="settings-group" style="padding: 10px; margin-bottom: 10px;">
|
||||
<legend><i class="fas fa-brain"></i> 中枢决策室</legend>
|
||||
|
||||
<div class="sinan-navigation-deck" style="gap: 5px; margin-bottom: 10px;">
|
||||
<button class="sinan-nav-item active" data-tab="injection-settings"><i class="fas fa-cogs"></i> 注入设置</button>
|
||||
<button class="sinan-nav-item" data-tab="action-center"><i class="fas fa-toolbox"></i> 操作中心</button>
|
||||
<button class="sinan-nav-item" data-tab="ai-template"><i class="fas fa-robot"></i> 指令模板</button>
|
||||
<button class="sinan-nav-item" data-tab="world-settings"><i class="fas fa-globe"></i> 世界读取</button>
|
||||
</div>
|
||||
|
||||
<div class="sinan-content-wrapper">
|
||||
<div id="sinan-injection-settings-tab" class="sinan-tab-pane active">
|
||||
<div class="inline-settings-grid">
|
||||
<label for="table-injection-position">注入位置</label>
|
||||
<select id="table-injection-position" class="text_pole">
|
||||
<option value="2">主提示前</option>
|
||||
<option value="0">主提示后</option>
|
||||
<option value="1">聊天内</option>
|
||||
</select>
|
||||
<label for="table-injection-depth">注入深度</label>
|
||||
<input type="number" id="table-injection-depth" class="text_pole" value="3">
|
||||
<label>注入角色</label>
|
||||
<div class="radio-group">
|
||||
<input type="radio" id="table-role-system" name="table-injection-role" value="0" data-setting-key="injection.role" data-type="integer">
|
||||
<label for="table-role-system">系统</label>
|
||||
<input type="radio" id="table-role-user" name="table-injection-role" value="1" data-setting-key="injection.role" data-type="integer">
|
||||
<label for="table-role-user">用户</label>
|
||||
<input type="radio" id="table-role-ai" name="table-injection-role" value="2" data-setting-key="injection.role" data-type="integer">
|
||||
<label for="table-role-ai">AI</label>
|
||||
</div>
|
||||
<label for="batch-filling-threshold">批处理阈值</label>
|
||||
<input type="number" id="batch-filling-threshold" class="text_pole" value="30">
|
||||
</div>
|
||||
<div class="control-block-with-switch" style="margin-top: 10px;">
|
||||
<label for="show-table-in-chat-toggle">聊天内显示表格</label>
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="show-table-in-chat-toggle" data-setting-key="show_table_in_chat" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="control-block-with-switch" style="margin-top: 10px;">
|
||||
<label for="render-on-every-message-toggle">持续渲染最新消息</label>
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="render-on-every-message-toggle" data-setting-key="render_on_every_message" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sinan-world-settings-tab" class="sinan-tab-pane">
|
||||
<div class="amily2_opt_settings_block">
|
||||
<label for="table_worldbook_enabled">启用世界书</label>
|
||||
<label class="toggle-switch">
|
||||
<input id="table_worldbook_enabled" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="amily2_opt_settings_block">
|
||||
<label for="table_worldbook_char_limit">世界书最大字符数: <span id="table_worldbook_char_limit_value">60000</span></label>
|
||||
<input type="range" id="table_worldbook_char_limit" min="1000" max="200000" step="1000" value="60000">
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="amily2_opt_settings_block_radio">
|
||||
<label>世界书来源</label>
|
||||
<div class="amily2_opt_radio_group">
|
||||
<input type="radio" id="table_worldbook_source_character" name="table_worldbook_source" value="character" checked>
|
||||
<label for="table_worldbook_source_character">角色卡主世界书</label>
|
||||
<input type="radio" id="table_worldbook_source_manual" name="table_worldbook_source" value="manual">
|
||||
<label for="table_worldbook_source_manual">手动选择世界书</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="table_worldbook_select_wrapper" style="display: none;">
|
||||
<div class="worldbook-selection-container">
|
||||
<!-- World Book List Column -->
|
||||
<div class="worldbook-column">
|
||||
<div class="amily2_opt_label_with_button_wrapper">
|
||||
<label>选择世界书 (可多选)</label>
|
||||
<button id="table_refresh_worldbooks" class="menu_button" title="刷新世界书列表"><i class="fa-solid fa-sync"></i></button>
|
||||
</div>
|
||||
<div class="table-search-wrapper">
|
||||
<input type="text" id="table_worldbook_search" class="table-search-input" placeholder="搜索世界书名称...">
|
||||
<i class="fas fa-search table-search-icon"></i>
|
||||
</div>
|
||||
<div id="table_worldbook_checkbox_list" class="scrollable-container">
|
||||
<!-- 世界书勾选框将在这里动态生成 -->
|
||||
</div>
|
||||
<small class="notes">勾选需要启用的世界书。</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- World Book Entry List Column -->
|
||||
<div class="worldbook-column" style="margin-top: 10px;">
|
||||
<label>选择条目 (可多选)</label>
|
||||
<div class="table-search-wrapper">
|
||||
<input type="text" id="table_entry_search" class="table-search-input" placeholder="搜索条目名称、关键词...">
|
||||
<i class="fas fa-search table-search-icon"></i>
|
||||
</div>
|
||||
<div id="table_worldbook_entry_list" class="scrollable-container">
|
||||
<!-- 世界书条目勾选框将在这里动态生成 -->
|
||||
</div>
|
||||
<small class="notes">勾选需要注入的条目。</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sinan-action-center-tab" class="sinan-tab-pane">
|
||||
<div class="control-block-with-switch" style="margin-bottom: 15px; padding: 8px; border: 2px solid #4a9eff; border-radius: 5px; background: rgba(74, 158, 255, 0.1);">
|
||||
<label for="table-system-master-switch" style="font-weight: bold; color: #4a9eff;">
|
||||
<i class="fas fa-power-off"></i> 表格系统总开关
|
||||
</label>
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="table-system-master-switch" data-setting-key="table_system_enabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="control-block-with-switch" style="margin-bottom: 10px;">
|
||||
<label for="table-injection-enabled-toggle">启用表格注入</label>
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="table-injection-enabled" data-setting-key="table_injection_enabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="control-block-with-switch" style="margin-bottom: 10px;">
|
||||
<label for="context-optimization-enabled-toggle">启用上下文优化 (合并世界书)</label>
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="context-optimization-enabled" data-setting-key="context_optimization_enabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="control-block-with-switch" style="margin-bottom: 10px;">
|
||||
<label>填表模式</label>
|
||||
<div class="radio-group">
|
||||
<input type="radio" id="main-api-mode" name="filling-mode" value="main-api" checked>
|
||||
<label for="main-api-mode">原始</label>
|
||||
<input type="radio" id="secondary-api-mode" name="filling-mode" value="secondary-api">
|
||||
<label for="secondary-api-mode">分步</label>
|
||||
<input type="radio" id="optimized-mode" name="filling-mode" value="optimized">
|
||||
<label for="optimized-mode">兼容优化</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 分步填表高级控制 - 仅在分步模式下显示 -->
|
||||
<div id="secondary-filler-controls" style="display: none; border-left: 2px solid #4a9eff; padding-left: 10px; margin-bottom: 10px;">
|
||||
|
||||
<!-- 上下文深度 -->
|
||||
<div class="control-block-with-switch" style="margin-bottom: 10px; flex-direction: column; align-items: flex-start;">
|
||||
<label for="secondary-filler-context">上下文深度</label>
|
||||
<input type="number" id="secondary-filler-context" min="0" max="20" step="1" value="2" class="text_pole" style="width: 80px; margin-top: 5px;">
|
||||
<small class="notes" style="margin-top: 5px; display: block;">填表时参考的历史上下文消息数量。</small>
|
||||
</div>
|
||||
|
||||
<!-- 填表批次 -->
|
||||
<div class="control-block-with-switch" style="margin-bottom: 10px; flex-direction: column; align-items: flex-start;">
|
||||
<label for="secondary-filler-batch">填表批次 (Batch)</label>
|
||||
<input type="number" id="secondary-filler-batch" min="0" max="20" step="1" value="0" class="text_pole" style="width: 80px; margin-top: 5px;">
|
||||
<small class="notes" style="margin-top: 5px; display: block;">单次填表处理的消息数量 (0 = 实时单条模式)。</small>
|
||||
</div>
|
||||
|
||||
<!-- 保留楼层 -->
|
||||
<div class="control-block-with-switch" style="margin-bottom: 10px; flex-direction: column; align-items: flex-start;">
|
||||
<label for="secondary-filler-buffer">保留楼层 (Buffer)</label>
|
||||
<input type="number" id="secondary-filler-buffer" min="0" max="10" step="1" value="0" class="text_pole" style="width: 80px; margin-top: 5px;">
|
||||
<small class="notes" style="margin-top: 5px; display: block;">始终保留不填表的最新消息数量 (缓冲防抖)。</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="table-independent-rules-container" class="control-block-with-switch" style="margin-bottom: 10px; display: none; flex-direction: column; align-items: flex-start; gap: 8px;">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
|
||||
<label for="table-independent-rules-enabled">启用独立提取规则</label>
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="table-independent-rules-enabled">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<button id="table-configure-rules-btn" class="menu_button small_button" style="display: none;"><i class="fas fa-cog"></i> 配置规则</button>
|
||||
<small class="notes">启用后,分步填表和批量填表将使用下方配置的专属规则,而非微言录的规则。</small>
|
||||
</div>
|
||||
<div class="action-center-buttons" style="gap: 8px;">
|
||||
<button id="amily2-open-relationship-graph-btn" class="menu_button accent small_button interactable"><i class="fas fa-project-diagram"></i> 关系图谱</button>
|
||||
<button id="amily2-export-preset-btn" class="menu_button primary small_button interactable"><i class="fas fa-file-export"></i> 导出预设</button>
|
||||
<button id="amily2-export-preset-full-btn" class="menu_button primary small_button interactable"><i class="fas fa-file-archive"></i> 导出备份</button>
|
||||
<button id="amily2-import-preset-btn" class="menu_button secondary small_button interactable"><i class="fas fa-file-upload"></i> 导入预设</button>
|
||||
<button id="amily2-import-global-preset-btn" class="menu_button secondary small_button interactable"><i class="fas fa-globe"></i> 导入全局</button>
|
||||
<button id="amily2-clear-global-preset-btn" class="menu_button danger small_button interactable"><i class="fas fa-undo"></i> 清除全局</button>
|
||||
<button id="amily2-clear-all-tables-btn" class="menu_button danger small_button interactable"><i class="fas fa-trash-alt"></i> 清空内容</button>
|
||||
</div>
|
||||
<p class="notes" style="margin-top: 8px; margin-bottom: 10px;">说明:可以导出不含剧情的"纯净预设"用于分享,或导出包含剧情的"完整备份"用于存档。</p>
|
||||
|
||||
<hr class="section-divider" style="margin: 10px 0;">
|
||||
|
||||
<!-- 历史记录清理区域 -->
|
||||
<fieldset class="settings-group" style="border-style: dashed; padding: 8px; margin-bottom: 10px;">
|
||||
<legend><i class="fas fa-trash-alt"></i> 历史记录清理</legend>
|
||||
<div class="control-block-with-switch" style="margin-bottom: 10px; flex-direction: column; align-items: flex-start;">
|
||||
<label for="clear-records-before-floor">清除此楼层前的表格记录</label>
|
||||
<div style="display: flex; gap: 10px; align-items: center; width: 100%; margin-top: 5px;">
|
||||
<input type="number" id="clear-records-before-floor" class="text_pole" style="flex: 1;" placeholder="输入楼层号 (例如: 100)">
|
||||
<button id="clear-records-btn" class="menu_button danger small_button interactable">
|
||||
<i class="fas fa-eraser"></i> 一键清除
|
||||
</button>
|
||||
</div>
|
||||
<small class="notes" style="margin-top: 5px; display: block;">
|
||||
警告:此操作将永久删除指定楼层之前所有消息中存储的表格快照。这可以显著减小聊天记录文件的大小,但会导致无法回退到这些楼层的表格状态。当前最新的表格状态不会受影响。
|
||||
</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<hr class="section-divider" style="margin: 10px 0;">
|
||||
|
||||
<!-- Nccs API 控制区域 -->
|
||||
<fieldset class="settings-group" style="border-style: dashed; padding: 8px; margin-bottom: 10px;">
|
||||
<legend><i class="fas fa-brain"></i> Nccs API 系统</legend>
|
||||
|
||||
<div class="control-block-with-switch" style="margin-bottom: 10px;">
|
||||
<label for="nccs-api-enabled">启用 Nccs API</label>
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="nccs-api-enabled" data-setting-key="nccsEnabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div id="nccs-api-config" style="display: none;">
|
||||
<div class="amily2_opt_settings_block" style="margin-bottom: 10px;">
|
||||
<label for="nccs-api-mode">API 模式</label>
|
||||
<select id="nccs-api-mode" class="text_pole">
|
||||
<option value="openai_test">全兼容模式</option>
|
||||
<option value="sillytavern_preset">SillyTavern预设模式</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="amily2_opt_settings_block" style="margin-bottom: 10px;">
|
||||
<label for="nccs-api-url">API URL</label>
|
||||
<input type="text" id="nccs-api-url" class="text_pole" placeholder="https://api.openai.com/v1">
|
||||
</div>
|
||||
|
||||
<div class="amily2_opt_settings_block" style="margin-bottom: 10px;">
|
||||
<label for="nccs-api-key">API Key</label>
|
||||
<input type="password" id="nccs-api-key" class="text_pole" placeholder="输入您的API密钥">
|
||||
</div>
|
||||
|
||||
<div class="amily2_opt_settings_block" style="margin-bottom: 10px;">
|
||||
<label for="nccs-api-model">模型</label>
|
||||
<div style="display: flex; gap: 5px; align-items: center;">
|
||||
<input type="text" id="nccs-api-model" class="text_pole" placeholder="选择或输入模型">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="amily2_opt_settings_block" style="margin-bottom: 10px;">
|
||||
<label for="nccs-max-tokens">最大Token数: <span id="nccs-max-tokens-value">2000</span></label>
|
||||
<input type="range" id="nccs-max-tokens" min="100" max="100000" step="100" value="2000">
|
||||
</div>
|
||||
|
||||
<div class="amily2_opt_settings_block" style="margin-bottom: 10px;">
|
||||
<label for="nccs-temperature">Temperature: <span id="nccs-temperature-value">0.7</span></label>
|
||||
<input type="range" id="nccs-temperature" min="0" max="2" step="0.1" value="0.7">
|
||||
</div>
|
||||
|
||||
<div class="amily2_opt_settings_block" style="margin-bottom: 10px;">
|
||||
<label for="nccs-sillytavern-preset">SillyTavern 预设</label>
|
||||
<select id="nccs-sillytavern-preset" class="text_pole">
|
||||
<option value="">选择预设</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="nccs-button-row" style="display: flex; gap: 10px; justify-content: center; margin-top: 15px;">
|
||||
<button id="nccs-test-connection" class="menu_button primary small_button interactable">
|
||||
<i class="fas fa-plug"></i> 测试连接
|
||||
</button>
|
||||
<button id="nccs-fetch-models" class="menu_button secondary small_button interactable">
|
||||
<i class="fas fa-download"></i> 获取模型
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<hr class="section-divider" style="margin: 10px 0;">
|
||||
|
||||
<div class="action-center-buttons" id="theme-action-buttons" style="gap: 8px;">
|
||||
<button id="amily2-import-theme-btn" class="menu_button small_button interactable"><i class="fas fa-palette"></i> 导入主题</button>
|
||||
<button id="amily2-export-theme-btn" class="menu_button small_button interactable"><i class="fas fa-paint-brush"></i> 导出主题</button>
|
||||
<button id="amily2-reset-theme-btn" class="menu_button small_button interactable"><i class="fas fa-undo"></i> 恢复默认</button>
|
||||
</div>
|
||||
<p class="notes" style="margin-top: 8px;">说明:导入下载的主题JSON文件,或将当前的外观导出分享。</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="sinan-ai-template-tab" class="sinan-tab-pane">
|
||||
<fieldset class="settings-group" style="border-style: dashed; padding: 8px; margin-bottom: 10px;">
|
||||
<legend><i class="fas fa-scroll"></i> 规则提示词</legend>
|
||||
<div class="amily2_settings_block prompt-editor-area">
|
||||
<textarea id="ai-rule-template-editor" class="text_pole" rows="2"></textarea>
|
||||
<div class="editor-buttons-panel">
|
||||
<button id="ai-rule-template-save-btn" class="menu_button accent small_button interactable"><i class="fas fa-save"></i> 保存</button>
|
||||
<button id="ai-rule-template-restore-btn" class="menu_button secondary small_button interactable"><i class="fas fa-undo"></i> 默认</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group" style="border-style: dashed; padding: 8px;">
|
||||
<legend><i class="fas fa-tasks"></i> 流程提示词</legend>
|
||||
<div class="amily2_settings_block prompt-editor-area">
|
||||
<textarea id="ai-flow-template-editor" class="text_pole" rows="2"></textarea>
|
||||
<div class="editor-buttons-panel">
|
||||
<button id="ai-flow-template-save-btn" class="menu_button accent small_button interactable"><i class="fas fa-save"></i> 保存</button>
|
||||
<button id="ai-flow-template-restore-btn" class="menu_button secondary small_button interactable"><i class="fas fa-undo"></i> 默认</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<hr class="section-divider" style="margin: 10px 0;">
|
||||
|
||||
<div id="table-filling-controls" style="display: flex; flex-direction: column; gap: 10px; align-items: center;">
|
||||
<!-- 楼层选择区域 -->
|
||||
<div style="display: flex; gap: 10px; align-items: center; justify-content: center;">
|
||||
<label for="floor-start-input" style="font-size: 12px; white-space: nowrap;">起始楼层:</label>
|
||||
<input type="number" id="floor-start-input" class="text_pole" style="width: 80px;" placeholder="1" min="1">
|
||||
<label for="floor-end-input" style="font-size: 12px; white-space: nowrap;">结束楼层:</label>
|
||||
<input type="number" id="floor-end-input" class="text_pole" style="width: 80px;" placeholder="10" min="1">
|
||||
</div>
|
||||
|
||||
<!-- 填表按钮区域 -->
|
||||
<div style="display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap;">
|
||||
<button id="fill-table-now-btn" class="menu_button small_button">立即填表</button>
|
||||
<button id="fill-selected-floors-btn" class="menu_button accent small_button">选定楼层填表</button>
|
||||
<button id="fill-current-floor-btn" class="menu_button secondary small_button">填当前楼层</button>
|
||||
<button id="rollback-and-refill-btn" class="menu_button secondary small_button">回退重填</button>
|
||||
<button id="reorganize-table-btn" class="menu_button warning small_button">重新整理</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div id="table-log-display" class="hly-log-display" style="margin-top: 10px; margin-bottom: 10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="all-tables-container" class="hly-scroll">
|
||||
|
||||
<div id="add-table-placeholder" title="敕令新表">
|
||||
<i class="fas fa-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
900
assets/amily-data-table/table.css
Normal file
900
assets/amily-data-table/table.css
Normal file
@@ -0,0 +1,900 @@
|
||||
:root {
|
||||
--amily2-bg-color: #2C2C2C;
|
||||
--amily2-button-color: #4A4A4A;
|
||||
--amily2-text-color: #E0E0E0;
|
||||
|
||||
/* Global Table Variables */
|
||||
--am2-gap-main: 10px;
|
||||
--am2-padding-main: 8px 5px;
|
||||
|
||||
--am2-container-bg: rgba(0, 0, 0, 0.2);
|
||||
--am2-container-border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
--am2-container-border-radius: 12px;
|
||||
--am2-container-padding: 10px 5px;
|
||||
--am2-container-shadow: inset 0 0 15px rgba(0,0,0,0.2);
|
||||
|
||||
--am2-title-font-size: 1.1em;
|
||||
--am2-title-font-weight: bold;
|
||||
--am2-title-text-shadow: 0 0 5px rgba(200, 200, 255, 0.3);
|
||||
--am2-title-gradient-start: #c0bde4;
|
||||
--am2-title-gradient-end: #dfdff0;
|
||||
--am2-title-icon-color: #9e8aff;
|
||||
--am2-title-icon-margin: 10px;
|
||||
|
||||
--am2-table-bg: rgba(40, 40, 45, 0.8);
|
||||
--am2-table-border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
--am2-table-cell-padding: 4px 6px;
|
||||
|
||||
--am2-header-bg: rgba(255, 255, 255, 0.1);
|
||||
--am2-header-color: #ececec;
|
||||
--am2-row-even-bg: rgba(0, 0, 0, 0.15);
|
||||
--am2-row-hover-bg: rgba(255, 255, 255, 0.1);
|
||||
--am2-header-editable-bg: rgba(172, 216, 255, 0.1);
|
||||
--am2-header-editable-focus-bg: rgba(172, 216, 255, 0.25);
|
||||
--am2-header-editable-focus-outline: 1px solid #79b8ff;
|
||||
|
||||
--am2-cell-editable-bg: rgba(255, 255, 172, 0.1);
|
||||
--am2-cell-editable-focus-bg: rgba(255, 255, 172, 0.25);
|
||||
--am2-cell-editable-focus-outline: 1px solid #ffc107;
|
||||
|
||||
--am2-index-col-bg: rgba(0, 0, 0, 0.2);
|
||||
--am2-index-col-color: #9e8aff;
|
||||
--am2-index-col-width: 40px;
|
||||
--am2-index-col-padding: 4px 5px;
|
||||
|
||||
--am2-controls-gap: 5px;
|
||||
--am2-controls-margin-bottom: 10px;
|
||||
|
||||
--am2-cell-highlight-bg: rgba(144, 238, 144, 0.3);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--am2-gap-main);
|
||||
padding: var(--am2-padding-main);
|
||||
box-sizing: border-box;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#upper-controls-wrapper {
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel #all-tables-container {
|
||||
overflow-y: auto;
|
||||
padding: var(--am2-container-padding);
|
||||
border: var(--am2-container-border);
|
||||
border-radius: var(--am2-container-border-radius);
|
||||
background: transparent;
|
||||
box-shadow: var(--am2-container-shadow);
|
||||
}
|
||||
|
||||
.amily2-table-header-container {
|
||||
background-color: rgba(50, 50, 55, 0.9);
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 8px 8px 0 0;
|
||||
padding: 8px 12px;
|
||||
margin-bottom: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel #all-tables-container h3 {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #e0e0e0;
|
||||
text-shadow: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel #all-tables-container h3 > i {
|
||||
margin-right: 8px;
|
||||
color: #9e8aff;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .table-controls {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 5px;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 0;
|
||||
transition: box-shadow 0.5s ease-in-out;
|
||||
table-layout: fixed;
|
||||
width: 100%;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.3);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel table[id^="amily2-table-"] tr:nth-child(even) {
|
||||
background-color: var(--am2-row-even-bg);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel table[id^="amily2-table-"] tr:hover {
|
||||
background-color: var(--am2-row-hover-bg);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel table[id^="amily2-table-"] th,
|
||||
#amily2_memorisation_forms_panel table[id^="amily2-table-"] td {
|
||||
border-right: var(--am2-table-border);
|
||||
border-bottom: var(--am2-table-border);
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel table[id^="amily2-table-"] th:last-child,
|
||||
#amily2_memorisation_forms_panel table[id^="amily2-table-"] td:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel table[id^="amily2-table-"] tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.amily2-cell-content {
|
||||
padding: var(--am2-table-cell-padding);
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
height: auto;
|
||||
max-height: 120px; /* Limit cell height */
|
||||
overflow-y: auto; /* Allow scrolling for long content */
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* Custom scrollbar for cell content */
|
||||
.amily2-cell-content::-webkit-scrollbar {
|
||||
width: 4px;
|
||||
}
|
||||
|
||||
.amily2-cell-content::-webkit-scrollbar-track {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.amily2-cell-content::-webkit-scrollbar-thumb {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.amily2-cell-content::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel table[id^="amily2-table-"] th {
|
||||
background-color: var(--am2-header-bg);
|
||||
color: var(--am2-header-color);
|
||||
font-weight: 600;
|
||||
position: relative;
|
||||
font-size: 0.95em;
|
||||
letter-spacing: 0.5px;
|
||||
border-bottom: 2px solid rgba(158, 138, 255, 0.4) !important; /* Accent color border */
|
||||
padding: 6px 8px; /* Direct padding for th */
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .amily2-resizer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -5px; /* Center the larger handle on the border */
|
||||
width: 10px; /* Increase hit area for easier grabbing */
|
||||
height: 100%;
|
||||
cursor: col-resize;
|
||||
user-select: none;
|
||||
background-color: transparent; /* Make the larger hit area invisible until hovered */
|
||||
transition: background-color 0.2s ease;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .amily2-resizer:hover,
|
||||
#amily2_memorisation_forms_panel .amily2-resizer:active {
|
||||
background-color: rgba(158, 138, 255, 0.5);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .index-col {
|
||||
background-color: var(--am2-index-col-bg);
|
||||
text-align: center !important;
|
||||
font-weight: bold;
|
||||
color: var(--am2-index-col-color);
|
||||
padding: var(--am2-table-cell-padding);
|
||||
word-break: normal;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
border-right: 1px solid rgba(255, 255, 255, 0.1);
|
||||
font-family: monospace;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel th[contenteditable="true"] {
|
||||
background-color: var(--am2-header-editable-bg);
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel th[contenteditable="true"]:focus {
|
||||
background-color: var(--am2-header-editable-focus-bg);
|
||||
outline: var(--am2-header-editable-focus-outline);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel td[contenteditable="true"] {
|
||||
background-color: var(--am2-cell-editable-bg);
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel td[contenteditable="true"]:focus {
|
||||
background-color: var(--am2-cell-editable-focus-bg);
|
||||
outline: var(--am2-cell-editable-focus-outline);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .menu_button {
|
||||
background: var(--am2-button-bg, var(--amily2-button-color));
|
||||
background-image: var(--am2-button-gradient, none);
|
||||
background-size: 200% 100%;
|
||||
background-position: 0% 50%;
|
||||
border: 1px solid var(--am2-button-border-color, rgba(255, 255, 255, 0.2)) !important;
|
||||
color: var(--am2-button-text-color, var(--amily2-text-color)) !important;
|
||||
padding: 8px 15px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
transition: all 0.4s ease-out !important;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .menu_button:hover {
|
||||
background-color: var(--am2-button-hover-bg, rgba(255, 255, 255, 0.2));
|
||||
background-position: 100% 50%;
|
||||
border-color: var(--am2-button-hover-border-color, #fff) !important;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .menu_button.danger {
|
||||
background: var(--am2-button-danger-bg, rgba(255, 82, 82, 0.2)) !important;
|
||||
border-color: var(--am2-button-danger-border-color, rgba(255, 82, 82, 0.5)) !important;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .menu_button.danger:hover {
|
||||
background: var(--am2-button-danger-hover-bg, rgba(255, 82, 82, 0.4)) !important;
|
||||
border-color: var(--am2-button-danger-hover-border-color, #ff5252) !important;
|
||||
}
|
||||
|
||||
/* 【延迟删除】恢复按钮的成功样式 */
|
||||
#amily2_memorisation_forms_panel .menu_button.success {
|
||||
background: var(--am2-button-success-bg, rgba(40, 167, 69, 0.2)) !important;
|
||||
border-color: var(--am2-button-success-border-color, rgba(40, 167, 69, 0.5)) !important;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .menu_button.success:hover {
|
||||
background: var(--am2-button-success-hover-bg, rgba(40, 167, 69, 0.4)) !important;
|
||||
border-color: var(--am2-button-success-hover-border-color, #28a745) !important;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .menu_button.small_button {
|
||||
padding: 5px 12px;
|
||||
font-size: 0.9em;
|
||||
border-radius: 6px;
|
||||
writing-mode: horizontal-tb !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .hly-log-display {
|
||||
background: transparent;
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
border: 1px solid #444;
|
||||
max-height: 100px;
|
||||
overflow-y: auto;
|
||||
font-size: 0.9em;
|
||||
color: var(--amily2-text-color);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .hly-log-entry {
|
||||
margin: 0;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
line-height: 1.5;
|
||||
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .hly-log-entry .fa-solid {
|
||||
margin-right: 8px;
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .log-info {
|
||||
color: #a0c4ff;
|
||||
border-left: 3px solid #6b9eff;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .log-success {
|
||||
color: #a8d8b4;
|
||||
border-left: 3px solid #5cb85c;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .log-error {
|
||||
color: #ffadad;
|
||||
border-left: 3px solid #d9534f;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .log-warn {
|
||||
color: #ffd6a5;
|
||||
border-left: 3px solid #f0ad4e;
|
||||
}
|
||||
|
||||
|
||||
.settings-group {
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
border-radius: 12px;
|
||||
padding: 12px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.settings-group > legend {
|
||||
color: var(--amily2-text-color);
|
||||
font-weight: bold;
|
||||
padding: 0 10px;
|
||||
margin-left: 10px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.settings-group > legend > i {
|
||||
margin-right: 8px;
|
||||
color: #9e8aff;
|
||||
}
|
||||
|
||||
.central-control-wrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.central-control-wrapper .control-section {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.central-control-wrapper #ai-template-section .hly-textarea {
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
min-height: 150px;
|
||||
}
|
||||
|
||||
.central-control-wrapper .vertical-divider {
|
||||
width: 1px;
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
|
||||
.inline-settings-grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: 8px 12px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.inline-settings-grid label {
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.inline-settings-grid .text_pole {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
#amily2_memorisation_forms_panel.prompt-editor-area {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel.editor-buttons-panel {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
|
||||
#add-table-placeholder {
|
||||
width: 100%;
|
||||
padding: 20px 0;
|
||||
border: 2px dashed rgba(255, 255, 255, 0.3);
|
||||
border-radius: 12px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#add-table-placeholder i {
|
||||
font-size: 2em;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
#add-table-placeholder:hover {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
border-color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
|
||||
#add-table-placeholder:hover i {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
|
||||
#amily2-action-center {
|
||||
display: flex !important;
|
||||
flex-direction: row !important;
|
||||
gap: 10px !important;
|
||||
}
|
||||
|
||||
|
||||
.sinan-navigation-deck {
|
||||
display: flex;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.sinan-nav-item {
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
color: var(--amily2-text-color);
|
||||
font-size: 1em;
|
||||
border-bottom: 3px solid transparent;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.sinan-nav-item:hover {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
color: var(--amily2-text-color);
|
||||
}
|
||||
|
||||
.sinan-nav-item.active {
|
||||
color: #9e8aff;
|
||||
border-bottom-color: #9e8aff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sinan-nav-item i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.sinan-content-wrapper {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.sinan-tab-pane {
|
||||
display: none;
|
||||
animation: fadeIn 0.5s;
|
||||
}
|
||||
|
||||
.sinan-tab-pane.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.action-center-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 15px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.action-center-buttons .menu_button {
|
||||
flex-grow: 1;
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.notes {
|
||||
font-size: 0.9em;
|
||||
color: var(--amily2-text-color);
|
||||
margin-top: 15px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.control-block-with-switch {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.control-block-with-switch label {
|
||||
font-weight: bold;
|
||||
color: var(--amily2-text-color);
|
||||
}
|
||||
|
||||
.toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #555;
|
||||
transition: .4s;
|
||||
border-radius: 28px;
|
||||
}
|
||||
#amily2_memorisation_forms_panel .slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
background-color: var(--amily2-text-color);
|
||||
border-radius: 50%;
|
||||
transition: .4s;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel input:checked + .slider {
|
||||
background-color: #8a72ff;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel input:focus + .slider {
|
||||
box-shadow: 0 0 1px #8a72ff;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel input:checked + .slider:before {
|
||||
transform: translateX(22px) translateY(-50%);
|
||||
}
|
||||
|
||||
.amily2-context-menu {
|
||||
display: none;
|
||||
z-index: 9999;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
padding: 4px;
|
||||
background-color: rgba(30, 30, 40, 0.98);
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.amily2-row-context-menu {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 100%;
|
||||
z-index: 10000;
|
||||
display: none; /* Initially hidden */
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 8px;
|
||||
width: max-content;
|
||||
background-color: rgba(30, 30, 40, 0.98);
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
/* Now controlled by a class on the parent TD for consistency */
|
||||
td.amily2-menu-open .amily2-row-context-menu {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.amily2-context-menu.amily2-menu-active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
th .amily2-context-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: 10000;
|
||||
display: none;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 4px;
|
||||
padding: 8px;
|
||||
width: max-content;
|
||||
background-color: rgba(30, 30, 40, 0.98);
|
||||
border: 1px solid rgba(255, 255, 255, 0.5);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
th.amily2-menu-open .amily2-context-menu {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .amily2-context-menu .menu_button {
|
||||
white-space: nowrap;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
padding: 4px 8px !important;
|
||||
font-size: 0.85em !important;
|
||||
background: transparent !important;
|
||||
transition: background-color 0.2s ease !important;
|
||||
text-align: left !important;
|
||||
font-weight: normal !important;
|
||||
transform: none !important;
|
||||
box-shadow: none !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .amily2-context-menu .menu_button:hover {
|
||||
background: rgba(255, 255, 255, 0.15) !important;
|
||||
transform: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* This rule is now part of the main .amily2-row-context-menu block above */
|
||||
|
||||
@media (max-width: 768px) {
|
||||
#amily2_memorisation_forms_panel {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#upper-controls-wrapper {
|
||||
padding: var(--am2-padding-main);
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel #all-tables-container {
|
||||
padding: 10px 2px;
|
||||
}
|
||||
|
||||
/* Make resizer easier to touch on mobile */
|
||||
#amily2_memorisation_forms_panel .amily2-resizer {
|
||||
width: 15px;
|
||||
right: -7px; /* Adjust position to keep it centered on the border */
|
||||
}
|
||||
}
|
||||
|
||||
#amily2_memorisation_forms_panel .cell-highlight {
|
||||
background-color: var(--am2-cell-highlight-bg, rgba(144, 238, 144, 0.3)) !important;
|
||||
transition: background-color 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
/* 自定义列名编辑对话框样式 */
|
||||
.custom-input-dialog {
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
background: rgba(30, 30, 40, 0.95);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
|
||||
width: 90vw;
|
||||
max-width: 450px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.custom-input-dialog .popup-body {
|
||||
background: rgba(40, 45, 60, 0.9);
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
}
|
||||
|
||||
.custom-input-dialog #column-name-input {
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.custom-input-dialog #column-name-input:focus {
|
||||
border-color: rgba(158, 138, 255, 0.8) !important;
|
||||
box-shadow: 0 0 8px rgba(158, 138, 255, 0.3);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.custom-input-dialog .popup-button-ok:hover {
|
||||
background: rgba(158, 138, 255, 0.5) !important;
|
||||
border-color: rgba(158, 138, 255, 0.8) !important;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.custom-input-dialog .popup-button-cancel:hover {
|
||||
background: rgba(120, 120, 120, 0.4) !important;
|
||||
border-color: rgba(120, 120, 120, 0.6) !important;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
/* Nccs API 按钮行样式 */
|
||||
.nccs-button-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.nccs-button-row .menu_button {
|
||||
min-width: 120px;
|
||||
height: 35px;
|
||||
border-radius: 20px;
|
||||
background: linear-gradient(45deg, rgba(74, 158, 255, 0.6), rgba(138, 114, 255, 0.6));
|
||||
border: 1px solid rgba(74, 158, 255, 0.8) !important;
|
||||
color: #fff !important;
|
||||
font-weight: bold;
|
||||
transition: all 0.3s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.nccs-button-row .menu_button:hover {
|
||||
background: linear-gradient(45deg, rgba(74, 158, 255, 0.8), rgba(138, 114, 255, 0.8));
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 15px rgba(74, 158, 255, 0.4);
|
||||
}
|
||||
|
||||
.nccs-button-row .menu_button.secondary {
|
||||
background: linear-gradient(45deg, rgba(120, 120, 120, 0.6), rgba(160, 160, 160, 0.6));
|
||||
border: 1px solid rgba(120, 120, 120, 0.8) !important;
|
||||
}
|
||||
|
||||
.nccs-button-row .menu_button.secondary:hover {
|
||||
background: linear-gradient(45deg, rgba(120, 120, 120, 0.8), rgba(160, 160, 160, 0.8));
|
||||
box-shadow: 0 4px 15px rgba(120, 120, 120, 0.4);
|
||||
}
|
||||
|
||||
/* Styles for tables injected into chat messages */
|
||||
#amily2-chat-table-container {
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
border: 1px solid var(--am2-container-border, rgba(255, 255, 255, 0.2));
|
||||
border-radius: 8px;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
backdrop-filter: blur(5px);
|
||||
-webkit-backdrop-filter: blur(5px);
|
||||
overflow-x: auto; /* Ensure horizontal scrolling on small screens */
|
||||
}
|
||||
|
||||
.amily2-chat-table {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.amily2-chat-table:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.amily2-chat-table h4 {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
color: var(--am2-header-color, #e0e0e0);
|
||||
margin-bottom: 8px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: 1px solid var(--am2-table-border, rgba(255, 255, 255, 0.25));
|
||||
}
|
||||
|
||||
.amily2-chat-table table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.amily2-chat-table th,
|
||||
.amily2-chat-table td {
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
padding: 5px 8px;
|
||||
text-align: left;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.amily2-chat-table th {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
/* Styles for collapsible in-chat tables */
|
||||
.amily2-chat-table-summary {
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.2s ease;
|
||||
list-style: none; /* Hide the default triangle */
|
||||
display: block;
|
||||
}
|
||||
|
||||
.amily2-chat-table-summary::-webkit-details-marker {
|
||||
display: none; /* Hide the default triangle in Chrome/Safari */
|
||||
}
|
||||
|
||||
.amily2-chat-table-summary:before {
|
||||
content: '▶';
|
||||
margin-right: 8px;
|
||||
font-size: 0.8em;
|
||||
display: inline-block;
|
||||
transition: transform 0.2s ease;
|
||||
}
|
||||
|
||||
.amily2-chat-table-details[open] > .amily2-chat-table-summary:before {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.amily2-chat-table-summary:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.amily2-chat-table th,
|
||||
.amily2-chat-table td {
|
||||
padding: 4px 6px; /* Reduce padding on mobile */
|
||||
font-size: 0.85em; /* Slightly smaller font on mobile */
|
||||
}
|
||||
|
||||
#amily2-chat-table-container {
|
||||
padding: 5px; /* Reduce container padding on mobile */
|
||||
}
|
||||
|
||||
/* On mobile, allow text wrapping to prevent overflow */
|
||||
.amily2-chat-table th,
|
||||
.amily2-chat-table td {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
.amily2-chat-table td.amily2-cell-highlight {
|
||||
background-color: var(--am2-cell-highlight-bg, rgba(144, 238, 144, 0.3));
|
||||
transition: background-color 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
#amily2-chat-table-container.mobile-table-view .amily2-chat-table th,
|
||||
#amily2-chat-table-container.mobile-table-view .amily2-chat-table td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.pending-deletion-row {
|
||||
background-color: rgba(255, 82, 82, 0.15) !important;
|
||||
transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.pending-deletion-row:hover {
|
||||
background-color: rgba(255, 82, 82, 0.25) !important;
|
||||
}
|
||||
|
||||
.pending-deletion-row td {
|
||||
opacity: 0.7;
|
||||
}
|
||||
h3.table-updated {
|
||||
color: #87CEFA !important;
|
||||
text-shadow: 0 0 8px #00BFFF, 0 0 12px rgba(0, 191, 255, 0.5);
|
||||
transition: color 0.4s ease-in-out, text-shadow 0.4s ease-in-out;
|
||||
}
|
||||
325
assets/amily-glossary-system/amily2-glossary.css
Normal file
325
assets/amily-glossary-system/amily2-glossary.css
Normal file
@@ -0,0 +1,325 @@
|
||||
|
||||
#amily2_glossary_panel {
|
||||
--am2-gap-main: 15px;
|
||||
--am2-padding-main: 10px;
|
||||
|
||||
--am2-container-bg: rgba(0,0,0,0.2);
|
||||
--am2-container-border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
--am2-container-border-radius: 12px;
|
||||
--am2-container-padding: 20px;
|
||||
--am2-container-shadow: inset 0 0 15px rgba(0,0,0,0.25);
|
||||
|
||||
--am2-title-font-size: 1.15em;
|
||||
--am2-title-font-weight: bold;
|
||||
--am2-title-icon-color: #9e8aff;
|
||||
--am2-title-icon-margin: 10px;
|
||||
|
||||
--am2-button-bg: #4A4A4A;
|
||||
--am2-button-border-color: rgba(255, 255, 255, 0.2);
|
||||
--am2-button-hover-bg: rgba(255, 255, 255, 0.15);
|
||||
--am2-button-hover-border-color: #fff;
|
||||
--am2-button-text-color: #E0E0E0;
|
||||
}
|
||||
|
||||
/* --- 整体布局 --- */
|
||||
#amily2_glossary_panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--am2-gap-main);
|
||||
padding: var(--am2-padding-main);
|
||||
}
|
||||
|
||||
/* --- 标签页系统 --- */
|
||||
#amily2_glossary_panel .glossary-tabs {
|
||||
display: flex;
|
||||
border-bottom: 1px solid var(--am2-container-border);
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .glossary-tab {
|
||||
background: none;
|
||||
border: none;
|
||||
border-bottom: 3px solid transparent;
|
||||
color: var(--text-color-secondary);
|
||||
cursor: pointer;
|
||||
font-size: 1em;
|
||||
padding: 10px 15px;
|
||||
transition: all 0.3s ease;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .glossary-tab:hover {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
color: var(--text-color-light);
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .glossary-tab.active {
|
||||
color: var(--am2-title-icon-color);
|
||||
border-bottom-color: var(--am2-title-icon-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .glossary-tab i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .glossary-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .glossary-content.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* --- 设置组 (卡片样式) --- */
|
||||
#amily2_glossary_panel .settings-group {
|
||||
background: var(--am2-container-bg);
|
||||
border: var(--am2-container-border);
|
||||
border-radius: var(--am2-container-border-radius);
|
||||
padding: var(--am2-container-padding);
|
||||
box-shadow: var(--am2-container-shadow);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px; /* 组内元素的间距 */
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .settings-group .legend {
|
||||
font-size: var(--am2-title-font-size);
|
||||
font-weight: var(--am2-title-font-weight);
|
||||
color: var(--am2-button-text-color);
|
||||
margin: 0;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .settings-group .legend i {
|
||||
margin-right: var(--am2-title-icon-margin);
|
||||
color: var(--am2-title-icon-color);
|
||||
}
|
||||
|
||||
/* --- 表单控件 --- */
|
||||
#amily2_glossary_panel .control-group,
|
||||
#amily2_glossary_panel .amily2_settings_block {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 10px 15px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .control-group label,
|
||||
#amily2_glossary_panel .amily2_settings_block > label { /* > 选择器避免影响toggle-switch内的label */
|
||||
flex: 1 1 150px;
|
||||
min-width: 120px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .control-group .text_pole,
|
||||
#amily2_glossary_panel .control-group .select-with-refresh,
|
||||
#amily2_glossary_panel .control-group input[type="range"] {
|
||||
flex: 2 1 250px;
|
||||
}
|
||||
|
||||
/* --- 开关按钮 (使用专属Class,彻底隔离污染) --- */
|
||||
#amily2_glossary_panel .amily2-glossary-toggle {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 28px;
|
||||
min-width: 50px;
|
||||
flex-shrink: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .amily2-glossary-toggle input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .amily2-glossary-toggle .slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #555;
|
||||
transition: .4s;
|
||||
border-radius: 28px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .amily2-glossary-toggle .slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 4px;
|
||||
top: 50%;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
transition: .4s;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .amily2-glossary-toggle input:checked + .slider {
|
||||
background-color: #8a72ff;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .amily2-glossary-toggle input:focus + .slider {
|
||||
box-shadow: 0 0 1px #8a72ff;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .amily2-glossary-toggle input:checked + .slider:before {
|
||||
transform: translateX(22px) translateY(-50%);
|
||||
}
|
||||
|
||||
/* --- 按钮 (移植自 table.css) --- */
|
||||
#amily2_glossary_panel .sybd-button-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .menu_button {
|
||||
background: var(--am2-button-bg, #4A4A4A);
|
||||
border: 1px solid var(--am2-button-border-color, rgba(255, 255, 255, 0.2)) !important;
|
||||
color: var(--am2-button-text-color, #E0E0E0) !important;
|
||||
padding: 8px 15px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
transition: all 0.4s ease-out !important;
|
||||
white-space: nowrap; /* 防止文字换行 */
|
||||
display: inline-flex; /* 确保图标和文字对齐 */
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .menu_button:hover {
|
||||
background-color: var(--am2-button-hover-bg, rgba(255, 255, 255, 0.15));
|
||||
border-color: var(--am2-button-hover-border-color, #fff) !important;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .menu_button.small_button {
|
||||
padding: 5px 12px;
|
||||
font-size: 0.9em;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* --- 世界书条目渲染 --- */
|
||||
#amily2_glossary_panel .world-book-entry-item {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .entry-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .entry-title {
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .entry-content-display pre {
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
background-color: rgba(0, 0, 0, 0.25);
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .table-render {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .table-render th,
|
||||
#amily2_glossary_panel .table-render td {
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#amily2_glossary_panel .table-render th {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
/* --- 小说处理面板特定样式修复 --- */
|
||||
|
||||
/* 为需要水平布局的组应用flex */
|
||||
#amily2_glossary_panel #glossary-content-novel-process .horizontal-group {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 10px 15px;
|
||||
}
|
||||
#amily2_glossary_panel #glossary-content-novel-process .horizontal-group label {
|
||||
flex: 0 0 150px; /* 固定标签宽度 */
|
||||
}
|
||||
#amily2_glossary_panel #glossary-content-novel-process .horizontal-group .text_pole,
|
||||
#amily2_glossary_panel #glossary-content-novel-process .horizontal-group select {
|
||||
flex: 1 1 200px; /* 输入框占据剩余空间 */
|
||||
}
|
||||
|
||||
/* 上传按钮容器 */
|
||||
#amily2_glossary_panel #glossary-content-novel-process .upload-button-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
#amily2_glossary_panel #glossary-content-novel-process .upload-button-container .menu_button {
|
||||
cursor: pointer; /* 确保鼠标指针是手型 */
|
||||
}
|
||||
|
||||
|
||||
/* 预览区域 */
|
||||
#amily2_glossary_panel #glossary-content-novel-process .preview-container label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
#amily2_glossary_panel #glossary-content-novel-process #novel-chunk-preview {
|
||||
height: 150px;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
padding: 10px;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
#amily2_glossary_panel #glossary-content-novel-process #novel-chunk-preview .chunk-preview-item {
|
||||
padding: 4px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
#amily2_glossary_panel #glossary-content-novel-process #novel-chunk-preview .chunk-preview-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
|
||||
/* 开关组的对齐 */
|
||||
#amily2_glossary_panel #glossary-content-novel-process .amily2_settings_block {
|
||||
justify-content: space-between; /* 让label和开关分布在两端 */
|
||||
padding: 12px;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 8px;
|
||||
}
|
||||
#amily2_glossary_panel #glossary-content-novel-process .amily2_settings_block > label {
|
||||
flex: 1 1 auto; /* 让标签占据可用空间 */
|
||||
}
|
||||
#amily2_glossary_panel #glossary-content-novel-process .amily2_settings_block .amily2-glossary-toggle {
|
||||
flex: 0 0 auto; /* 开关不拉伸 */
|
||||
}
|
||||
197
assets/amily-glossary-system/amily2-glossary.html
Normal file
197
assets/amily-glossary-system/amily2-glossary.html
Normal file
@@ -0,0 +1,197 @@
|
||||
<div class="amily2-header">
|
||||
<div class="additional-features-title">
|
||||
<i class="fas fa-book"></i> 术语表 (Sybd 系统)
|
||||
</div>
|
||||
<button id="amily2_back_to_main_from_glossary" class="menu_button secondary small_button interactable">
|
||||
返回主殿 <i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
<hr class="header-divider">
|
||||
|
||||
<div class="glossary-tabs">
|
||||
<button class="glossary-tab active" data-tab="api">
|
||||
<i class="fas fa-bolt"></i> API 设置
|
||||
</button>
|
||||
<button class="glossary-tab" data-tab="novel-process">
|
||||
<i class="fas fa-file-invoice"></i> 小说处理
|
||||
</button>
|
||||
<button class="glossary-tab" data-tab="tools">
|
||||
<i class="fas fa-tools"></i> 条目工具
|
||||
</button>
|
||||
<button class="glossary-tab" data-tab="context">
|
||||
<i class="fas fa-book-open"></i> 世界书条目
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="glossary-content-container">
|
||||
|
||||
<div id="glossary-content-api" class="glossary-content active">
|
||||
<div class="settings-group">
|
||||
<div class="legend"><i class="fas fa-satellite-dish"></i> Sybd API 调用系统</div>
|
||||
<small class="notes" style="text-align: center; display: block; margin-bottom: 15px;">
|
||||
独立的API调用系统,可与主系统并行使用,支持全兼容和SillyTavern预设两种模式。
|
||||
</small>
|
||||
|
||||
<div class="amily2_settings_block" id="amily2_sybd_content">
|
||||
<div class="control-group">
|
||||
<label for="amily2_sybd_api_mode">API调用模式:</label>
|
||||
<select id="amily2_sybd_api_mode" class="text_pole" data-setting-key="sybdApiMode" data-type="string">
|
||||
<option value="openai_test">全兼容模式</option>
|
||||
<option value="sillytavern_preset">SillyTavern预设模式</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="amily2_sybd_config_panel" style="margin-top: 15px;">
|
||||
<!-- 全兼容模式配置 -->
|
||||
<div id="amily2_sybd_compatible_config">
|
||||
<div class="control-group">
|
||||
<label for="amily2_sybd_api_url">API地址:</label>
|
||||
<input type="text" id="amily2_sybd_api_url" class="text_pole" placeholder="https://api.openai.com/v1" data-setting-key="sybdApiUrl" data-type="string" />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="amily2_sybd_api_key">API密钥:</label>
|
||||
<input type="password" id="amily2_sybd_api_key" class="text_pole" placeholder="sk-..." data-setting-key="sybdApiKey" data-type="string" />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="amily2_sybd_model">模型:</label>
|
||||
<div class="select-with-refresh">
|
||||
<select id="amily2_sybd_model_select" class="text_pole" style="flex-grow: 1; display: none;">
|
||||
<option value="">-- 请选择模型 --</option>
|
||||
</select>
|
||||
<input type="text" id="amily2_sybd_model" class="text_pole" placeholder="gpt-4" style="flex-grow: 1;" data-setting-key="sybdModel" data-type="string" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SillyTavern预设模式配置 -->
|
||||
<div id="amily2_sybd_preset_config" style="display: none;">
|
||||
<div class="control-group">
|
||||
<label for="amily2_sybd_tavern_profile">选择SillyTavern预设:</label>
|
||||
<select id="amily2_sybd_tavern_profile" class="text_pole" data-setting-key="sybdTavernProfile" data-type="string">
|
||||
<option value="">-- 请选择预设 --</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 通用参数配置 -->
|
||||
<div class="control-group">
|
||||
<label for="amily2_sybd_max_tokens">最大令牌数:<span id="amily2_sybd_max_tokens_value">4000</span></label>
|
||||
<input type="range" id="amily2_sybd_max_tokens" min="100" max="100000" step="100" value="4000" data-setting-key="sybdMaxTokens" data-type="integer" />
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label for="amily2_sybd_temperature">温度:<span id="amily2_sybd_temperature_value">0.7</span></label>
|
||||
<input type="range" id="amily2_sybd_temperature" min="0" max="2" step="0.1" value="0.7" data-setting-key="sybdTemperature" data-type="float" />
|
||||
</div>
|
||||
|
||||
<!-- 测试按钮组 - 水平排列 -->
|
||||
<div class="sybd-button-row" style="display: flex; gap: 10px; justify-content: center; margin-top: 15px;">
|
||||
<button id="amily2_sybd_test_connection" class="menu_button primary small_button interactable">
|
||||
<i class="fas fa-plug"></i> 测试连接
|
||||
</button>
|
||||
<button id="amily2_sybd_fetch_models" class="menu_button secondary small_button interactable" title="获取可用模型列表">
|
||||
<i class="fas fa-download"></i> 获取模型
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="glossary-content-tools" class="glossary-content">
|
||||
<div class="settings-group">
|
||||
<div class="legend"><i class="fas fa-sitemap"></i> 按标题重组条目</div>
|
||||
<small class="notes" style="text-align: center; display: block; margin-bottom: 15px;">
|
||||
在下方文本框中输入您想要合并的标题 (不带'#'),每行一个。<br>
|
||||
插件将精确查找这些标题,并将它们的内容合并到同名的新条目中。
|
||||
</small>
|
||||
<div class="control-group" style="margin: 15px auto; max-width: 80%;">
|
||||
<label for="reorganize-headings-list" style="display: block; text-align: center; margin-bottom: 5px;">要重组的标题列表:</label>
|
||||
<textarea id="reorganize-headings-list" class="text_pole" style="width: 100%; min-height: 120px;" placeholder="世界观设定 章节内容概述 时间线 角色关系网 角色总览"></textarea>
|
||||
</div>
|
||||
<div class="sybd-button-row" style="justify-content: center; margin-top: 10px;">
|
||||
<button id="reorganize-entries-by-heading" class="menu_button primary interactable">
|
||||
<i class="fas fa-play-circle"></i> 开始重组
|
||||
</button>
|
||||
</div>
|
||||
<div id="reorganize-status" style="text-align: center; margin-top: 10px; font-weight: bold;">
|
||||
请选择一个世界书并开始操作...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="glossary-content-context" class="glossary-content">
|
||||
<div class="settings-group">
|
||||
<div class="legend"><i class="fas fa-book-open"></i> 世界书条目预览</div>
|
||||
<small class="notes" style="text-align: center; display: block; margin-bottom: 15px;">
|
||||
此处将显示在“小说处理”标签页中选定世界书的条目。
|
||||
</small>
|
||||
<div class="amily2-glossary-toolbar" style="text-align: center; margin-bottom: 15px;">
|
||||
|
||||
</div>
|
||||
<div id="world-book-entries-display" class="world-book-entries-container">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="glossary-content-novel-process" class="glossary-content">
|
||||
<div class="settings-group">
|
||||
<div class="legend"><i class="fas fa-file-upload"></i> 小说文件处理流程</div>
|
||||
|
||||
<div class="control-group horizontal-group">
|
||||
<label for="novel-world-book-select">1. 选择目标世界书:</label>
|
||||
<select id="novel-world-book-select" class="text_pole"></select>
|
||||
</div>
|
||||
|
||||
<div class="upload-button-container" style="display: flex; gap: 10px; justify-content: center;">
|
||||
<label for="novel-file-input" class="menu_button secondary interactable">
|
||||
<i class="fas fa-upload"></i> 2a. 上传本地文件 (.txt)
|
||||
</label>
|
||||
<input type="file" id="novel-file-input" accept=".txt" style="display: none;">
|
||||
<button id="select-from-database-button" class="menu_button secondary interactable">
|
||||
<i class="fas fa-database"></i> 2b. 从数据库选择
|
||||
</button>
|
||||
</div>
|
||||
<div id="database-file-list-container" class="world-book-entries-container" style="display: none; margin-top: 10px; max-height: 200px; overflow-y: auto;">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="control-group horizontal-group">
|
||||
<label for="novel-chunk-size">3. 每批处理字符数:</label>
|
||||
<input type="number" id="novel-chunk-size" class="text_pole" value="300000" min="1000" step="500" data-setting-key="novelChunkSize" data-type="integer">
|
||||
</div>
|
||||
|
||||
<div class="control-group horizontal-group">
|
||||
<label for="novel-start-batch-index" title="如果处理中断,可在此指定从第几批重新开始。">指定开始批次:</label>
|
||||
<input type="number" id="novel-start-batch-index" class="text_pole" value="1" min="1" step="1">
|
||||
</div>
|
||||
|
||||
<hr class="header-divider">
|
||||
|
||||
<div class="preview-container">
|
||||
<label>4. 内容分块预览 (共 <span id="novel-chunk-count">0</span> 块):</label>
|
||||
<div id="novel-chunk-preview">
|
||||
<small>请先上传文件...</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="novel-force-new">强制新建条目 (不更新现有条目)</label>
|
||||
<label class="amily2-glossary-toggle">
|
||||
<input id="novel-force-new" type="checkbox" />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="sybd-button-row">
|
||||
<button id="novel-confirm-and-process" class="menu_button primary interactable" disabled>
|
||||
<i class="fas fa-play-circle"></i> 确认并开始处理
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="novel-process-status" style="text-align: center; margin-top: 10px; font-weight: bold;">
|
||||
等待操作...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
803
assets/amily-hanlinyuan-system/hanlinyuan.css
Normal file
803
assets/amily-hanlinyuan-system/hanlinyuan.css
Normal file
@@ -0,0 +1,803 @@
|
||||
:root {
|
||||
--amily2-bg-color: #2C2C2C;
|
||||
--amily2-button-color: #4A4A4A;
|
||||
--amily2-text-color: #E0E0E0;
|
||||
}
|
||||
|
||||
|
||||
/* ------------------ 整体模态窗口布局 ------------------ */
|
||||
#hly-modal-container {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
color: var(--amily2-text-color);
|
||||
background-color: transparent;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
max-width: 90vw; /* 限制最大宽度 */
|
||||
margin: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
/* ------------------ 滚动区域 ------------------ */
|
||||
#hly-modal-container .hly-scroll {
|
||||
max-height: 60vh; /* 限制最大高度 */
|
||||
overflow-y: auto;
|
||||
padding-right: 10px; /* 为滚动条留出空间 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
|
||||
#hly-modal-container .hly-scroll::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
#hly-modal-container .hly-scroll::-webkit-scrollbar-track {
|
||||
background: #333;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#hly-modal-container .hly-scroll::-webkit-scrollbar-thumb {
|
||||
background-color: #555;
|
||||
border-radius: 4px;
|
||||
border: 2px solid #333;
|
||||
}
|
||||
#hly-modal-container .hly-scroll::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #777;
|
||||
}
|
||||
|
||||
/* ------------------ 头部 & 分割线 ------------------ */
|
||||
#hly-modal-container .amily2-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
#hly-modal-container .additional-features-title {
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
color: #8A2BE2; /* 紫罗兰色 */
|
||||
}
|
||||
#hly-modal-container .header-divider {
|
||||
border: 0;
|
||||
height: 1px;
|
||||
background: linear-gradient(to right, transparent, #555, transparent);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ------------------ 状态诏书 (顶部信息面板) ------------------ */
|
||||
#hly-modal-container .hly-imperial-edict {
|
||||
background-color: transparent;
|
||||
border: 1px solid #444;
|
||||
border-radius: 6px;
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
#hly-modal-container .hly-edict-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
#hly-modal-container .hly-edict-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
#hly-modal-container .hly-edict-label {
|
||||
color: #AAA;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
#hly-modal-container .hly-edict-value {
|
||||
color: #E0E0E0;
|
||||
font-weight: bold;
|
||||
background-color: #383838;
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
#hly-modal-container .hly-memory-display .hly-memory-count {
|
||||
color: #4CAF50; /* 绿色 */
|
||||
}
|
||||
#hly-modal-container .hly-locked-status {
|
||||
color: #8A2BE2 !important; /* 锁定状态用醒目的紫罗兰色 */
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* ------------------ 司南 (导航栏) ------------------ */
|
||||
#hly-modal-container .hly-navigation-deck {
|
||||
display: flex;
|
||||
background-color: transparent;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #444;
|
||||
}
|
||||
#hly-modal-container .hly-nav-item {
|
||||
flex-grow: 1;
|
||||
padding: 10px 15px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background-color: transparent;
|
||||
color: #CCC;
|
||||
border: none;
|
||||
border-right: 1px solid #444;
|
||||
transition: background-color 0.3s, color 0.3s;
|
||||
}
|
||||
#hly-modal-container .hly-nav-item:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
#hly-modal-container .hly-nav-item:hover {
|
||||
background-color: #454545;
|
||||
color: #FFF;
|
||||
}
|
||||
#hly-modal-container .hly-nav-item.active {
|
||||
background-color: #8A2BE2;
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* ------------------ 标签页内容 ------------------ */
|
||||
#hly-modal-container .hly-tab-pane {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
#hly-modal-container .hly-tab-pane.active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* 【V11.4 废弃】注入面板的显示/隐藏逻辑已完全由 hanlinyuan-bindings.js 通过直接修改style属性来控制。*/
|
||||
|
||||
|
||||
/* ------------------ 设置组 (Fieldset) ------------------ */
|
||||
#hly-modal-container .hly-settings-group {
|
||||
border: 1px solid #4A4A4A;
|
||||
border-radius: 6px;
|
||||
padding: 15px;
|
||||
background-color: transparent;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
#hly-modal-container .hly-settings-group legend {
|
||||
color: #8A2BE2;
|
||||
font-weight: bold;
|
||||
padding: 0 10px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
#hly-modal-container .hly-settings-group legend i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* ------------------ 通用控件样式 ------------------ */
|
||||
#hly-modal-container .hly-control-block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
}
|
||||
#hly-modal-container .hly-control-block label {
|
||||
color: #CCC;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
#hly-modal-container .hly-imperial-brush { /* 通用输入框/下拉框样式 */
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
color: #E0E0E0;
|
||||
border: 1px solid #555;
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#hly-modal-container .hly-imperial-brush:focus {
|
||||
outline: none;
|
||||
border-color: #8A2BE2;
|
||||
box-shadow: 0 0 5px rgba(138, 43, 226, 0.5);
|
||||
}
|
||||
#hly-modal-container .hly-notes {
|
||||
font-size: 0.8em;
|
||||
color: #888;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* ------------------ 【V15.2 紧急修复】优先检索排版修正 ------------------ */
|
||||
#hly-modal-container .hly-priority-source-config .hly-control-block {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 8px; /* 为元素之间提供一些间距 */
|
||||
}
|
||||
#hly-modal-container .hly-priority-source-config .hly-control-block label:not(.hly-checkbox-label) {
|
||||
white-space: nowrap; /* 防止 "固定检索:" 换行 */
|
||||
flex-shrink: 0;
|
||||
}
|
||||
#hly-modal-container .hly-priority-source-config .hly-control-block .hly-imperial-brush {
|
||||
width: 60px; /* 固定输入框宽度 */
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
}
|
||||
#hly-modal-container .hly-priority-source-config .hly-control-block > span {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ------------------ 按钮组 ------------------ */
|
||||
#hly-modal-container .hly-button-group {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: flex-end;
|
||||
margin-top: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
#hly-modal-container .hly-action-button {
|
||||
background-color: var(--amily2-button-color);
|
||||
color: var(--amily2-text-color);
|
||||
border: 1px solid #666;
|
||||
border-radius: 4px;
|
||||
padding: 8px 12px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.3s, border-color 0.3s;
|
||||
}
|
||||
#hly-modal-container .hly-action-button:hover {
|
||||
background-color: #5A5A5A;
|
||||
border-color: #888;
|
||||
}
|
||||
#hly-modal-container .hly-action-button.success {
|
||||
background-color: #4CAF50;
|
||||
border-color: #66BB6A;
|
||||
}
|
||||
#hly-modal-container .hly-action-button.success:hover {
|
||||
background-color: #5CB85C;
|
||||
}
|
||||
#hly-modal-container .hly-action-button.danger {
|
||||
background-color: #D9534F;
|
||||
border-color: #E57373;
|
||||
}
|
||||
#hly-modal-container .hly-action-button.danger:hover {
|
||||
background-color: #E57373;
|
||||
}
|
||||
#hly-modal-container .hly-action-button.active {
|
||||
background-color: #8A2BE2;
|
||||
color: #FFFFFF;
|
||||
border-color: #9370DB;
|
||||
}
|
||||
|
||||
/* ------------------ 开关 (Toggle Switch) ------------------ */
|
||||
#hly-modal-container .hly-toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
}
|
||||
#hly-modal-container .hly-toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
#hly-modal-container .hly-toggle-switch .slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #555;
|
||||
transition: .4s;
|
||||
border-radius: 24px;
|
||||
}
|
||||
#hly-modal-container .hly-toggle-switch .slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background-color: white;
|
||||
transition: .4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
#hly-modal-container input:checked + .slider {
|
||||
background-color: #4CAF50;
|
||||
}
|
||||
#hly-modal-container input:checked + .slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* ------------------ 复选框和单选框 ------------------ */
|
||||
#hly-modal-container .hly-checkbox-group,
|
||||
#hly-modal-container .hly-radio-group-vertical {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
#hly-modal-container .hly-radio-group-vertical {
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
#hly-modal-container .hly-checkbox-group label,
|
||||
#hly-modal-container .hly-radio-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* ------------------ 结果显示区域 ------------------ */
|
||||
#hly-modal-container .hly-results-display,
|
||||
#hly-modal-container .hly-log-display {
|
||||
background-color: transparent;
|
||||
border: 1px solid #444;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
min-height: 80px;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 0.9em;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
#hly-modal-container .hly-record-hint {
|
||||
color: #888;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* ------------------ 日志条目样式 ------------------ */
|
||||
#hly-modal-container .hly-log-entry {
|
||||
margin: 0 0 5px 0;
|
||||
padding: 2px 5px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
#hly-modal-container .hly-log-entry i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
#hly-modal-container .log-info { color: #A6A6A6; }
|
||||
#hly-modal-container .log-success { color: #76C7C0; }
|
||||
#hly-modal-container .log-error { color: #F47174; }
|
||||
#hly-modal-container .log-warn { color: #F9D56E; }
|
||||
|
||||
/* ------------------ 文件上传控件 ------------------ */
|
||||
#hly-modal-container .file-input-container {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: inline-block;
|
||||
}
|
||||
#hly-modal-container .file-input-container input[type=file] {
|
||||
font-size: 100px;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
opacity: 0;
|
||||
}
|
||||
#hly-modal-container .file-name {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
color: #ccc;
|
||||
font-style: italic;
|
||||
max-width: 200px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* ------------------ 预览模态框样式 ------------------ */
|
||||
#hly-modal-container .hly-preview-container-v2 {
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
padding: 10px;
|
||||
background: #2a2a2a;
|
||||
border-radius: 5px;
|
||||
}
|
||||
#hly-modal-container .hly-preview-item-v2 {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
background: #333;
|
||||
border: 1px solid #444;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
#hly-modal-container .hly-preview-details {
|
||||
flex-grow: 1;
|
||||
}
|
||||
#hly-modal-container .hly-preview-summary {
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
color: #8A2BE2;
|
||||
}
|
||||
#hly-modal-container .hly-preview-content {
|
||||
margin-top: 8px;
|
||||
}
|
||||
#hly-modal-container .hly-preview-textarea {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
background: #252525;
|
||||
color: #E0E0E0;
|
||||
border: 1px solid #555;
|
||||
border-radius: 4px;
|
||||
padding: 8px;
|
||||
box-sizing: border-box;
|
||||
resize: vertical;
|
||||
}
|
||||
#hly-modal-container .hly-preview-delete-btn-v2 {
|
||||
background: #c0392b;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* ------------------ 知识库管理列表 ------------------ */
|
||||
#hly-modal-container .hly-kb-toolbar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 5px 10px;
|
||||
background-color: #3a3a3a;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
#hly-modal-container .hly-kb-toolbar label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#hly-modal-container .hly-kb-bulk-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
#hly-modal-container .hly-kb-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
#hly-modal-container .hly-kb-list-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #383838;
|
||||
padding: 8px 12px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #484848;
|
||||
gap: 10px;
|
||||
}
|
||||
#hly-modal-container .hly-kb-list-item input[type="checkbox"] {
|
||||
margin-right: 5px;
|
||||
}
|
||||
#hly-modal-container .hly-kb-name {
|
||||
font-weight: bold;
|
||||
color: #DDD;
|
||||
flex-grow: 1;
|
||||
}
|
||||
#hly-modal-container .hly-kb-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
}
|
||||
#hly-modal-container .hly-kb-actions .hly-kb-move-btn,
|
||||
#hly-modal-container .hly-kb-actions .hly-kb-delete-btn {
|
||||
background-color: var(--amily2-button-color);
|
||||
color: var(--amily2-text-color);
|
||||
border: 1px solid #666;
|
||||
border-radius: 4px;
|
||||
padding: 4px 8px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s, border-color 0.2s;
|
||||
font-size: 1em;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-kb-actions .hly-kb-move-btn:hover {
|
||||
background-color: #5A5A5A;
|
||||
border-color: #888;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-kb-actions .hly-kb-delete-btn {
|
||||
background-color: #c94a4a;
|
||||
font-size: 1.2em;
|
||||
padding: 2px 8px;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-kb-actions .hly-kb-delete-btn:hover {
|
||||
background-color: #e04f4f;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* 【修复】为知识库管理列表中的开关添加特定样式 */
|
||||
#hly-modal-container .hly-kb-list .hly-toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
}
|
||||
#hly-modal-container .hly-kb-list .hly-toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
#hly-modal-container .hly-kb-list .hly-toggle-switch .hly-toggle-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: .4s;
|
||||
border-radius: 20px;
|
||||
}
|
||||
#hly-modal-container .hly-kb-list .hly-toggle-switch .hly-toggle-slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: white;
|
||||
transition: .4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
#hly-modal-container .hly-kb-list input:checked + .hly-toggle-slider {
|
||||
background-color: #2196F3;
|
||||
}
|
||||
#hly-modal-container .hly-kb-list input:checked + .hly-toggle-slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* ------------------ 自定义多选下拉框样式 ------------------ */
|
||||
#hly-modal-container .hly-multiselect-container {
|
||||
position: relative;
|
||||
}
|
||||
#hly-modal-container .hly-multiselect-options-container {
|
||||
position: absolute;
|
||||
background-color: #333;
|
||||
border: 1px solid #555;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
z-index: 1000;
|
||||
margin-top: 5px;
|
||||
}
|
||||
#hly-modal-container .hly-multiselect-option {
|
||||
display: flex; /* 关键:使内部元素水平排列 */
|
||||
align-items: center; /* 关键:垂直居中对齐 */
|
||||
padding: 8px 12px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
#hly-modal-container .hly-multiselect-option:hover {
|
||||
background-color: #454545;
|
||||
}
|
||||
#hly-modal-container .hly-multiselect-option input[type="checkbox"] {
|
||||
margin-right: 10px; /* 在复选框和文本之间添加间距 */
|
||||
}
|
||||
#hly-modal-container #hly-hist-entry-multiselect-btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
text-align: left;
|
||||
}
|
||||
#hly-modal-container #hly-hist-entry-multiselect-btn i {
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
#hly-modal-container #hly-hist-entry-multiselect-options[style*="display: block;"] + #hly-hist-entry-multiselect-btn i {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* ------------------ 搜索框样式 ------------------ */
|
||||
#hly-modal-container .hly-search-wrapper,
|
||||
#hly-modal-container .hly-entry-search-wrapper {
|
||||
position: relative;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-search-input {
|
||||
width: 100%;
|
||||
padding: 8px 32px 8px 12px;
|
||||
border: 1px solid #555;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
background: transparent;
|
||||
color: var(--amily2-text-color);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-search-icon {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #888;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-search-input:focus {
|
||||
outline: none;
|
||||
border-color: #8A2BE2;
|
||||
box-shadow: 0 0 5px rgba(138, 43, 226, 0.5);
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-search-input::placeholder {
|
||||
color: #888;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* 搜索高亮样式 */
|
||||
#hly-modal-container .search-highlight {
|
||||
background-color: #fff3cd;
|
||||
color: #856404;
|
||||
padding: 1px 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* 条目容器样式 */
|
||||
#hly-modal-container .hly-entries-container {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-multiselect-option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6px 12px;
|
||||
cursor: pointer;
|
||||
border-bottom: 1px solid #444;
|
||||
margin: 0;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-multiselect-option:hover {
|
||||
background-color: #454545;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-multiselect-option input[type="checkbox"] {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* 无结果提示 */
|
||||
#hly-modal-container .hly-no-results {
|
||||
padding: 12px;
|
||||
text-align: center;
|
||||
color: #888;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* 增强选择器样式 */
|
||||
#hly-modal-container .hly-enhanced-selector {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-search-container {
|
||||
position: relative;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/* ------------------ 【V15.3 新增 & V15.4 优化】功能署名样式 ------------------ */
|
||||
#hly-modal-container .hly-feature-credit {
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 15px;
|
||||
font-size: 0.9em;
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
opacity: 0.9;
|
||||
background: linear-gradient(90deg, #00d2ff 0%, #928DFF 100%);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
pointer-events: none;
|
||||
text-shadow: 0 0 4px rgba(200, 200, 255, 0.5);
|
||||
}
|
||||
|
||||
/* ------------------ 【V15.5】移动端响应式适配 ------------------ */
|
||||
@media (max-width: 768px) {
|
||||
/* 知识库列表项 */
|
||||
#hly-modal-container .hly-kb-list-item {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12px; /* 增加垂直间距 */
|
||||
}
|
||||
|
||||
/* 知识库名称,将其与复选框包裹起来以便对齐 */
|
||||
#hly-modal-container .hly-kb-name-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-kb-name {
|
||||
white-space: normal; /* 允许长标题换行 */
|
||||
word-break: break-all; /* 强制长单词换行 */
|
||||
flex-grow: 1;
|
||||
margin-left: 8px; /* 与复选框的间距 */
|
||||
}
|
||||
|
||||
/* 操作按钮容器 */
|
||||
#hly-modal-container .hly-kb-actions {
|
||||
width: 100%;
|
||||
justify-content: flex-end; /* 让按钮靠右对齐 */
|
||||
}
|
||||
|
||||
/* 顶部批量操作按钮栏 */
|
||||
#hly-modal-container .hly-kb-toolbar {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-kb-bulk-actions {
|
||||
width: 100%;
|
||||
justify-content: space-around; /* 让按钮均匀分布 */
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------ 知识库分组样式 ------------------ */
|
||||
#hly-modal-container .hly-kb-group-item {
|
||||
margin-bottom: 8px;
|
||||
border: 1px solid #484848;
|
||||
border-radius: 4px;
|
||||
background-color: #333;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-kb-group-summary {
|
||||
padding: 10px 12px;
|
||||
background-color: #3a3a3a;
|
||||
cursor: pointer;
|
||||
list-style: none; /* 移除默认三角 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
color: #DDD;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-kb-group-summary:hover {
|
||||
background-color: #454545;
|
||||
}
|
||||
|
||||
/* 自定义三角图标 */
|
||||
#hly-modal-container .hly-kb-group-summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
#hly-modal-container .hly-kb-group-summary::before {
|
||||
content: '▶';
|
||||
font-size: 0.8em;
|
||||
margin-right: 8px;
|
||||
transition: transform 0.2s;
|
||||
display: inline-block;
|
||||
}
|
||||
#hly-modal-container .hly-kb-group-details[open] .hly-kb-group-summary::before {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-kb-group-title i {
|
||||
margin-right: 5px;
|
||||
color: #8A2BE2;
|
||||
}
|
||||
|
||||
#hly-modal-container .hly-kb-group-content {
|
||||
padding: 5px;
|
||||
background-color: #2c2c2c;
|
||||
border-top: 1px solid #444;
|
||||
}
|
||||
|
||||
/* 组内的列表项稍微缩进 */
|
||||
#hly-modal-container .hly-kb-group-content .hly-kb-list-item {
|
||||
margin-bottom: 5px;
|
||||
border-left: 3px solid #8A2BE2; /* 视觉区分 */
|
||||
}
|
||||
#hly-modal-container .hly-kb-group-content .hly-kb-list-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
538
assets/amily-hanlinyuan-system/hanlinyuan.html
Normal file
538
assets/amily-hanlinyuan-system/hanlinyuan.html
Normal file
@@ -0,0 +1,538 @@
|
||||
|
||||
<div class="amily2-header">
|
||||
<div id="amily2_open_hanlin_tutorial" class="additional-features-title interactable" title="查看翰林院使用教程" style="cursor: pointer;">
|
||||
<i class="fas fa-landmark-dome"></i> 翰林院 · 忆识核心
|
||||
</div>
|
||||
<button id="amily2_back_to_main_from_hanlinyuan" class="menu_button secondary small_button interactable">
|
||||
返回主殿 <i class="fas fa-arrow-right"></i>
|
||||
</button>
|
||||
</div>
|
||||
<hr class="header-divider">
|
||||
|
||||
<div id="hly-modal-container">
|
||||
<!-- 状态诏书 -->
|
||||
<div class="hly-imperial-edict">
|
||||
<fieldset class="hly-settings-group" style="margin-bottom: 10px;">
|
||||
<legend><i class="fas fa-power-off"></i> 总开关</legend>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-retrieval-enabled-toggle">开启忆识检索之权</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-retrieval-enabled" data-setting-key="retrieval.enabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-rerank-enabled-toggle">启用 Rerank</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-rerank-enabled" data-setting-key="rerank.enabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-super-sort-enabled-toggle" title="启用后,排序不再依照分数,而是使用绝对正确的排序及分类。">超级排序</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-super-sort-enabled" data-setting-key="rerank.superSortEnabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-independent-chat-memory-toggle" title="启用后,每个聊天文件都将拥有独立的知识库。关闭后,同一角色的所有聊天将共享同一个知识库。">独立聊天记忆</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-independent-chat-memory-enabled" data-setting-key="retrieval.independentChatMemoryEnabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="hly-edict-row">
|
||||
<div class="hly-edict-item">
|
||||
<span class="hly-edict-label">当前会话:</span>
|
||||
<span id="hly-current-chat-id" class="hly-edict-value">未开启</span>
|
||||
</div>
|
||||
<div class="hly-edict-item">
|
||||
<span class="hly-edict-label">当前辅佐:</span>
|
||||
<span id="hly-current-character-name" class="hly-edict-value">待命中...</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hly-edict-row">
|
||||
<div class="hly-edict-item hly-memory-display">
|
||||
<span class="hly-edict-label">忆识总数:</span>
|
||||
<span id="hly-current-vector-count" class="hly-memory-count">0</span>
|
||||
<button class="hly-action-button" onclick="updateHLYMemoryCount()" title="刷新忆识总数" style="padding: 4px 8px; font-size: 12px;">
|
||||
🔄
|
||||
</button>
|
||||
</div>
|
||||
<div class="hly-button-group" style="margin-left: auto;">
|
||||
<button class="hly-action-button" onclick="purgeHLYStorage()" style="padding: 4px 8px; font-size: 12px;">清空宝库</button>
|
||||
<button id="hly-session-lock-btn" class="hly-action-button" style="padding: 4px 8px; font-size: 12px;">
|
||||
<i class="fas fa-lock"></i> <span>锁定会话</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 司南 -->
|
||||
<div class="hly-navigation-deck">
|
||||
<button class="hly-nav-item active" data-tab="retrieval">忆识检索</button>
|
||||
<button class="hly-nav-item" data-tab="historiography">书库编纂</button>
|
||||
<button class="hly-nav-item" data-tab="knowledge-bases">知识管理</button>
|
||||
<button class="hly-nav-item" data-tab="rerank">忆识精炼</button>
|
||||
<button class="hly-nav-item" data-tab="advanced">高级设定</button>
|
||||
</div>
|
||||
|
||||
<div class="hly-scroll">
|
||||
<div id="hly-retrieval-tab" class="hly-tab-pane active">
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-broadcast-tower"></i> 神力之源 (API)</legend>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-api-endpoint">API模式:</label>
|
||||
<select id="hly-api-endpoint" class="hly-imperial-brush" data-setting-key="retrieval.apiEndpoint" data-type="string">
|
||||
<option value="custom">自定义 (OpenAI/Azure 兼容)</option>
|
||||
<option value="google_direct">Google 直连</option>
|
||||
<option value="local_proxy">本地代理 (LM Studio/Ollama)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="hly-control-block" id="hly-custom-endpoint-docket">
|
||||
<label for="hly-custom-api-url">API URL:</label>
|
||||
<input type="text" id="hly-custom-api-url" class="hly-imperial-brush" placeholder="根据所选模式填写" data-setting-key="retrieval.customApiUrl" data-type="string">
|
||||
</div>
|
||||
<div class="hly-control-block" id="hly-api-key-group">
|
||||
<label for="hly-api-key">通行令牌 (API Key):</label>
|
||||
<input type="password" id="hly-api-key" class="hly-imperial-brush" placeholder="请在此输入您的通行令牌" data-setting-key="retrieval.apiKey" data-type="string">
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-embedding-model">嵌入模型:</label>
|
||||
<select id="hly-embedding-model" class="hly-imperial-brush" data-setting-key="retrieval.embeddingModel" data-type="string"></select>
|
||||
</div>
|
||||
<div class="hly-button-group">
|
||||
<button class="hly-action-button" onclick="testHLYApi()">测试神力</button>
|
||||
<button class="hly-action-button" onclick="fetchHLYEmbeddingModels()">获取模型</button>
|
||||
<button class="hly-action-button danger" onclick="resetHLYSettings()">重置为初</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hly-rerank-tab" class="hly-tab-pane">
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-wand-magic-sparkles"></i> Rerank 精炼</legend>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-rerank-api-mode">Rerank API 模式:</label>
|
||||
<select id="hly-rerank-api-mode" class="hly-imperial-brush" data-setting-key="rerank.apiMode" data-type="string">
|
||||
<option value="custom">自定义 (兼容API)</option>
|
||||
<option value="local_proxy">本地代理</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-rerank-url">Rerank API 地址:</label>
|
||||
<input type="text" id="hly-rerank-url" class="hly-imperial-brush" placeholder="根据所选模式填写" data-setting-key="rerank.url" data-type="string">
|
||||
</div>
|
||||
<div class="hly-control-block" id="hly-rerank-api-key-group">
|
||||
<label for="hly-rerank-api-key">Rerank API Key:</label>
|
||||
<input type="password" id="hly-rerank-api-key" class="hly-imperial-brush" placeholder="请输入您的 Rerank API Key" data-setting-key="rerank.apiKey" data-type="string">
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-rerank-model">Rerank 模型:</label>
|
||||
<div style="display: flex; width: 100%;">
|
||||
<select id="hly-rerank-model" class="hly-imperial-brush" data-setting-key="rerank.model" data-type="string" style="flex-grow: 1;"></select>
|
||||
<button class="hly-action-button" onclick="fetchHLYRerankModels()" style="margin-left: 10px; flex-shrink: 0;">获取模型</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-rerank-top-n">返回结果数 (top_n):</label>
|
||||
<input type="number" id="hly-rerank-top-n" class="hly-imperial-brush" value="5" data-setting-key="rerank.top_n" data-type="integer">
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-rerank-hybrid-alpha">混合分数权重 (Alpha):</label>
|
||||
<input type="number" id="hly-rerank-hybrid-alpha" class="hly-imperial-brush" value="0.7" step="0.1" min="0" max="1" data-setting-key="rerank.hybrid_alpha" data-type="float">
|
||||
<small class="hly-notes">Rerank分数权重。1.0表示只用Rerank分数,0.0表示只用原始相似度分数。</small>
|
||||
</div>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-rerank-notify-toggle">Rerank 时上奏</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-rerank-notify" data-setting-key="rerank.notify" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="hly-settings-group" style="position: relative; padding-bottom: 30px;">
|
||||
<legend><i class="fas fa-star-of-life"></i> 优先检索</legend>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-priority-retrieval-enabled" title="启用后,您可以为特定来源设置固定的检索数量,这些结果将必定被注入。">启用优先检索</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-priority-retrieval-enabled" data-setting-key="rerank.priorityRetrieval.enabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<small class="hly-notes">启用后,可以为特定来源设置固定的检索数量,这些结果将必定被注入,不受后续Rerank和排序影响。未勾选的来源将共享剩余的检索名额。</small>
|
||||
|
||||
<!-- 来源配置 -->
|
||||
<div class="hly-priority-source-config" style="margin-top: 15px;">
|
||||
<!-- 小说 -->
|
||||
<div class="hly-control-block" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<label class="hly-checkbox-label" style="flex-grow: 1;">
|
||||
<input type="checkbox" data-setting-key="rerank.priorityRetrieval.sources.novel.enabled" data-type="boolean">
|
||||
<span>小说录入</span>
|
||||
</label>
|
||||
<label>固定检索: </label>
|
||||
<input type="number" class="hly-imperial-brush" style="width: 60px; margin-left: 10px;" value="5" data-setting-key="rerank.priorityRetrieval.sources.novel.count" data-type="integer">
|
||||
<span>块</span>
|
||||
</div>
|
||||
<!-- 聊天记录 -->
|
||||
<div class="hly-control-block" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<label class="hly-checkbox-label" style="flex-grow: 1;">
|
||||
<input type="checkbox" data-setting-key="rerank.priorityRetrieval.sources.chat_history.enabled" data-type="boolean">
|
||||
<span>聊天记录</span>
|
||||
</label>
|
||||
<label>固定检索: </label>
|
||||
<input type="number" class="hly-imperial-brush" style="width: 60px; margin-left: 10px;" value="5" data-setting-key="rerank.priorityRetrieval.sources.chat_history.count" data-type="integer">
|
||||
<span>块</span>
|
||||
</div>
|
||||
<!-- 世界书 -->
|
||||
<div class="hly-control-block" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<label class="hly-checkbox-label" style="flex-grow: 1;">
|
||||
<input type="checkbox" data-setting-key="rerank.priorityRetrieval.sources.lorebook.enabled" data-type="boolean">
|
||||
<span>世界书</span>
|
||||
</label>
|
||||
<label>固定检索: </label>
|
||||
<input type="number" class="hly-imperial-brush" style="width: 60px; margin-left: 10px;" value="5" data-setting-key="rerank.priorityRetrieval.sources.lorebook.count" data-type="integer">
|
||||
<span>块</span>
|
||||
</div>
|
||||
<!-- 手动录入 -->
|
||||
<div class="hly-control-block" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<label class="hly-checkbox-label" style="flex-grow: 1;">
|
||||
<input type="checkbox" data-setting-key="rerank.priorityRetrieval.sources.manual.enabled" data-type="boolean">
|
||||
<span>手动录入</span>
|
||||
</label>
|
||||
<label>固定检索: </label>
|
||||
<input type="number" class="hly-imperial-brush" style="width: 60px; margin-left: 10px;" value="5" data-setting-key="rerank.priorityRetrieval.sources.manual.count" data-type="integer">
|
||||
<span>块</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hly-feature-credit">感谢功能友情提供:Silence_Lurker潜默</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="hly-historiography-tab" class="hly-tab-pane">
|
||||
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-book-medical"></i> 凝识法则</legend>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-condensation-enabled-toggle">准许凝识</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-condensation-enabled" data-setting-key="condensation.enabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-auto-condense-toggle" title="启用后,AI回复后将自动对历史消息进行凝识。">自动凝识</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-auto-condense-toggle" data-setting-key="condensation.autoCondense" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-preserve-floors" title="自动凝识时,保留最近的X层楼不进行凝识。">保留楼层 (自动凝识):</label>
|
||||
<input type="number" id="hly-preserve-floors" class="hly-imperial-brush" value="10" data-setting-key="condensation.preserveFloors" data-type="integer">
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label>凝识范围 (聊天楼层):</label>
|
||||
<div style="display: flex; gap: 10px; align-items: center;">
|
||||
<input type="number" id="hly-layer-start" class="hly-imperial-brush" value="1" data-setting-key="condensation.layerStart" data-type="integer">
|
||||
<span>-</span>
|
||||
<input type="number" id="hly-layer-end" class="hly-imperial-brush" value="10" data-setting-key="condensation.layerEnd" data-type="integer">
|
||||
</div>
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label class="hly-label">消息来源:</label>
|
||||
<div class="hly-checkbox-group">
|
||||
<label><input type="checkbox" id="hly-include-user" data-setting-key="condensation.messageTypes.user" data-type="boolean"> 用户</label>
|
||||
<label><input type="checkbox" id="hly-include-ai" data-setting-key="condensation.messageTypes.ai" data-type="boolean"> AI</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-tag-extraction-toggle">标签提取</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-tag-extraction-toggle" data-setting-key="condensation.tagExtractionEnabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div id="hly-tag-input-container" class="hly-control-block" style="display: none;">
|
||||
<label for="hly-tag-input">输入标签 (以逗号分隔):</label>
|
||||
<textarea id="hly-tag-input" class="hly-imperial-brush" rows="2" placeholder="例如: content,details,摘要" data-setting-key="condensation.tags" data-type="string"></textarea>
|
||||
</div>
|
||||
<div class="hly-button-group" style="justify-content: flex-start;">
|
||||
<button id="hly-exclusion-rules-btn" class="hly-action-button">内容排除</button>
|
||||
</div>
|
||||
<div class="hly-button-group">
|
||||
<button class="hly-action-button success" onclick="startHLYCondensation()"> 开始凝识</button>
|
||||
<button class="hly-action-button" onclick="previewHLYCondensation()"> 预览内容</button>
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label>凝识结果预览:</label>
|
||||
<div id="hly-condensation-results" class="hly-results-display"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-book"></i> 手动录入</legend>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-manual-text">在此处粘贴您要录入的知识文书:</label>
|
||||
<textarea id="hly-manual-text" class="hly-imperial-brush" rows="8" placeholder="例如,您可以粘贴角色设定、世界观、背景故事等..."></textarea>
|
||||
<small class="hly-notes">录入的文本将被分块、向量化并存入当前角色的忆识宝库中。</small>
|
||||
</div>
|
||||
<div class="hly-button-group">
|
||||
<button class="hly-action-button success" onclick="ingestHLYManualText()">
|
||||
<i class="fas fa-file-import"></i> 开始录入
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<!-- ================== 小说/文档导入模块 ================== -->
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-book-open"></i> 整本录入 (小说/文档)</legend>
|
||||
<div class="hly-control-block">
|
||||
<label for="hanlin_novel_uploader">选择一个 .txt 格式的文本文档:</label>
|
||||
<div id="hanlinyuan-ingest-novel-controls" class="hly-button-group" style="align-items: center;">
|
||||
<!-- 文件选择按钮 -->
|
||||
<div class="file-input-container">
|
||||
<label for="hanlinyuan-ingest-novel-file-input" class="hly-action-button">选择.txt文件</label>
|
||||
<input type="file" id="hanlinyuan-ingest-novel-file-input" accept=".txt" style="display: none;">
|
||||
</div>
|
||||
<!-- 编码选择 -->
|
||||
<div class="file-encoding-container">
|
||||
<select id="hanlinyuan-ingest-novel-encoding" class="hly-imperial-brush" style="padding: 8px; height: auto;" title="选择您原始文件的编码格式,系统将为您转换为标准的UTF-8格式进行处理。">
|
||||
<option value="UTF-8" selected>UTF-8 (默认)</option>
|
||||
<option value="GBK">GBK/GB2312 → UTF-8</option>
|
||||
<option value="Big5">Big5 → UTF-8</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- 开始按钮 -->
|
||||
<button id="hanlinyuan-ingest-novel-start" class="hly-action-button success">开始录入</button>
|
||||
</div>
|
||||
<span id="hanlinyuan-ingest-novel-file-name" class="file-name" style="margin-top: 10px; color: #ccc; display: inline-block;">未选择文件</span>
|
||||
|
||||
<div id="hanlinyuan-ingest-progress-container" style="display: none; margin-top: 10px;">
|
||||
<div id="hanlinyuan-ingest-status" style="margin-bottom: 5px;">正在准备...</div>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<progress id="hanlinyuan-ingest-progress-bar" value="0" max="100" style="width: 100%;"></progress>
|
||||
<button id="hanlinyuan-ingest-abort" class="hly-action-button danger" style="margin-left: 10px;">中止</button>
|
||||
</div>
|
||||
</div>
|
||||
<small class="hly-notes" style="margin-top: 10px;">上传 .txt 文件,系统会自动分块并存入忆识核心。处理大文件时请耐心等待。</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-list-alt"></i> 按条目编纂</legend>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-hist-select-library">选择书库:</label>
|
||||
<div class="hly-search-wrapper">
|
||||
<input type="text" id="hly-worldbook-search" class="hly-search-input" placeholder="搜索世界书名称...">
|
||||
<i class="fas fa-search hly-search-icon"></i>
|
||||
</div>
|
||||
<select id="hly-hist-select-library" class="hly-imperial-brush">
|
||||
<option value="">请选择书库...</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-hist-select-entry">选择条目:</label>
|
||||
<div class="hly-multiselect-container">
|
||||
<div class="hly-entry-search-wrapper">
|
||||
<input type="text" id="hly-entry-search" class="hly-search-input" placeholder="搜索条目名称、关键词...">
|
||||
<i class="fas fa-search hly-search-icon"></i>
|
||||
</div>
|
||||
<button id="hly-hist-entry-multiselect-btn" class="hly-imperial-brush" disabled>
|
||||
<span>请先选择书库...</span>
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</button>
|
||||
<div id="hly-hist-entry-multiselect-options" class="hly-multiselect-options-container" style="display: none;">
|
||||
<!-- Options will be populated by JS -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hly-button-group">
|
||||
<button class="hly-action-button success" onclick="startHLYHistoriography()">
|
||||
<i class="fas fa-file-import"></i> 开始编纂
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="hly-control-block">
|
||||
<label>编纂结果预览:</label>
|
||||
<div id="hly-historiography-results" class="hly-results-display"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- ================== Knowledge Base Management Tab ================== -->
|
||||
<div id="hly-knowledge-bases-tab" class="hly-tab-pane">
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-globe"></i> 全局知识库 (全角色通用)</legend>
|
||||
<div class="hly-kb-toolbar">
|
||||
<label><input type="checkbox" id="hly-kb-select-all-global"> 全选</label>
|
||||
<div id="hly-kb-bulk-actions-global" class="hly-kb-bulk-actions" style="display: none;">
|
||||
<button class="hly-action-button" data-action="toggle">切换状态</button>
|
||||
<button class="hly-action-button" data-action="move">移至局部</button>
|
||||
<button class="hly-action-button danger" data-action="delete">删除</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="hly-kb-list-global" class="hly-kb-list">
|
||||
<p id="hly-kb-list-global-placeholder" style="color: #888;">尚无全局知识库。</p>
|
||||
<!-- Global KBs will be populated here -->
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="hly-kb-transfer-controls">
|
||||
<button id="hly-kb-move-all-to-local" class="hly-action-button" title="将所有全局知识库移动到当前角色的局部列表">
|
||||
<i class="fas fa-angles-down"></i> 全局移至局部
|
||||
</button>
|
||||
<button id="hly-kb-move-all-to-global" class="hly-action-button" title="将当前角色的所有局部知识库移动到全局列表">
|
||||
<i class="fas fa-angles-up"></i> 局部移至全局
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-user"></i> <span id="hly-local-kb-char-name">当前角色</span>的局部知识库</legend>
|
||||
<div class="hly-kb-toolbar">
|
||||
<label><input type="checkbox" id="hly-kb-select-all-local"> 全选</label>
|
||||
<div id="hly-kb-bulk-actions-local" class="hly-kb-bulk-actions" style="display: none;">
|
||||
<button class="hly-action-button" data-action="toggle">切换状态</button>
|
||||
<button class="hly-action-button" data-action="move">移至全局</button>
|
||||
<button class="hly-action-button danger" data-action="delete">删除</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="hly-kb-list-local" class="hly-kb-list">
|
||||
<p id="hly-kb-list-local-placeholder" style="color: #888;">当前角色没有知识库。通过“书库编纂”中的功能可自动创建。</p>
|
||||
<!-- Local KBs will be populated here -->
|
||||
</div>
|
||||
<div class="hly-button-group" style="margin-top: 15px;">
|
||||
<button id="hly-kb-delete-local-btn" class="hly-action-button danger">
|
||||
<i class="fas fa-skull-crossbones"></i> 删除该角色所有局部知识库
|
||||
</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hly-advanced-tab" class="hly-tab-pane">
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-cogs"></i> 检索微调</legend>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-chunk-size">书卷尺寸 (Chunk Size):</label>
|
||||
<input type="number" id="hly-chunk-size" class="hly-imperial-brush" value="768" data-setting-key="advanced.chunkSize" data-type="integer">
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-overlap-size">上下文关联度 (Overlap):</label>
|
||||
<input type="number" id="hly-overlap-size" class="hly-imperial-brush" value="50" data-setting-key="advanced.overlap" data-type="integer">
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-match-threshold">忆识匹配度 (Threshold):</label>
|
||||
<input type="number" id="hly-match-threshold" class="hly-imperial-brush" value="0.5" step="0.1" data-setting-key="advanced.matchThreshold" data-type="float">
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-query-message-count">检索参考的消息数量:</label>
|
||||
<input type="number" id="hly-query-message-count" class="hly-imperial-brush" value="2" data-setting-key="advanced.queryMessageCount" data-type="integer">
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-max-results">单次检索最大结果数:</label>
|
||||
<input type="number" id="hly-max-results" class="hly-imperial-brush" value="10" data-setting-key="advanced.maxResults" data-type="integer">
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-batch-size">批处理大小 (Batch Size):</label>
|
||||
<input type="number" id="hly-batch-size" class="hly-imperial-brush" value="50" data-setting-key="retrieval.batchSize" data-type="integer">
|
||||
<small class="hly-notes">每次调用API时处理的文本数量。</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-wand-magic-sparkles"></i> 检索预处理</legend>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-query-preprocessing-enabled" title="启用后,将在向量检索前对您的提问进行净化处理,以提高准确性。">启用检索预处理</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-query-preprocessing-enabled" data-setting-key="queryPreprocessing.enabled" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="hly-button-group" style="justify-content: flex-start;">
|
||||
<button id="hly-query-preprocessing-rules-btn" class="hly-action-button">配置处理规则</button>
|
||||
</div>
|
||||
<small class="hly-notes">此功能类似于“凝识法则”,可对您最近的几条聊天记录(即用于检索的文本)进行标签提取和内容排除,以生成更纯净、更高效的检索查询。</small>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-wand-magic-sparkles"></i> 圣言注入 (按来源)</legend>
|
||||
<div style="text-align: center; margin-bottom: 10px;">
|
||||
<small style="font-style: italic; color: #05c3f3;">感谢功能友情提供:Silence_Lurker潜默</small>
|
||||
</div>
|
||||
<!-- 【V12.0 重构】统一注入编辑器 -->
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-injection-source-selector">选择要配置的注入来源:</label>
|
||||
<select id="hly-injection-source-selector" class="hly-imperial-brush">
|
||||
<option value="novel">小说</option>
|
||||
<option value="chat">聊天记录</option>
|
||||
<option value="lorebook">世界书</option>
|
||||
<option value="manual">手动录入</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="hly-unified-injection-editor">
|
||||
<div class="hly-control-block">
|
||||
<label for="hly-unified-template-editor">圣言模板:</label>
|
||||
<textarea id="hly-unified-template-editor" class="hly-imperial-brush" rows="3"></textarea>
|
||||
<small id="hly-unified-template-notes" class="hly-notes">以 {{placeholder}} 为占位符。</small>
|
||||
</div>
|
||||
<div class="hly-control-block">
|
||||
<label>注入位置:</label>
|
||||
<div class="hly-radio-group-vertical">
|
||||
<label class="hly-radio-label">
|
||||
<input type="radio" name="hly-unified-injection-position" value="2" /> <span>主提示前</span>
|
||||
</label>
|
||||
<label class="hly-radio-label">
|
||||
<input type="radio" name="hly-unified-injection-position" value="0" /> <span>主提示后</span>
|
||||
</label>
|
||||
<label class="hly-radio-label">
|
||||
<input type="radio" name="hly-unified-injection-position" value="1" />
|
||||
<span>聊天内 @ 深度</span>
|
||||
<input id="hly-unified-injection-depth" class="hly-imperial-brush" type="number" min="0" max="999" style="width: 60px; margin-left: 10px;" />
|
||||
<span style="margin-left: 10px;">作为</span>
|
||||
<select id="hly-unified-injection-role" class="hly-imperial-brush" style="width: auto; margin-left: 10px;">
|
||||
<option value="0">系统</option>
|
||||
<option value="1">用户</option>
|
||||
<option value="2">助手</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-bell"></i> 上奏设定</legend>
|
||||
<div class="hly-control-block" style="flex-direction: row; justify-content: space-between; align-items: center;">
|
||||
<label for="hly-retrieval-notify-toggle">检索成功时上奏</label>
|
||||
<label class="hly-toggle-switch">
|
||||
<input type="checkbox" id="hly-retrieval-notify" data-setting-key="retrieval.notify" data-type="boolean">
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="hly-log-container" style="border-top: 2px solid #444; padding-top: 10px; margin-top: 10px;">
|
||||
<fieldset class="hly-settings-group">
|
||||
<legend><i class="fas fa-scroll"></i> 起居注</legend>
|
||||
<div id="hly-log-output" class="hly-log-display">
|
||||
<p>翰林院运行日志将在此记录...</p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="hly-footer">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 引入强大的文本解码库,确保编码转换万无一失 -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/text-encoding@0.7.0/lib/encoding.min.js"></script>
|
||||
318
assets/amily2-modal.html
Normal file
318
assets/amily2-modal.html
Normal file
@@ -0,0 +1,318 @@
|
||||
<style>
|
||||
.amily2-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.header-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.header-column.center {
|
||||
gap: 0px;
|
||||
}
|
||||
.side-button {
|
||||
writing-mode: vertical-rl; /* 【V59.0】恢复垂直模式 */
|
||||
text-orientation: mixed;
|
||||
height: 140px;
|
||||
width: 50px;
|
||||
padding: 10px 5px;
|
||||
text-align: center;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.side-button > i {
|
||||
writing-mode: horizontal-tb;
|
||||
display: block;
|
||||
margin: 0 auto 10px auto;
|
||||
font-size: 1.3em;
|
||||
}
|
||||
#amily2_open_tutorial, #amily2_update_button_new {
|
||||
writing-mode: horizontal-tb !important;
|
||||
height: auto !important;
|
||||
width: auto !important;
|
||||
padding: 5px 10px !important;
|
||||
line-height: normal !important;
|
||||
}
|
||||
#amily2_update_button_new {
|
||||
display: none;
|
||||
background-color: #4CAF50 !important;
|
||||
}
|
||||
|
||||
.version-info-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 12px;
|
||||
background-color: rgba(255, 255, 255, 0.03);
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.version-info-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
color: #adb6e6;
|
||||
}
|
||||
|
||||
.version-label {
|
||||
font-size: 10px;
|
||||
opacity: 0.7;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.version-number {
|
||||
font-weight: bold;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.version-current .version-number {
|
||||
color: #68b7ff;
|
||||
}
|
||||
|
||||
.version-latest .version-number {
|
||||
color: #4CAF50;
|
||||
}
|
||||
|
||||
.version-latest.has-update .version-number {
|
||||
color: #ff6b6b;
|
||||
animation: glow 2s ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
@keyframes glow {
|
||||
from { text-shadow: 0 0 5px rgba(255, 107, 107, 0.5); }
|
||||
to { text-shadow: 0 0 10px rgba(255, 107, 107, 0.8), 0 0 15px rgba(255, 107, 107, 0.3); }
|
||||
}
|
||||
|
||||
.collapsible-legend {
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
.collapsible-legend:hover {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
.collapse-icon {
|
||||
transition: transform 0.2s ease-in-out;
|
||||
}
|
||||
.collapsible-content {
|
||||
padding-top: 10px;
|
||||
}
|
||||
.disclaimer-box {
|
||||
margin-top: 15px;
|
||||
padding: 12px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 8px;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.disclaimer-emo {
|
||||
font-style: italic;
|
||||
color: #adb6e6;
|
||||
text-align: center;
|
||||
margin-bottom: 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.disclaimer-text {
|
||||
font-size: 12px;
|
||||
color: #c0c0c0;
|
||||
line-height: 1.6;
|
||||
}
|
||||
.disclaimer-text strong {
|
||||
color: #ffc107;
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
<div class="flex-container">
|
||||
<div id="amily2_chat_optimiser">
|
||||
|
||||
<div id="auth_panel" style="display: none;">
|
||||
<div class="auth-header">
|
||||
<div class="auth-title"><i class="fas fa-crown"></i> Amily2号优化助手 - 授权验证</div>
|
||||
<div class="auth-subtitle">解锁完整功能 享受智能优化体验</div>
|
||||
<div id="expiry_info"></div>
|
||||
</div>
|
||||
<div class="auth-code-input">
|
||||
<input type="password" id="amily2_auth_code" placeholder="输入授权码..."><button id="auth_submit">验证</button>
|
||||
</div>
|
||||
<div class="auth-daily-code">
|
||||
<span>今日授权码:</span>
|
||||
<span id="amily2_daily_code_display" class="daily-code">正在生成...</span>
|
||||
<button id="amily2_copy_daily_code" class="copy-button" title="复制授权码"><i class="fas fa-copy"></i></button>
|
||||
</div>
|
||||
<div class="auth-footer">声明:完全免费,禁止商用。仅供娱乐,严禁用于任何违法行为,且任何使用行为与作者无关。</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="plugin-features" style="display: none;">
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend style="display: flex; justify-content: space-between; align-items: center; width: 100%;">
|
||||
<span><i class="fas fa-cog"></i> Amily中枢</span>
|
||||
|
||||
|
||||
<div style="display: flex; gap: 5px;">
|
||||
<button id="amily2_reset_auth" class="menu_button small_button interactable" title="清除授权">
|
||||
<i class="fas fa-sign-out-alt"></i>
|
||||
</button>
|
||||
<button id="amily2_open_tutorial" class="menu_button small_button interactable" title="查看使用教程">
|
||||
教程
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</legend>
|
||||
</fieldset>
|
||||
|
||||
<div class="disclaimer-box">
|
||||
<p class="disclaimer-emo">“我也想过琴棋书画诗酒花,奈何生活只有柴米油盐酱醋茶。”</p>
|
||||
<p class="disclaimer-text">
|
||||
<strong>免责声明:</strong>本插件仅供个人学习与技术交流使用,严禁用于任何商业目的或非法活动。使用者需自行承担因使用本插件而产生的一切风险与法律责任,开发者对此不承担任何责任。
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-bullhorn"></i> 作者留言</legend>
|
||||
<div id="amily2_message_board" style="display: flex; justify-content: center; align-items: center; padding: 8px; background-color: rgba(255, 255, 255, 0.05); border-radius: 5px; min-height: 40px;">
|
||||
<div id="amily2_message_content" style="color: #adb6e6; font-size: 13px; line-height: 1.5; text-align: center;"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-code-branch"></i> 版本信息</legend>
|
||||
<div class="version-info-container">
|
||||
<div class="version-info-item version-current">
|
||||
<div class="version-label">当前版本</div>
|
||||
<div id="amily2_current_version" class="version-number">加载中...</div>
|
||||
</div>
|
||||
<div class="version-info-item version-center" style="display: flex; flex-direction: column; align-items: center; gap: 5px;">
|
||||
<div style="position: relative;">
|
||||
<button id="amily2_update_button" class="menu_button small_button interactable" title="查看更新日志">
|
||||
<i class="fas fa-bell"></i>
|
||||
</button>
|
||||
<div id="amily2_update_indicator" class="update-indicator" style="display: none;"></div>
|
||||
</div>
|
||||
<button id="amily2_update_button_new" class="menu_button small_button interactable" title="查看更新日志">更新</button>
|
||||
</div>
|
||||
<div class="version-info-item version-latest">
|
||||
<div class="version-label">最新版本</div>
|
||||
<div id="amily2_latest_version" class="version-number">检查中...</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-plus-circle"></i> 记忆增强</legend>
|
||||
<div class="button-group" style="display: flex; justify-content: space-between; gap: 8px;">
|
||||
<button id="amily2_open_additional_features" class="menu_button wide_button"><i class="fas fa-landmark-dome"></i> 总结模块</button>
|
||||
<button id="amily2_open_rag_palace" class="menu_button wide_button"><i class="fas fa-brain"></i> 向量模块</button>
|
||||
<button id="amily2_open_memorisation_forms" class="menu_button wide_button"><i class="fas fa-table"></i> 表格模块</button>
|
||||
<button id="amily2_open_character_world_book" class="menu_button wide_button"><i class="fa-solid fa-book-atlas"></i> 角色世界</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-puzzle-piece"></i> 附加功能</legend>
|
||||
<div class="button-group" style="display: flex; justify-content: space-between; gap: 8px;">
|
||||
<button id="amily2_open_plot_optimization" class="menu_button wide_button"><i class="fas fa-feather-alt"></i> 记忆管理</button>
|
||||
<button id="amily2_open_text_optimization" class="menu_button wide_button"><i class="fas fa-cogs"></i> 正文优化</button>
|
||||
<button id="amily2_open_world_editor" class="menu_button wide_button"><i class="fas fa-globe"></i> 世界编辑</button>
|
||||
<button id="amily2_open_glossary" class="menu_button wide_button"><i class="fas fa-book"></i> 术语表单</button>
|
||||
<button id="amily2_open_renderer" class="menu_button wide_button"><i class="fas fa-paint-brush"></i> 前端渲染</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="settings-group">
|
||||
<legend><i class="fas fa-flask"></i> 内测功能</legend>
|
||||
<div class="button-group" style="display: flex; justify-content: space-between; gap: 8px;">
|
||||
<button id="amily2_open_super_memory" class="menu_button wide_button"><i class="fas fa-brain"></i> 超级记忆</button>
|
||||
<button id="amily2_open_auto_char_card" class="menu_button wide_button"><i class="fas fa-robot"></i> 一键生卡</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<hr class="header-divider">
|
||||
|
||||
|
||||
|
||||
<fieldset class="settings-group collapsible">
|
||||
<legend class="collapsible-legend"><i class="fas fa-palette"></i> 界面定制 <i class="fas fa-chevron-down collapse-icon"></i></legend>
|
||||
<div class="collapsible-content">
|
||||
<div class="amily2_settings_block">
|
||||
<label>帝国徽记位置:</label>
|
||||
<div class="radio-toggle-group">
|
||||
<input type="radio" id="amily2_icon_location_topbar" name="amily2_icon_location" value="topbar">
|
||||
<label for="amily2_icon_location_topbar">驻扎顶栏</label>
|
||||
<input type="radio" id="amily2_icon_location_extensions" name="amily2_icon_location" value="extensions">
|
||||
<label for="amily2_icon_location_extensions">收归扩展</label>
|
||||
</div>
|
||||
<small class="notes">为解决部分移动端UI溢出问题。更改后将立即生效。</small>
|
||||
</div>
|
||||
<div class="amily2_settings_block color-controls-container">
|
||||
<div class="color-picker-group">
|
||||
<div class="color-picker-item">
|
||||
<label for="amily2_bg_color">背景色:</label>
|
||||
<input type="color" id="amily2_bg_color" value="#1e1e1e">
|
||||
</div>
|
||||
<div class="color-picker-item">
|
||||
<label for="amily2_button_color">按钮色:</label>
|
||||
<input type="color" id="amily2_button_color" value="#4a4a4a">
|
||||
</div>
|
||||
<div class="color-picker-item">
|
||||
<label for="amily2_text_color">文字颜色:</label>
|
||||
<input type="color" id="amily2_text_color" value="#ffffff">
|
||||
</div>
|
||||
</div>
|
||||
<button id="amily2_restore_colors" class="menu_button small_button">默认</button>
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_bg_opacity">背景透明度: <span id="amily2_bg_opacity_value">0</span></label>
|
||||
<input type="range" id="amily2_bg_opacity" min="0" max="1" step="0.01" value="0">
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<label>自定义背景图:</label>
|
||||
<div style="display: flex; gap: 10px; align-items: center;">
|
||||
<label for="amily2_custom_bg_image" class="menu_button wide_button" style="cursor: pointer; text-align: center; flex-grow: 1;">
|
||||
<i class="fas fa-upload"></i> 上传图片
|
||||
</label>
|
||||
<input type="file" id="amily2_custom_bg_image" accept="image/*" style="display: none;">
|
||||
<button id="amily2_restore_bg_image" class="menu_button small_button">默认</button>
|
||||
<small class="notes">选择一张图片作为背景。推荐使用小于5MB的图片。</small>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<legend><i class="fas fa-tools"></i> 诊断与操作</legend>
|
||||
<div class="amily2_settings_block button-pair">
|
||||
<button class="menu_button primary interactable" id="amily2_test"><i class="fas fa-search"></i> 测试检查</button>
|
||||
<button class="menu_button accent interactable" id="amily2_fix_now"><i class="fas fa-magic"></i> 立即修复</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div id="amily2_hidden_prompts" style="display:none;">
|
||||
<div class="amily2_settings_block">
|
||||
<div class="prompt-container">
|
||||
<textarea id="amily2_main_prompt" class="text_pole" rows="6"></textarea>
|
||||
<button id="save_main_prompt" class="menu_button small_button interactable"><i class="fas fa-save"></i> 保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<div class="prompt-container">
|
||||
<textarea id="amily2_system_prompt" class="text_pole" rows="8"></textarea>
|
||||
<button id="save_system_prompt" class="menu_button small_button interactable"><i class="fas fa-save"></i> 保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="amily2_settings_block">
|
||||
<div class="prompt-container">
|
||||
<textarea id="amily2_output_format_prompt" class="text_pole" rows="4"></textarea>
|
||||
<button id="save_output_format_prompt" class="menu_button small_button interactable"><i class="fas fa-save"></i> 保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
173
assets/auto-char-card/index.html
Normal file
173
assets/auto-char-card/index.html
Normal file
@@ -0,0 +1,173 @@
|
||||
<div id="acc-window" class="acc-window">
|
||||
<!-- 顶部栏 -->
|
||||
<div class="acc-header">
|
||||
<div class="acc-header-left">
|
||||
<i class="fas fa-robot acc-logo"></i>
|
||||
<span class="acc-title">Amily2 自动构建器</span>
|
||||
<span id="acc-status-indicator" class="acc-status-badge status-idle">空闲</span>
|
||||
</div>
|
||||
<div class="acc-header-controls">
|
||||
<button id="acc-minimize-btn" class="acc-control-btn" title="最小化"><i class="fas fa-window-minimize"></i></button>
|
||||
<button id="acc-maximize-btn" class="acc-control-btn" title="全屏/还原"><i class="fas fa-expand"></i></button>
|
||||
<button id="acc-close-btn" class="acc-control-btn" title="关闭"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 主体内容 (三栏布局) -->
|
||||
<div class="acc-body">
|
||||
<!-- 左栏:工作区设置 -->
|
||||
<div class="acc-column acc-left-panel">
|
||||
<div class="acc-panel-header">
|
||||
<i class="fas fa-cog"></i> 工作区设置
|
||||
</div>
|
||||
<div class="acc-panel-content">
|
||||
<div class="acc-form-group">
|
||||
<label>目标角色卡</label>
|
||||
<select id="acc-target-char" class="acc-select">
|
||||
<option value="">-- 请选择或新建 --</option>
|
||||
<option value="new">新建空白角色</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="acc-form-group">
|
||||
<label>关联世界书</label>
|
||||
<select id="acc-target-world" class="acc-select">
|
||||
<option value="">-- 请选择或新建 --</option>
|
||||
<option value="new">新建世界书</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="acc-divider"></div>
|
||||
|
||||
<div class="acc-section-title">当前任务</div>
|
||||
<div id="acc-task-list" class="acc-task-list">
|
||||
<div class="acc-task-item pending">等待指令...</div>
|
||||
</div>
|
||||
|
||||
<div class="acc-divider"></div>
|
||||
|
||||
<div class="acc-panel-header" style="cursor: pointer;" id="acc-rules-toggle">
|
||||
<i class="fas fa-book"></i> 动态规则 <i class="fas fa-chevron-down" style="float: right;"></i>
|
||||
</div>
|
||||
<div id="acc-rules-content" style="display: none; padding-top: 10px;">
|
||||
<div class="acc-form-group">
|
||||
<label>添加新规则 (格式: 关键词|规则内容)</label>
|
||||
<div style="display: flex; gap: 5px;">
|
||||
<input type="text" id="acc-new-rule-input" class="acc-input" placeholder="例如: 魔法|描写魔法时必须包含咒语">
|
||||
<button id="acc-add-rule-btn" class="acc-btn-secondary"><i class="fas fa-plus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="acc-rules-list" class="acc-rules-list">
|
||||
<!-- Rules will be added here -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="acc-divider"></div>
|
||||
|
||||
<div class="acc-panel-header" style="cursor: pointer;" id="acc-api-settings-toggle">
|
||||
<i class="fas fa-network-wired"></i> API 配置 <i class="fas fa-chevron-down" style="float: right;"></i>
|
||||
</div>
|
||||
<div id="acc-api-settings-content" style="display: none; padding-top: 10px;">
|
||||
<div id="acc-api-executor" class="acc-api-group">
|
||||
<div class="acc-form-group">
|
||||
<label>API URL</label>
|
||||
<input type="text" id="acc-executor-url" class="acc-input" placeholder="http://localhost:3000/v1">
|
||||
</div>
|
||||
<div class="acc-form-group">
|
||||
<label>API Key</label>
|
||||
<input type="password" id="acc-executor-key" class="acc-input" placeholder="sk-...">
|
||||
</div>
|
||||
<div class="acc-form-group">
|
||||
<label>Model</label>
|
||||
<div style="display: flex; gap: 5px;">
|
||||
<select id="acc-executor-model" class="acc-select" style="flex: 1;">
|
||||
<option value="">请刷新获取模型</option>
|
||||
</select>
|
||||
<button id="acc-executor-refresh-models" class="acc-btn-secondary" title="刷新模型列表"><i class="fas fa-sync-alt"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="acc-form-group">
|
||||
<label>Max Tokens</label>
|
||||
<input type="number" id="acc-executor-max-tokens" class="acc-input" placeholder="4000" value="4000">
|
||||
</div>
|
||||
<button id="acc-executor-test" class="acc-btn-secondary" style="width: 100%;">测试连接</button>
|
||||
</div>
|
||||
|
||||
<button id="acc-save-api" class="acc-btn-primary" style="width: 100%; margin-top: 10px;">保存配置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 中栏:互动区域 -->
|
||||
<div class="acc-column acc-center-panel">
|
||||
<div class="acc-panel-header">
|
||||
<i class="fas fa-comments"></i> 交互控制台
|
||||
</div>
|
||||
<div id="acc-chat-stream" class="acc-chat-stream">
|
||||
<div class="acc-message system">
|
||||
<div class="acc-message-content">
|
||||
欢迎使用 Amily2 自动构建器。<br>
|
||||
请在左侧配置工作区,然后在下方输入您的需求。<br>
|
||||
当使用时,最好不要进入所选的角色卡中,以便后台执行即时生效。
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="acc-input-area">
|
||||
<div class="acc-input-wrapper">
|
||||
<textarea id="acc-user-input" placeholder="描述您的需求,例如:创建一个赛博朋克风格的黑客少女..." rows="2"></textarea>
|
||||
<button id="acc-send-btn" class="acc-send-btn"><i class="fas fa-paper-plane"></i></button>
|
||||
</div>
|
||||
<div class="acc-input-controls">
|
||||
<label class="acc-checkbox-label" title="开启后,每次工具调用前都需要您确认">
|
||||
<input type="checkbox" id="acc-require-approval"> 需要确认
|
||||
</label>
|
||||
<button id="acc-stop-btn" class="acc-btn-danger" style="display: none;"><i class="fas fa-stop"></i> 停止生成</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 右栏:实时预览/Diff -->
|
||||
<div class="acc-column acc-right-panel">
|
||||
<div class="acc-panel-header" style="display: flex; justify-content: space-between; align-items: center;">
|
||||
<div style="display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0;">
|
||||
<i class="fas fa-eye" style="flex-shrink: 0;"></i>
|
||||
<select id="acc-file-selector" class="acc-select" style="height: 24px; padding: 0 5px; font-size: 12px; width: auto; flex: 1; min-width: 100px;">
|
||||
<option value="">-- 选择文件 --</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="acc-preview-tabs" style="display: flex; gap: 2px; overflow-x: auto; max-width: 60%;">
|
||||
<!-- Tabs will be injected here -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="acc-panel-content" id="acc-preview-container">
|
||||
<!-- 预览内容将动态插入这里 -->
|
||||
<div class="acc-empty-state">
|
||||
<i class="fas fa-file-alt"></i>
|
||||
<p>暂无修改内容</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 移动端底部导航栏 -->
|
||||
<div class="acc-mobile-nav">
|
||||
<button class="acc-nav-btn" data-target="acc-left-panel">
|
||||
<i class="fas fa-cog"></i>
|
||||
<span>设置</span>
|
||||
</button>
|
||||
<button class="acc-nav-btn active" data-target="acc-center-panel">
|
||||
<i class="fas fa-comments"></i>
|
||||
<span>聊天</span>
|
||||
</button>
|
||||
<button class="acc-nav-btn" data-target="acc-right-panel">
|
||||
<i class="fas fa-eye"></i>
|
||||
<span>预览</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 最小化后的图标 -->
|
||||
<div id="acc-minimized-icon" class="acc-minimized-icon" style="display: none;">
|
||||
<i class="fas fa-robot"></i>
|
||||
<span class="acc-notification-dot" style="display: none;"></span>
|
||||
</div>
|
||||
790
assets/auto-char-card/style.css
Normal file
790
assets/auto-char-card/style.css
Normal file
@@ -0,0 +1,790 @@
|
||||
/* 容器样式 */
|
||||
.acc-window {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
height: 100dvh; /* 适配移动端动态视口 */
|
||||
background-color: #1e1e1e !important;
|
||||
color: #e0e0e0;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
z-index: 99999 !important; /* 确保在最上层,超过 SillyTavern 的层级 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 顶部栏 */
|
||||
.acc-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 20px;
|
||||
background-color: #252526;
|
||||
border-bottom: 1px solid #333;
|
||||
height: 50px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.acc-header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.acc-logo {
|
||||
color: #ffc107;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.acc-title {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.acc-status-badge {
|
||||
font-size: 12px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.status-idle { color: #888; }
|
||||
.status-working { color: #4CAF50; background-color: rgba(76, 175, 80, 0.1); }
|
||||
.status-error { color: #f44336; background-color: rgba(244, 67, 54, 0.1); }
|
||||
|
||||
.acc-control-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #aaa;
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
font-size: 14px;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.acc-control-btn:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 主体内容 */
|
||||
.acc-body {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.acc-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-right: 1px solid #333;
|
||||
}
|
||||
|
||||
.acc-column:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
/* 左栏:设置 */
|
||||
.acc-left-panel {
|
||||
width: 250px;
|
||||
background-color: #252526;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
/* 中栏:交互 */
|
||||
.acc-center-panel {
|
||||
flex: 1;
|
||||
background-color: #1e1e1e;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
/* 右栏:预览 */
|
||||
.acc-right-panel {
|
||||
width: 40%;
|
||||
background-color: #1e1e1e;
|
||||
min-width: 300px;
|
||||
}
|
||||
|
||||
/* 面板通用样式 */
|
||||
.acc-panel-header {
|
||||
padding: 10px 15px;
|
||||
background-color: #2d2d2d;
|
||||
border-bottom: 1px solid #333;
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
color: #ccc;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
/* overflow: hidden; Removed to allow dropdowns to show fully if custom, though native selects are fine. */
|
||||
}
|
||||
|
||||
.acc-panel-header i.fa-chevron-down,
|
||||
.acc-panel-header i.fa-chevron-up {
|
||||
margin-left: auto; /* Use flexbox alignment instead of float */
|
||||
}
|
||||
|
||||
.acc-panel-content {
|
||||
flex: 1;
|
||||
padding: 15px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
/* 表单元素 */
|
||||
.acc-form-group {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.acc-form-group label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.acc-select {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
background-color: #3c3c3c;
|
||||
border: 1px solid #555;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.acc-input {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
background-color: #3c3c3c;
|
||||
border: 1px solid #555;
|
||||
color: #fff;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box; /* Ensure padding doesn't affect width */
|
||||
}
|
||||
|
||||
.acc-input:focus {
|
||||
outline: none;
|
||||
border-color: #0e639c;
|
||||
}
|
||||
|
||||
.acc-btn-primary {
|
||||
background-color: #0e639c;
|
||||
color: #fff;
|
||||
border: none;
|
||||
padding: 8px 12px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.acc-btn-primary:hover {
|
||||
background-color: #1177bb;
|
||||
}
|
||||
|
||||
.acc-btn-secondary {
|
||||
background-color: #3c3c3c;
|
||||
color: #ccc;
|
||||
border: 1px solid #555;
|
||||
padding: 8px 12px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.acc-btn-secondary:hover {
|
||||
background-color: #444;
|
||||
color: #fff;
|
||||
border-color: #666;
|
||||
}
|
||||
|
||||
.acc-divider {
|
||||
height: 1px;
|
||||
background-color: #333;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
/* 任务列表 */
|
||||
.acc-section-title {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
margin-bottom: 10px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.acc-task-item {
|
||||
padding: 8px;
|
||||
margin-bottom: 5px;
|
||||
background-color: #333;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.acc-task-item.active {
|
||||
border-left: 3px solid #ffc107;
|
||||
background-color: rgba(255, 193, 7, 0.1);
|
||||
}
|
||||
|
||||
/* 聊天区域 (Cline Style) */
|
||||
.acc-chat-stream {
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
.acc-message {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
max-width: 100%;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.acc-avatar {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
flex-shrink: 0;
|
||||
margin-top: 2px;
|
||||
background-color: #2d2d2d;
|
||||
}
|
||||
|
||||
.acc-message-content {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
color: #d4d4d4;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* User Message */
|
||||
.acc-message.user {
|
||||
background-color: rgba(255, 255, 255, 0.04);
|
||||
border: 1px solid #333;
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.acc-message.user .acc-avatar {
|
||||
display: flex; /* Show avatar for user */
|
||||
background-color: #0e639c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.acc-message.user .acc-message-content {
|
||||
color: #ffffff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Assistant Message */
|
||||
.acc-message.assistant {
|
||||
padding: 16px;
|
||||
background-color: #252526;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #333;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.acc-message.assistant .acc-avatar {
|
||||
background-color: transparent;
|
||||
color: #4caf50; /* Green robot */
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/* Markdown Styles */
|
||||
.acc-message-content code {
|
||||
background-color: rgba(110, 118, 129, 0.4); /* VSCode style inline code bg */
|
||||
color: #e0e0e0;
|
||||
padding: 2px 5px;
|
||||
border-radius: 4px;
|
||||
font-family: 'JetBrains Mono', 'Consolas', monospace;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.acc-message-content pre {
|
||||
background-color: #1e1e1e;
|
||||
padding: 12px;
|
||||
border-radius: 6px;
|
||||
overflow-x: auto;
|
||||
border: 1px solid #333;
|
||||
margin: 12px 0;
|
||||
}
|
||||
|
||||
.acc-message-content pre code {
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
border: none;
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.acc-message-content p {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.acc-message-content p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.acc-message-content ul, .acc-message-content ol {
|
||||
margin: 10px 0;
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
.acc-message-content li {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
/* Tool Request Styles */
|
||||
.acc-tool-request {
|
||||
background-color: #252526;
|
||||
border: 1px solid #333;
|
||||
border-radius: 8px;
|
||||
margin: 12px 0;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.acc-tool-header {
|
||||
background-color: #2d2d2d;
|
||||
padding: 10px 14px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #e0e0e0;
|
||||
border-bottom: 1px solid #333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.acc-tool-header:hover {
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.acc-tool-header i {
|
||||
color: #e5c07b; /* Gold icon */
|
||||
}
|
||||
|
||||
.acc-tool-content {
|
||||
padding: 14px;
|
||||
margin: 0;
|
||||
background-color: #1e1e1e;
|
||||
color: #9cdcfe;
|
||||
font-family: 'JetBrains Mono', 'Consolas', monospace;
|
||||
font-size: 12px;
|
||||
overflow-x: auto;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* System/Thought Message */
|
||||
.acc-message.system, .acc-message.thought {
|
||||
padding: 0 10px;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.acc-message.thought .acc-avatar {
|
||||
color: #9c27b0;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.acc-message.thought .acc-message-content {
|
||||
color: #8b949e;
|
||||
font-style: italic;
|
||||
background-color: rgba(156, 39, 176, 0.05);
|
||||
padding: 10px 14px;
|
||||
border-radius: 6px;
|
||||
border-left: 3px solid #9c27b0;
|
||||
}
|
||||
|
||||
/* 输入区域 */
|
||||
.acc-input-area {
|
||||
padding: 15px;
|
||||
background-color: #252526;
|
||||
border-top: 1px solid #333;
|
||||
}
|
||||
|
||||
.acc-input-wrapper {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#acc-user-input {
|
||||
flex: 1;
|
||||
background-color: #3c3c3c;
|
||||
border: 1px solid #555;
|
||||
color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 4px;
|
||||
resize: none;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
#acc-user-input:focus {
|
||||
outline: none;
|
||||
border-color: #0e639c;
|
||||
}
|
||||
|
||||
.acc-send-btn {
|
||||
background-color: #0e639c;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
width: 40px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.acc-send-btn:hover {
|
||||
background-color: #1177bb;
|
||||
}
|
||||
|
||||
.acc-btn-danger {
|
||||
background-color: #d32f2f;
|
||||
color: #fff;
|
||||
border: none;
|
||||
padding: 5px 10px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 预览区域 (Editor Tabs) */
|
||||
.acc-preview-tabs {
|
||||
display: flex;
|
||||
background-color: #252526;
|
||||
border-bottom: 1px solid #2b2b2b;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.acc-tab-btn {
|
||||
background: #2d2d2d;
|
||||
border: none;
|
||||
border-right: 1px solid #252526;
|
||||
color: #969696;
|
||||
cursor: pointer;
|
||||
padding: 8px 15px;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
min-width: 100px;
|
||||
max-width: 200px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.acc-tab-title {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.acc-tab-btn:hover {
|
||||
background-color: #2a2d2e;
|
||||
color: #cccccc;
|
||||
}
|
||||
|
||||
.acc-tab-btn.active {
|
||||
background-color: #1e1e1e;
|
||||
color: #ffffff;
|
||||
border-top: 2px solid #0e639c; /* Active tab indicator */
|
||||
}
|
||||
|
||||
.acc-tab-btn i {
|
||||
font-size: 14px;
|
||||
color: #e7c05e; /* JS/File icon color */
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.acc-tab-close {
|
||||
flex-shrink: 0;
|
||||
margin-left: 5px;
|
||||
cursor: pointer;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.acc-tab-close:hover {
|
||||
opacity: 1;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.acc-editor-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
background-color: #1e1e1e;
|
||||
padding: 0; /* Remove padding to let editor fill space */
|
||||
}
|
||||
|
||||
/* Hide scrollbar for tabs but allow scrolling */
|
||||
.acc-preview-tabs::-webkit-scrollbar {
|
||||
height: 3px;
|
||||
}
|
||||
.acc-preview-tabs::-webkit-scrollbar-thumb {
|
||||
background: #444;
|
||||
}
|
||||
|
||||
.acc-empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.acc-empty-state i {
|
||||
font-size: 48px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* 最小化图标 */
|
||||
.acc-minimized-icon {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: #0e639c;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 4px 10px rgba(0,0,0,0.5);
|
||||
z-index: 2001;
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
.acc-minimized-icon:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.acc-notification-dot {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-color: #f44336;
|
||||
border-radius: 50%;
|
||||
border: 2px solid #1e1e1e;
|
||||
}
|
||||
|
||||
/* Cursor-like Editor Styles */
|
||||
.cursor-card {
|
||||
background-color: #181818; /* Cursor dark background */
|
||||
color: #cccccc;
|
||||
font-family: 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
border: 1px solid #2b2b2b;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 16px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.cursor-header {
|
||||
background-color: #202020;
|
||||
padding: 8px 12px;
|
||||
border-bottom: 1px solid #2b2b2b;
|
||||
font-size: 12px;
|
||||
color: #8b949e;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.cursor-header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.cursor-filename {
|
||||
color: #c9d1d9;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.cursor-actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.cursor-action-btn {
|
||||
background: transparent;
|
||||
border: 1px solid #30363d;
|
||||
color: #c9d1d9;
|
||||
padding: 2px 8px;
|
||||
border-radius: 4px;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.cursor-action-btn:hover {
|
||||
background-color: #30363d;
|
||||
border-color: #8b949e;
|
||||
}
|
||||
|
||||
.cursor-content {
|
||||
padding: 4px 0;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.cursor-line {
|
||||
display: flex;
|
||||
padding: 0;
|
||||
min-height: 21px; /* Ensure empty lines have height */
|
||||
}
|
||||
|
||||
.cursor-line-number {
|
||||
color: #484f58;
|
||||
min-width: 40px;
|
||||
text-align: right;
|
||||
padding-right: 16px;
|
||||
user-select: none;
|
||||
font-size: 12px;
|
||||
line-height: 1.7; /* Align with content */
|
||||
background-color: #181818;
|
||||
border-right: 1px solid transparent; /* Optional separator */
|
||||
}
|
||||
|
||||
.cursor-line-content {
|
||||
white-space: pre-wrap;
|
||||
flex: 1;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
/* Syntax Highlighting (Cursor/Dark Modern) */
|
||||
.syntax-key { color: #ff7b72; } /* Red/Pink */
|
||||
.syntax-string { color: #a5d6ff; } /* Light Blue */
|
||||
.syntax-number { color: #79c0ff; } /* Blue */
|
||||
.syntax-comment { color: #8b949e; font-style: italic; } /* Grey */
|
||||
.syntax-func { color: #d2a8ff; } /* Purple */
|
||||
|
||||
/* Diff Styles (Cursor Style) */
|
||||
.diff-added {
|
||||
background-color: rgba(46, 160, 67, 0.15);
|
||||
}
|
||||
|
||||
.diff-added .cursor-line-number {
|
||||
background-color: rgba(46, 160, 67, 0.15); /* Match line bg */
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
border-left: 3px solid #2ea043; /* Green marker */
|
||||
}
|
||||
|
||||
.diff-removed {
|
||||
background-color: rgba(248, 81, 73, 0.15);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.diff-removed .cursor-line-number {
|
||||
background-color: rgba(248, 81, 73, 0.15);
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
border-left: 3px solid #f85149; /* Red marker */
|
||||
}
|
||||
|
||||
.diff-removed .cursor-line-content {
|
||||
text-decoration: line-through;
|
||||
text-decoration-color: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
|
||||
/* Mobile Navigation */
|
||||
.acc-mobile-nav {
|
||||
display: none;
|
||||
/* Flex item in .acc-window */
|
||||
height: 60px;
|
||||
background-color: #252526;
|
||||
border-top: 1px solid #333;
|
||||
z-index: 2002;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.acc-nav-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #888;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.acc-nav-btn.active {
|
||||
color: #0e639c;
|
||||
}
|
||||
|
||||
.acc-nav-btn i {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* Responsive Styles */
|
||||
@media (max-width: 768px) {
|
||||
.acc-mobile-nav {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.acc-body {
|
||||
padding-bottom: 0; /* Nav is now a flex item */
|
||||
}
|
||||
|
||||
.acc-column {
|
||||
width: 100% !important;
|
||||
border-right: none;
|
||||
display: none; /* Hidden by default on mobile */
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Show center panel by default or via JS class */
|
||||
.acc-column.mobile-active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Adjust header */
|
||||
.acc-title {
|
||||
display: none; /* Hide title on small screens */
|
||||
}
|
||||
|
||||
.acc-header {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
/* Adjust panels */
|
||||
.acc-left-panel, .acc-right-panel {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
/* Adjust chat input */
|
||||
.acc-input-area {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
436
assets/historiography.css
Normal file
436
assets/historiography.css
Normal file
@@ -0,0 +1,436 @@
|
||||
:root {
|
||||
--amily2-bg-color: #2C2C2C;
|
||||
--amily2-button-color: #4A4A4A;
|
||||
--amily2-text-color: #E0E0E0;
|
||||
}
|
||||
|
||||
.manual-command-block {
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
|
||||
.manual-command-block .manual-input {
|
||||
flex: 1 1 60px;
|
||||
width: 80px;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
border: 1px solid var(--border_color);
|
||||
background-color: var(--amily2-bg-color);
|
||||
color: var(--amily2-text-color);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.manual-command-block .menu_button {
|
||||
flex: 2 1 90px;
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.manual-command-block label {
|
||||
flex-shrink: 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.manual-command-block .manual-command-divider {
|
||||
font-weight: bold;
|
||||
color: var(--amily2-text-color);
|
||||
}
|
||||
|
||||
#amily2_manual_historiography_bureau .mhb-controls-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 6px;
|
||||
padding: 12px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
|
||||
#amily2_manual_historiography_bureau .manual-command-block {
|
||||
flex-wrap: wrap;
|
||||
gap: 5px; /* 减小间距以适应换行 */
|
||||
}
|
||||
#amily2_manual_historiography_bureau .manual-command-block .manual-input {
|
||||
flex: 1 1 50px; /* 弹性伸缩 */
|
||||
}
|
||||
#amily2_manual_historiography_bureau .manual-command-block .menu_button {
|
||||
flex: 2 1 80px; /* 按钮占据更多空间 */
|
||||
}
|
||||
|
||||
|
||||
#amily2_manual_historiography_bureau .editor-buttons-panel .accent {
|
||||
background: linear-gradient(to right, #FF5722, #E64A19);
|
||||
border: 1px solid #D84315;
|
||||
}
|
||||
#amily2_manual_historiography_bureau .editor-buttons-panel .accent:hover {
|
||||
box-shadow: 0 0 8px rgba(255, 87, 34, 0.7);
|
||||
transform: scale(1.03);
|
||||
}
|
||||
#amily2_manual_historiography_bureau .editor-buttons-panel .secondary {
|
||||
background: linear-gradient(to right, #ffb300, #fb8c00);
|
||||
border: 1px solid #f57c00;
|
||||
}
|
||||
#amily2_manual_historiography_bureau .editor-buttons-panel .secondary:hover {
|
||||
box-shadow: 0 0 8px rgba(255, 179, 0, 0.7);
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
|
||||
#amily2_manual_historiography_bureau .mhb-selector-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
#amily2_manual_historiography_bureau .mhb-selector-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
min-width: 0;
|
||||
gap: 5px;
|
||||
}
|
||||
#amily2_manual_historiography_bureau .mhb-selector-group > label {
|
||||
width: auto;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
#amily2_manual_historiography_bureau .auto-command-block {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
flex-wrap: wrap; /* 允许换行 */
|
||||
gap: 15px;
|
||||
margin-top: 15px;
|
||||
padding: 10px;
|
||||
border: 1px solid var(--secondary-border);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
|
||||
#amily2_manual_historiography_bureau .auto-control-pair {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
#amily2_manual_historiography_bureau #amily2_mhb_small_expedition_execute {
|
||||
width: auto;
|
||||
flex-grow: 0;
|
||||
}
|
||||
#amily2_manual_historiography_bureau #amily2_mhb_small_expedition_execute {
|
||||
background: linear-gradient(135deg, #8e44ad, #6a1b9a);
|
||||
border: 1px solid #4a148c;
|
||||
color: white;
|
||||
text-shadow: 0 0 2px rgba(0,0,0,0.3);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
#amily2_manual_historiography_bureau #amily2_mhb_small_expedition_execute:hover {
|
||||
background: linear-gradient(135deg, #9b59b6, #8e44ad);
|
||||
box-shadow: 0 0 10px rgba(142, 68, 173, 0.7);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
|
||||
#amily2_manual_historiography_bureau #amily2_mhb_small_manual_execute {
|
||||
background: linear-gradient(135deg, #ff8a65, #ff5722);
|
||||
border: 1px solid #e64a19;
|
||||
}
|
||||
|
||||
#amily2_manual_historiography_bureau #amily2_mhb_small_manual_execute:hover {
|
||||
background: linear-gradient(135deg, #ff7043, #f4511e);
|
||||
box-shadow: 0 0 10px rgba(255, 87, 34, 0.6);
|
||||
}
|
||||
|
||||
#amily2_manual_historiography_bureau .danger {
|
||||
background: linear-gradient(135deg, #e74c3c, #c0392b);
|
||||
border: 1px solid #a93226;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#amily2_manual_historiography_bureau .danger:hover {
|
||||
background: linear-gradient(135deg, #ec7063, #e74c3c);
|
||||
box-shadow: 0 0 10px rgba(231, 76, 60, 0.7);
|
||||
}
|
||||
|
||||
#amily2_manual_historiography_bureau .success {
|
||||
background: linear-gradient(135deg, #2ecc71, #27ae60);
|
||||
color: white;
|
||||
}
|
||||
|
||||
#amily2_manual_historiography_bureau .success:hover {
|
||||
background: linear-gradient(135deg, #58d68d, #2ecc71);
|
||||
box-shadow: 0 0 10px rgba(46, 204, 113, 0.7);
|
||||
}
|
||||
|
||||
.prompt-editor-area {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
}
|
||||
.prompt-editor-area textarea {
|
||||
flex-grow: 1;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.editor-buttons-panel {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 10px;
|
||||
}
|
||||
.editor-buttons-panel .menu_button {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.editor_maximize {
|
||||
color: #ccc;
|
||||
cursor: pointer;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.2s, color 0.2s;
|
||||
}
|
||||
.editor_maximize:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.label-with-button {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#amily2_unhide_all_button {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 2px;
|
||||
background: linear-gradient(135deg, #28a745, #20c997);
|
||||
border: 1px solid #198754;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
text-shadow: 0 0 2px rgba(0,0,0,0.3);
|
||||
transition: all 0.3s ease;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
#amily2_unhide_all_button:hover {
|
||||
background: linear-gradient(135deg, #20c997, #28a745);
|
||||
box-shadow: 0 0 10px rgba(40, 167, 69, 0.7);
|
||||
transform: translateY(-2px);
|
||||
border-color: #1a9c5c;
|
||||
}
|
||||
|
||||
#amily2_unhide_all_button {
|
||||
font-size: 13px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
#amily2_unhide_all_button i {
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
}
|
||||
#amily2_unhide_all_button span {
|
||||
font-size: 9px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.amily2-panel-visible {
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.opt-exclusion-rule-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.opt-exclusion-rule-row input[type="text"] {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.delete-rule-btn.danger_button {
|
||||
background: linear-gradient(135deg, #e74c3c, #c0392b);
|
||||
border: 1px solid #a93226;
|
||||
color: white;
|
||||
border-radius: 50%;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
flex-shrink: 0;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.delete-rule-btn.danger_button:hover {
|
||||
background: linear-gradient(135deg, #ec7063, #e74c3c);
|
||||
box-shadow: 0 0 8px rgba(231, 76, 60, 0.7);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.amily2-add-rule-btn {
|
||||
width: auto;
|
||||
padding: 8px 16px;
|
||||
background: linear-gradient(135deg, #2ecc71, #27ae60);
|
||||
border: 1px solid #229954;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.amily2-add-rule-btn:hover {
|
||||
background: linear-gradient(135deg, #58d68d, #2ecc71);
|
||||
box-shadow: 0 0 10px rgba(46, 204, 113, 0.7);
|
||||
}
|
||||
|
||||
/* Styles moved from hanlinyuan.css that are required by the Historiographer panel */
|
||||
|
||||
.hly-control-block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.hly-imperial-brush {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
border: 1px solid #555;
|
||||
border-radius: 8px;
|
||||
padding: 10px;
|
||||
color: #f0f0f0;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.hly-imperial-brush:focus {
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
border-color: #7e57c2;
|
||||
box-shadow: 0 0 10px rgba(126, 87, 194, 0.5);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Combined rule for all toggle switches in this panel */
|
||||
.toggle-switch,
|
||||
.hly-toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 26px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.toggle-switch input,
|
||||
.hly-toggle-switch input { opacity: 0; width: 0; height: 0; }
|
||||
|
||||
.toggle-switch .slider,
|
||||
.hly-toggle-switch .slider {
|
||||
position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
|
||||
background-color: #333; border-radius: 26px; transition: .4s;
|
||||
border: 1px solid #555;
|
||||
}
|
||||
.toggle-switch .slider:before,
|
||||
.hly-toggle-switch .slider:before {
|
||||
position: absolute; content: ""; height: 20px; width: 20px; left: 2px; bottom: 2px;
|
||||
background-color: white; border-radius: 50%; transition: .4s;
|
||||
}
|
||||
.toggle-switch input:checked + .slider,
|
||||
.hly-toggle-switch input:checked + .slider {
|
||||
background: linear-gradient(to right, #7e57c2, #5e35b1);
|
||||
box-shadow: 0 0 8px rgba(126, 87, 194, 0.7);
|
||||
}
|
||||
.toggle-switch input:checked + .slider:before,
|
||||
.hly-toggle-switch input:checked + .slider:before { transform: translateX(24px); }
|
||||
|
||||
|
||||
.hly-action-button {
|
||||
padding: 8px 15px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid transparent;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
transition: all 0.3s ease;
|
||||
background-color: var(--amily2-button-color);
|
||||
color: var(--amily2-text-color);
|
||||
border-color: #666;
|
||||
}
|
||||
.hly-action-button:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
.hly-button-group {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* Ngms API 按钮样式 - 水平扁平按钮 */
|
||||
.ngms-button-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.ngms-button-row .menu_button {
|
||||
min-width: 120px;
|
||||
height: 35px;
|
||||
padding: 8px 16px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
border-radius: 20px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
transition: all 0.3s ease;
|
||||
text-transform: none;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.ngms-button-row .menu_button.primary {
|
||||
background: linear-gradient(135deg, #4CAF50, #45a049);
|
||||
border: 1px solid #388e3c;
|
||||
color: white;
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.ngms-button-row .menu_button.primary:hover {
|
||||
background: linear-gradient(135deg, #5CBF60, #4CAF50);
|
||||
box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.ngms-button-row .menu_button.secondary {
|
||||
background: linear-gradient(135deg, #2196F3, #1976D2);
|
||||
border: 1px solid #1565C0;
|
||||
color: white;
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
.ngms-button-row .menu_button.secondary:hover {
|
||||
background: linear-gradient(135deg, #42A5F5, #2196F3);
|
||||
box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.ngms-button-row .menu_button i {
|
||||
font-size: 14px;
|
||||
}
|
||||
274
assets/optimization.css
Normal file
274
assets/optimization.css
Normal file
@@ -0,0 +1,274 @@
|
||||
#amily2_plot_optimization_panel .settings-group {
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
border-radius: 12px;
|
||||
padding: 12px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
:root {
|
||||
--amily2-bg-color: #2C2C2C;
|
||||
--amily2-button-color: #4A4A4A;
|
||||
--amily2-text-color: #E0E0E0;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .settings-group > legend {
|
||||
color: var(--amily2-text-color);
|
||||
font-weight: bold;
|
||||
padding: 0 10px;
|
||||
margin-left: 10px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .settings-group > legend > i {
|
||||
margin-right: 8px;
|
||||
color: #9e8aff;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .sinan-navigation-deck {
|
||||
display: flex;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .sinan-nav-item {
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
color: var(--amily2-text-color);
|
||||
font-size: 1em;
|
||||
border-bottom: 3px solid transparent;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .sinan-nav-item:hover {
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
color: var(--amily2-text-color);
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .sinan-nav-item.active {
|
||||
color: #9e8aff;
|
||||
border-bottom-color: #9e8aff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .sinan-nav-item i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .sinan-content-wrapper {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .sinan-tab-pane {
|
||||
display: none;
|
||||
animation: fadeIn 0.5s;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .sinan-tab-pane.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .control-block-with-switch {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
border-radius: 8px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .control-block-with-switch label {
|
||||
font-weight: bold;
|
||||
color: var(--amily2-text-color);
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .inline-settings-grid {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
gap: 8px 12px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .inline-settings-grid label {
|
||||
font-weight: bold;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
color: var(--amily2-text-color);
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .inline-settings-grid .text_pole,
|
||||
#amily2_plot_optimization_panel .inline-settings-grid input[type="range"],
|
||||
#amily2_plot_optimization_panel .inline-settings-grid .amily2_opt_preset_selector_wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .prompt-editor-area {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .prompt-editor-area > label {
|
||||
font-weight: bold;
|
||||
color: var(--amily2-text-color);
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .editor-with-button {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .editor-with-button textarea {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .amily2_opt_reset_button {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .scrollable-container {
|
||||
border: 1px solid #444;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
height: 150px;
|
||||
overflow-y: auto;
|
||||
background-color: var(--amily2-bg-color);
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .worldbook-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .amily2_opt_label_with_button_wrapper,
|
||||
#amily2_plot_optimization_panel .amily2_opt_label_with_controls_wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .radio-group {
|
||||
display: flex;
|
||||
border: 1px solid #555;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
#amily2_plot_optimization_panel .radio-group input[type="radio"] { display: none; }
|
||||
#amily2_plot_optimization_panel .radio-group label {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 8px 10px;
|
||||
cursor: pointer;
|
||||
background-color: var(--amily2-bg-color);
|
||||
color: var(--amily2-text-color);
|
||||
transition: all 0.3s ease;
|
||||
border-left: 1px solid #555;
|
||||
margin: 0 !important;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
#amily2_plot_optimization_panel .radio-group label:first-of-type { border-left: none; }
|
||||
#amily2_plot_optimization_panel .radio-group input[type="radio"]:checked + label {
|
||||
background-color: #7e57c2;
|
||||
color: white;
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
/* Horizontal wrapping for button groups */
|
||||
#amily2_plot_optimization_panel .amily2_opt_preset_selector_wrapper,
|
||||
#amily2_plot_optimization_panel #amily2_opt_worldbook_entry_controls {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 5px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .amily2_opt_preset_selector_wrapper > .text_pole {
|
||||
flex-grow: 1; /* Allow select to take available space */
|
||||
}
|
||||
|
||||
/* Jqyh API button styles */
|
||||
#amily2_plot_optimization_panel .jqyh-button-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .jqyh-button-row .menu_button {
|
||||
min-width: 120px;
|
||||
height: 35px;
|
||||
padding: 8px 16px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
border-radius: 20px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
transition: all 0.3s ease;
|
||||
text-transform: none;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .jqyh-button-row .menu_button.primary {
|
||||
background: linear-gradient(135deg, #4CAF50, #45a049);
|
||||
border: 1px solid #388e3c;
|
||||
color: white;
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .jqyh-button-row .menu_button.primary:hover {
|
||||
background: linear-gradient(135deg, #5CBF60, #4CAF50);
|
||||
box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .jqyh-button-row .menu_button.secondary {
|
||||
background: linear-gradient(135deg, #2196F3, #1976D2);
|
||||
border: 1px solid #1565C0;
|
||||
color: white;
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .jqyh-button-row .menu_button.secondary:hover {
|
||||
background: linear-gradient(135deg, #42A5F5, #2196F3);
|
||||
box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .jqyh-button-row .menu_button i {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Unified Prompt Editor Styles */
|
||||
#amily2_plot_optimization_panel .unified-prompt-editor {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .prompt-editor-buttons {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#amily2_plot_optimization_panel .prompt-editor-buttons .menu_button {
|
||||
min-width: 120px;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
26
assets/renderer.css
Normal file
26
assets/renderer.css
Normal file
@@ -0,0 +1,26 @@
|
||||
#amily2_renderer_panel {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.amily2-renderer-info-container {
|
||||
margin-top: 20px;
|
||||
padding: 15px;
|
||||
background-color: rgba(45, 45, 55, 0.5);
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.emo-statement {
|
||||
font-style: italic;
|
||||
color: #d1c4e9;
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
text-shadow: 0 0 5px rgba(209, 196, 233, 0.5);
|
||||
}
|
||||
|
||||
.description-text {
|
||||
font-size: 14px;
|
||||
color: #dddddd;
|
||||
line-height: 1.6;
|
||||
}
|
||||
731
assets/style.css
Normal file
731
assets/style.css
Normal file
@@ -0,0 +1,731 @@
|
||||
:root {
|
||||
--amily2-bg-color: #2C2C2C;
|
||||
--amily2-button-color: #4A4A4A;
|
||||
--amily2-text-color: #E0E0E0;
|
||||
--amily2-bg-image: url('https://cdn.jsdelivr.net/gh/Wx-2025/ST-Amily2-images@main/images2/guigubahuang_2024-09-27_11-20-00_v2.png');
|
||||
--amily2-bg-opacity: 0.85;
|
||||
}
|
||||
|
||||
#amily2_drawer_content .flex-container {
|
||||
width: 100%; height: 100%; display: flex; flex-direction: column;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser {
|
||||
position: relative;
|
||||
background: var(--amily2-bg-image) no-repeat center center !important;
|
||||
background-size: cover !important;
|
||||
z-index: 0;
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
padding: 15px 20px;
|
||||
box-sizing: border-box;
|
||||
color: var(--amily2-text-color) !important;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
background-color: var(--amily2-bg-color);
|
||||
opacity: var(--amily2-bg-opacity);
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser #auth_panel {
|
||||
position: relative;
|
||||
background: transparent !important;
|
||||
z-index: 0;
|
||||
padding: 20px;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 20px;
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
#auth_panel .auth-header { text-align: center; margin-bottom: 20px; }
|
||||
#auth_panel .auth-title {
|
||||
font-size: 1.8rem;
|
||||
background: linear-gradient(to right, #ff9800, #ff5722);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
#auth_panel .auth-subtitle { color: var(--amily2-text-color); margin-top: 5px; }
|
||||
#auth_panel .auth-code-input { display: flex; margin-bottom: 15px; }
|
||||
#auth_panel #amily2_auth_code {
|
||||
flex: 1; padding: 10px; border-radius: 8px 0 0 8px;
|
||||
border: 1px solid #7e57c2;
|
||||
background: rgba(0,0,0,0.3);
|
||||
color: var(--amily2-text-color);
|
||||
}
|
||||
#auth_panel #auth_submit {
|
||||
padding: 10px 15px; border: none;
|
||||
background: var(--amily2-button-color);
|
||||
color: var(--amily2-text-color);
|
||||
border-radius: 0 8px 8px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
#auth_panel .auth-footer { text-align: center; font-size: 0.8em; color: var(--amily2-text-color); }
|
||||
|
||||
.auth-status { padding: 10px; border-radius: 8px; text-align: center; margin-top: 15px; }
|
||||
.auth-status.valid { background-color: rgba(76, 175, 80, 0.2); border: 1px solid #4CAF50; }
|
||||
.auth-status.expired { background-color: rgba(244, 67, 54, 0.2); border: 1px solid #f44336; }
|
||||
|
||||
#amily2_chat_optimiser .amily2_settings_block {
|
||||
position: relative;
|
||||
background: transparent !important;
|
||||
z-index: 0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
padding: 8px;
|
||||
margin: 0;
|
||||
border-radius: 8px;
|
||||
backdrop-filter: blur(3px);
|
||||
}
|
||||
|
||||
.amily2_settings_block label {
|
||||
color: var(--amily2-text-color) !important;
|
||||
margin-right: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.amily2_settings_block input[type="color"] {
|
||||
width: 50px;
|
||||
height: 30px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
margin-right: 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.amily2_settings_block .menu_button {
|
||||
margin-top: 10px;
|
||||
background: var(--amily2-button-color) !important;
|
||||
color: var(--amily2-text-color) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2) !important;
|
||||
}
|
||||
|
||||
.amily2_settings_block .menu_button:hover {
|
||||
background: rgba(74, 74, 74, 0.8) !important;
|
||||
border-color: rgba(255, 255, 255, 0.4) !important;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .main-toggle { margin: 0; }
|
||||
#amily2_chat_optimiser .main-toggle label { font-size: 1.2em; color: var(--amily2-text-color) !important; }
|
||||
|
||||
#amily2_chat_optimiser .update-section {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
#amily2_update_button {
|
||||
background: var(--amily2-button-color) !important;
|
||||
border: 1px solid rgba(255,255,255,0.2);
|
||||
padding: 5px 8px;
|
||||
color: var(--amily2-text-color) !important;
|
||||
}
|
||||
#amily2_update_button:hover {
|
||||
background: rgba(74, 74, 74, 0.8) !important;
|
||||
}
|
||||
|
||||
.update-indicator {
|
||||
position: absolute; top: -3px; right: -3px; width: 10px; height: 10px;
|
||||
background-color: #ff4d4d; border-radius: 50%; border: 1px solid var(--amily2-bg-color);
|
||||
}
|
||||
|
||||
hr.header-divider {
|
||||
border: none;
|
||||
border-top: 1px solid rgba(255,255,255,0.1);
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .settings-group {
|
||||
position: relative;
|
||||
background: transparent !important;
|
||||
z-index: 0;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
border-radius: 8px;
|
||||
padding: 8px 12px;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
backdrop-filter: blur(3px);
|
||||
}
|
||||
|
||||
.settings-group legend {
|
||||
font-size: 1.1em;
|
||||
font-weight: bold;
|
||||
color: var(--amily2-text-color) !important;
|
||||
padding: 0 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.settings-group legend > i {
|
||||
margin-right: 8px;
|
||||
color: #7e57c2;
|
||||
}
|
||||
|
||||
.settings-group legend > i.fa-palette {
|
||||
color: #ff9800;
|
||||
}
|
||||
|
||||
/* === Collapsible Legend Fix === */
|
||||
.collapsible-legend {
|
||||
position: relative; /* Establish a stacking context */
|
||||
z-index: 2; /* Ensure it's above sibling content */
|
||||
cursor: pointer; /* Indicate it's clickable */
|
||||
}
|
||||
|
||||
|
||||
#amily2_chat_optimiser .color-controls-container {
|
||||
flex-direction: row !important;
|
||||
align-items: center !important;
|
||||
justify-content: space-between !important;
|
||||
gap: 15px !important;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .color-picker-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
flex-grow: 1;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .color-picker-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
/* === 可变透明度容器背景 === */
|
||||
#amily2_chat_optimiser .settings-group::before,
|
||||
#amily2_chat_optimiser .amily2_settings_block::before,
|
||||
#amily2_chat_optimiser #auth_panel::before,
|
||||
#amily2_chat_optimiser .extension_block::before,
|
||||
#amily2_chat_optimiser .plugin-features::before,
|
||||
#amily2_chat_optimiser .amily2_extension_frame::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--amily2-bg-color);
|
||||
opacity: var(--amily2-bg-opacity);
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .settings-group::before,
|
||||
#amily2_chat_optimiser .amily2_settings_block::before,
|
||||
#amily2_chat_optimiser .extension_block::before,
|
||||
#amily2_chat_optimiser .plugin-features::before,
|
||||
#amily2_chat_optimiser .amily2_extension_frame::before {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser #auth_panel::before {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .settings-group {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .settings-group:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* === 扩展卡片和面板样式 === */
|
||||
#amily2_chat_optimiser .extension_settings {
|
||||
background: var(--amily2-bg-color) !important;
|
||||
color: var(--amily2-text-color) !important;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser #extensions_settings2,
|
||||
#amily2_chat_optimiser .extension_block,
|
||||
#amily2_chat_optimiser .plugin-features,
|
||||
#amily2_chat_optimiser .amily2_extension_frame {
|
||||
position: relative;
|
||||
background: transparent !important;
|
||||
z-index: 0;
|
||||
color: var(--amily2-text-color) !important;
|
||||
}
|
||||
|
||||
/* === 按钮统一样式 (已限定作用域) === */
|
||||
#amily2_chat_optimiser .amily2_extension_frame .menu_button,
|
||||
#amily2_chat_optimiser .extension_block .menu_button,
|
||||
#amily2_chat_optimiser #amily2_drawer_content .menu_button {
|
||||
background: var(--amily2-button-color) !important;
|
||||
color: var(--amily2-text-color) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2) !important;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .amily2_extension_frame .menu_button:hover,
|
||||
#amily2_chat_optimiser .extension_block .menu_button:hover,
|
||||
#amily2_chat_optimiser #amily2_drawer_content .menu_button:hover {
|
||||
background: rgba(74, 74, 74, 0.8) !important;
|
||||
border-color: rgba(255, 255, 255, 0.4) !important;
|
||||
}
|
||||
|
||||
/* === 输入框样式 (已限定作用域) === */
|
||||
#amily2_chat_optimiser .amily2_extension_frame input,
|
||||
#amily2_chat_optimiser .amily2_extension_frame textarea,
|
||||
#amily2_chat_optimiser .amily2_extension_frame select,
|
||||
#amily2_chat_optimiser #amily2_drawer_content input,
|
||||
#amily2_chat_optimiser #amily2_drawer_content textarea,
|
||||
#amily2_chat_optimiser #amily2_drawer_content select {
|
||||
background: rgba(74, 74, 74, 0.6) !important;
|
||||
color: var(--amily2-text-color) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2) !important;
|
||||
}
|
||||
|
||||
/* === 抽屉容器样式 === */
|
||||
#amily2_main_drawer {
|
||||
/* 顶栏的父容器应保持透明,不应有背景或边框 */
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
#amily2_drawer_content {
|
||||
/* 父容器应保持透明,让子元素的背景得以显示 */
|
||||
background: transparent !important;
|
||||
color: var(--amily2-text-color) !important;
|
||||
}
|
||||
|
||||
/* === 开关样式 === */
|
||||
#amily2_chat_optimiser .toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 26px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
.toggle-switch .slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: var(--amily2-bg-color);
|
||||
border-radius: 26px;
|
||||
transition: .4s;
|
||||
border: 1px solid #555;
|
||||
}
|
||||
.toggle-switch .slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: var(--amily2-text-color);
|
||||
border-radius: 50%;
|
||||
transition: .4s;
|
||||
}
|
||||
.toggle-switch input:checked + .slider {
|
||||
background: linear-gradient(to right, #7e57c2, #5e35b1);
|
||||
box-shadow: 0 0 8px rgba(126, 87, 194, 0.7);
|
||||
}
|
||||
.toggle-switch input:checked + .slider:before {
|
||||
transform: translateX(24px);
|
||||
}
|
||||
|
||||
/* === 单选按钮组样式 === */
|
||||
#amily2_chat_optimiser .radio-toggle-group {
|
||||
display: flex;
|
||||
border: 1px solid #555;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.radio-toggle-group input[type="radio"] {
|
||||
display: none;
|
||||
}
|
||||
.radio-toggle-group label {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 8px 10px;
|
||||
cursor: pointer;
|
||||
background-color: var(--amily2-bg-color);
|
||||
color: var(--amily2-text-color);
|
||||
transition: all 0.3s ease;
|
||||
border-left: 1px solid #555;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.radio-toggle-group label:first-of-type {
|
||||
border-left: none;
|
||||
}
|
||||
.radio-toggle-group input[type="radio"]:checked + label {
|
||||
background-color: #7e57c2;
|
||||
color: var(--amily2-text-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* === 控制对容器样式 === */
|
||||
#amily2_chat_optimiser .control-pair-container {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.control-pair-container .amily2_settings_block {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
.control-pair-container .amily2_settings_block label:first-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .amily2_settings_block { display: flex; flex-direction: column; gap: 8px; }
|
||||
.amily2_settings_block label {
|
||||
font-weight: bold;
|
||||
color: var(--amily2-text-color) !important;
|
||||
}
|
||||
.amily2_settings_block .notes {
|
||||
font-size: 0.8em;
|
||||
color: var(--amily2-text-color);
|
||||
opacity: 0.9;
|
||||
font-style: italic;
|
||||
align-self: flex-start;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.control-pair-container .amily2_settings_block .notes {
|
||||
align-self: center;
|
||||
}
|
||||
.label-with-button {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* === Lore配置样式 === */
|
||||
#amily2_chat_optimiser .amily2_lore_config_wrapper {
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.amily2_lore_config_section {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.amily2_vertical_divider {
|
||||
width: 1px;
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
#amily2_save_lore_settings {
|
||||
width: 100%;
|
||||
background: linear-gradient(135deg, #7e57c2, #5e35b1) !important;
|
||||
border: 1px solid #4527a0 !important;
|
||||
color: var(--amily2-text-color) !important;
|
||||
}
|
||||
#amily2_save_lore_settings:hover {
|
||||
background: linear-gradient(135deg, #5e35b1, #7e57c2) !important;
|
||||
box-shadow: 0 0 8px rgba(126, 87, 194, 0.6);
|
||||
}
|
||||
|
||||
#amily2_lore_save_status {
|
||||
color: #66bb6a;
|
||||
font-weight: bold;
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s ease-in-out;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
/* === New Lore Config Grid Layout === */
|
||||
#amily2_chat_optimiser .lore-config-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1.5fr;
|
||||
gap: 15px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .grid-left-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .grid-right-col {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .grid-right-col .amily2_settings_block {
|
||||
padding: 10px; /* Add some padding for better spacing */
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .grid-right-col .amily2_settings_block:last-child {
|
||||
margin-top: auto; /* Pushes the button to the bottom */
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .radio-group.vertical {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .radio-group.vertical label {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* === 通用样式 === */
|
||||
#amily2_chat_optimiser hr {
|
||||
border: none;
|
||||
border-top: 1px solid rgba(255,255,255,0.1);
|
||||
margin: 0;
|
||||
}
|
||||
#amily2_chat_optimiser .text_pole, #amily2_chat_optimiser select {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .button-pair {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
gap: 15px;
|
||||
}
|
||||
.button-pair .menu_button {
|
||||
flex-grow: 1;
|
||||
}
|
||||
#amily2_chat_optimiser .flex-container .primary {
|
||||
background-color: #2196F3 !important;
|
||||
}
|
||||
#amily2_chat_optimiser .flex-container .accent {
|
||||
background-color: #FF5722 !important;
|
||||
}
|
||||
|
||||
/* === 抽屉图标状态 === */
|
||||
#amily2_drawer_icon.closedIcon { opacity: 0.5; }
|
||||
#amily2_drawer_icon.openIcon { opacity: 1; }
|
||||
#amily2_drawer_icon.interactable:hover { opacity: 1; }
|
||||
|
||||
/* 强制保护顶栏图标不受主题颜色影响 */
|
||||
#amily2_drawer_icon {
|
||||
background: none !important;
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
/* === 特殊功能开关样式 === */
|
||||
#amily2_optimization_enabled:checked + .slider {
|
||||
background: linear-gradient(to right, #28a745, #20c997) !important;
|
||||
box-shadow: 0 0 10px rgba(40, 167, 69, 0.7);
|
||||
}
|
||||
|
||||
#amily2_summarization_enabled:checked + .slider {
|
||||
background: linear-gradient(to right, #007bff, #17a2b8) !important;
|
||||
box-shadow: 0 0 10px rgba(0, 123, 255, 0.7);
|
||||
}
|
||||
|
||||
/* === 位置选择按钮样式 === */
|
||||
#amily2_icon_location_topbar:checked + label {
|
||||
background: linear-gradient(135deg, #0d6efd, #0dcaf0) !important;
|
||||
color: white !important;
|
||||
font-weight: bold;
|
||||
box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.5), 0 0 12px rgba(13, 110, 253, 0.6);
|
||||
transform: translateY(-2px);
|
||||
border-color: #0dcaf0;
|
||||
}
|
||||
|
||||
#amily2_icon_location_extensions:checked + label {
|
||||
background: linear-gradient(135deg, #ffc107, #fd7e14) !important;
|
||||
color: #492000 !important;
|
||||
font-weight: bold;
|
||||
text-shadow: 0 0 1px rgba(255,255,255,0.7);
|
||||
box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.6), 0 0 12px rgba(255, 193, 7, 0.6);
|
||||
transform: translateY(-2px);
|
||||
border-color: #ffc107;
|
||||
}
|
||||
|
||||
.radio-toggle-group label {
|
||||
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
#amily2_mode_intercept:checked + label {
|
||||
background: linear-gradient(135deg, #00bfa5, #00acc1) !important;
|
||||
color: white !important;
|
||||
text-shadow: 0 0 3px rgba(0,0,0,0.4);
|
||||
box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.4), 0 0 10px rgba(0, 191, 165, 0.6);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
#amily2_mode_refresh:checked + label {
|
||||
background: linear-gradient(135deg, #3f51b5, #2196f3) !important;
|
||||
color: white !important;
|
||||
text-shadow: 0 0 3px rgba(0,0,0,0.4);
|
||||
box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.4), 0 0 10px rgba(63, 81, 181, 0.6);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* === 特殊按钮样式 === */
|
||||
#amily2_refresh_models {
|
||||
background: linear-gradient(to right, #2196F3, #1976D2) !important;
|
||||
border: 1px solid #1565C0 !important;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
#amily2_refresh_models:hover {
|
||||
background: linear-gradient(to right, #1976D2, #2196F3) !important;
|
||||
box-shadow: 0 0 8px rgba(33, 150, 243, 0.7);
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
#amily2_unified_restore_button.secondary {
|
||||
background: linear-gradient(to right, #ffb300, #fb8c00) !important;
|
||||
border: 1px solid #f57c00 !important;
|
||||
color: #4d2c00 !important;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
#amily2_unified_restore_button.secondary:hover {
|
||||
background: linear-gradient(to right, #fb8c00, #ffb300) !important;
|
||||
box-shadow: 0 0 8px rgba(255, 179, 0, 0.7);
|
||||
transform: scale(1.03);
|
||||
}
|
||||
|
||||
/* === 头部动作组 === */
|
||||
#amily2_chat_optimiser .header-actions-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
/* === 密室按钮 === */
|
||||
#amily2_chat_optimiser .secret-chamber-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
padding: 6px 10px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: var(--amily2-text-color) !important;
|
||||
background-color: var(--amily2-bg-color) !important;
|
||||
border: 1px solid var(--border_color) !important;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
.secret-chamber-button i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.secret-chamber-button:hover {
|
||||
background-color: var(--background_tertiary) !important;
|
||||
border-color: var(--text_color_half) !important;
|
||||
color: var(--primary_color) !important;
|
||||
}
|
||||
|
||||
/* === 响应式按钮组 === */
|
||||
#amily2_chat_optimiser .button-group {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.button-group {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
gap: 3px;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.button-group .menu_button.wide_button {
|
||||
flex: 1;
|
||||
height: 50px;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
line-height: 1.1;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
font-size: clamp(8px, 2.5vw, 14px);
|
||||
}
|
||||
|
||||
.button-group .menu_button.wide_button i {
|
||||
display: block;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 769px) {
|
||||
.button-group {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.button-group .menu_button.wide_button {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* === 面板可见性 === */
|
||||
#amily2_chat_optimiser .amily2-panel-visible {
|
||||
display: flex !important;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .header-left-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .rag-palace-entry-container {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser #rag_palace_panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .amily2-panel-visible {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
/* === 统一提示词编辑器按钮布局 === */
|
||||
#amily2_chat_optimiser .prompt-editor-area {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser .prompt-editor-area textarea {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
#amily2_test_api_connection {
|
||||
margin-left: 10px;
|
||||
}
|
||||
194
assets/super-memory.css
Normal file
194
assets/super-memory.css
Normal file
@@ -0,0 +1,194 @@
|
||||
#sm-modal-container {
|
||||
color: #e0e0e0;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
padding: 10px;
|
||||
height: calc(100% - 60px); /* Adjust based on header height */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.sm-intro-box {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.sm-intro-box h3 {
|
||||
margin-top: 0;
|
||||
color: #05c3f3; /* Amily Blue */
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.sm-navigation-deck {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
margin-bottom: 15px;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.sm-nav-item {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #888;
|
||||
padding: 8px 15px;
|
||||
cursor: pointer;
|
||||
border-radius: 5px 5px 0 0;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.sm-nav-item:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.sm-nav-item.active {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
color: #05c3f3;
|
||||
border-bottom: 2px solid #05c3f3;
|
||||
}
|
||||
|
||||
.sm-scroll {
|
||||
flex-grow: 1;
|
||||
overflow-y: auto;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.sm-tab-pane {
|
||||
display: none;
|
||||
animation: fadeIn 0.3s ease;
|
||||
}
|
||||
|
||||
.sm-tab-pane.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; transform: translateY(5px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.sm-settings-group {
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
margin-bottom: 15px;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.sm-settings-group legend {
|
||||
color: #05c3f3;
|
||||
font-weight: bold;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.sm-control-block {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
padding: 5px 0;
|
||||
border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.sm-control-block:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.sm-input {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: #fff;
|
||||
padding: 5px 8px;
|
||||
border-radius: 4px;
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sm-button-group {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.sm-action-button {
|
||||
flex: 1;
|
||||
padding: 8px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
transition: background 0.2s;
|
||||
background: #4a4a4a;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.sm-action-button.success {
|
||||
background: #28a745;
|
||||
}
|
||||
|
||||
.sm-action-button.success:hover {
|
||||
background: #218838;
|
||||
}
|
||||
|
||||
.sm-action-button.danger {
|
||||
background: #dc3545;
|
||||
}
|
||||
|
||||
.sm-action-button.danger:hover {
|
||||
background: #c82333;
|
||||
}
|
||||
|
||||
.sm-status-indicator {
|
||||
font-weight: bold;
|
||||
color: #ffc107; /* Warning yellow */
|
||||
}
|
||||
|
||||
/* Toggle Switch */
|
||||
.sm-toggle-switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.sm-toggle-switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.sm-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: .4s;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.sm-slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: white;
|
||||
transition: .4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
input:checked + .sm-slider {
|
||||
background-color: #05c3f3;
|
||||
}
|
||||
|
||||
input:checked + .sm-slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
Reference in New Issue
Block a user