codexmate 0.0.14 → 0.0.16

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.
@@ -0,0 +1,123 @@
1
+ export const PROVIDER_CONFIG_MODE_META = Object.freeze({
2
+ codex: Object.freeze({
3
+ label: 'Codex',
4
+ modelPlaceholder: '例如: gpt-5.3-codex',
5
+ statusConfigLabel: 'Codex 提供商',
6
+ statusModelLabel: 'Codex 模型'
7
+ })
8
+ });
9
+
10
+ export const CONFIG_MODE_SET = new Set([
11
+ ...Object.keys(PROVIDER_CONFIG_MODE_META),
12
+ 'claude',
13
+ 'openclaw'
14
+ ]);
15
+
16
+ export function getProviderConfigModeMeta(mode) {
17
+ return PROVIDER_CONFIG_MODE_META[mode] || null;
18
+ }
19
+
20
+ export function createConfigModeComputed() {
21
+ return {
22
+ isProviderConfigMode() {
23
+ return !!getProviderConfigModeMeta(this.configMode);
24
+ },
25
+ isCodexConfigMode() {
26
+ return this.configMode === 'codex';
27
+ },
28
+ activeProviderModeMeta() {
29
+ return getProviderConfigModeMeta(this.configMode) || PROVIDER_CONFIG_MODE_META.codex;
30
+ },
31
+ activeProviderModeLabel() {
32
+ return this.activeProviderModeMeta.label;
33
+ },
34
+ activeProviderModelPlaceholder() {
35
+ return this.activeProviderModeMeta.modelPlaceholder;
36
+ },
37
+ activeProviderConfigChipLabel() {
38
+ return this.activeProviderModeMeta.statusConfigLabel;
39
+ },
40
+ activeProviderModelChipLabel() {
41
+ return this.activeProviderModeMeta.statusModelLabel;
42
+ },
43
+ activeProviderBridgeHint() {
44
+ if (!this.isProviderConfigMode || this.isCodexConfigMode) {
45
+ return '';
46
+ }
47
+ return `${this.activeProviderModeLabel} 当前复用 Codex Provider / Model 管理链路。`;
48
+ },
49
+ inspectorMainTabLabel() {
50
+ if (this.mainTab === 'config') return '配置中心';
51
+ if (this.mainTab === 'sessions') return '会话浏览';
52
+ if (this.mainTab === 'settings') return '设置';
53
+ return '未知';
54
+ },
55
+ inspectorConfigModeLabel() {
56
+ if (this.mainTab !== 'config') return '--';
57
+ const providerMeta = getProviderConfigModeMeta(this.configMode);
58
+ if (providerMeta) return providerMeta.label;
59
+ if (this.configMode === 'claude') return 'Claude Code';
60
+ if (this.configMode === 'openclaw') return 'OpenClaw';
61
+ return '未选择';
62
+ },
63
+ inspectorCurrentConfigLabel() {
64
+ if (this.mainTab !== 'config') return '--';
65
+ if (getProviderConfigModeMeta(this.configMode)) {
66
+ const provider = typeof this.currentProvider === 'string' ? this.currentProvider.trim() : '';
67
+ return provider || '未选择';
68
+ }
69
+ if (this.configMode === 'claude') {
70
+ const config = typeof this.currentClaudeConfig === 'string' ? this.currentClaudeConfig.trim() : '';
71
+ return config || '未选择';
72
+ }
73
+ if (this.configMode === 'openclaw') {
74
+ const openclaw = typeof this.currentOpenclawConfig === 'string' ? this.currentOpenclawConfig.trim() : '';
75
+ return openclaw || '未选择';
76
+ }
77
+ return '未选择';
78
+ },
79
+ inspectorCurrentModelLabel() {
80
+ if (this.mainTab !== 'config') return '--';
81
+ if (getProviderConfigModeMeta(this.configMode)) {
82
+ const model = typeof this.currentModel === 'string' ? this.currentModel.trim() : '';
83
+ return model || '未选择';
84
+ }
85
+ if (this.configMode === 'claude') {
86
+ const model = typeof this.currentClaudeModel === 'string' ? this.currentClaudeModel.trim() : '';
87
+ return model || '未选择';
88
+ }
89
+ if (this.configMode === 'openclaw') {
90
+ const model = this.openclawStructured && typeof this.openclawStructured.agentPrimary === 'string'
91
+ ? this.openclawStructured.agentPrimary.trim()
92
+ : '';
93
+ return model || '按配置文件';
94
+ }
95
+ return '未选择';
96
+ },
97
+ inspectorTemplateStatus() {
98
+ if (this.mainTab !== 'config') return '--';
99
+ if (this.configMode === 'codex') {
100
+ if (this.configTemplateApplying || this.codexApplying) {
101
+ return '模板应用中';
102
+ }
103
+ return '模板可编辑(手动确认应用)';
104
+ }
105
+ if (getProviderConfigModeMeta(this.configMode)) {
106
+ if (this.codexApplying) {
107
+ return 'Provider / Model 应用中';
108
+ }
109
+ return '复用 Codex Provider / Model';
110
+ }
111
+ if (this.configMode === 'claude') {
112
+ return '即时写入 Claude settings';
113
+ }
114
+ if (this.configMode === 'openclaw') {
115
+ if (this.openclawApplying || this.openclawSaving) {
116
+ return 'OpenClaw 保存/应用中';
117
+ }
118
+ return 'JSON5 可保存并应用';
119
+ }
120
+ return '未选择';
121
+ }
122
+ };
123
+ }
@@ -0,0 +1,82 @@
1
+ export function createSkillsComputed() {
2
+ return {
3
+ filteredSkillsList() {
4
+ const list = Array.isArray(this.skillsList) ? this.skillsList : [];
5
+ const keyword = typeof this.skillsKeyword === 'string' ? this.skillsKeyword.trim().toLowerCase() : '';
6
+ const status = typeof this.skillsStatusFilter === 'string' ? this.skillsStatusFilter : 'all';
7
+ return list.filter((item) => {
8
+ const safe = item && typeof item === 'object' ? item : {};
9
+ const hasSkillFile = !!safe.hasSkillFile;
10
+ if (status === 'with-skill-file' && !hasSkillFile) return false;
11
+ if (status === 'missing-skill-file' && hasSkillFile) return false;
12
+ if (!keyword) return true;
13
+ const fields = [
14
+ safe.name,
15
+ safe.displayName,
16
+ safe.description,
17
+ safe.path
18
+ ];
19
+ return fields.some((value) => typeof value === 'string' && value.toLowerCase().includes(keyword));
20
+ });
21
+ },
22
+ skillsSelectableNames() {
23
+ const list = Array.isArray(this.filteredSkillsList) ? this.filteredSkillsList : [];
24
+ return list
25
+ .map((item) => (item && typeof item.name === 'string' ? item.name.trim() : ''))
26
+ .filter(Boolean);
27
+ },
28
+ skillsConfiguredCount() {
29
+ const list = Array.isArray(this.skillsList) ? this.skillsList : [];
30
+ return list.filter((item) => !!(item && item.hasSkillFile)).length;
31
+ },
32
+ skillsMissingSkillFileCount() {
33
+ const list = Array.isArray(this.skillsList) ? this.skillsList : [];
34
+ return list.filter((item) => !(item && item.hasSkillFile)).length;
35
+ },
36
+ skillsFilterDirty() {
37
+ const keyword = typeof this.skillsKeyword === 'string' ? this.skillsKeyword.trim() : '';
38
+ const status = typeof this.skillsStatusFilter === 'string' ? this.skillsStatusFilter : 'all';
39
+ return keyword.length > 0 || status !== 'all';
40
+ },
41
+ skillsSelectedCount() {
42
+ const selected = Array.isArray(this.skillsSelectedNames) ? this.skillsSelectedNames : [];
43
+ return Array.from(new Set(selected.map((item) => String(item || '').trim()).filter(Boolean))).length;
44
+ },
45
+ skillsVisibleSelectedCount() {
46
+ const selectable = this.skillsSelectableNames;
47
+ const selectedSet = new Set(Array.isArray(this.skillsSelectedNames) ? this.skillsSelectedNames : []);
48
+ return selectable.filter((name) => selectedSet.has(name)).length;
49
+ },
50
+ skillsAllSelected() {
51
+ const selectable = this.skillsSelectableNames;
52
+ if (!selectable.length) return false;
53
+ const selectedSet = new Set(Array.isArray(this.skillsSelectedNames) ? this.skillsSelectedNames : []);
54
+ return selectable.every((name) => selectedSet.has(name));
55
+ },
56
+ skillsImportSelectableKeys() {
57
+ const list = Array.isArray(this.skillsImportList) ? this.skillsImportList : [];
58
+ return list
59
+ .map((item) => this.buildSkillImportKey(item))
60
+ .filter(Boolean);
61
+ },
62
+ skillsImportSelectedCount() {
63
+ const selectable = this.skillsImportSelectableKeys;
64
+ const selectedSet = new Set(Array.isArray(this.skillsImportSelectedKeys) ? this.skillsImportSelectedKeys : []);
65
+ return selectable.filter((key) => selectedSet.has(key)).length;
66
+ },
67
+ skillsImportAllSelected() {
68
+ const selectable = this.skillsImportSelectableKeys;
69
+ if (!selectable.length) return false;
70
+ const selectedSet = new Set(Array.isArray(this.skillsImportSelectedKeys) ? this.skillsImportSelectedKeys : []);
71
+ return selectable.every((key) => selectedSet.has(key));
72
+ },
73
+ skillsImportConfiguredCount() {
74
+ const list = Array.isArray(this.skillsImportList) ? this.skillsImportList : [];
75
+ return list.filter((item) => !!(item && item.hasSkillFile)).length;
76
+ },
77
+ skillsImportMissingSkillFileCount() {
78
+ const list = Array.isArray(this.skillsImportList) ? this.skillsImportList : [];
79
+ return list.filter((item) => !(item && item.hasSkillFile)).length;
80
+ }
81
+ };
82
+ }
@@ -0,0 +1,344 @@
1
+ export function createSkillsMethods({ api }) {
2
+ return {
3
+ async openSkillsManager() {
4
+ this.skillsSelectedNames = [];
5
+ this.skillsKeyword = '';
6
+ this.skillsStatusFilter = 'all';
7
+ this.skillsImportList = [];
8
+ this.skillsImportSelectedKeys = [];
9
+ this.showSkillsModal = true;
10
+ await this.refreshSkillsList({ silent: false });
11
+ },
12
+
13
+ closeSkillsModal() {
14
+ const busy = !!(
15
+ this.skillsLoading
16
+ || this.skillsDeleting
17
+ || this.skillsScanningImports
18
+ || this.skillsImporting
19
+ || this.skillsZipImporting
20
+ || this.skillsExporting
21
+ );
22
+ if (busy) return;
23
+ this.showSkillsModal = false;
24
+ this.skillsSelectedNames = [];
25
+ this.skillsImportSelectedKeys = [];
26
+ },
27
+
28
+ async refreshSkillsList(options = {}) {
29
+ this.skillsLoading = true;
30
+ try {
31
+ const res = await api('list-codex-skills');
32
+ if (res.error) {
33
+ this.skillsRootPath = '';
34
+ this.skillsList = [];
35
+ this.skillsSelectedNames = [];
36
+ this.showMessage(res.error, 'error');
37
+ return;
38
+ }
39
+ const exists = res.exists !== false;
40
+ if (!exists) {
41
+ this.skillsRootPath = '';
42
+ this.skillsList = [];
43
+ this.skillsSelectedNames = [];
44
+ if (!options.silent) {
45
+ this.showMessage('skills 目录不存在,已按空列表显示', 'info');
46
+ }
47
+ return;
48
+ }
49
+ this.skillsRootPath = res.root || '';
50
+ this.skillsList = Array.isArray(res.items) ? res.items : [];
51
+ const currentNames = new Set((Array.isArray(this.skillsList) ? this.skillsList : [])
52
+ .map((item) => (item && typeof item.name === 'string' ? item.name.trim() : ''))
53
+ .filter(Boolean));
54
+ this.skillsSelectedNames = (Array.isArray(this.skillsSelectedNames) ? this.skillsSelectedNames : [])
55
+ .filter((name) => currentNames.has(name));
56
+ } catch (e) {
57
+ this.skillsRootPath = '';
58
+ this.skillsList = [];
59
+ this.skillsSelectedNames = [];
60
+ this.showMessage('加载 skills 失败', 'error');
61
+ } finally {
62
+ this.skillsLoading = false;
63
+ }
64
+ },
65
+
66
+ resetSkillsFilters() {
67
+ this.skillsKeyword = '';
68
+ this.skillsStatusFilter = 'all';
69
+ },
70
+
71
+ toggleAllSkillsSelection() {
72
+ const selectable = this.skillsSelectableNames;
73
+ if (this.skillsAllSelected) {
74
+ const selectedSet = new Set(Array.isArray(this.skillsSelectedNames) ? this.skillsSelectedNames : []);
75
+ selectable.forEach((name) => selectedSet.delete(name));
76
+ this.skillsSelectedNames = Array.from(selectedSet);
77
+ return;
78
+ }
79
+ const selectedSet = new Set(Array.isArray(this.skillsSelectedNames) ? this.skillsSelectedNames : []);
80
+ selectable.forEach((name) => selectedSet.add(name));
81
+ this.skillsSelectedNames = Array.from(selectedSet);
82
+ },
83
+
84
+ buildSkillImportKey(item) {
85
+ const safe = item && typeof item === 'object' ? item : {};
86
+ const sourceApp = typeof safe.sourceApp === 'string' ? safe.sourceApp.trim().toLowerCase() : '';
87
+ const name = typeof safe.name === 'string' ? safe.name.trim() : '';
88
+ if (!sourceApp || !name) return '';
89
+ return `${sourceApp}:${name}`;
90
+ },
91
+
92
+ toggleAllSkillsImportSelection() {
93
+ const selectable = this.skillsImportSelectableKeys;
94
+ if (this.skillsImportAllSelected) {
95
+ this.skillsImportSelectedKeys = [];
96
+ return;
97
+ }
98
+ this.skillsImportSelectedKeys = [...selectable];
99
+ },
100
+
101
+ async scanImportableSkills(options = {}) {
102
+ if (this.skillsScanningImports || this.skillsImporting || this.skillsZipImporting || this.skillsExporting) return;
103
+ const silent = !!(options && options.silent);
104
+ this.skillsScanningImports = true;
105
+ try {
106
+ const res = await api('scan-unmanaged-codex-skills');
107
+ if (res.error) {
108
+ this.skillsImportList = [];
109
+ this.skillsImportSelectedKeys = [];
110
+ if (!silent) {
111
+ this.showMessage(res.error, 'error');
112
+ }
113
+ return;
114
+ }
115
+ this.skillsImportList = Array.isArray(res.items) ? res.items : [];
116
+ const availableKeys = new Set(this.skillsImportSelectableKeys);
117
+ this.skillsImportSelectedKeys = (Array.isArray(this.skillsImportSelectedKeys) ? this.skillsImportSelectedKeys : [])
118
+ .filter((key) => availableKeys.has(key));
119
+ if (!silent && this.skillsImportList.length === 0) {
120
+ this.showMessage('未扫描到可导入 skill', 'info');
121
+ } else if (!silent) {
122
+ this.showMessage(`扫描到 ${this.skillsImportList.length} 个可导入 skill`, 'success');
123
+ }
124
+ } catch (e) {
125
+ this.skillsImportList = [];
126
+ this.skillsImportSelectedKeys = [];
127
+ if (!silent) {
128
+ this.showMessage('扫描可导入 skill 失败', 'error');
129
+ }
130
+ } finally {
131
+ this.skillsScanningImports = false;
132
+ }
133
+ },
134
+
135
+ async importSelectedSkills() {
136
+ if (this.skillsImporting || this.skillsZipImporting || this.skillsExporting) return;
137
+ const selectedSet = new Set(Array.isArray(this.skillsImportSelectedKeys) ? this.skillsImportSelectedKeys : []);
138
+ const selectedItems = (Array.isArray(this.skillsImportList) ? this.skillsImportList : [])
139
+ .filter((item) => selectedSet.has(this.buildSkillImportKey(item)))
140
+ .map((item) => ({
141
+ name: item.name,
142
+ sourceApp: item.sourceApp
143
+ }));
144
+ if (!selectedItems.length) {
145
+ this.showMessage('请先选择要导入的 skill', 'error');
146
+ return;
147
+ }
148
+
149
+ this.skillsImporting = true;
150
+ try {
151
+ const res = await api('import-codex-skills', { items: selectedItems });
152
+ if (res.error) {
153
+ this.showMessage(res.error, 'error');
154
+ return;
155
+ }
156
+ const importedCount = Array.isArray(res.imported) ? res.imported.length : 0;
157
+ const failedCount = Array.isArray(res.failed) ? res.failed.length : 0;
158
+ if (failedCount > 0 && importedCount > 0) {
159
+ this.showMessage(`已导入 ${importedCount} 个,失败 ${failedCount} 个`, 'error');
160
+ } else if (failedCount > 0) {
161
+ const first = res.failed[0] && res.failed[0].error ? res.failed[0].error : '导入失败';
162
+ this.showMessage(first, 'error');
163
+ } else {
164
+ this.showMessage(`已导入 ${importedCount} 个 skill`, 'success');
165
+ }
166
+ await this.refreshSkillsList({ silent: true });
167
+ } catch (e) {
168
+ this.showMessage('导入 skill 失败', 'error');
169
+ } finally {
170
+ this.skillsImporting = false;
171
+ await this.scanImportableSkills({ silent: true });
172
+ }
173
+ },
174
+
175
+ triggerSkillsZipImport() {
176
+ const input = this.$refs.skillsZipImportInput;
177
+ if (input) {
178
+ input.value = '';
179
+ input.click();
180
+ }
181
+ },
182
+
183
+ handleSkillsZipImportChange(event) {
184
+ const file = event && event.target && event.target.files ? event.target.files[0] : null;
185
+ if (file) {
186
+ void this.importSkillsFromZipFile(file);
187
+ }
188
+ },
189
+
190
+ resetSkillsZipImportInput() {
191
+ const el = this.$refs.skillsZipImportInput;
192
+ if (el) {
193
+ el.value = '';
194
+ }
195
+ },
196
+
197
+ async uploadSkillsZipStream(file) {
198
+ const fileName = (file && typeof file.name === 'string' && file.name.trim())
199
+ ? file.name.trim()
200
+ : 'codex-skills.zip';
201
+ const response = await fetch('/api/import-codex-skills-zip', {
202
+ method: 'POST',
203
+ headers: {
204
+ 'x-codexmate-file-name': encodeURIComponent(fileName)
205
+ },
206
+ body: file
207
+ });
208
+ let payload = {};
209
+ try {
210
+ payload = await response.json();
211
+ } catch (_) {
212
+ payload = {
213
+ error: response.ok
214
+ ? 'ZIP 导入响应无效'
215
+ : `上传失败(HTTP ${response.status})`
216
+ };
217
+ }
218
+ if (!response.ok && !payload.error) {
219
+ payload.error = `上传失败(HTTP ${response.status})`;
220
+ }
221
+ return payload;
222
+ },
223
+
224
+ async importSkillsFromZipFile(file) {
225
+ if (this.skillsZipImporting || this.skillsImporting || this.skillsExporting) return;
226
+ const maxSize = 20 * 1024 * 1024;
227
+ if (file.size > maxSize) {
228
+ this.showMessage('ZIP 文件过大,限制 20MB', 'error');
229
+ this.resetSkillsZipImportInput();
230
+ return;
231
+ }
232
+ this.skillsZipImporting = true;
233
+ try {
234
+ const res = await this.uploadSkillsZipStream(file);
235
+ if (res && res.error) {
236
+ this.showMessage(res.error, 'error');
237
+ return;
238
+ }
239
+ const importedCount = Array.isArray(res && res.imported) ? res.imported.length : 0;
240
+ const failedCount = Array.isArray(res && res.failed) ? res.failed.length : 0;
241
+ if (failedCount > 0 && importedCount > 0) {
242
+ this.showMessage(`已导入 ${importedCount} 个,失败 ${failedCount} 个`, 'error');
243
+ } else if (failedCount > 0) {
244
+ const first = res.failed[0] && res.failed[0].error ? res.failed[0].error : '导入失败';
245
+ this.showMessage(first, 'error');
246
+ } else {
247
+ this.showMessage(`已导入 ${importedCount} 个 skill`, 'success');
248
+ }
249
+ await this.refreshSkillsList({ silent: true });
250
+ } catch (e) {
251
+ this.showMessage('ZIP 导入失败', 'error');
252
+ } finally {
253
+ this.skillsZipImporting = false;
254
+ this.resetSkillsZipImportInput();
255
+ await this.scanImportableSkills({ silent: true });
256
+ }
257
+ },
258
+
259
+ async exportSelectedSkills() {
260
+ if (this.skillsExporting || this.skillsZipImporting || this.skillsImporting) return;
261
+ const selected = Array.isArray(this.skillsSelectedNames)
262
+ ? Array.from(new Set(this.skillsSelectedNames.map((item) => String(item || '').trim()).filter(Boolean)))
263
+ : [];
264
+ if (!selected.length) {
265
+ this.showMessage('请先选择要导出的 skill', 'error');
266
+ return;
267
+ }
268
+ this.skillsExporting = true;
269
+ try {
270
+ const res = await api('export-codex-skills', { names: selected });
271
+ if (res && res.error) {
272
+ this.showMessage(res.error, 'error');
273
+ return;
274
+ }
275
+ if (!res || !res.fileName) {
276
+ this.showMessage('导出失败:未生成压缩包', 'error');
277
+ return;
278
+ }
279
+ const exportedCount = Array.isArray(res.exported) ? res.exported.length : 0;
280
+ const failedCount = Array.isArray(res.failed) ? res.failed.length : 0;
281
+ const downloadUrl = typeof res.downloadPath === 'string' && res.downloadPath.trim()
282
+ ? res.downloadPath.trim()
283
+ : `/download/${encodeURIComponent(res.fileName)}`;
284
+ const link = document.createElement('a');
285
+ link.href = downloadUrl;
286
+ link.download = res.fileName;
287
+ document.body.appendChild(link);
288
+ link.click();
289
+ document.body.removeChild(link);
290
+ if (failedCount > 0) {
291
+ this.showMessage(`已导出 ${exportedCount} 个,失败 ${failedCount} 个`, 'error');
292
+ } else {
293
+ this.showMessage(`已导出 ${exportedCount} 个 skill`, 'success');
294
+ }
295
+ } catch (e) {
296
+ this.showMessage('导出 skill 失败', 'error');
297
+ } finally {
298
+ this.skillsExporting = false;
299
+ }
300
+ },
301
+
302
+ async deleteSelectedSkills() {
303
+ if (this.skillsDeleting || this.skillsZipImporting || this.skillsExporting || this.skillsImporting) return;
304
+ const selected = Array.isArray(this.skillsSelectedNames)
305
+ ? Array.from(new Set(this.skillsSelectedNames.map((item) => String(item || '').trim()).filter(Boolean)))
306
+ : [];
307
+ if (!selected.length) {
308
+ this.showMessage('请先选择要删除的 skill', 'error');
309
+ return;
310
+ }
311
+ const confirmed = window.confirm(`确认删除 ${selected.length} 个 skill 吗?此操作不可撤销。`);
312
+ if (!confirmed) {
313
+ return;
314
+ }
315
+
316
+ this.skillsDeleting = true;
317
+ try {
318
+ const res = await api('delete-codex-skills', { names: selected });
319
+ if (res.error) {
320
+ this.showMessage(res.error, 'error');
321
+ return;
322
+ }
323
+
324
+ const deletedCount = Array.isArray(res.deleted) ? res.deleted.length : 0;
325
+ const failedList = Array.isArray(res.failed) ? res.failed : [];
326
+ const failedCount = failedList.length;
327
+ if (failedCount > 0 && deletedCount > 0) {
328
+ this.showMessage(`已删除 ${deletedCount} 个,失败 ${failedCount} 个`, 'error');
329
+ } else if (failedCount > 0) {
330
+ const first = failedList[0] && failedList[0].error ? failedList[0].error : '删除失败';
331
+ this.showMessage(first, 'error');
332
+ } else {
333
+ this.showMessage(`已删除 ${deletedCount} 个 skill`, 'success');
334
+ }
335
+ await this.refreshSkillsList({ silent: true });
336
+ } catch (e) {
337
+ this.showMessage('删除 skill 失败', 'error');
338
+ } finally {
339
+ this.skillsDeleting = false;
340
+ await this.scanImportableSkills({ silent: true });
341
+ }
342
+ }
343
+ };
344
+ }
package/web-ui/styles.css CHANGED
@@ -1,4 +1,4 @@
1
- @import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Source+Sans+3:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');
1
+ @import url('https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500&family=JetBrains+Mono:wght@400;500&family=Source+Sans+3:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');
2
2
 
3
3
  /* ============================================
4
4
  设计系统 - Design Tokens
@@ -32,9 +32,9 @@
32
32
  linear-gradient(135deg, #F8F2EA 0%, #F1E4D8 44%, #F8F2EA 100%);
33
33
 
34
34
  /* 字体系统 */
35
- --font-family-body: 'Source Sans 3', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
36
- --font-family-display: 'Space Grotesk', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
37
- --font-family-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
35
+ --font-family-body: 'JetBrainsMono Nerd Font Mono', 'OPPO Sans 4.0', 'Fira Mono', 'JetBrains Mono', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', monospace;
36
+ --font-family-display: 'JetBrainsMono Nerd Font Mono', 'OPPO Sans 4.0', 'Fira Mono', 'JetBrains Mono', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', monospace;
37
+ --font-family-mono: 'JetBrainsMono Nerd Font Mono', 'OPPO Sans 4.0', 'Fira Mono', 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
38
38
  --font-family: var(--font-family-body);
39
39
 
40
40
  --font-size-display: 52px;