Skip to content

Commit 784cb53

Browse files
committed
Switch to green primary / accent instead of blue. Fix diff coloring
1 parent 750ae72 commit 784cb53

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

cli/src/components/tools/diff-viewer.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,20 @@ interface DiffViewerProps {
77
}
88

99
const DIFF_LINE_COLORS = {
10-
added: '#B6BD73',
11-
removed: '#BF6C69',
10+
dark: {
11+
added: '#7ACC35',
12+
removed: '#BF6C69',
13+
},
14+
light: {
15+
added: '#4A9E1C',
16+
removed: '#C53030',
17+
},
1218
}
1319

14-
const lineColor = (line: string): { fg: string; attrs?: number } => {
20+
const lineColor = (
21+
line: string,
22+
themeName: 'dark' | 'light',
23+
): { fg: string; attrs?: number } => {
1524
if (line.startsWith('@@')) {
1625
return { fg: 'cyan', attrs: TextAttributes.BOLD }
1726
}
@@ -27,10 +36,10 @@ const lineColor = (line: string): { fg: string; attrs?: number } => {
2736
return { fg: 'gray' }
2837
}
2938
if (line.startsWith('+')) {
30-
return { fg: DIFF_LINE_COLORS.added }
39+
return { fg: DIFF_LINE_COLORS[themeName].added }
3140
}
3241
if (line.startsWith('-')) {
33-
return { fg: DIFF_LINE_COLORS.removed }
42+
return { fg: DIFF_LINE_COLORS[themeName].removed }
3443
}
3544
if (line.startsWith('\\')) {
3645
return { fg: 'gray' }
@@ -50,7 +59,7 @@ export const DiffViewer = ({ diffText }: DiffViewerProps) => {
5059
.filter((rawLine) => !rawLine.startsWith('@@'))
5160
.map((rawLine, idx) => {
5261
const line = rawLine.length === 0 ? ' ' : rawLine
53-
const { fg, attrs } = lineColor(line)
62+
const { fg, attrs } = lineColor(line, theme.name)
5463
const resolvedFg = fg || theme.foreground
5564
return (
5665
<text key={`diff-line-${idx}`} style={{ wrapMode: 'none' }}>

cli/src/utils/theme-system.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ const DEFAULT_CHAT_THEMES: Record<ThemeName, ChatTheme> = {
768768
success: '#22c55e',
769769
error: '#ef4444',
770770
warning: '#FFA500',
771-
info: '#38bdf8',
771+
info: '#9EFC62',
772772

773773
// Neutral scale
774774
foreground: '#f1f5f9',
@@ -780,7 +780,7 @@ const DEFAULT_CHAT_THEMES: Record<ThemeName, ChatTheme> = {
780780

781781
// Context-specific
782782
aiLine: '#6b7280',
783-
userLine: '#38bdf8',
783+
userLine: '#9EFC62',
784784

785785
// Agent backgrounds
786786
agentToggleHeaderBg: '#f97316',
@@ -803,7 +803,7 @@ const DEFAULT_CHAT_THEMES: Record<ThemeName, ChatTheme> = {
803803
// Dark mode: slightly darker gray for less brightness
804804
codeBackground: '#374151',
805805
codeHeaderFg: '#5b647a',
806-
inlineCodeFg: '#fa8329',
806+
inlineCodeFg: '#9EFC62',
807807
codeTextFg: '#f1f5f9',
808808
headingFg: {
809809
1: '#facc15',
@@ -828,7 +828,7 @@ const DEFAULT_CHAT_THEMES: Record<ThemeName, ChatTheme> = {
828828
success: '#059669',
829829
error: '#ef4444',
830830
warning: '#F59E0B',
831-
info: '#3b82f6',
831+
info: '#65A83E',
832832

833833
// Neutral scale
834834
foreground: '#111827',
@@ -840,7 +840,7 @@ const DEFAULT_CHAT_THEMES: Record<ThemeName, ChatTheme> = {
840840

841841
// AI/User context
842842
aiLine: '#6b7280',
843-
userLine: '#3b82f6',
843+
userLine: '#65A83E',
844844

845845
// Agent context
846846
agentToggleHeaderBg: '#ea580c',
@@ -863,7 +863,7 @@ const DEFAULT_CHAT_THEMES: Record<ThemeName, ChatTheme> = {
863863
// Light mode: lighter gray background so inline code feels airy
864864
codeBackground: '#f3f4f6',
865865
codeHeaderFg: '#6b7280',
866-
inlineCodeFg: '#fa8329',
866+
inlineCodeFg: '#65A83E',
867867
codeTextFg: '#111827',
868868
headingFg: {
869869
1: '#dc2626',

0 commit comments

Comments
 (0)