mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 10:05:50 +00:00
Add files via upload
This commit is contained in:
152
assets/auto-char-card/index.html
Normal file
152
assets/auto-char-card/index.html
Normal file
@@ -0,0 +1,152 @@
|
||||
<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-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 class="acc-tabs">
|
||||
<button class="acc-tab-btn active" data-target="executor">模型 A (执行)</button>
|
||||
<button class="acc-tab-btn" data-target="reviewer">模型 B (规划)</button>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<button id="acc-executor-test" class="acc-btn-secondary" style="width: 100%;">测试连接</button>
|
||||
</div>
|
||||
|
||||
<div id="acc-api-reviewer" class="acc-api-group" style="display: none;">
|
||||
<div class="acc-form-group">
|
||||
<label>API URL</label>
|
||||
<input type="text" id="acc-reviewer-url" class="acc-input" placeholder="http://localhost:3000/v1">
|
||||
</div>
|
||||
<div class="acc-form-group">
|
||||
<label>API Key</label>
|
||||
<input type="password" id="acc-reviewer-key" class="acc-input" placeholder="sk-...">
|
||||
</div>
|
||||
<div class="acc-form-group">
|
||||
<label>Model</label>
|
||||
<div style="display: flex; gap: 5px;">
|
||||
<select id="acc-reviewer-model" class="acc-select" style="flex: 1;">
|
||||
<option value="">请刷新获取模型</option>
|
||||
</select>
|
||||
<button id="acc-reviewer-refresh-models" class="acc-btn-secondary" title="刷新模型列表"><i class="fas fa-sync-alt"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<button id="acc-reviewer-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>
|
||||
请在左侧配置工作区,然后在下方输入您的需求。
|
||||
</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">
|
||||
<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">
|
||||
<i class="fas fa-eye"></i> 内容预览
|
||||
<div class="acc-preview-tabs">
|
||||
<button class="acc-tab-btn active" data-tab="diff">变更对比</button>
|
||||
<button class="acc-tab-btn" data-tab="preview">最终效果</button>
|
||||
</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>
|
||||
|
||||
<!-- 最小化后的图标 -->
|
||||
<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>
|
||||
379
assets/auto-char-card/style.css
Normal file
379
assets/auto-char-card/style.css
Normal file
@@ -0,0 +1,379 @@
|
||||
/* 容器样式 */
|
||||
.acc-window {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #1e1e1e;
|
||||
color: #e0e0e0;
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
z-index: 2000; /* 确保在最上层 */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 顶部栏 */
|
||||
.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;
|
||||
}
|
||||
|
||||
.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-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);
|
||||
}
|
||||
|
||||
/* 聊天区域 */
|
||||
.acc-chat-stream {
|
||||
flex: 1;
|
||||
padding: 20px;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.acc-message {
|
||||
max-width: 90%;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.acc-avatar {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
background-color: #444;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.acc-message-content {
|
||||
padding: 10px 15px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
position: relative;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.acc-message.user {
|
||||
align-self: flex-end;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.acc-message.user .acc-message-content {
|
||||
background-color: #0e639c;
|
||||
color: #fff;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.acc-message.assistant {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.acc-message.assistant .acc-message-content {
|
||||
background-color: #333;
|
||||
border: 1px solid #444;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.acc-message.system {
|
||||
align-self: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.acc-message.system .acc-message-content {
|
||||
background-color: transparent;
|
||||
color: #888;
|
||||
font-style: italic;
|
||||
font-size: 12px;
|
||||
padding: 5px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* 输入区域 */
|
||||
.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;
|
||||
}
|
||||
|
||||
/* 预览区域 */
|
||||
.acc-preview-tabs {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.acc-tab-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
padding: 2px 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.acc-tab-btn.active {
|
||||
color: #fff;
|
||||
border-bottom: 2px solid #0e639c;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
/* Diff 高亮样式 */
|
||||
.diff-added {
|
||||
background-color: rgba(76, 175, 80, 0.2);
|
||||
border-left: 3px solid #4CAF50;
|
||||
}
|
||||
|
||||
.diff-removed {
|
||||
background-color: rgba(244, 67, 54, 0.2);
|
||||
border-left: 3px solid #f44336;
|
||||
text-decoration: line-through;
|
||||
opacity: 0.7;
|
||||
}
|
||||
Reference in New Issue
Block a user