Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion editors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,44 @@ const copilot = require('./copilot');
const cursorAgent = require('./cursor-agent');
const commandcode = require('./commandcode');

const EDITOR_COLORS = {
'cursor': '#f59e0b',
'windsurf': '#06b6d4',
'windsurf-next': '#22d3ee',
'antigravity': '#a78bfa',
'claude-code': '#f97316',
'claude': '#f97316',
'vscode': '#3b82f6',
'vscode-insiders': '#60a5fa',
'zed': '#10b981',
'opencode': '#ec4899',
'codex': '#0f766e',
'gemini-cli': '#4285f4',
'kimi-cli': '#84cc16',
'copilot-cli': '#8957e5',
'cursor-agent': '#f59e0b',
'commandcode': '#e11d48',
};

const EDITOR_LABELS = {
'cursor': 'Cursor',
'windsurf': 'Windsurf',
'windsurf-next': 'Windsurf Next',
'antigravity': 'Antigravity',
'claude-code': 'Claude Code',
'claude': 'Claude Code',
'vscode': 'VS Code',
'vscode-insiders': 'VS Code Insiders',
'zed': 'Zed',
'opencode': 'OpenCode',
'codex': 'Codex',
'gemini-cli': 'Gemini CLI',
'kimi-cli': 'Kimi CLI',
'copilot-cli': 'Copilot CLI',
'cursor-agent': 'Cursor Agent',
'commandcode': 'Command Code',
};

const editors = [cursor, windsurf, claude, vscode, zed, opencode, codex, gemini, kimi, copilot, cursorAgent, commandcode];

/**
Expand Down Expand Up @@ -53,4 +91,4 @@ function resetCaches() {
}
}

module.exports = { getAllChats, getMessages, editors, resetCaches };
module.exports = { getAllChats, getMessages, editors, resetCaches, EDITOR_LABELS, EDITOR_COLORS };
20 changes: 1 addition & 19 deletions relay-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,10 @@ const readline = require('readline');
const crypto = require('crypto');

const cache = require('./cache');
const { EDITOR_LABELS } = require('./editors');

const SYNC_INTERVAL_MS = 30000; // 30 seconds

const EDITOR_LABELS = {
'cursor': 'Cursor',
'windsurf': 'Windsurf',
'windsurf-next': 'Windsurf Next',
'antigravity': 'Antigravity',
'claude-code': 'Claude Code',
'claude': 'Claude Code',
'vscode': 'VS Code',
'vscode-insiders': 'VS Code Insiders',
'zed': 'Zed',
'opencode': 'OpenCode',
'codex': 'Codex CLI',
'gemini-cli': 'Gemini CLI',
'kimi-cli': 'Kimi CLI',
'copilot-cli': 'Copilot CLI',
'cursor-agent': 'Cursor (Background Agent)',
'commandcode': 'CommandCode',
};

/**
* Interactive project picker using readline (no external deps beyond Node built-ins).
* Returns an array of selected folder paths.
Expand Down
40 changes: 2 additions & 38 deletions share-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
* Accepts an `opts` object to toggle sections on/off.
*/

const { EDITOR_LABELS, EDITOR_COLORS } = require('./editors');

function fmt(n) {
if (n == null) return '0';
if (n >= 1_000_000) return (n / 1_000_000).toFixed(1) + 'M';
Expand All @@ -18,44 +20,6 @@ function fmtCost(n) {
return '$' + n.toFixed(2);
}

const EDITOR_COLORS = {
'cursor': '#f59e0b',
'windsurf': '#06b6d4',
'windsurf-next': '#22d3ee',
'antigravity': '#a78bfa',
'claude-code': '#f97316',
'claude': '#f97316',
'vscode': '#3b82f6',
'vscode-insiders': '#60a5fa',
'zed': '#10b981',
'opencode': '#ec4899',
'codex': '#0f766e',
'gemini-cli': '#4285f4',
'kimi-cli': '#84cc16',
'copilot-cli': '#8957e5',
'cursor-agent': '#f59e0b',
'commandcode': '#e11d48',
};

const EDITOR_LABELS = {
'cursor': 'Cursor',
'windsurf': 'Windsurf',
'windsurf-next': 'WS Next',
'antigravity': 'Antigravity',
'claude-code': 'Claude Code',
'claude': 'Claude Code',
'vscode': 'VS Code',
'vscode-insiders': 'VS Code Ins.',
'zed': 'Zed',
'opencode': 'OpenCode',
'codex': 'Codex',
'gemini-cli': 'Gemini CLI',
'kimi-cli': 'Kimi CLI',
'copilot-cli': 'Copilot CLI',
'cursor-agent': 'Cursor Agent',
'commandcode': 'Cmd Code',
};

/**
* @param {object} overview — from getCachedOverview()
* @param {object} stats — from getCachedDashboardStats()
Expand Down