pygmalion 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/preset/pygmalion-director/agent.cordis.yml +204 -161
- package/src/active-session.js +25 -2
- package/src/agent-life.js +94 -17
- package/src/bot-factory.js +285 -282
- package/src/heartbeat.js +411 -352
- package/src/inbound.js +790 -770
- package/src/index.js +230 -210
- package/src/llm-provider.js +71 -27
- package/src/meme-worker.js +397 -0
- package/src/memebox.js +348 -0
- package/src/persona.js +397 -380
- package/src/setup-agent.js +3 -1
- package/src/tools.js +904 -511
- package/src/wakeup.js +202 -208
- package/src/web-public/app.js +488 -381
- package/src/web-public/index.html +157 -130
- package/src/web-public/style.css +51 -44
- package/src/web-server.js +581 -506
- package/templates/sample-life.mjs +6 -0
|
@@ -1,130 +1,157 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="zh-CN">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>Pygmalion 管理台</title>
|
|
7
|
-
<link rel="stylesheet" href="/style.css">
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<main>
|
|
11
|
-
<!-- 登录 / 注册 -->
|
|
12
|
-
<section id="auth-view" class="panel hidden">
|
|
13
|
-
<h1>Pygmalion 管理台</h1>
|
|
14
|
-
<p class="muted">登录你的账号管理角色。首次使用先注册。</p>
|
|
15
|
-
<form id="auth-form" class="stack">
|
|
16
|
-
<input id="auth-qq" type="text" inputmode="numeric" placeholder="QQ 号" autocomplete="username" required>
|
|
17
|
-
<input id="auth-pass" type="password" placeholder="密码(至少 6 位)" autocomplete="current-password" required>
|
|
18
|
-
<input id="auth-display" type="text" placeholder="昵称(选填,仅注册时)" class="hidden">
|
|
19
|
-
<button type="submit" id="auth-submit">登录</button>
|
|
20
|
-
</form>
|
|
21
|
-
<button id="auth-toggle" class="link-btn">没有账号?注册</button>
|
|
22
|
-
<p id="auth-error" class="error"></p>
|
|
23
|
-
</section>
|
|
24
|
-
|
|
25
|
-
<!-- 主界面 -->
|
|
26
|
-
<section id="app-view" class="hidden">
|
|
27
|
-
<header class="topbar">
|
|
28
|
-
<div>
|
|
29
|
-
<h1>Pygmalion 管理台</h1>
|
|
30
|
-
<p class="muted" id="me-label"></p>
|
|
31
|
-
</div>
|
|
32
|
-
<div class="row">
|
|
33
|
-
<button id="btn-password" class="ghost">改密码</button>
|
|
34
|
-
<button id="btn-logout" class="ghost">退出</button>
|
|
35
|
-
</div>
|
|
36
|
-
</header>
|
|
37
|
-
|
|
38
|
-
<div id="status-bar" class="status-bar hidden"></div>
|
|
39
|
-
|
|
40
|
-
<!-- 角色列表 -->
|
|
41
|
-
<section class="card">
|
|
42
|
-
<div class="card-head">
|
|
43
|
-
<h2>我的角色</h2>
|
|
44
|
-
<button id="btn-new-role">+ 新建角色</button>
|
|
45
|
-
</div>
|
|
46
|
-
<div id="role-list" class="role-list"></div>
|
|
47
|
-
</section>
|
|
48
|
-
|
|
49
|
-
<!-- 新建 / 编辑角色 -->
|
|
50
|
-
<section id="editor-view" class="panel hidden">
|
|
51
|
-
<div class="card-head">
|
|
52
|
-
<h2 id="editor-title">新建角色</h2>
|
|
53
|
-
<button id="btn-close-editor" class="ghost">关闭</button>
|
|
54
|
-
</div>
|
|
55
|
-
<form id="role-form" class="stack">
|
|
56
|
-
<fieldset>
|
|
57
|
-
<legend>人设</legend>
|
|
58
|
-
<label>角色名 <input id="f-name" required></label>
|
|
59
|
-
<label>年龄 <input id="f-age"></label>
|
|
60
|
-
<label>头像提示(选填,如“长发”“黑猫”) <input id="f-avatar"></label>
|
|
61
|
-
<label>性格 <input id="f-personality"></label>
|
|
62
|
-
<label>背景故事 <textarea id="f-backstory" rows="3"></textarea></label>
|
|
63
|
-
<label>说话风格 <textarea id="f-speaking" rows="3"></textarea></label>
|
|
64
|
-
<label>与 ta 的关系 <textarea id="f-relationship" rows="2"></textarea></label>
|
|
65
|
-
<label>日程(HH:MM,每行一条,如 早安=08:00) <textarea id="f-schedule" rows="3" placeholder="早安=08:00 晚安=23:00"></textarea></label>
|
|
66
|
-
</fieldset>
|
|
67
|
-
<fieldset>
|
|
68
|
-
<legend>模型</legend>
|
|
69
|
-
<label>provider(留空则按 apiUrl 自动注册) <input id="f-provider" placeholder="opencode-go 或留空"></label>
|
|
70
|
-
<label>model(必填) <input id="f-model" placeholder="deepseek-v4-flash"></label>
|
|
71
|
-
<label>apiUrl(选填,OpenAI 兼容接口;填了即用自定义端点) <input id="f-apiurl" placeholder="https://api.deepseek.com/v1"></label>
|
|
72
|
-
<label>apiKey(选填,配自定义 apiUrl 时必填) <input id="f-apikey" type="password" placeholder="sk-..."></label>
|
|
73
|
-
</fieldset>
|
|
74
|
-
<fieldset>
|
|
75
|
-
<legend>主动策略</legend>
|
|
76
|
-
<label class="row"><input id="f-proactive-enabled" type="checkbox" checked> 允许主动唤醒</label>
|
|
77
|
-
<label>每日主动唤醒上限 <input id="f-maxwake" type="number" min="0" max="50" value="5"></label>
|
|
78
|
-
<label>免打扰时段(HH:MM-HH:MM,逗号分隔,如 23:00-07:00) <input id="f-quiet" placeholder="23:00-07:00"></label>
|
|
79
|
-
<label>沉默归档(分钟) <input id="f-archive" type="number" min="0" value="45"></label>
|
|
80
|
-
<label>晚间问候时刻 <input id="f-evening" value="20:00"></label>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
<
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<
|
|
123
|
-
<
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Pygmalion 管理台</title>
|
|
7
|
+
<link rel="stylesheet" href="/style.css">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main>
|
|
11
|
+
<!-- 登录 / 注册 -->
|
|
12
|
+
<section id="auth-view" class="panel hidden">
|
|
13
|
+
<h1>Pygmalion 管理台</h1>
|
|
14
|
+
<p class="muted">登录你的账号管理角色。首次使用先注册。</p>
|
|
15
|
+
<form id="auth-form" class="stack">
|
|
16
|
+
<input id="auth-qq" type="text" inputmode="numeric" placeholder="QQ 号" autocomplete="username" required>
|
|
17
|
+
<input id="auth-pass" type="password" placeholder="密码(至少 6 位)" autocomplete="current-password" required>
|
|
18
|
+
<input id="auth-display" type="text" placeholder="昵称(选填,仅注册时)" class="hidden">
|
|
19
|
+
<button type="submit" id="auth-submit">登录</button>
|
|
20
|
+
</form>
|
|
21
|
+
<button id="auth-toggle" class="link-btn">没有账号?注册</button>
|
|
22
|
+
<p id="auth-error" class="error"></p>
|
|
23
|
+
</section>
|
|
24
|
+
|
|
25
|
+
<!-- 主界面 -->
|
|
26
|
+
<section id="app-view" class="hidden">
|
|
27
|
+
<header class="topbar">
|
|
28
|
+
<div>
|
|
29
|
+
<h1>Pygmalion 管理台</h1>
|
|
30
|
+
<p class="muted" id="me-label"></p>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="row">
|
|
33
|
+
<button id="btn-password" class="ghost">改密码</button>
|
|
34
|
+
<button id="btn-logout" class="ghost">退出</button>
|
|
35
|
+
</div>
|
|
36
|
+
</header>
|
|
37
|
+
|
|
38
|
+
<div id="status-bar" class="status-bar hidden"></div>
|
|
39
|
+
|
|
40
|
+
<!-- 角色列表 -->
|
|
41
|
+
<section class="card">
|
|
42
|
+
<div class="card-head">
|
|
43
|
+
<h2>我的角色</h2>
|
|
44
|
+
<button id="btn-new-role">+ 新建角色</button>
|
|
45
|
+
</div>
|
|
46
|
+
<div id="role-list" class="role-list"></div>
|
|
47
|
+
</section>
|
|
48
|
+
|
|
49
|
+
<!-- 新建 / 编辑角色 -->
|
|
50
|
+
<section id="editor-view" class="panel hidden">
|
|
51
|
+
<div class="card-head">
|
|
52
|
+
<h2 id="editor-title">新建角色</h2>
|
|
53
|
+
<button id="btn-close-editor" class="ghost">关闭</button>
|
|
54
|
+
</div>
|
|
55
|
+
<form id="role-form" class="stack">
|
|
56
|
+
<fieldset>
|
|
57
|
+
<legend>人设</legend>
|
|
58
|
+
<label>角色名 <input id="f-name" required></label>
|
|
59
|
+
<label>年龄 <input id="f-age"></label>
|
|
60
|
+
<label>头像提示(选填,如“长发”“黑猫”) <input id="f-avatar"></label>
|
|
61
|
+
<label>性格 <input id="f-personality"></label>
|
|
62
|
+
<label>背景故事 <textarea id="f-backstory" rows="3"></textarea></label>
|
|
63
|
+
<label>说话风格 <textarea id="f-speaking" rows="3"></textarea></label>
|
|
64
|
+
<label>与 ta 的关系 <textarea id="f-relationship" rows="2"></textarea></label>
|
|
65
|
+
<label>日程(HH:MM,每行一条,如 早安=08:00) <textarea id="f-schedule" rows="3" placeholder="早安=08:00 晚安=23:00"></textarea></label>
|
|
66
|
+
</fieldset>
|
|
67
|
+
<fieldset>
|
|
68
|
+
<legend>模型</legend>
|
|
69
|
+
<label>provider(留空则按 apiUrl 自动注册) <input id="f-provider" placeholder="opencode-go 或留空"></label>
|
|
70
|
+
<label>model(必填) <input id="f-model" placeholder="deepseek-v4-flash"></label>
|
|
71
|
+
<label>apiUrl(选填,OpenAI 兼容接口;填了即用自定义端点) <input id="f-apiurl" placeholder="https://api.deepseek.com/v1"></label>
|
|
72
|
+
<label>apiKey(选填,配自定义 apiUrl 时必填) <input id="f-apikey" type="password" placeholder="sk-..."></label>
|
|
73
|
+
</fieldset>
|
|
74
|
+
<fieldset>
|
|
75
|
+
<legend>主动策略</legend>
|
|
76
|
+
<label class="row"><input id="f-proactive-enabled" type="checkbox" checked> 允许主动唤醒</label>
|
|
77
|
+
<label>每日主动唤醒上限 <input id="f-maxwake" type="number" min="0" max="50" value="5"></label>
|
|
78
|
+
<label>免打扰时段(HH:MM-HH:MM,逗号分隔,如 23:00-07:00) <input id="f-quiet" placeholder="23:00-07:00"></label>
|
|
79
|
+
<label>沉默归档(分钟) <input id="f-archive" type="number" min="0" value="45"></label>
|
|
80
|
+
<label>晚间问候时刻 <input id="f-evening" value="20:00"></label>
|
|
81
|
+
<label class="row"><input id="f-meme-enabled" type="checkbox"> 周期收集表情包(默认关;开启后导演定期用搜索+视觉识别给 ta 更新表情包库)</label>
|
|
82
|
+
<label>表情包收集周期(天) <input id="f-meme-interval" type="number" min="1" value="7"></label>
|
|
83
|
+
<details class="muted">
|
|
84
|
+
<summary>subagent 视觉 API(表情包子代理专用;model 留空则自动)</summary>
|
|
85
|
+
<label>provider(route 名,留空自动) <input id="f-meme-vision-provider" placeholder="留空自动"></label>
|
|
86
|
+
<label>model(视觉模型 id) <input id="f-meme-vision-model" placeholder="deepseek-v4-flash-vision-exp"></label>
|
|
87
|
+
<label>apiUrl(选填,OpenAI 兼容端点) <input id="f-meme-vision-apiurl" placeholder="https://..."></label>
|
|
88
|
+
<label>apiKey(选填,配 apiUrl 时必填) <input id="f-meme-vision-apikey" type="password" placeholder="sk-..."></label>
|
|
89
|
+
</details>
|
|
90
|
+
</fieldset>
|
|
91
|
+
<div class="row">
|
|
92
|
+
<button type="submit" id="role-save">保存</button>
|
|
93
|
+
<span id="editor-error" class="error"></span>
|
|
94
|
+
</div>
|
|
95
|
+
</form>
|
|
96
|
+
|
|
97
|
+
<!-- QQ 机器人配置(角色创建后才可配置;AppSecret 不回显,留空=保持不变) -->
|
|
98
|
+
<form id="bot-form" class="stack hidden">
|
|
99
|
+
<fieldset>
|
|
100
|
+
<legend>QQ 机器人</legend>
|
|
101
|
+
<div class="muted" id="bot-status-line"></div>
|
|
102
|
+
<label>AppID <input id="f-appid" placeholder="QQ 开放平台机器人 AppID"></label>
|
|
103
|
+
<label>AppSecret <input id="f-appsecret" type="password" autocomplete="new-password" placeholder="已配置则留空保持不变"></label>
|
|
104
|
+
<label class="row"><input id="f-sandbox" type="checkbox" checked> 沙箱环境</label>
|
|
105
|
+
<label class="row"><input id="f-streaming" type="checkbox"> 流式回复</label>
|
|
106
|
+
<label>唤醒撞车窗口(分钟,最近互动后跳过主动唤醒) <input id="f-chatwindow" type="number" min="1" value="5"></label>
|
|
107
|
+
<div class="row">
|
|
108
|
+
<button type="submit">保存机器人</button>
|
|
109
|
+
<button type="button" id="btn-del-bot" class="ghost danger hidden">删除</button>
|
|
110
|
+
<span id="bot-error" class="error"></span>
|
|
111
|
+
</div>
|
|
112
|
+
</fieldset>
|
|
113
|
+
</form>
|
|
114
|
+
</section>
|
|
115
|
+
|
|
116
|
+
<!-- 脚本监管 -->
|
|
117
|
+
<section id="life-view" class="panel hidden">
|
|
118
|
+
<div class="card-head">
|
|
119
|
+
<h2>生活脚本监管 · <span id="life-role-name"></span></h2>
|
|
120
|
+
<button id="btn-close-life" class="ghost">关闭</button>
|
|
121
|
+
</div>
|
|
122
|
+
<h3>运行中脚本</h3>
|
|
123
|
+
<div id="life-running" class="log-list"></div>
|
|
124
|
+
<h3>脚本源码(点击脚本名查看)</h3>
|
|
125
|
+
<div id="life-scripts" class="log-list"></div>
|
|
126
|
+
<pre id="life-source" class="code hidden"></pre>
|
|
127
|
+
<h3>运行清单(.manifest.json)</h3>
|
|
128
|
+
<pre id="life-manifest" class="code"></pre>
|
|
129
|
+
<h3>运行日志(.logs/)</h3>
|
|
130
|
+
<div id="life-logs" class="log-list"></div>
|
|
131
|
+
<pre id="life-log-body" class="code hidden"></pre>
|
|
132
|
+
<h3>快照备份(.backup/)</h3>
|
|
133
|
+
<ul id="life-backups"></ul>
|
|
134
|
+
</section>
|
|
135
|
+
<!-- 表情包管理 -->
|
|
136
|
+
<section id="meme-view" class="panel hidden">
|
|
137
|
+
<div class="card-head">
|
|
138
|
+
<h2>表情包库 · <span id="meme-role-name"></span></h2>
|
|
139
|
+
<button id="btn-close-meme" class="ghost">关闭</button>
|
|
140
|
+
</div>
|
|
141
|
+
<p class="muted">表情包主要由导演(subagent_meme)搜索收集 + 视觉识别归类;这里可查看、批量导入、编辑元数据、删除。未归类(staging)的表情包在补全 内容/风格/适用语境 后会自动归类。</p>
|
|
142
|
+
<fieldset>
|
|
143
|
+
<legend>批量导入(选中的图片存入待归类区)</legend>
|
|
144
|
+
<div class="row">
|
|
145
|
+
<input id="meme-upload" type="file" accept="image/png,image/jpeg,image/webp,image/gif" multiple>
|
|
146
|
+
<button type="button" id="btn-meme-upload" class="ghost">上传</button>
|
|
147
|
+
<span id="meme-upload-msg" class="muted"></span>
|
|
148
|
+
</div>
|
|
149
|
+
</fieldset>
|
|
150
|
+
<h3>库内表情包</h3>
|
|
151
|
+
<div id="meme-grid" class="meme-grid"></div>
|
|
152
|
+
</section>
|
|
153
|
+
</section>
|
|
154
|
+
</main>
|
|
155
|
+
<script type="module" src="/app.js"></script>
|
|
156
|
+
</body>
|
|
157
|
+
</html>
|
package/src/web-public/style.css
CHANGED
|
@@ -1,44 +1,51 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--bg: #0f1115; --panel: #161a22; --card: #1b2130; --line: #2a3142;
|
|
3
|
-
--text: #e8eaf0; --muted: #8b93a7; --accent: #5b8cff; --danger: #e5534b;
|
|
4
|
-
--ok: #3fb950;
|
|
5
|
-
}
|
|
6
|
-
* { box-sizing: border-box; }
|
|
7
|
-
body { margin: 0; font: 14px/1.6 system-ui, "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
|
|
8
|
-
main { max-width: 860px; margin: 0 auto; padding: 24px 16px 80px; }
|
|
9
|
-
h1 { font-size: 20px; margin: 0; }
|
|
10
|
-
h2 { font-size: 16px; margin: 0; }
|
|
11
|
-
h3 { font-size: 13px; color: var(--muted); margin: 18px 0 6px; }
|
|
12
|
-
.hidden { display: none !important; }
|
|
13
|
-
.muted { color: var(--muted); font-size: 13px; }
|
|
14
|
-
.error { color: var(--danger); font-size: 13px; }
|
|
15
|
-
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 18px; }
|
|
16
|
-
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
|
|
17
|
-
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
|
|
18
|
-
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
|
19
|
-
.stack { display: flex; flex-direction: column; gap: 10px; }
|
|
20
|
-
input, textarea { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 8px 10px; font: inherit; width: 100%; }
|
|
21
|
-
textarea { resize: vertical; }
|
|
22
|
-
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 12px; }
|
|
23
|
-
legend { color: var(--muted); font-size: 12px; padding: 0 6px; }
|
|
24
|
-
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
|
|
25
|
-
button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 8px 16px; font: inherit; cursor: pointer; }
|
|
26
|
-
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
|
|
27
|
-
button.danger { color: var(--danger); }
|
|
28
|
-
button.link-btn { background: none; color: var(--accent); padding: 4px; }
|
|
29
|
-
button:disabled { opacity: .5; cursor: default; }
|
|
30
|
-
.tag { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1px 10px; font-size: 12px; color: var(--muted); }
|
|
31
|
-
.tag.ok { color: var(--ok); border-color: var(--ok); }
|
|
32
|
-
.role-list { display: flex; flex-direction: column; gap: 12px; }
|
|
33
|
-
.role-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
|
34
|
-
.role-main { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 2px; }
|
|
35
|
-
.role-actions { align-items: flex-end; }
|
|
36
|
-
.code { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow: auto; margin: 0; }
|
|
37
|
-
.log-list { display: flex; flex-direction: column; gap: 4px; }
|
|
38
|
-
.log-btn { background: var(--card); border: 1px solid var(--line); color: var(--text); text-align: left; font: 12px ui-monospace, monospace; padding: 6px 10px; border-radius: 6px; }
|
|
39
|
-
.log-btn:hover { border-color: var(--accent); }
|
|
40
|
-
.run-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--card); border: 1px solid var(--line); padding: 6px 10px; border-radius: 6px; }
|
|
41
|
-
.run-info { font: 12px ui-monospace, monospace; color: var(--text); }
|
|
42
|
-
.status-bar { background: var(--ok); color: #04140a; border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-size: 13px; }
|
|
43
|
-
.status-bar.error { background: var(--danger); color: #fff; }
|
|
44
|
-
ul { margin: 4px 0; padding-left: 20px; color: var(--muted); }
|
|
1
|
+
:root {
|
|
2
|
+
--bg: #0f1115; --panel: #161a22; --card: #1b2130; --line: #2a3142;
|
|
3
|
+
--text: #e8eaf0; --muted: #8b93a7; --accent: #5b8cff; --danger: #e5534b;
|
|
4
|
+
--ok: #3fb950;
|
|
5
|
+
}
|
|
6
|
+
* { box-sizing: border-box; }
|
|
7
|
+
body { margin: 0; font: 14px/1.6 system-ui, "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
|
|
8
|
+
main { max-width: 860px; margin: 0 auto; padding: 24px 16px 80px; }
|
|
9
|
+
h1 { font-size: 20px; margin: 0; }
|
|
10
|
+
h2 { font-size: 16px; margin: 0; }
|
|
11
|
+
h3 { font-size: 13px; color: var(--muted); margin: 18px 0 6px; }
|
|
12
|
+
.hidden { display: none !important; }
|
|
13
|
+
.muted { color: var(--muted); font-size: 13px; }
|
|
14
|
+
.error { color: var(--danger); font-size: 13px; }
|
|
15
|
+
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 18px; }
|
|
16
|
+
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
|
|
17
|
+
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
|
|
18
|
+
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
|
|
19
|
+
.stack { display: flex; flex-direction: column; gap: 10px; }
|
|
20
|
+
input, textarea { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 8px 10px; font: inherit; width: 100%; }
|
|
21
|
+
textarea { resize: vertical; }
|
|
22
|
+
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 0; padding: 12px; }
|
|
23
|
+
legend { color: var(--muted); font-size: 12px; padding: 0 6px; }
|
|
24
|
+
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
|
|
25
|
+
button { background: var(--accent); color: #fff; border: 0; border-radius: 6px; padding: 8px 16px; font: inherit; cursor: pointer; }
|
|
26
|
+
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
|
|
27
|
+
button.danger { color: var(--danger); }
|
|
28
|
+
button.link-btn { background: none; color: var(--accent); padding: 4px; }
|
|
29
|
+
button:disabled { opacity: .5; cursor: default; }
|
|
30
|
+
.tag { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1px 10px; font-size: 12px; color: var(--muted); }
|
|
31
|
+
.tag.ok { color: var(--ok); border-color: var(--ok); }
|
|
32
|
+
.role-list { display: flex; flex-direction: column; gap: 12px; }
|
|
33
|
+
.role-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
|
|
34
|
+
.role-main { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 2px; }
|
|
35
|
+
.role-actions { align-items: flex-end; }
|
|
36
|
+
.code { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font: 12px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow: auto; margin: 0; }
|
|
37
|
+
.log-list { display: flex; flex-direction: column; gap: 4px; }
|
|
38
|
+
.log-btn { background: var(--card); border: 1px solid var(--line); color: var(--text); text-align: left; font: 12px ui-monospace, monospace; padding: 6px 10px; border-radius: 6px; }
|
|
39
|
+
.log-btn:hover { border-color: var(--accent); }
|
|
40
|
+
.run-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--card); border: 1px solid var(--line); padding: 6px 10px; border-radius: 6px; }
|
|
41
|
+
.run-info { font: 12px ui-monospace, monospace; color: var(--text); }
|
|
42
|
+
.status-bar { background: var(--ok); color: #04140a; border-radius: 8px; padding: 8px 12px; margin-bottom: 14px; font-size: 13px; }
|
|
43
|
+
.status-bar.error { background: var(--danger); color: #fff; }
|
|
44
|
+
ul { margin: 4px 0; padding-left: 20px; color: var(--muted); }
|
|
45
|
+
/* 表情包 */
|
|
46
|
+
.meme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
|
|
47
|
+
.meme-card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
|
|
48
|
+
.meme-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #222; display: block; }
|
|
49
|
+
.meme-meta { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
|
|
50
|
+
.meme-meta label { font-size: 12px; }
|
|
51
|
+
.meme-meta input { font-size: 12px; padding: 5px 7px; }
|