mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 13:35:51 +00:00
Add files via upload
This commit is contained in:
13
manifest.json
Normal file
13
manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"display_name": "Amily2号聊天优化助手",
|
||||
"loading_order": 100,
|
||||
"requires": [],
|
||||
"optional": [],
|
||||
"js": "index.js",
|
||||
"css": "style.css",
|
||||
"author": "Wx-2025",
|
||||
"version": "2.0.1",
|
||||
"homePage": "https://github.com/Wx-2025/sillytavern.git",
|
||||
"description": "自动检查和修复AI聊天回复中的重复内容和抢话问题",
|
||||
"minSillyTavernVersion": "1.10.0"
|
||||
}
|
||||
22
package.json
Normal file
22
package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "ST-Amily2-Chat-Optimisation",
|
||||
"version": "2.0.1",
|
||||
"description": "Amily2's advanced chat optimization engine",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"zip": "zip -r amily2-chat-optimiser.zip . -x '*.git*' -x 'node_modules/*' -x '*.zip' -x 'package*.json'"
|
||||
},
|
||||
"keywords": [
|
||||
"sillytavern",
|
||||
"extension",
|
||||
"chat",
|
||||
"ai",
|
||||
"optimization"
|
||||
],
|
||||
"author": "Wx-2025",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Wx-2025/sillytavern-chat-optimiser.git"
|
||||
}
|
||||
}
|
||||
135
srttings.html
Normal file
135
srttings.html
Normal file
@@ -0,0 +1,135 @@
|
||||
<div id="amily2_chat_optimiser">
|
||||
<!-- 华丽授权面板 -->
|
||||
<div id="auth_panel">
|
||||
<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="auth_input" placeholder="输入授权码...">
|
||||
<button id="auth_submit">验证</button>
|
||||
</div>
|
||||
|
||||
<div class="auth-footer">
|
||||
需要授权码?请联系开发者获取
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 插件功能面板 (激活后显示) -->
|
||||
<div class="plugin-features">
|
||||
<div class="inline-drawer">
|
||||
<div class="inline-drawer-toggle inline-drawer-header">
|
||||
<b><i class="fas fa-stars"></i> Amily2号优化助手</b>
|
||||
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
|
||||
</div>
|
||||
<div class="inline-drawer-content">
|
||||
<div class="amily2_settings_block flex-container">
|
||||
<input id="amily2_enabled" type="checkbox" />
|
||||
<label for="amily2_enabled">启动Amily2号</label>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<!-- 新增弹窗控制区域 -->
|
||||
<div class="amily2_settings_block">
|
||||
<div class="flex-container" style="align-items: center; justify-content: space-between">
|
||||
<div>
|
||||
<input id="amily2_show_toast" type="checkbox">
|
||||
<label for="amily2_show_toast">显示分析通知</label>
|
||||
</div>
|
||||
<button class="menu_button small" id="amily2_reset_toast">
|
||||
<i class="fas fa-undo"></i> 重置设置
|
||||
</button>
|
||||
</div>
|
||||
<p class="notes">控制优化完成后的通知显示</p>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4><i class="fas fa-cog"></i> API 配置</h4>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_api_url">API URL</label>
|
||||
<input id="amily2_api_url" type="text" class="text_pole" placeholder="http://localhost:3000/v1" />
|
||||
<small class="notes">OpenAI兼容接口地址</small>
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_api_key">API Key</label>
|
||||
<input id="amily2_api_key" type="password" class="text_pole" placeholder="sk-..." />
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<div class="flex-container">
|
||||
<select id="amily2_model" class="text_pole" style="flex: 1">
|
||||
<option value="">-- 等待加载 --</option>
|
||||
</select>
|
||||
<button id="amily2_refresh_models" class="menu_button" style="white-space: nowrap">
|
||||
<i class="fas fa-sync-alt"></i> 刷新模型
|
||||
</button>
|
||||
</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="20000" 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" />
|
||||
<small class="notes">提供更多上下文提升优化准确度</small>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4><i class="fas fa-star"></i> 核心提示词配置</h4>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_main_prompt">破限提示词</label>
|
||||
<textarea id="amily2_main_prompt" class="text_pole" rows="6"></textarea>
|
||||
<small class="notes">使用think标签包裹思考过程,content标签包裹优化结果</small>
|
||||
</div>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<label for="amily2_system_prompt">预设提示词</label>
|
||||
<textarea id="amily2_system_prompt" class="text_pole" rows="8"></textarea>
|
||||
<small class="notes">默认系统提示词</small>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h4><i class="fas fa-tools"></i> 操作面板</h4>
|
||||
|
||||
<div class="amily2_settings_block">
|
||||
<div class="flex-container">
|
||||
<button class="menu_button primary" id="amily2_test">
|
||||
<i class="fas fa-search"></i> 测试检查
|
||||
</button>
|
||||
<button class="menu_button accent" id="amily2_fix_now">
|
||||
<i class="fas fa-magic"></i> 立即修复
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
87
style.css
Normal file
87
style.css
Normal file
@@ -0,0 +1,87 @@
|
||||
/* Amily2号优化助手华丽样式 */
|
||||
#extensions_settings2 #amily2_chat_optimiser {
|
||||
padding: 20px;
|
||||
border-radius: 16px;
|
||||
background: linear-gradient(145deg, #1e1e2e, #2d2b42);
|
||||
}
|
||||
.amily2_settings_block {
|
||||
margin: 15px 0;
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.amily2_settings_block:hover {
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.amily2_settings_block label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
color: #e0e0e0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.text_pole {
|
||||
width: 100%;
|
||||
padding: 12px 15px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(255,255,255,0.15);
|
||||
background: rgba(50, 50, 75, 0.5);
|
||||
color: #ffffff;
|
||||
font-size: 0.95rem;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
.text_pole:focus {
|
||||
border-color: #ff9800;
|
||||
box-shadow: 0 0 0 2px rgba(255,152,0,0.3);
|
||||
background: rgba(65, 65, 95, 0.7);
|
||||
}
|
||||
.menu_button {
|
||||
padding: 12px 20px;
|
||||
border-radius: 8px;
|
||||
background: rgba(100, 100, 150, 0.3);
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
border: none;
|
||||
text-align: center;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
|
||||
#amily2_chat_optimiser h4 {
|
||||
margin: 20px 0 12px;
|
||||
font-size: 1.2rem;
|
||||
color: #ff9800;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.1);
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
#amily2_chat_optimiser hr {
|
||||
border: none;
|
||||
height: 1px;
|
||||
background: linear-gradient(to right, transparent, rgba(255,152,0,0.3), transparent);
|
||||
margin: 20px 0;
|
||||
}
|
||||
.notes {
|
||||
font-size: 0.85rem;
|
||||
color: #a0a0c0;
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
#extensions_settings2::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.6) 70%);
|
||||
pointer-events: none;
|
||||
z-index: -1;
|
||||
}
|
||||
Reference in New Issue
Block a user