Skip to content

Commit 647f1fe

Browse files
brandonkachenclaude
andcommitted
feat: make repo path blue and underline on hover
Updated the repository path link in the welcome message to be blue (#3b82f6) and show underline on hover. Enhanced TerminalLink component to support hover states and click handlers in inline mode. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c862a4e commit 647f1fe

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

cli/src/chat.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,12 +291,12 @@ export const App = ({
291291

292292
blocks.push({
293293
type: 'html',
294-
render: ({ textColor }) => (
294+
render: () => (
295295
<text>
296296
Codebuff can read and write files in{' '}
297297
<TerminalLink
298298
text={displayPath}
299-
color={textColor}
299+
color="#3b82f6"
300300
inline={true}
301301
onActivate={async () => {
302302
await openFileAtPath(repoRoot)

cli/src/components/terminal-link.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,26 @@ export const TerminalLink: React.FC<TerminalLinkProps> = ({
5050
}
5151
}, [onActivate])
5252

53-
// For inline mode, render as a simple span (no hover/click in inline mode)
53+
// For inline mode, wrap in a text element with hover support
5454
if (inline) {
55-
return <span fg={displayColor}>{text}</span>
55+
const content = shouldUnderline ? (
56+
<u>
57+
<span fg={displayColor}>{text}</span>
58+
</u>
59+
) : (
60+
<span fg={displayColor}>{text}</span>
61+
)
62+
63+
return (
64+
<text
65+
wrap={false}
66+
onMouseOver={() => setIsHovered(true)}
67+
onMouseOut={() => setIsHovered(false)}
68+
onMouseDown={handleActivate}
69+
>
70+
{content}
71+
</text>
72+
)
5673
}
5774

5875
return (

0 commit comments

Comments
 (0)