fix: Codex 自动压缩不触发 —— 接管时链接模型目录(绝对路径)进 config.toml (hot 1.5.83)
This commit is contained in:
+1952
-248
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,33 @@
|
||||
(function initCanvasInputs(root) {
|
||||
function uniqueNonEmpty(values) {
|
||||
const seen = new Set();
|
||||
return (Array.isArray(values) ? values : []).filter((value) => {
|
||||
const normalized = typeof value === "string" ? value.trim() : "";
|
||||
if (!normalized || seen.has(normalized)) return false;
|
||||
seen.add(normalized);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
function collectUpstreamOutputs(node, readNodeOutput) {
|
||||
const out = { text: "", image: "", images: [] };
|
||||
if (!node || !node.inputs || typeof readNodeOutput !== "function") return out;
|
||||
|
||||
for (const key of Object.keys(node.inputs)) {
|
||||
const connections = (node.inputs[key] && node.inputs[key].connections) || [];
|
||||
for (const connection of connections) {
|
||||
const source = readNodeOutput(connection.node) || {};
|
||||
if (source.text && !out.text) out.text = String(source.text).trim();
|
||||
if (source.image) out.images.push(source.image);
|
||||
}
|
||||
}
|
||||
|
||||
out.images = uniqueNonEmpty(out.images);
|
||||
out.image = out.images[0] || "";
|
||||
return out;
|
||||
}
|
||||
|
||||
const api = { uniqueNonEmpty, collectUpstreamOutputs };
|
||||
if (typeof module !== "undefined" && module.exports) module.exports = api;
|
||||
root.CanvasInputs = api;
|
||||
})(typeof window !== "undefined" ? window : globalThis);
|
||||
+145
-91
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div class="brand-text">
|
||||
<div class="brand-name">TD工具箱</div>
|
||||
<div class="brand-sub">tokendun 工具箱 · 技能 / 插件 · 路由 · 代理</div>
|
||||
<div class="brand-sub">tokendun 工具箱 · 技能 / 插件 · 路由</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
<button class="tab" data-tab="plugins" role="tab">插件市场</button>
|
||||
<button class="tab" data-tab="canvas" role="tab">创意画布</button>
|
||||
<button class="tab" data-tab="router" role="tab">路由中转</button>
|
||||
<button class="tab" data-tab="proxy" role="tab">全局代理</button>
|
||||
<button class="tab" data-tab="settings" role="tab">设置</button>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -84,11 +83,11 @@
|
||||
<p class="muted">tokendun 官方自研插件与内置工具</p>
|
||||
</div>
|
||||
<div class="head-actions">
|
||||
<div class="codex-link-status" title="Codex 桌面连接状态;语音输入与 Token 用量共用此连接">
|
||||
<div class="codex-link-status" title="Codex 注入状态:语音输入、Token 用量和左侧任务行的彻底删除按钮都依赖此连接">
|
||||
<span id="codex-link-dot" class="voice-dot" data-state="unknown"></span>
|
||||
<span class="codex-link-label">Codex</span>
|
||||
<span id="codex-link-phase-text" class="muted small">未连接</span>
|
||||
<button class="btn ghost small" id="codex-link-connect-btn" data-voice-link-connect>连接</button>
|
||||
<button class="btn ghost small" id="codex-link-connect-btn" data-voice-link-connect>连接并注入</button>
|
||||
<button class="btn ghost small hidden" id="codex-link-disconnect-btn" data-voice-link-disconnect>断开</button>
|
||||
</div>
|
||||
<input id="plugin-search" class="search" type="search" placeholder="搜索插件 / 作者…" />
|
||||
@@ -111,11 +110,11 @@
|
||||
</div>
|
||||
<div class="tool-card">
|
||||
<div class="tool-top"><span class="tool-ico">🎤</span><div class="tool-name">语音输入</div></div>
|
||||
<div class="tool-desc">给 Codex 输入框注入麦克风按钮,说话即转文字填入。需由工具箱重启 Codex 一次以启用调试通道(登录态保留)。</div>
|
||||
<div class="tool-desc">给 ChatGPT/Codex 输入框注入麦克风按钮,说话即转文字填入。需由工具箱重启 ChatGPT 一次以启用调试通道(登录态保留)。</div>
|
||||
<div class="tool-foot"><button class="btn primary small" id="voice-enable-card-btn" data-voice-enable data-enable-label="启用" data-enabled-label="已启用">启用</button></div>
|
||||
</div>
|
||||
<div class="tool-card">
|
||||
<div class="tool-top"><span class="tool-ico">🧑💼</span><div class="tool-name">员工团队</div></div>
|
||||
<div class="tool-top"><span class="tool-ico">👥</span><div class="tool-name">员工团队</div></div>
|
||||
<div class="tool-desc">用一段话描述项目需求,自动拆解出一支带约束、能协作的 AI 员工团队(含总控 + 契约 + 文件边界 + 协同规范),打包成 Codex / Claude Code 可直接用的配置 zip。</div>
|
||||
<div class="tool-foot"><button class="btn primary small" data-open-panel="team">打开</button></div>
|
||||
</div>
|
||||
@@ -129,6 +128,23 @@
|
||||
<div class="tool-desc">在 Codex 输入框下方、模型选择左侧显示每日 Token 累计消耗量。复用语音 CDP 连接自动注入,无需额外配置。每天 24 点自动清零。</div>
|
||||
<div class="tool-foot"><button class="btn primary small" data-open-panel="token">打开</button></div>
|
||||
</div>
|
||||
<div class="tool-card" id="codex-installer-card">
|
||||
<div class="tool-top"><span class="tool-ico">⬇</span><div class="tool-name">安装 Codex</div></div>
|
||||
<div class="tool-desc">Windows / Mac 版远程下载并自动校验安装包,不把大体积安装文件塞进工具箱。下载和安装过程会显示进度。</div>
|
||||
<div class="tool-status muted small" id="codex-installer-status">正在读取安装器信息…</div>
|
||||
<div class="installer-progress hidden" id="codex-installer-progress-wrap">
|
||||
<div class="installer-progress-bar" id="codex-installer-progress-bar"></div>
|
||||
</div>
|
||||
<div class="installer-cancel-row hidden" id="codex-installer-cancel-row">
|
||||
<button class="btn ghost small" id="codex-installer-cancel-btn">取消下载</button>
|
||||
</div>
|
||||
<div class="tool-foot multi">
|
||||
<button class="btn ghost small" id="codex-win-open-url-btn">浏览器打开 Windows</button>
|
||||
<button class="btn primary small" id="codex-win-install-btn">Windows 一键安装</button>
|
||||
<button class="btn ghost small" id="codex-mac-open-url-btn">浏览器打开 Mac</button>
|
||||
<button class="btn primary small" id="codex-mac-install-btn">Mac 一键安装</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 已安装插件 -->
|
||||
@@ -147,18 +163,19 @@
|
||||
<div class="panel-head">
|
||||
<div>
|
||||
<h2><button class="btn ghost small back-btn" data-back-plugins>← 插件市场</button> 语音输入</h2>
|
||||
<p class="muted">由工具箱用 CDP 连接 Codex 桌面版,往输入框注入麦克风按钮;录音经中转站 Whisper 转文字并自动填入。</p>
|
||||
<p class="muted">由工具箱用 CDP 连接 ChatGPT/Codex 桌面版,往输入框注入麦克风按钮;录音经中转站 Whisper 转文字并自动填入。</p>
|
||||
</div>
|
||||
<div class="head-actions">
|
||||
<span id="voice-dot" class="voice-dot" data-state="unknown"></span>
|
||||
<span id="voice-phase-text" class="muted small">未连接</span>
|
||||
<button id="voice-enable-btn" class="btn primary" data-voice-enable data-enable-label="启用语音输入" data-enabled-label="已启用">启用语音输入</button>
|
||||
<button id="voice-disable-btn" class="btn ghost hidden" data-voice-disable>关闭语音输入</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="voice-body">
|
||||
<div class="voice-card">
|
||||
<div class="voice-card-title">状态</div>
|
||||
<div id="voice-detail" class="muted small">点击「启用语音输入」开始。若 Codex 正在运行,会提示你确认重启 Codex 以启用调试端口。</div>
|
||||
<div id="voice-detail" class="muted small">点击「启用语音输入」开始。若 ChatGPT 正在运行,会提示你确认重启 ChatGPT 以启用调试端口。</div>
|
||||
</div>
|
||||
<div class="voice-card">
|
||||
<div class="voice-card-title">转写分组 / 模型</div>
|
||||
@@ -176,7 +193,7 @@
|
||||
<div class="voice-card">
|
||||
<div class="voice-card-title">使用说明</div>
|
||||
<ol class="voice-ol">
|
||||
<li>点击「启用语音输入」。若 Codex 在运行且未带调试端口,会弹窗提示重启(当前窗口会关闭一次,登录态保留)。</li>
|
||||
<li>点击「启用语音输入」。若 ChatGPT 在运行且未带调试端口,会弹窗提示重启(当前窗口会关闭一次,登录态保留)。</li>
|
||||
<li>连接成功后,Codex 输入框旁出现 🎤 按钮。点击 → 授权麦克风权限 → 说话 → 再次点击停止。</li>
|
||||
<li>转写完成后文字自动填入输入框。首次需在「系统设置 → 隐私 → 麦克风」允许 ChatGPT。</li>
|
||||
<li>macOS 误杀进程风险已规避:仅在确认后重启。Codex 升级后若按钮消失,可能需等待工具箱适配。</li>
|
||||
@@ -189,27 +206,57 @@
|
||||
<section class="panel" id="tab-canvas">
|
||||
<div class="cv-toolbar">
|
||||
<div class="cv-toolbar-left">
|
||||
<h2 class="cv-title">🎨 创意画布</h2>
|
||||
<button class="cv-nav-dot" type="button" title="画布"></button>
|
||||
<h2 class="cv-title">创意画布</h2>
|
||||
<button class="cv-project-name" id="cv-projects-btn" type="button" title="打开画布记录">未命名画布</button>
|
||||
<span class="pc-badge cv-status" id="cv-status">检测中…</span>
|
||||
</div>
|
||||
<div class="cv-toolbar-right">
|
||||
<span class="cv-add-label">添加节点</span>
|
||||
<button class="btn small" data-cv-add="text">📝 文本</button>
|
||||
<button class="btn small" data-cv-add="image">🖼️ 文生图</button>
|
||||
<button class="btn small" data-cv-add="video">🎬 图生视频</button>
|
||||
<button class="btn small" data-cv-add="grokVideo">🎞️ Grok视频</button>
|
||||
<button class="btn small" data-cv-add="tts">🔊 TTS配音</button>
|
||||
<button class="btn small ghost" id="cv-new-btn">+ 新建画布</button>
|
||||
<button class="btn small ghost" id="cv-models-btn">🔄 拉取模型</button>
|
||||
<button class="btn small ghost" id="cv-seed-btn">✨ 载入示例</button>
|
||||
<button class="btn small primary" id="cv-full-btn">⛶ 全屏</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cv-tool-rail" aria-label="添加节点">
|
||||
<button class="cv-rail-btn" type="button" data-cv-add="text" title="文本">T</button>
|
||||
<button class="cv-rail-btn" type="button" data-cv-add="image" title="文生图">▧</button>
|
||||
<button class="cv-rail-btn" type="button" data-cv-add="video" title="图生视频">▣</button>
|
||||
<button class="cv-rail-btn" type="button" data-cv-add="grokVideo" title="Grok视频">◆</button>
|
||||
<button class="cv-rail-btn" type="button" data-cv-add="tts" title="TTS配音">♪</button>
|
||||
</div>
|
||||
<div class="cv-stage">
|
||||
<div class="cv-project-picker hidden" id="cv-project-picker" role="dialog" aria-label="画布记录">
|
||||
<div class="cv-project-picker-head">
|
||||
<div><b>画布记录</b><span>自动保存到本机,生成素材也会缓存</span></div>
|
||||
<button class="cv-project-close" id="cv-project-close" type="button" title="关闭">×</button>
|
||||
</div>
|
||||
<div class="cv-project-actions">
|
||||
<button class="btn small primary" id="cv-project-create" type="button">+ 新建画布</button>
|
||||
</div>
|
||||
<div class="cv-project-list" id="cv-project-list"></div>
|
||||
</div>
|
||||
<div id="drawflow"></div>
|
||||
<div class="cv-empty-hint" id="cv-empty-hint">
|
||||
<span>✳ 双击</span>
|
||||
<b>画布任意空白处,自由生成</b>
|
||||
</div>
|
||||
<div class="cv-quick-menu hidden" id="cv-quick-menu">
|
||||
<div class="cv-quick-title">新建节点</div>
|
||||
<button type="button" data-cv-quick-add="text"><span>T</span>文本生成</button>
|
||||
<button type="button" data-cv-quick-add="image"><span>▧</span>图片生成</button>
|
||||
<button type="button" data-cv-quick-add="video"><span>▣</span>视频生成</button>
|
||||
<button type="button" data-cv-quick-add="grokVideo"><span>◆</span>Grok 视频</button>
|
||||
<button type="button" data-cv-quick-add="tts"><span>♪</span>音频 / TTS</button>
|
||||
</div>
|
||||
<div class="cv-zoom">
|
||||
<button class="cv-zoom-btn" id="cv-zoom-in" title="放大 (Ctrl+滚轮)">+</button>
|
||||
<button class="cv-zoom-btn" id="cv-zoom-out" title="缩小">-</button>
|
||||
<input id="cv-zoom-range" class="cv-zoom-range" type="range" min="50" max="160" step="5" value="100" aria-label="画布缩放" />
|
||||
<button class="cv-zoom-btn cv-zoom-level" id="cv-zoom-reset" title="点击重置为 100%">100%</button>
|
||||
<button class="cv-zoom-btn" id="cv-zoom-out" title="缩小 (Ctrl+滚轮)">-</button>
|
||||
<button class="cv-zoom-btn" id="cv-zoom-in" title="放大">+</button>
|
||||
</div>
|
||||
<div class="cv-minimap" aria-hidden="true">
|
||||
<div class="cv-minimap-view"><span></span></div>
|
||||
</div>
|
||||
<div class="cv-mask hidden" id="cv-mask">
|
||||
<div class="cv-mask-box">
|
||||
@@ -241,19 +288,34 @@
|
||||
</div>
|
||||
|
||||
<div class="tm-field">
|
||||
<label class="tm-label">分析模型(中转分组)</label>
|
||||
<label class="tm-label">团队生成模型(仅用于生成配置)</label>
|
||||
<div class="tm-row">
|
||||
<select class="tm-select" id="tm-group"></select>
|
||||
<button class="btn small ghost" id="tm-fetch">🔄 拉取模型</button>
|
||||
</div>
|
||||
<select class="tm-select" id="tm-model" style="margin-top:8px"></select>
|
||||
<div class="tm-hint" id="tm-model-hint">先在『路由中转』配置好分组,再选具体模型</div>
|
||||
<div class="tm-hint" id="tm-model-hint">只负责把需求转换成团队配置;它不会决定生成后 Agent 执行任务使用的模型</div>
|
||||
</div>
|
||||
|
||||
<div class="tm-field">
|
||||
<label class="tm-label">员工运行模型(可选)</label>
|
||||
<input id="tm-agent-model" class="tm-text" placeholder="留空=用上面的分析模型,如 gpt-4o" />
|
||||
<div class="tm-hint" id="tm-agent-hint">写进每个员工的 model 字段,改成你运行器支持的模型名</div>
|
||||
<label class="tm-label">总控执行模型(生成后实际运行)</label>
|
||||
<div class="tm-row">
|
||||
<select class="tm-select" id="tm-orch-group"></select>
|
||||
<button class="btn small ghost" id="tm-orch-fetch">🔄 拉取模型</button>
|
||||
</div>
|
||||
<select class="tm-select" id="tm-orch-model" style="margin-top:8px"></select>
|
||||
<div class="tm-hint" id="tm-orch-hint">总控负责调度、设计、审计、验收和多模态任务;可以和团队生成模型不同</div>
|
||||
</div>
|
||||
|
||||
<div class="tm-field">
|
||||
<label class="tm-label">子 Agent 执行模型</label>
|
||||
<div class="tm-row">
|
||||
<select class="tm-select" id="tm-agent-group"></select>
|
||||
<button class="btn small ghost" id="tm-agent-fetch">🔄 拉取模型</button>
|
||||
</div>
|
||||
<input id="tm-agent-model" class="tm-text" list="tm-agent-model-list" style="margin-top:2px" placeholder="选择或填写 DeepSeek 模型,如 deepseek-v4-flash" />
|
||||
<datalist id="tm-agent-model-list"></datalist>
|
||||
<div class="tm-hint" id="tm-agent-hint">子 Agent 负责编码、测试和文档;模型名会写入员工配置,并自动登记到对应路由分组</div>
|
||||
</div>
|
||||
|
||||
<button id="tm-gen" class="btn primary tm-gen" disabled>生成员工团队</button>
|
||||
@@ -267,7 +329,7 @@
|
||||
</div>
|
||||
<div class="tm-result-body">
|
||||
<div class="tm-empty" id="tm-empty">
|
||||
<div class="tm-empty-ico">🧑💼→👥</div>
|
||||
<div class="tm-empty-ico">👤→👥</div>
|
||||
<p class="tm-empty-title">描述需求,自动组建 AI 员工团队</p>
|
||||
<p class="tm-empty-sub">拆解职责 · 定义契约 · 划分文件边界 · 生成协同规范</p>
|
||||
</div>
|
||||
@@ -413,7 +475,7 @@
|
||||
<div class="panel-head">
|
||||
<div>
|
||||
<h2><button class="btn ghost small back-btn" data-back-plugins>← 插件市场</button> 会话记录</h2>
|
||||
<p class="muted">直接读取本机 <code>~/.codex/sessions</code>,全量模式会同时读取 <code>archived_sessions</code> 和子任务会话</p>
|
||||
<p class="muted">直接读取所选 Codex 数据目录的 <code>sessions</code>;全量模式会同时读取 <code>archived_sessions</code> 和子任务会话</p>
|
||||
</div>
|
||||
<div class="head-actions">
|
||||
<input id="sess-search" class="search" type="search" placeholder="搜索标题 / 项目…" />
|
||||
@@ -424,6 +486,12 @@
|
||||
<button id="sess-backup" class="btn">备份全部…</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="session-data-dir" id="session-data-dir">
|
||||
<span class="muted small">Codex 会话数据目录</span>
|
||||
<code id="session-data-dir-path">读取中…</code>
|
||||
<button id="session-data-dir-select" class="btn ghost small">选择目录…</button>
|
||||
<button id="session-data-dir-reset" class="btn ghost small hidden">恢复默认</button>
|
||||
</div>
|
||||
<div class="sync-banner">
|
||||
<div class="sync-text">
|
||||
<strong>🔄 同步会话到当前账号</strong>
|
||||
@@ -442,7 +510,10 @@
|
||||
<div class="sess-conv hidden" id="sess-conv">
|
||||
<div class="sess-conv-head">
|
||||
<div class="sess-conv-title" id="sess-conv-title"></div>
|
||||
<button id="sess-export" class="btn small">导出为 Markdown</button>
|
||||
<div class="sess-conv-actions">
|
||||
<button id="sess-delete" class="btn small danger">永久删除</button>
|
||||
<button id="sess-export" class="btn small">导出为 Markdown</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sess-messages" id="sess-messages"></div>
|
||||
</div>
|
||||
@@ -476,6 +547,7 @@
|
||||
工作方式:会话静默几分钟后自动摘要(优先走「路由中转」当前分组的 LLM,失败退化为本地提取)。
|
||||
项目根目录会生成 <code>HANDOFF.md</code>(状态快照),并在 <code>AGENTS.md</code> 里加一段「先读 HANDOFF」引导(带标记,可随时删)。
|
||||
</p>
|
||||
<p class="muted small" style="margin:6px 0 0">正在监视:<code id="mem-data-dir-path">读取中…</code></p>
|
||||
</div>
|
||||
|
||||
<div class="panel-head" style="margin-top:14px">
|
||||
@@ -510,6 +582,7 @@
|
||||
<button id="router-apply" class="btn primary">启用本地路由(高级)</button>
|
||||
<button id="router-apply-claude" class="btn">接入 Claude Code</button>
|
||||
<button id="router-toggle" class="btn">启动</button>
|
||||
<button id="router-refresh-codex" class="btn ghost" title="仅当需要同步 Codex 顶部模型选择器时重启 Codex">刷新 Codex 显示</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -533,6 +606,31 @@
|
||||
</div>
|
||||
<div id="router-groups" class="checklist"></div>
|
||||
|
||||
<!-- 默认账号配置详情 -->
|
||||
<div id="default-config-modal" class="modal-overlay hidden">
|
||||
<div class="modal default-config-modal">
|
||||
<div class="modal-head"><h3>默认账号配置(只读)</h3><button class="modal-close" id="default-config-close">✕</button></div>
|
||||
<div class="modal-body">
|
||||
<div id="default-config-summary" class="default-config-summary"></div>
|
||||
<label class="field grow" style="margin-top:12px">
|
||||
<span>当前 ~/.codex/config.toml</span>
|
||||
<textarea id="default-config-current" class="config-textarea" readonly></textarea>
|
||||
</label>
|
||||
<label class="field grow" style="margin-top:12px">
|
||||
<span>默认分组保存的原始快照(切回默认时参考)</span>
|
||||
<textarea id="default-config-snapshot" class="config-textarea" readonly></textarea>
|
||||
</label>
|
||||
<div class="row between" style="margin-top:12px">
|
||||
<span class="muted small">auth.json 仅展示脱敏摘要,不回显密钥或登录 token。</span>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn ghost small" id="default-config-refresh">刷新</button>
|
||||
<button type="button" class="btn small" id="default-config-copy">复制当前 config</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 分组编辑弹窗 -->
|
||||
<div id="grp-modal" class="modal-overlay hidden">
|
||||
<div class="modal">
|
||||
@@ -549,16 +647,26 @@
|
||||
</label>
|
||||
<label class="field grow" style="margin-top:10px"><span>API 地址(base_url)</span><input id="grp-url" placeholder="https://api.xxx.com" /></label>
|
||||
<label class="field grow" style="margin-top:10px"><span>API 密钥</span><input id="grp-key" type="password" placeholder="sk-…" /></label>
|
||||
<label class="field grow" style="margin-top:10px;flex-direction:row;align-items:center;gap:8px;cursor:pointer">
|
||||
<input id="grp-codex-image" type="checkbox" style="width:auto;margin:0" />
|
||||
<span style="margin:0">在 Codex 中用于生图(写入 gen-image 技能,需支持 OpenAI 图片接口)</span>
|
||||
</label>
|
||||
<label class="field grow" style="margin-top:10px;flex-direction:row;align-items:center;gap:8px;cursor:pointer">
|
||||
<input id="grp-stt" type="checkbox" style="width:auto;margin:0" />
|
||||
<span style="margin:0">支持语音转文字(语音输入插件用此分组转写)</span>
|
||||
</label>
|
||||
<label class="field grow" style="margin-top:8px">
|
||||
<span>语音转写模型(勾选 STT 后填,如 whisper-1 / speech-01)</span>
|
||||
<div class="grp-purpose">
|
||||
<label class="grp-purpose-pill">
|
||||
<input id="grp-codex-image" type="checkbox" />
|
||||
<span>生图专用</span>
|
||||
</label>
|
||||
<label class="grp-purpose-pill">
|
||||
<input id="grp-codex-video" type="checkbox" />
|
||||
<span>视频专用</span>
|
||||
</label>
|
||||
<label class="grp-purpose-pill">
|
||||
<input id="grp-stt" type="checkbox" />
|
||||
<span>语音专用</span>
|
||||
</label>
|
||||
<label class="grp-purpose-pill" title="只用于当前 DeepSeek 分组的附件识别,不会替换对话模型">
|
||||
<input id="grp-multimodal" type="checkbox" />
|
||||
<span>启用 MiniMax 多模态</span>
|
||||
</label>
|
||||
</div>
|
||||
<label class="field grow hidden" id="grp-stt-model-field" style="margin-top:8px">
|
||||
<span>语音专用模型(如 whisper-1 / speech-01)</span>
|
||||
<input id="grp-stt-model" placeholder="whisper-1" />
|
||||
</label>
|
||||
<div class="field grow" style="margin-top:10px">
|
||||
@@ -607,61 +715,6 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ⑤ 全局代理 -->
|
||||
<section class="panel" id="tab-proxy">
|
||||
<div class="panel-head">
|
||||
<div>
|
||||
<h2>全局代理</h2>
|
||||
<p class="muted">填入 SOCKS5 代理,一键把<b>整台电脑</b>(全局 TUN)或<b>系统</b>的网络切到代理上。支持要密码的 SOCKS5。</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card action-card">
|
||||
<label class="field grow">
|
||||
<span>SOCKS5 代理地址</span>
|
||||
<input id="proxy-str" type="text" placeholder="host:port:user:pass 例如 1.2.3.4:1080:用户名:密码" />
|
||||
</label>
|
||||
<div class="row between">
|
||||
<span class="muted small" id="proxy-parsed">支持格式:<code>host:port:user:pass</code> / <code>host:port</code> / <code>socks5://user:pass@host:port</code></span>
|
||||
<div class="btn-group">
|
||||
<button id="proxy-save" class="btn ghost">保存</button>
|
||||
<button id="proxy-test" class="btn">测试连接</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="proxy-test-out" class="muted small" style="margin-top:6px"></div>
|
||||
</div>
|
||||
|
||||
<div class="card action-card">
|
||||
<div class="row between">
|
||||
<div class="field">
|
||||
<span>当前状态</span>
|
||||
<div><span class="pc-badge" id="proxy-state">未开启</span> <span class="muted small" id="proxy-state-detail"></span></div>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button id="proxy-start-global" class="btn primary">启动全局代理(整机)</button>
|
||||
<button id="proxy-start-system" class="btn">启动系统代理</button>
|
||||
<button id="proxy-stop" class="btn ghost hidden">关闭代理</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="proxy-modes">
|
||||
<div class="pm-item">
|
||||
<b>🌐 全局代理(整机 TUN)</b>
|
||||
<span class="muted small">创建虚拟网卡接管<b>所有</b>程序的流量(含命令行、各类 App)。macOS/Windows 启动时会弹一次<b>系统管理员密码</b>——创建网卡必需,和 Clash 一样。</span>
|
||||
</div>
|
||||
<div class="pm-item">
|
||||
<b>⚙️ 系统代理</b>
|
||||
<span class="muted small">只设操作系统代理,<b>不需要管理员密码</b>。浏览器和多数 App 生效;不认系统代理的程序(部分命令行)不走。</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card action-card">
|
||||
<p class="muted small" style="margin:0">
|
||||
<b>说明</b>:本功能内置 sing-box 引擎在本地做中转,因此即使 SOCKS5 需要账号密码也能正常用于系统代理(操作系统本身不发密码,靠本地中转补上)。关闭软件会自动还原网络设置。
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 设置 -->
|
||||
<section class="panel" id="tab-settings">
|
||||
<div class="panel-head"><div><h2>设置</h2><p class="muted">密钥用系统安全存储加密后保存在本机</p></div></div>
|
||||
@@ -764,6 +817,7 @@
|
||||
</div>
|
||||
|
||||
<script src="vendor/drawflow.min.js"></script>
|
||||
<script src="canvas-inputs.js"></script>
|
||||
<script src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+427
-78
@@ -141,12 +141,6 @@ h3 { margin: 0; font-size: 16px; }
|
||||
.cl-warn { margin-top: 6px; font-size: 12px; color: #f59e0b;
|
||||
background: rgba(245,158,11,.1); border-radius: 8px; padding: 6px 9px; }
|
||||
.pc-badge.on { background: rgba(74,222,128,.18); color: var(--ok); }
|
||||
/* 全局代理:两种模式说明块 */
|
||||
.proxy-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
|
||||
.pm-item { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px;
|
||||
border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.02); }
|
||||
.pm-item b { font-size: 14px; }
|
||||
@media (max-width: 760px) { .proxy-modes { grid-template-columns: 1fr; } }
|
||||
.pc-name { font-weight: 700; font-size: 15px; word-break: break-all; }
|
||||
.pc-meta { color: var(--muted); font-size: 12px; display: flex; gap: 10px;
|
||||
flex-wrap: wrap; }
|
||||
@@ -166,8 +160,12 @@ h3 { margin: 0; font-size: 16px; }
|
||||
cursor: pointer; transition: .12s; }
|
||||
.cl-item:hover { border-color: var(--accent); }
|
||||
.cl-item input { width: 17px; height: 17px; accent-color: var(--accent); }
|
||||
.cl-item.is-disabled { cursor: default; opacity: .82; }
|
||||
.cl-item.is-disabled:hover { border-color: var(--border); }
|
||||
.cl-item input:disabled { cursor: not-allowed; opacity: .45; }
|
||||
.cl-item .cl-name { font-weight: 600; }
|
||||
.cl-item .cl-src { color: var(--muted); font-size: 12px; }
|
||||
.cl-tool-hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
|
||||
.cl-item .cl-size { margin-left: auto; color: var(--muted); font-size: 12px; }
|
||||
|
||||
/* 路由分组:按协议族分两栏,各一个单选,可同时激活 */
|
||||
@@ -222,7 +220,7 @@ h3 { margin: 0; font-size: 16px; }
|
||||
/* Toast */
|
||||
.toast { position: fixed; bottom: 60px; left: 50%; transform: translateX(-50%);
|
||||
background: var(--card); border: 1px solid var(--border); color: var(--text);
|
||||
padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 50;
|
||||
padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 10060;
|
||||
max-width: 80%; font-size: 13px; }
|
||||
.toast.ok { border-color: var(--ok); }
|
||||
.toast.err { border-color: var(--danger); }
|
||||
@@ -232,6 +230,11 @@ h3 { margin: 0; font-size: 16px; }
|
||||
.installing { pointer-events: none; opacity: .7; }
|
||||
|
||||
/* 会话记录:同步横幅 */
|
||||
.session-data-dir { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
|
||||
margin-bottom: 12px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
|
||||
background: var(--card-2); }
|
||||
.session-data-dir code { min-width: 0; max-width: min(620px, 55vw); overflow: hidden;
|
||||
text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
|
||||
.sync-banner { display: flex; align-items: center; justify-content: space-between;
|
||||
gap: 14px; background: linear-gradient(135deg, rgba(124,133,255,.12), rgba(168,85,247,.10));
|
||||
border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px;
|
||||
@@ -266,6 +269,9 @@ h3 { margin: 0; font-size: 16px; }
|
||||
.sess-conv { display: flex; flex-direction: column; height: 100%; }
|
||||
.sess-conv-head { display: flex; align-items: center; justify-content: space-between;
|
||||
gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
|
||||
.sess-conv-actions { display: flex; align-items: center; gap: 7px; }
|
||||
.sess-conv-actions .btn.danger { color: var(--danger); border-color: rgba(255,107,107,.38); }
|
||||
.sess-conv-actions .btn.danger:hover { background: rgba(255,107,107,.12); border-color: var(--danger); }
|
||||
.sess-conv-title { font-weight: 700; font-size: 14px; white-space: nowrap;
|
||||
overflow: hidden; text-overflow: ellipsis; }
|
||||
.sess-messages { overflow-y: auto; padding: 16px; display: flex;
|
||||
@@ -294,7 +300,7 @@ h3 { margin: 0; font-size: 16px; }
|
||||
|
||||
/* 说明弹窗 */
|
||||
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5);
|
||||
display: flex; align-items: center; justify-content: center; z-index: 100;
|
||||
display: flex; align-items: center; justify-content: center; z-index: 10050;
|
||||
padding: 24px; animation: fade .15s ease; }
|
||||
.modal { background: var(--card); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); box-shadow: var(--shadow); max-width: 640px;
|
||||
@@ -325,9 +331,31 @@ h3 { margin: 0; font-size: 16px; }
|
||||
border: 1px solid var(--border); color: var(--text); border-radius: 10px;
|
||||
padding: 9px 12px; outline: none; font-size: 13px; }
|
||||
.grp-select:focus { border-color: var(--accent); }
|
||||
.grp-purpose { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
|
||||
.grp-purpose-pill {
|
||||
min-height: 36px; display: inline-flex; align-items: center; gap: 8px; flex: 1 1 0;
|
||||
min-width: 112px; padding: 8px 12px; border: 1px solid var(--border);
|
||||
border-radius: 10px; background: var(--bg-2); color: var(--text);
|
||||
font-size: 13px; font-weight: 600; cursor: pointer; user-select: none;
|
||||
}
|
||||
.grp-purpose-pill:hover { border-color: var(--accent); background: var(--card-2); }
|
||||
.grp-purpose-pill input {
|
||||
flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--accent); cursor: pointer;
|
||||
}
|
||||
.grp-purpose-pill span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.default-config-modal { max-width: 820px; }
|
||||
.default-config-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
|
||||
.default-config-summary div { min-width: 0; border: 1px solid var(--border); border-radius: 10px;
|
||||
background: var(--bg-2); padding: 9px 11px; color: var(--muted); font-size: 12px; line-height: 1.45; }
|
||||
.default-config-summary b { display: block; color: var(--text); font-size: 13px; margin-bottom: 2px; }
|
||||
.config-textarea { width: 100%; min-height: 180px; resize: vertical; border: 1px solid var(--border);
|
||||
border-radius: 10px; background: var(--bg-2); color: var(--text); padding: 10px 12px;
|
||||
font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; outline: none; }
|
||||
.config-textarea:focus { border-color: var(--accent); }
|
||||
.grp-1m-list { margin-top: 8px; display: flex; flex-direction: column; gap: 2px;
|
||||
max-height: 180px; overflow-y: auto; border: 1px solid var(--border);
|
||||
border-radius: 10px; padding: 6px; background: var(--bg-2); }
|
||||
@media (max-width: 720px) { .default-config-summary { grid-template-columns: 1fr; } }
|
||||
.grp-1m-item { display: flex; align-items: center; gap: 8px; padding: 5px 7px;
|
||||
border-radius: 7px; cursor: pointer; font-size: 13px; }
|
||||
.grp-1m-item:hover { background: var(--card); }
|
||||
@@ -335,6 +363,7 @@ h3 { margin: 0; font-size: 16px; }
|
||||
.grp-1m-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.claudedesk-block > span:first-child { font-weight: 600; font-size: 13px; }
|
||||
.claudedesk-block .btn:disabled { opacity: .45; cursor: not-allowed; }
|
||||
.claudedesk-block.hidden { display: none !important; }
|
||||
|
||||
/* —— 会话记忆 —— */
|
||||
.mem-item { background: var(--card); border: 1px solid var(--border);
|
||||
@@ -499,52 +528,194 @@ h3 { margin: 0; font-size: 16px; }
|
||||
.tool-name { font-weight: 700; font-size: 15px; }
|
||||
.tool-desc { color: var(--muted); font-size: 13px; line-height: 1.6; flex: 1; }
|
||||
.tool-foot { display: flex; justify-content: flex-end; }
|
||||
.tool-foot.multi { justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
.tool-status { min-height: 18px; line-height: 1.5; }
|
||||
.installer-progress { width: 100%; height: 8px; overflow: hidden; border-radius: 999px;
|
||||
background: var(--card-2); border: 1px solid var(--border); }
|
||||
.installer-progress-bar { width: 0%; height: 100%; border-radius: inherit;
|
||||
background: var(--accent); transition: width .18s ease; }
|
||||
.installer-cancel-row { display: flex; justify-content: flex-end; margin-top: -2px; }
|
||||
.back-btn { margin-right: 8px; vertical-align: middle; padding: 4px 10px; }
|
||||
|
||||
/* ============================================================
|
||||
创意画布(Drawflow 节点画布)
|
||||
复用 :root 设计变量,覆写 Drawflow 默认外观,明/暗色协调。
|
||||
============================================================ */
|
||||
#tab-canvas {
|
||||
color-scheme: dark;
|
||||
--text: #f6f6f6;
|
||||
--muted: #999999;
|
||||
--border: rgba(255,255,255,.08);
|
||||
--bg: #0a0a0a;
|
||||
--card: #161616;
|
||||
--card-2: #1d1d1d;
|
||||
--cv-accent: #ff6a2c;
|
||||
--cv-accent-strong: #ff7f42;
|
||||
--cv-accent-soft: rgba(255, 106, 44, .14);
|
||||
--cv-blue: #3b82f6;
|
||||
--cv-warn: #f59e0b;
|
||||
--cv-shell: #0a0a0a;
|
||||
--cv-surface: #161616;
|
||||
--cv-surface-2: #1d1d1d;
|
||||
--cv-panel-glass: rgba(35,35,41,.82);
|
||||
--cv-field: #1d1d1d;
|
||||
--cv-canvas: #0a0a0a;
|
||||
--cv-grid-major: rgba(255,255,255,.055);
|
||||
--cv-grid-minor: rgba(255,255,255,.032);
|
||||
--cv-shadow-soft: 0 25px 50px -12px rgba(0,0,0,.25);
|
||||
--cv-shadow-card: 0 8px 28px rgba(0,0,0,.42);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
#tab-canvas {
|
||||
color-scheme: light;
|
||||
}
|
||||
}
|
||||
|
||||
/* 画布面板占满内容区高度:工具条固定 + 画布撑满剩余空间 */
|
||||
/* 画布面板占满内容区高度:抵消 .content 的 22px padding,铺满更大气 */
|
||||
#tab-canvas.active { display: flex; flex-direction: column; min-height: 0;
|
||||
margin: -22px; height: calc(100% + 44px); padding: 22px; }
|
||||
.cv-toolbar { display: flex; align-items: center; justify-content: space-between;
|
||||
gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
|
||||
.cv-toolbar-left { display: flex; align-items: center; gap: 12px; }
|
||||
.cv-title { font-size: 18px; }
|
||||
.cv-status { border: 1px solid var(--border); background: var(--card-2); color: var(--muted); }
|
||||
.cv-status.on { background: rgba(74,222,128,.18); color: var(--ok); border-color: transparent; }
|
||||
.cv-status.off { background: rgba(255,107,107,.16); color: var(--danger); border-color: transparent; }
|
||||
.cv-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
|
||||
.cv-add-label { color: var(--muted); font-size: 12px; font-weight: 600; margin-right: 2px; }
|
||||
position: relative; margin: -22px; height: calc(100% + 44px); padding: 0; gap: 0;
|
||||
overflow: hidden; background: var(--cv-canvas); }
|
||||
.cv-toolbar { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 30;
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
gap: 12px; flex-wrap: nowrap; margin-bottom: 0; padding: 0; pointer-events: none; }
|
||||
.cv-toolbar-left,
|
||||
.cv-toolbar-right { display: flex; align-items: center; gap: 7px; min-height: 34px;
|
||||
pointer-events: auto; padding: 4px 6px; border-radius: 999px;
|
||||
border: 1px solid var(--border); background: rgba(22,22,22,.96);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,.28); }
|
||||
.cv-toolbar-left { min-width: 0; }
|
||||
.cv-nav-dot { width: 24px; height: 24px; border: 0; border-radius: 999px; cursor: default;
|
||||
background: radial-gradient(circle at 38% 36%, #ffb077, var(--cv-accent));
|
||||
box-shadow: 0 0 0 4px rgba(255,138,77,.12); }
|
||||
.cv-title { position: relative; display: inline-flex; align-items: center; gap: 8px;
|
||||
font-size: 14px; letter-spacing: 0; font-weight: 760; white-space: nowrap; }
|
||||
.cv-title::before { content: none; }
|
||||
.cv-status { border: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
|
||||
background: rgba(29,29,29,.9); color: var(--muted); box-shadow: none; }
|
||||
.cv-status.on { background: rgba(16,185,129,.10); color: #059669; border-color: rgba(16,185,129,.22); }
|
||||
.cv-status.off { background: rgba(255,107,107,.13); color: var(--danger); border-color: rgba(255,107,107,.28); }
|
||||
#tab-canvas .cv-toolbar .btn { min-height: 30px; padding: 6px 10px; border-radius: 8px;
|
||||
background: rgba(29,29,29,.9); color: var(--text);
|
||||
border-color: var(--border); box-shadow: none; }
|
||||
#tab-canvas .cv-toolbar .btn:hover { border-color: rgba(255,138,77,.42);
|
||||
background: color-mix(in srgb, var(--cv-accent-soft) 46%, var(--cv-surface-2)); }
|
||||
#tab-canvas .cv-toolbar .btn.primary { background: var(--cv-blue); border-color: transparent;
|
||||
color: #fff; box-shadow: 0 9px 18px rgba(59,130,246,.22); }
|
||||
#tab-canvas .cv-toolbar .btn.primary:hover { background: #2563eb; filter: none; }
|
||||
.cv-project-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||
border: 0; background: transparent; color: var(--text); font: inherit; font-size: 12px; font-weight: 680;
|
||||
padding: 5px 7px; border-radius: 6px; cursor: pointer; }
|
||||
.cv-project-name:hover { background: var(--cv-surface-2); }
|
||||
|
||||
.cv-tool-rail { position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
|
||||
z-index: 28; display: flex; flex-direction: column; align-items: center; gap: 4px;
|
||||
width: 50px; padding: 7px; box-sizing: border-box;
|
||||
border: 1px solid var(--border); border-radius: 26px;
|
||||
background: rgba(22,22,22,.96); box-shadow: 0 8px 18px rgba(0,0,0,.24); }
|
||||
.cv-rail-btn { width: 36px; height: 36px; border: 0; border-radius: 999px;
|
||||
display: grid; place-items: center; color: #8b96a8; background: transparent;
|
||||
font-weight: 760; font-size: 13px; cursor: pointer;
|
||||
transition: background-color .14s, color .14s; }
|
||||
.cv-rail-btn:hover { color: var(--text); background: var(--cv-surface-2); box-shadow: none; }
|
||||
|
||||
/* 画布舞台:明确高度(Drawflow 容器需要),点阵底纹 */
|
||||
.cv-stage { position: relative; flex: 1; min-height: 560px;
|
||||
border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
|
||||
box-shadow: var(--shadow); }
|
||||
border: 0; border-radius: 0; overflow: hidden; box-shadow: none; background: var(--cv-canvas); }
|
||||
.cv-stage::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
|
||||
background: radial-gradient(circle at 50% 42%, rgba(255,255,255,.025), transparent 44%);
|
||||
box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
|
||||
.cv-project-picker { position: absolute; z-index: 40; top: 14px; left: 50%; transform: translateX(-50%);
|
||||
width: min(520px, calc(100% - 28px)); max-height: min(620px, calc(100% - 28px)); overflow: auto;
|
||||
border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: #171717;
|
||||
box-shadow: 0 20px 55px rgba(0,0,0,.48); padding: 14px; box-sizing: border-box; }
|
||||
.cv-project-picker.hidden { display: none; }
|
||||
.cv-project-picker-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
|
||||
.cv-project-picker-head b { display: block; color: var(--text); font-size: 15px; }
|
||||
.cv-project-picker-head span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
|
||||
.cv-project-close { width: 28px; height: 28px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
|
||||
.cv-project-close:hover { color: var(--text); background: var(--cv-surface-2); }
|
||||
.cv-project-actions { display: flex; justify-content: flex-end; margin: 12px 0 10px; }
|
||||
.cv-project-list { display: grid; gap: 6px; }
|
||||
.cv-project-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 11px;
|
||||
border: 1px solid rgba(255,255,255,.08); border-radius: 8px; background: #1c1c1c; }
|
||||
.cv-project-item.active { border-color: rgba(59,130,246,.58); background: rgba(59,130,246,.08); }
|
||||
.cv-project-info { min-width: 0; }
|
||||
.cv-project-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; font-weight: 680; }
|
||||
.cv-project-title-input { width: 100%; height: 30px; box-sizing: border-box; border: 1px solid rgba(59,130,246,.7);
|
||||
border-radius: 6px; outline: none; background: #111; color: var(--text); padding: 5px 8px; font: inherit; font-size: 13px; }
|
||||
.cv-project-meta { margin-top: 4px; color: var(--muted); font-size: 11px; }
|
||||
.cv-project-item-actions { display: flex; align-items: center; gap: 6px; }
|
||||
.cv-project-icon { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px;
|
||||
background: transparent; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
|
||||
.cv-project-icon:hover { background: var(--cv-surface-2); color: var(--text); }
|
||||
.cv-project-icon.ok { color: #6ee7a0; }
|
||||
.cv-project-open { min-height: 30px; }
|
||||
.cv-project-empty { padding: 24px 8px; text-align: center; color: var(--muted); font-size: 13px; }
|
||||
#drawflow { position: absolute; inset: 0; width: 100%; height: 100%;
|
||||
background-color: var(--bg-2);
|
||||
background-image: radial-gradient(var(--border) 1px, transparent 1px);
|
||||
background-size: 22px 22px; }
|
||||
z-index: 2; background-color: var(--cv-canvas);
|
||||
background-image:
|
||||
linear-gradient(var(--cv-grid-major) 1px, transparent 1px),
|
||||
linear-gradient(90deg, var(--cv-grid-major) 1px, transparent 1px),
|
||||
radial-gradient(var(--cv-grid-minor) 1px, transparent 1px);
|
||||
background-size: 112px 112px, 112px 112px, 22px 22px;
|
||||
background-position: -1px -1px, -1px -1px, 0 0; }
|
||||
|
||||
/* 悬浮缩放控件(右下角,覆盖在画布上) */
|
||||
.cv-zoom { position: absolute; right: 14px; bottom: 14px; z-index: 15;
|
||||
display: flex; flex-direction: column; gap: 1px; border-radius: 10px; overflow: hidden;
|
||||
border: 1px solid var(--border); box-shadow: var(--shadow); }
|
||||
.cv-zoom-btn { border: 0; background: var(--card); color: var(--text);
|
||||
width: 38px; height: 34px; cursor: pointer; font-size: 17px; font-weight: 700;
|
||||
left: 50%; right: auto; transform: translateX(-50%);
|
||||
display: flex; align-items: center; justify-content: center; gap: 4px;
|
||||
width: min(436px, calc(100vw - 72px)); min-height: 46px; border-radius: 999px; overflow: hidden;
|
||||
border: 1px solid var(--border);
|
||||
background: rgba(22,22,22,.96);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,.28); padding: 5px; }
|
||||
.cv-zoom-btn { border: 0; background: transparent; color: var(--text);
|
||||
width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 15px; font-weight: 750;
|
||||
line-height: 1; display: flex; align-items: center; justify-content: center;
|
||||
transition: .12s; user-select: none; }
|
||||
.cv-zoom-btn:hover { background: var(--accent); color: #fff; }
|
||||
transition: background-color .12s, color .12s, transform .12s; user-select: none; }
|
||||
.cv-zoom-btn:hover { background: var(--cv-accent); color: #fff; }
|
||||
.cv-zoom-btn:active { transform: scale(.94); }
|
||||
.cv-zoom-level { font-size: 11px; font-weight: 600; color: var(--muted);
|
||||
border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
|
||||
.cv-zoom-level { font-size: 11px; font-weight: 750; color: var(--text);
|
||||
min-width: 56px; padding: 0 8px; background: var(--cv-surface-2);
|
||||
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 62%, transparent); }
|
||||
.cv-zoom-range { width: 128px; height: 18px; accent-color: var(--cv-accent); cursor: pointer; }
|
||||
.cv-zoom-range::-webkit-slider-runnable-track { height: 4px; border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--border) 64%, var(--cv-accent-soft)); }
|
||||
.cv-zoom-range::-webkit-slider-thumb { margin-top: -5px; width: 14px; height: 14px;
|
||||
border-radius: 50%; background: var(--cv-accent); border: 2px solid #fff;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,.22); }
|
||||
.cv-minimap { position: absolute; left: 18px; bottom: 18px; z-index: 15;
|
||||
width: 202px; height: 152px; padding: 9px; border-radius: 12px;
|
||||
border: 1px solid var(--border); background: rgba(22,22,22,.92);
|
||||
box-shadow: 0 6px 16px rgba(15,23,42,.16); }
|
||||
.cv-minimap-view { position: relative; width: 100%; height: 100%; border-radius: 6px;
|
||||
background: #101010; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
|
||||
.cv-minimap-view span { position: absolute; left: 50%; top: 50%; width: 34px; height: 9px;
|
||||
transform: translate(-50%,-50%); border-radius: 2px; background: var(--cv-accent); }
|
||||
.cv-empty-hint { position: absolute; left: 50%; top: 37%; z-index: 16;
|
||||
display: flex; align-items: center; gap: 12px; transform: translate(-50%, -50%);
|
||||
color: var(--muted); font-size: 14px; pointer-events: none; }
|
||||
.cv-empty-hint span { display: inline-flex; align-items: center; gap: 5px; height: 34px;
|
||||
padding: 0 15px; border-radius: 10px; color: var(--cv-accent-strong); background: var(--cv-surface);
|
||||
border: 1px solid var(--border); box-shadow: 0 12px 30px rgba(0,0,0,.28); }
|
||||
.cv-empty-hint b { font-size: 15px; color: var(--muted); font-weight: 660; }
|
||||
.cv-quick-menu { position: absolute; z-index: 32; width: 240px; padding: 12px;
|
||||
border-radius: 18px; border: 1px solid var(--border);
|
||||
background: rgba(22,22,22,.98); box-shadow: 0 12px 32px rgba(0,0,0,.34); }
|
||||
.cv-quick-title { color: var(--muted); font-size: 12px; padding: 2px 6px 8px; }
|
||||
.cv-quick-menu button { width: 100%; border: 0; background: transparent; color: var(--text);
|
||||
display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 12px;
|
||||
font: inherit; font-size: 14px; font-weight: 670; cursor: pointer; text-align: left;
|
||||
transition: background-color .14s, color .14s, transform .14s; }
|
||||
.cv-quick-menu button span { width: 32px; height: 32px; display: grid; place-items: center;
|
||||
border-radius: 10px; color: var(--muted); background: var(--cv-surface-2); font-weight: 780; }
|
||||
.cv-quick-menu button:hover { background: var(--cv-surface-2); transform: translateX(2px); }
|
||||
.cv-quick-menu button:hover span { color: var(--cv-accent-strong); background: var(--cv-accent-soft); }
|
||||
|
||||
/* 未就绪遮罩 */
|
||||
.cv-mask { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center;
|
||||
background: color-mix(in srgb, var(--bg) 78%, transparent);
|
||||
backdrop-filter: blur(2px); }
|
||||
background: color-mix(in srgb, var(--bg) 86%, transparent); }
|
||||
.cv-mask-box { text-align: center; background: var(--card); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 28px 32px; box-shadow: var(--shadow); max-width: 380px; }
|
||||
.cv-mask-ico { font-size: 34px; }
|
||||
@@ -552,30 +723,155 @@ h3 { margin: 0; font-size: 16px; }
|
||||
.cv-mask-text { color: var(--muted); font-size: 13px; margin: 0 0 14px; line-height: 1.6; }
|
||||
|
||||
/* —— 覆写 Drawflow 节点为卡片风 —— */
|
||||
.drawflow .drawflow-node { background: transparent; border: 0; padding: 0;
|
||||
border-radius: 16px; box-shadow: none; width: 250px; }
|
||||
.drawflow .drawflow-node.selected { box-shadow: none; }
|
||||
.drawflow .drawflow-node { background: transparent !important; border: 0; padding: 0;
|
||||
border-radius: 12px; box-shadow: none; width: 250px; }
|
||||
.drawflow .drawflow-node.cv-df-video,
|
||||
.drawflow .drawflow-node.cv-df-grokVideo { width: 420px; }
|
||||
.drawflow .drawflow-node.cv-df-image { width: 420px; }
|
||||
.drawflow .drawflow-node.cv-df-tts,
|
||||
.drawflow .drawflow-node.cv-df-text { width: 430px; }
|
||||
.drawflow .drawflow-node.selected { background: transparent !important; box-shadow: none; }
|
||||
.drawflow .drawflow-node .drawflow_content_node { width: 100%; }
|
||||
.cv-node { background: var(--card); border: 1px solid var(--border);
|
||||
border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
|
||||
transition: border-color .15s; }
|
||||
.drawflow-node:hover .cv-node { border-color: var(--accent); }
|
||||
.drawflow-node.selected .cv-node { border-color: transparent;
|
||||
box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
|
||||
.cv-node { background: var(--cv-surface); border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
|
||||
border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.22);
|
||||
transition: border-color .12s; }
|
||||
.drawflow-node:hover .cv-node { border-color: rgba(255,255,255,.14);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,.22); }
|
||||
.drawflow-node.selected .cv-node { border-color: rgba(255,106,44,.42);
|
||||
background: var(--cv-surface) !important;
|
||||
box-shadow: 0 0 0 2px rgba(255,106,44,.16), 0 2px 8px rgba(0,0,0,.22); }
|
||||
.drawflow .drawflow-node.cv-node-config-open { z-index: 30; }
|
||||
.drawflow-node.selected .cv-node-body { background: transparent !important; }
|
||||
.cv-node-head { display: flex; align-items: center; gap: 8px;
|
||||
padding: 9px 12px; background: var(--card-2); border-bottom: 1px solid var(--border); }
|
||||
.cv-node-ico { font-size: 15px; }
|
||||
.cv-node-name { font-weight: 700; font-size: 13px; color: var(--text); }
|
||||
.cv-node-tag { margin-left: auto; font-size: 10px; font-weight: 700; color: #f59e0b;
|
||||
background: rgba(245,158,11,.16); padding: 2px 7px; border-radius: 999px; }
|
||||
.cv-node-body { display: flex; flex-direction: column; gap: 8px; padding: 11px 12px; }
|
||||
padding: 9px 11px; background: linear-gradient(180deg, var(--cv-surface-2), color-mix(in srgb, var(--cv-surface-2) 70%, transparent));
|
||||
border-bottom: 1px solid color-mix(in srgb, var(--border) 72%, transparent); }
|
||||
.cv-node-ico { display: grid; place-items: center; width: 22px; height: 22px;
|
||||
border-radius: 7px; font-size: 13px; background: var(--cv-accent-soft); }
|
||||
.cv-node-name { font-weight: 750; font-size: 13px; color: var(--text); }
|
||||
.cv-node-tag { margin-left: auto; font-size: 10px; font-weight: 750; color: var(--cv-warn);
|
||||
background: rgba(217,119,6,.14); padding: 2px 7px; border-radius: 999px;
|
||||
border: 1px solid rgba(217,119,6,.18); }
|
||||
.cv-node-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 11px 11px; }
|
||||
.cv-node-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
|
||||
.cv-df-video .cv-node,
|
||||
.cv-df-grokVideo .cv-node,
|
||||
.cv-df-image .cv-node,
|
||||
.cv-df-tts .cv-node,
|
||||
.cv-df-text .cv-node { background: transparent !important; border: 0; box-shadow: none;
|
||||
overflow: visible; backdrop-filter: none; }
|
||||
.cv-df-video .cv-node-head,
|
||||
.cv-df-grokVideo .cv-node-head,
|
||||
.cv-df-image .cv-node-head,
|
||||
.cv-df-tts .cv-node-head,
|
||||
.cv-df-text .cv-node-head { display: none; }
|
||||
.cv-df-video .cv-node-body,
|
||||
.cv-df-grokVideo .cv-node-body,
|
||||
.cv-df-image .cv-node-body,
|
||||
.cv-df-tts .cv-node-body,
|
||||
.cv-df-text .cv-node-body { padding: 0; background: transparent !important; }
|
||||
.cv-df-video.drawflow-node.selected .cv-node,
|
||||
.cv-df-grokVideo.drawflow-node.selected .cv-node,
|
||||
.cv-df-image.drawflow-node.selected .cv-node,
|
||||
.cv-df-tts.drawflow-node.selected .cv-node,
|
||||
.cv-df-text.drawflow-node.selected .cv-node { background: transparent !important; box-shadow: none !important; }
|
||||
.cv-video-compact { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
|
||||
padding-top: 14px; }
|
||||
.cv-video-label { align-self: center; display: inline-flex; align-items: center; gap: 7px;
|
||||
max-width: calc(100% - 44px); padding: 0 8px; color: var(--muted);
|
||||
font-size: 13px; font-weight: 650; background: var(--cv-canvas);
|
||||
border-radius: 999px; line-height: 1.2; white-space: nowrap; overflow: hidden;
|
||||
text-overflow: ellipsis; }
|
||||
.cv-video-label span { color: #777; flex: none; }
|
||||
.cv-video-frame { width: 276px; max-width: calc(100% - 44px); min-height: 0; border: 1px solid var(--border);
|
||||
border-radius: 16px; padding: 8px; background: var(--cv-surface);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,.24); }
|
||||
.drawflow-node.selected .cv-video-frame { border-color: rgba(255,106,44,.42);
|
||||
box-shadow: 0 0 0 2px rgba(255,106,44,.14), 0 2px 8px rgba(0,0,0,.24); }
|
||||
.cv-video-frame-inner { height: auto; aspect-ratio: var(--cv-video-preview-aspect, 16 / 9);
|
||||
border-radius: 10px; border: 1px dashed rgba(255,255,255,.12);
|
||||
display: grid; place-items: center; color: var(--muted); font-size: 34px; background: #101010;
|
||||
overflow: hidden; }
|
||||
.cv-video-frame-inner .cv-skeleton { width: 100%; height: 100%; border-radius: inherit; }
|
||||
.cv-video-frame-inner .cv-preview-shell { width: 100%; height: 100%; border-radius: inherit; overflow: hidden; }
|
||||
.cv-video-frame-inner .cv-preview-shell.cv-preview-video { background: #05070b; }
|
||||
.cv-video-frame-inner .cv-preview-shell.cv-preview-image { background: #111; }
|
||||
.cv-video-frame-inner .cv-preview-video .cv-media { width: 100%; height: 100%; max-height: none; object-fit: contain; background: #05070b; }
|
||||
.cv-video-frame-inner .cv-preview-image .cv-media { width: 100%; height: 100%; max-height: none; object-fit: contain; background: #111; }
|
||||
.cv-video-frame-inner .cv-meta { display: none; }
|
||||
.cv-image-frame { width: 276px; max-width: calc(100% - 44px); min-height: 0; align-self: center; }
|
||||
.cv-image-frame[data-ratio="16:9"],
|
||||
.cv-image-frame[data-ratio="4:3"],
|
||||
.cv-image-frame[data-ratio="3:2"] { width: 276px; max-width: calc(100% - 44px); }
|
||||
.cv-image-frame[data-ratio="9:16"],
|
||||
.cv-image-frame[data-ratio="3:4"] { width: 276px; max-width: calc(100% - 44px); }
|
||||
.cv-image-frame .cv-video-frame-inner { height: auto; aspect-ratio: var(--cv-image-preview-aspect, 1 / 1);
|
||||
min-height: 0; border-style: solid; border-color: rgba(255,255,255,.08); background: #111; font-size: 30px; }
|
||||
.cv-image-compact .cv-video-foot { width: min(420px, calc(100% - 60px)); margin-top: -6px; }
|
||||
.cv-audio-frame .cv-video-frame-inner,
|
||||
.cv-text-frame .cv-video-frame-inner { aspect-ratio: 16 / 5; border-style: solid;
|
||||
border-color: rgba(255,255,255,.08); font-size: 28px; }
|
||||
.cv-video-foot { width: min(420px, 100%); display: flex; align-items: center;
|
||||
justify-content: space-between; color: var(--muted); font-size: 12px; pointer-events: none; }
|
||||
.cv-video-foot b { padding: 4px 8px; border-radius: 999px; background: var(--cv-accent-soft);
|
||||
border: 1px solid rgba(255,106,44,.38); color: var(--cv-accent); font-size: 10px; font-weight: 500; }
|
||||
.cv-video-composer { width: min(420px, 100%); min-height: 188px; margin-top: 0; padding: 12px;
|
||||
border-radius: 16px; border: 1px solid var(--border);
|
||||
background: var(--cv-surface); box-shadow: 0 2px 8px rgba(0,0,0,.24);
|
||||
contain: layout paint style; display: none; flex-direction: column; gap: 8px; }
|
||||
.cv-video-compact.cv-config-open .cv-video-composer { display: flex; }
|
||||
.cv-video-compact.cv-config-open .cv-video-foot { display: none; }
|
||||
.cv-tts-compact .cv-video-composer,
|
||||
.cv-text-compact .cv-video-composer { min-height: 0; }
|
||||
.cv-video-compose-tools { display: flex; align-items: center; gap: 4px; color: var(--muted);
|
||||
font-size: 16px; height: 28px; }
|
||||
.cv-video-compose-tools .cv-video-expand { margin-left: auto; font-size: 13px; }
|
||||
.cv-video-prompt { min-height: 58px; border: 0; box-shadow: none; padding: 6px 0;
|
||||
background: transparent; resize: none; color: var(--text); }
|
||||
.cv-video-prompt:focus { box-shadow: none; border-color: transparent; }
|
||||
.cv-video-chip-row { display: flex; align-items: flex-start; gap: 7px; flex-wrap: wrap; }
|
||||
.cv-chip-select, .cv-chip-action, .cv-video-pop > summary { width: auto; min-width: 0; height: 27px;
|
||||
border-radius: 999px !important; border: 1px solid var(--border) !important;
|
||||
background: var(--cv-surface-2) !important; color: var(--muted) !important; font-size: 11px !important;
|
||||
font-weight: 500; padding: 0 10px !important; resize: none; }
|
||||
.cv-chip-select.cv-field-group { max-width: 132px; }
|
||||
.cv-chip-select.cv-field-model { max-width: 150px; }
|
||||
.cv-chip-action { cursor: pointer; }
|
||||
.cv-video-pop { position: relative; flex: 0 0 auto; }
|
||||
.cv-video-pop > summary { display: inline-flex; align-items: center; cursor: pointer; list-style: none; }
|
||||
.cv-video-pop > summary::-webkit-details-marker { display: none; }
|
||||
.cv-video-pop[open] { flex-basis: 100%; width: 100%; }
|
||||
.cv-video-pop-body { position: static; left: auto; top: auto; transform: none;
|
||||
z-index: 42; width: 100%; margin-top: 8px; padding: 12px; border-radius: 14px;
|
||||
border: 1px solid var(--border); background: #141414;
|
||||
box-shadow: none; contain: layout paint style; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
|
||||
.cv-video-pop[open] > summary { color: var(--cv-accent-strong) !important; background: var(--cv-accent-soft) !important; }
|
||||
.cv-video-pop-body label { display: grid; gap: 5px; min-width: 0; color: #7f8da1; font-size: 11px; font-weight: 650; }
|
||||
.cv-video-pop-body .cv-pop-wide,
|
||||
.cv-video-pop-body .cv-refimg-row,
|
||||
.cv-video-pop-body .cv-field-refsource,
|
||||
.cv-video-pop-body .cv-pop-close { grid-column: 1 / -1; }
|
||||
.cv-video-pop-body .cv-field { height: 34px; border-radius: 10px; background: var(--cv-surface-2); color: var(--text); border-color: var(--border); }
|
||||
.cv-video-pop-body .cv-field,
|
||||
.cv-video-pop-body select,
|
||||
.cv-video-pop-body input,
|
||||
.cv-video-pop-body textarea { min-width: 0; width: 100%; box-sizing: border-box; }
|
||||
.cv-pop-close { height: 32px; border: 0; border-radius: 10px; background: var(--cv-surface-2);
|
||||
color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
|
||||
.cv-pop-close:hover { background: #242424; color: var(--text); }
|
||||
.cv-video-compact.cv-pop-open .cv-video-foot { display: none !important; }
|
||||
.cv-send-run { margin-left: auto; width: 34px; height: 34px; border-radius: 999px;
|
||||
padding: 0; display: grid; place-items: center; background: #ffc7b8; color: #f26b2d; }
|
||||
.cv-video-materials { margin-top: 8px; }
|
||||
.cv-df-video .cv-node-preview,
|
||||
.cv-df-grokVideo .cv-node-preview,
|
||||
.cv-df-image .cv-node-preview,
|
||||
.cv-df-tts .cv-node-preview { margin-top: 10px; }
|
||||
|
||||
/* 节点内表单控件 */
|
||||
.cv-field { width: 100%; background: var(--bg-2); border: 1px solid var(--border);
|
||||
color: var(--text); border-radius: 9px; padding: 8px 10px; font-size: 12px;
|
||||
.cv-field { width: 100%; background: var(--cv-field); border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
|
||||
color: var(--text); border-radius: 8px; padding: 8px 10px; font-size: 12px;
|
||||
font-family: inherit; outline: none; resize: vertical; }
|
||||
.cv-field:focus { border-color: var(--accent); }
|
||||
.cv-field:focus { border-color: var(--cv-accent); box-shadow: 0 0 0 3px var(--cv-accent-soft); }
|
||||
select.cv-field { resize: none; cursor: pointer; }
|
||||
|
||||
/* 并排两个下拉(比例 + 清晰度 / 音色 + 格式 等) */
|
||||
@@ -585,34 +881,39 @@ select.cv-field { resize: none; cursor: pointer; }
|
||||
/* 模型输入框 + 每节点「拉取」小按钮 */
|
||||
.cv-model-row { display: flex; gap: 6px; align-items: stretch; }
|
||||
.cv-model-row .cv-field { flex: 1; min-width: 0; }
|
||||
.cv-fetch-models { flex: none; border: 1px solid var(--border); background: var(--card-2);
|
||||
color: var(--muted); border-radius: 9px; padding: 0 10px; cursor: pointer;
|
||||
.cv-fetch-models { flex: none; border: 1px solid color-mix(in srgb, var(--border) 76%, transparent); background: var(--cv-surface-2);
|
||||
color: var(--muted); border-radius: 8px; padding: 0 10px; cursor: pointer;
|
||||
font-size: 11px; font-weight: 700; transition: .15s; }
|
||||
.cv-fetch-models:hover { border-color: var(--accent); color: var(--accent); }
|
||||
.cv-fetch-models:hover { border-color: var(--cv-accent); color: var(--cv-accent); }
|
||||
.cv-fetch-models:disabled { opacity: .5; cursor: not-allowed; }
|
||||
|
||||
/* 素材上传控件(图片节点参考图 / 视频节点首帧·尾帧·多参考图)——走自建图床 */
|
||||
.cv-refimg-row, .cv-vmat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
|
||||
.cv-refimg-pick { display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
|
||||
border: 1px dashed var(--accent); color: var(--accent); background: var(--card-2);
|
||||
border-radius: 9px; padding: 7px 12px; font-size: 11px; font-weight: 700;
|
||||
border: 1px dashed rgba(255,106,44,.52); color: var(--cv-accent); background: var(--cv-accent-soft);
|
||||
border-radius: 8px; padding: 7px 12px; font-size: 11px; font-weight: 700;
|
||||
transition: .15s; white-space: nowrap; user-select: none; }
|
||||
.cv-refimg-pick:hover { background: var(--accent); color: #fff; }
|
||||
.cv-refimg-thumb, .cv-vmat-thumb { border: 1px solid var(--border); }
|
||||
.cv-refimg-clear, .cv-vmat-clear { flex: none; border: 1px solid var(--border);
|
||||
background: var(--card-2); color: var(--muted); border-radius: 7px; cursor: pointer;
|
||||
.cv-refimg-pick:hover { background: var(--cv-accent); color: #fff; }
|
||||
.cv-refimg-thumb, .cv-vmat-thumb { flex: none; display: block; width: 42px; height: 42px;
|
||||
max-width: 42px; max-height: 42px; object-fit: cover;
|
||||
border: 1px solid color-mix(in srgb, var(--border) 76%, transparent); border-radius: 8px; }
|
||||
.cv-refimg-clear, .cv-vmat-clear { flex: none; border: 1px solid color-mix(in srgb, var(--border) 76%, transparent);
|
||||
background: var(--cv-surface-2); color: var(--muted); border-radius: 7px; cursor: pointer;
|
||||
width: 24px; height: 24px; font-size: 12px; line-height: 1; padding: 0; transition: .15s; }
|
||||
.cv-refimg-clear:hover, .cv-vmat-clear:hover { border-color: var(--danger); color: var(--danger); }
|
||||
/* URL 输入 / 提示 / 多图缩略图 各自独占一行 */
|
||||
.cv-vmat-url, .cv-vmat-urls { flex: 1 1 100%; }
|
||||
.cv-refimg-row .cv-node-hint, .cv-vmat .cv-node-hint { flex: 1 1 100%; }
|
||||
.cv-vmat-refs-thumbs { display: flex; flex-wrap: wrap; gap: 2px; flex: 1 1 100%; }
|
||||
.cv-vmat-refs-thumbs img { width: 34px !important; height: 34px !important;
|
||||
max-width: 34px !important; max-height: 34px !important; object-fit: cover;
|
||||
border-radius: 7px; border: 1px solid color-mix(in srgb, var(--border) 76%, transparent); }
|
||||
/* 复选标签(生成音频 / 水印 / 固定镜头)对齐 */
|
||||
.cv-check { display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
|
||||
color: var(--muted); cursor: pointer; user-select: none; }
|
||||
|
||||
/* 折叠「高级」区(接口地址覆盖),别把节点撑太高 */
|
||||
.cv-adv { border-top: 1px dashed var(--border); padding-top: 6px; }
|
||||
.cv-adv { border-top: 1px dashed color-mix(in srgb, var(--border) 78%, transparent); padding-top: 6px; }
|
||||
.cv-adv > summary { cursor: pointer; color: var(--muted); font-size: 11px;
|
||||
font-weight: 600; list-style: none; user-select: none; }
|
||||
.cv-adv > summary::-webkit-details-marker { display: none; }
|
||||
@@ -621,29 +922,39 @@ select.cv-field { resize: none; cursor: pointer; }
|
||||
.cv-adv[open] > summary { margin-bottom: 6px; }
|
||||
|
||||
/* 运行按钮(沿用主色渐变观感) */
|
||||
.cv-run { align-self: stretch; border: 0; background: var(--grad); color: #fff;
|
||||
padding: 8px 14px; border-radius: 9px; cursor: pointer; font-size: 12px;
|
||||
.cv-run { align-self: stretch; border: 0; background: var(--cv-accent); color: #fff;
|
||||
padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 12px;
|
||||
font-weight: 700; transition: .15s; }
|
||||
.cv-run:hover { filter: brightness(1.08); }
|
||||
.cv-run:hover { background: var(--cv-accent-strong); filter: none; }
|
||||
.cv-run:disabled { opacity: .6; cursor: not-allowed; }
|
||||
.cv-video-chip-row .cv-send-run { align-self: auto; flex: none; margin-left: auto;
|
||||
width: 34px; height: 34px; border-radius: 999px; padding: 0; display: grid; place-items: center;
|
||||
background: var(--cv-accent); color: #0a0a0a; box-shadow: none; overflow: hidden; white-space: nowrap; }
|
||||
.cv-video-chip-row .cv-send-run:hover { background: var(--cv-accent-strong); color: #0a0a0a; }
|
||||
.cv-video-chip-row .cv-send-run.loading { color: transparent; position: relative; }
|
||||
.cv-video-chip-row .cv-send-run.loading::after { content: ""; position: absolute; width: 14px; height: 14px;
|
||||
border-radius: 999px; border: 2px solid rgba(242,107,45,.24); border-top-color: #f26b2d;
|
||||
animation: cv-rot .7s linear infinite; }
|
||||
|
||||
/* 错误红字 */
|
||||
.cv-node-err { color: var(--danger); font-size: 11px; line-height: 1.5;
|
||||
background: rgba(255,107,107,.1); border-radius: 8px; padding: 6px 9px; }
|
||||
|
||||
/* 预览区(img/video/audio)圆角、限高、加载骨架 */
|
||||
.cv-node-preview { border-radius: 10px; overflow: hidden; background: var(--bg-2);
|
||||
border: 1px solid var(--border); }
|
||||
.cv-node-preview { border-radius: 9px; overflow: hidden; background: var(--cv-field);
|
||||
border: 1px solid color-mix(in srgb, var(--border) 76%, transparent); }
|
||||
.cv-preview-shell { position: relative; background: #000; }
|
||||
.cv-preview-shell.cv-preview-audio { display: grid; place-items: center; min-height: 92px; background: #111; }
|
||||
.cv-preview-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 5px;
|
||||
z-index: 2; opacity: .92; }
|
||||
.cv-preview-actions button { width: 26px; height: 26px; display: grid; place-items: center;
|
||||
border: 1px solid rgba(255,255,255,.22); border-radius: 7px; background: rgba(15,17,23,.78);
|
||||
color: #fff; cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
|
||||
.cv-preview-actions button:hover { background: rgba(90,103,216,.92); border-color: rgba(255,255,255,.4); }
|
||||
.cv-preview-actions button:hover { background: rgba(255,106,44,.92); border-color: rgba(255,255,255,.4); }
|
||||
.cv-media { display: block; width: 100%; max-height: 220px; object-fit: contain;
|
||||
background: #000; }
|
||||
.cv-media-audio { display: block; width: 100%; }
|
||||
.cv-preview-audio .cv-media-audio { width: calc(100% - 16px); margin: 34px 8px 8px; }
|
||||
.cv-meta { font-size: 10px; color: var(--muted); padding: 5px 8px;
|
||||
border-top: 1px solid var(--border); }
|
||||
.cv-skeleton { display: flex; align-items: center; justify-content: center; gap: 8px;
|
||||
@@ -652,25 +963,59 @@ select.cv-field { resize: none; cursor: pointer; }
|
||||
background-size: 200% 100%; animation: cv-shimmer 1.2s linear infinite; }
|
||||
@keyframes cv-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
|
||||
.cv-spin { width: 13px; height: 13px; border-radius: 50%;
|
||||
border: 2px solid var(--border); border-top-color: var(--accent);
|
||||
border: 2px solid var(--border); border-top-color: var(--cv-accent);
|
||||
animation: cv-rot .7s linear infinite; }
|
||||
@keyframes cv-rot { to { transform: rotate(360deg); } }
|
||||
|
||||
/* —— 端口与连线用主题色 —— */
|
||||
.drawflow .drawflow-node .input,
|
||||
.drawflow .drawflow-node .output { background: var(--card);
|
||||
border: 2px solid var(--accent); width: 13px; height: 13px; }
|
||||
.drawflow .drawflow-node .output:hover,
|
||||
.drawflow .drawflow-node .input:hover { background: var(--accent); }
|
||||
.drawflow .connection .main-path { stroke: var(--accent); stroke-width: 2.4px; }
|
||||
.drawflow .drawflow-node .output { width: 28px; height: 28px; border: 0;
|
||||
background: transparent; box-shadow: none; opacity: 1; z-index: 8;
|
||||
position: absolute !important; top: var(--cv-port-y, 50%) !important; margin-bottom: 0 !important; }
|
||||
.drawflow .drawflow-node .input { pointer-events: none; }
|
||||
.drawflow .drawflow-node .output { pointer-events: auto; }
|
||||
.drawflow .drawflow-node .input { left: var(--cv-port-left, 0) !important; transform: translate(-50%, -50%) !important; }
|
||||
.drawflow .drawflow-node .output { left: var(--cv-port-right, 100%) !important; right: auto !important; transform: translate(-50%, -50%) !important; }
|
||||
.drawflow .drawflow-node .input::after,
|
||||
.drawflow .drawflow-node .output::after { content: "+"; position: absolute; left: 50%; top: 50%;
|
||||
display: grid; place-items: center; color: var(--text); font-size: 16px; font-weight: 720; line-height: 1;
|
||||
width: 22px; height: 22px; border-radius: 999px; transform: translate(-50%, -50%) scale(.86);
|
||||
background: var(--cv-surface-2); border: 1px solid rgba(255,255,255,.16);
|
||||
box-shadow: none;
|
||||
opacity: 0; pointer-events: none; transition: opacity .10s ease, color .10s ease, border-color .10s ease; }
|
||||
.drawflow .drawflow-node.selected .output::after,
|
||||
.drawflow .drawflow-node.cv-node-config-open .output::after,
|
||||
#drawflow.cv-linking .drawflow-node .input::after,
|
||||
#drawflow.cv-linking .drawflow-node .output::after {
|
||||
opacity: 1;
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
}
|
||||
#drawflow.cv-linking .drawflow-node .input::after { opacity: 1; }
|
||||
#drawflow.cv-dragging .cv-node,
|
||||
#drawflow.cv-dragging .cv-video-frame,
|
||||
#drawflow.cv-dragging .cv-video-composer,
|
||||
#drawflow.cv-dragging .cv-skeleton,
|
||||
#drawflow.cv-dragging .cv-spin,
|
||||
#drawflow.cv-dragging .drawflow-node .input::after,
|
||||
#drawflow.cv-dragging .drawflow-node .output::after {
|
||||
box-shadow: none !important;
|
||||
transition: none !important;
|
||||
animation-play-state: paused !important;
|
||||
}
|
||||
#drawflow.cv-dragging .drawflow-node.selected { will-change: transform; }
|
||||
#drawflow.cv-linking .drawflow-node .input { pointer-events: auto; }
|
||||
#drawflow.cv-linking .drawflow-node .output:hover::after,
|
||||
#drawflow.cv-linking .drawflow-node .input:hover::after { color: var(--cv-accent-strong); border-color: var(--cv-accent-strong); }
|
||||
.drawflow .connection .main-path { stroke: var(--cv-accent); stroke-width: 2.3px; }
|
||||
.drawflow .connection .main-path:hover { stroke: var(--text); }
|
||||
.drawflow .connection .point { stroke: var(--accent); fill: var(--card); }
|
||||
.drawflow .connection .point { stroke: var(--cv-accent); fill: var(--cv-surface); }
|
||||
|
||||
/* —— 沉浸式全屏:fixed 覆盖整个应用窗口(含顶部导航) —— */
|
||||
body.cv-noscroll { overflow: hidden; }
|
||||
#tab-canvas.cv-fullscreen { position: fixed; inset: 0; z-index: 9999; margin: 0;
|
||||
height: auto; padding: 14px 16px; background: var(--bg); }
|
||||
#tab-canvas.cv-fullscreen .cv-stage { min-height: 0; border-radius: 12px; }
|
||||
height: auto; padding: 0; background: var(--cv-canvas); }
|
||||
#tab-canvas.cv-fullscreen .cv-stage { min-height: 0; border-radius: 11px; }
|
||||
#tab-canvas.cv-fullscreen .cv-toolbar { padding: 8px 10px; }
|
||||
|
||||
/* —— 语音输入面板 —— */
|
||||
.voice-body { display: grid; gap: 14px; max-width: 760px; }
|
||||
@@ -682,9 +1027,9 @@ body.cv-noscroll { overflow: hidden; }
|
||||
.voice-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; background: #6b7280; flex: none; }
|
||||
.voice-dot[data-state="connected"] { background: #34d399; box-shadow: 0 0 8px rgba(52,211,153,.7); }
|
||||
.voice-dot[data-state="transcribing"], .voice-dot[data-state="recording"] { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,.7); }
|
||||
.voice-dot[data-state="restarting"], .voice-dot[data-state="connecting"], .voice-dot[data-state="injecting"], .voice-dot[data-state="checking"] { background: #60a5fa; }
|
||||
.voice-dot[data-state="restarting"], .voice-dot[data-state="waiting_debug_port"], .voice-dot[data-state="connecting"], .voice-dot[data-state="injecting"], .voice-dot[data-state="checking"] { background: #60a5fa; }
|
||||
.voice-dot[data-state="error"] { background: #ef4444; box-shadow: 0 0 8px rgba(239,68,68,.7); }
|
||||
.voice-dot[data-state="running_no_port"] { background: #f59e0b; }
|
||||
.voice-dot[data-state="running_no_port"], .voice-dot[data-state="unsupported_packaged"] { background: #f59e0b; }
|
||||
.codex-link-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -712,6 +1057,7 @@ body.cv-noscroll { overflow: hidden; }
|
||||
.tm-field { display: flex; flex-direction: column; gap: 6px; }
|
||||
.tm-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
|
||||
.tm-hint { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
|
||||
.tm-hint strong { color: var(--text); }
|
||||
.tm-row { display: flex; gap: 8px; align-items: center; }
|
||||
.tm-select, .tm-text { background: var(--card); border: 1px solid var(--border); color: var(--text);
|
||||
border-radius: 9px; padding: 8px 10px; font-size: 13px; font-family: inherit; flex: 1; min-width: 0; }
|
||||
@@ -742,6 +1088,8 @@ body.cv-noscroll { overflow: hidden; }
|
||||
.tm-team-name { font-size: 18px; font-weight: 700; }
|
||||
.tm-team-summary { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }
|
||||
.tm-team-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
|
||||
.tm-team-models { margin-top: 8px; color: var(--muted); font-size: 12px; }
|
||||
.tm-team-models code, .tm-emp-model code { color: var(--text); font-family: ui-monospace, monospace; }
|
||||
.tm-stack-chip { background: var(--card-2); border: 1px solid var(--border); color: var(--text);
|
||||
padding: 3px 10px; border-radius: 20px; font-size: 11.5px; }
|
||||
.tm-conv-card, .tm-emp-card { background: var(--card); border: 1px solid var(--border);
|
||||
@@ -758,6 +1106,7 @@ body.cv-noscroll { overflow: hidden; }
|
||||
.tm-emp-id { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--muted);
|
||||
background: var(--card-2); padding: 1px 6px; border-radius: 5px; }
|
||||
.tm-emp-duty { font-size: 13px; color: var(--text); margin-top: 5px; line-height: 1.5; }
|
||||
.tm-emp-model { margin-top: 5px; color: var(--muted); font-size: 11.5px; }
|
||||
.tm-sec-label { font-size: 11.5px; font-weight: 600; color: var(--accent); margin: 10px 0 4px; }
|
||||
.tm-resp, .tm-flow { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
|
||||
.tm-collab { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
|
||||
|
||||
Reference in New Issue
Block a user