mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 12:45:51 +00:00
Initial commit with CC BY-NC-ND 4.0 license
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user