Skip to content

Commit 8a4bf00

Browse files
Merge pull request #1 from berk-developer/claude/fix-merge-conflict-c3M3s
refactor: centralize EDITOR_LABELS and EDITOR_COLORS in editors/index.js
2 parents bf5919b + c6d3f43 commit 8a4bf00

3 files changed

Lines changed: 42 additions & 58 deletions

File tree

editors/index.js

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,44 @@ const copilot = require('./copilot');
1111
const cursorAgent = require('./cursor-agent');
1212
const commandcode = require('./commandcode');
1313

14+
const EDITOR_COLORS = {
15+
'cursor': '#f59e0b',
16+
'windsurf': '#06b6d4',
17+
'windsurf-next': '#22d3ee',
18+
'antigravity': '#a78bfa',
19+
'claude-code': '#f97316',
20+
'claude': '#f97316',
21+
'vscode': '#3b82f6',
22+
'vscode-insiders': '#60a5fa',
23+
'zed': '#10b981',
24+
'opencode': '#ec4899',
25+
'codex': '#0f766e',
26+
'gemini-cli': '#4285f4',
27+
'kimi-cli': '#84cc16',
28+
'copilot-cli': '#8957e5',
29+
'cursor-agent': '#f59e0b',
30+
'commandcode': '#e11d48',
31+
};
32+
33+
const EDITOR_LABELS = {
34+
'cursor': 'Cursor',
35+
'windsurf': 'Windsurf',
36+
'windsurf-next': 'Windsurf Next',
37+
'antigravity': 'Antigravity',
38+
'claude-code': 'Claude Code',
39+
'claude': 'Claude Code',
40+
'vscode': 'VS Code',
41+
'vscode-insiders': 'VS Code Insiders',
42+
'zed': 'Zed',
43+
'opencode': 'OpenCode',
44+
'codex': 'Codex',
45+
'gemini-cli': 'Gemini CLI',
46+
'kimi-cli': 'Kimi CLI',
47+
'copilot-cli': 'Copilot CLI',
48+
'cursor-agent': 'Cursor Agent',
49+
'commandcode': 'Command Code',
50+
};
51+
1452
const editors = [cursor, windsurf, claude, vscode, zed, opencode, codex, gemini, kimi, copilot, cursorAgent, commandcode];
1553

1654
/**
@@ -53,4 +91,4 @@ function resetCaches() {
5391
}
5492
}
5593

56-
module.exports = { getAllChats, getMessages, editors, resetCaches };
94+
module.exports = { getAllChats, getMessages, editors, resetCaches, EDITOR_LABELS, EDITOR_COLORS };

relay-client.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,10 @@ const readline = require('readline');
44
const crypto = require('crypto');
55

66
const cache = require('./cache');
7+
const { EDITOR_LABELS } = require('./editors');
78

89
const SYNC_INTERVAL_MS = 30000; // 30 seconds
910

10-
const EDITOR_LABELS = {
11-
'cursor': 'Cursor',
12-
'windsurf': 'Windsurf',
13-
'windsurf-next': 'Windsurf Next',
14-
'antigravity': 'Antigravity',
15-
'claude-code': 'Claude Code',
16-
'claude': 'Claude Code',
17-
'vscode': 'VS Code',
18-
'vscode-insiders': 'VS Code Insiders',
19-
'zed': 'Zed',
20-
'opencode': 'OpenCode',
21-
'codex': 'Codex CLI',
22-
'gemini-cli': 'Gemini CLI',
23-
'kimi-cli': 'Kimi CLI',
24-
'copilot-cli': 'Copilot CLI',
25-
'cursor-agent': 'Cursor (Background Agent)',
26-
'commandcode': 'CommandCode',
27-
};
28-
2911
/**
3012
* Interactive project picker using readline (no external deps beyond Node built-ins).
3113
* Returns an array of selected folder paths.

share-image.js

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Accepts an `opts` object to toggle sections on/off.
44
*/
55

6+
const { EDITOR_LABELS, EDITOR_COLORS } = require('./editors');
7+
68
function fmt(n) {
79
if (n == null) return '0';
810
if (n >= 1_000_000) return (n / 1_000_000).toFixed(1) + 'M';
@@ -18,44 +20,6 @@ function fmtCost(n) {
1820
return '$' + n.toFixed(2);
1921
}
2022

21-
const EDITOR_COLORS = {
22-
'cursor': '#f59e0b',
23-
'windsurf': '#06b6d4',
24-
'windsurf-next': '#22d3ee',
25-
'antigravity': '#a78bfa',
26-
'claude-code': '#f97316',
27-
'claude': '#f97316',
28-
'vscode': '#3b82f6',
29-
'vscode-insiders': '#60a5fa',
30-
'zed': '#10b981',
31-
'opencode': '#ec4899',
32-
'codex': '#0f766e',
33-
'gemini-cli': '#4285f4',
34-
'kimi-cli': '#84cc16',
35-
'copilot-cli': '#8957e5',
36-
'cursor-agent': '#f59e0b',
37-
'commandcode': '#e11d48',
38-
};
39-
40-
const EDITOR_LABELS = {
41-
'cursor': 'Cursor',
42-
'windsurf': 'Windsurf',
43-
'windsurf-next': 'WS Next',
44-
'antigravity': 'Antigravity',
45-
'claude-code': 'Claude Code',
46-
'claude': 'Claude Code',
47-
'vscode': 'VS Code',
48-
'vscode-insiders': 'VS Code Ins.',
49-
'zed': 'Zed',
50-
'opencode': 'OpenCode',
51-
'codex': 'Codex',
52-
'gemini-cli': 'Gemini CLI',
53-
'kimi-cli': 'Kimi CLI',
54-
'copilot-cli': 'Copilot CLI',
55-
'cursor-agent': 'Cursor Agent',
56-
'commandcode': 'Cmd Code',
57-
};
58-
5923
/**
6024
* @param {object} overview — from getCachedOverview()
6125
* @param {object} stats — from getCachedDashboardStats()

0 commit comments

Comments
 (0)