Update UI components and refactor message display

This commit is contained in:
Chris Scott committed 2025-11-29 20:23:45 -05:00
1 parent 21bc210e62
commit 8c0689eac8
15 files changed
+78 -78

No files matched your search

@@ -56,7 +56,7 @@ const statusConfig: Record<GitFileStatusType, { icon: typeof FileText; color: st
added: { icon: FilePlus, color: 'text-green-500', bgColor: 'bg-green-500/10', label: 'Added' },
deleted: { icon: FileX, color: 'text-red-500', bgColor: 'bg-red-500/10', label: 'Deleted' },
renamed: { icon: FileText, color: 'text-blue-500', bgColor: 'bg-blue-500/10', label: 'Renamed' },
untracked: { icon: File, color: 'text-gray-400', bgColor: 'bg-gray-500/10', label: 'Untracked' },
untracked: { icon: File, color: 'text-muted-foreground', bgColor: 'bg-muted/50', label: 'Untracked' },
copied: { icon: FileText, color: 'text-purple-500', bgColor: 'bg-purple-500/10', label: 'Copied' },
}
@@ -71,7 +71,7 @@ function DiffLineComponent({ line, showLineNumbers, onLineClick }: { line: DiffL
if (line.type === 'hunk') {
return (
<div className="px-4 py-1 bg-blue-500/10 text-blue-400 text-xs font-mono">
<div className="px-4 py-1 bg-blue-500/10 text-blue-600 dark:text-blue-400 text-xs font-mono">
{line.content}
</div>
)
@@ -84,9 +84,9 @@ function DiffLineComponent({ line, showLineNumbers, onLineClick }: { line: DiffL
: ''
const textClass = line.type === 'add'
? 'text-green-400'
? 'text-green-600 dark:text-green-400'
: line.type === 'remove'
? 'text-red-400'
? 'text-red-600 dark:text-red-400'
: 'text-foreground'
const lineNumber = line.newLineNumber ?? line.oldLineNumber
@@ -15,7 +15,7 @@ const statusConfig: Record<GitFileStatusType, { icon: typeof FileText; color: st
added: { icon: FilePlus, color: 'text-green-500', label: 'Added' },
deleted: { icon: FileX, color: 'text-red-500', label: 'Deleted' },
renamed: { icon: FileText, color: 'text-blue-500', label: 'Renamed' },
untracked: { icon: File, color: 'text-gray-400', label: 'Untracked' },
untracked: { icon: File, color: 'text-muted-foreground', label: 'Untracked' },
copied: { icon: FileText, color: 'text-purple-500', label: 'Copied' },
}
@@ -67,7 +67,7 @@ export function GitChangesSheet({ isOpen, onClose, repoId, currentBranch, repoLo
>
<div className="flex items-center justify-between px-4 sm:py-3 border-b border-border flex-shrink-0">
<div className="flex items-center gap-2">
<GitBranch className="w-4 h-4 text-blue-400" />
<GitBranch className="w-4 h-4 text-foreground" />
<h2 className="text-sm font-semibold text-foreground">
{selectedFile ? 'File Changes' : 'Git Changes'}
</h2>
@@ -136,25 +136,25 @@ export const MessagePart = memo(function MessagePart({ part, role, allParts, par
return <ToolCallPart part={part} onFileClick={onFileClick} />
case 'reasoning':
return (
<details className="border border-zinc-800 rounded-lg my-2">
<summary className="px-4 py-2 bg-zinc-900 hover:bg-zinc-800 cursor-pointer text-sm font-medium">
<details className="border border-border rounded-lg my-2">
<summary className="px-4 py-2 bg-muted hover:bg-accent cursor-pointer text-sm font-medium">
Reasoning
</summary>
<div className="p-4 bg-zinc-950 text-sm text-zinc-300 whitespace-pre-wrap">
<div className="p-4 bg-card text-sm text-muted-foreground whitespace-pre-wrap">
{part.text}
</div>
</details>
)
case 'snapshot':
return (
<div className="border border-zinc-800 rounded-lg p-4 my-2 bg-zinc-950">
<div className="text-xs text-zinc-500 font-mono">Snapshot: {part.snapshot}</div>
<div className="border border-border rounded-lg p-4 my-2 bg-card">
<div className="text-xs text-muted-foreground font-mono">Snapshot: {part.snapshot}</div>
</div>
)
case 'agent':
return (
<div className="border border-zinc-800 rounded-lg p-4 my-2 bg-zinc-950">
<div className="text-sm font-medium text-blue-400">Agent: {part.name}</div>
<div className="border border-border rounded-lg p-4 my-2 bg-card">
<div className="text-sm font-medium text-blue-600 dark:text-blue-400">Agent: {part.name}</div>
</div>
)
case 'step-finish':
@@ -167,8 +167,8 @@ export const MessagePart = memo(function MessagePart({ part, role, allParts, par
)
case 'file':
return (
<span className="inline-flex items-center gap-1 px-2 py-1 rounded bg-zinc-800 border border-zinc-700 text-sm text-zinc-300">
<span className="text-blue-400">@</span>
<span className="inline-flex items-center gap-1 px-2 py-1 rounded bg-muted border border-border text-sm text-foreground">
<span className="text-blue-600 dark:text-blue-400">@</span>
<span className="font-medium">{part.filename || 'File'}</span>
</span>
)
@@ -31,7 +31,7 @@ const isMessageThinking = (msg: MessageWithParts): boolean => {
export const MessageThread = memo(function MessageThread({ messages, onFileClick }: MessageThreadProps) {
if (!messages || messages.length === 0) {
return (
<div className="flex items-center justify-center h-full text-zinc-600">
<div className="flex items-center justify-center h-full text-muted-foreground">
No messages yet. Start a conversation below.
</div>
)
@@ -56,7 +56,7 @@ export const MessageThread = memo(function MessageThread({ messages, onFileClick
} ${streaming ? 'animate-pulse-subtle' : ''}`}
>
<div className="flex items-center gap-2 mb-1">
<span className="text-xs font-medium text-zinc-400">
<span className="text-xs font-medium text-muted-foreground">
{msg.info.role === 'user' ? 'You' : (msg.info.role === 'assistant' && 'modelID' in msg.info ? msg.info.modelID : 'Assistant')}
</span>
{msg.info.time && (
@@ -65,14 +65,14 @@ export const MessageThread = memo(function MessageThread({ messages, onFileClick
</span>
)}
{streaming && (
<span className="text-xs text-blue-400 flex items-center gap-1">
<span className="text-xs text-blue-600 dark:text-blue-400 flex items-center gap-1">
<span className="animate-pulse">●</span> <span className="shine-loading">Generating...</span>
</span>
)}
</div>
{thinking ? (
<div className="flex items-center gap-2 text-zinc-500">
<div className="flex items-center gap-2 text-muted-foreground">
<span className="animate-pulse">▋</span>
<span className="text-sm shine-loading">Thinking...</span>
</div>
@@ -440,9 +440,9 @@ export function PromptInput({
: "Send a message..."
}
disabled={disabled || hasActiveStream}
className={`w-full bg-background/90 px-2 md:px-3 py-2 text-[16px] text-foreground placeholder-muted-foreground focus:outline-none focus:bg-black resize-none min-h-[40px] max-h-[120px] disabled:opacity-50 disabled:cursor-not-allowed md:text-sm rounded-lg ${
className={`w-full bg-background/90 px-2 md:px-3 py-2 text-[16px] text-foreground placeholder-muted-foreground focus:outline-none focus:bg-background resize-none min-h-[40px] max-h-[120px] disabled:opacity-50 disabled:cursor-not-allowed md:text-sm rounded-lg ${
isBashMode
? 'border-purple-500/50 bg-purple-500/5 focus:bg-black'
? 'border-purple-500/50 bg-purple-500/5 focus:bg-background'
: ''
}`}
rows={1}
@@ -59,7 +59,7 @@ function ClickableJson({ json, onFileClick }: { json: unknown; onFileClick?: (fi
e.stopPropagation()
onFileClick?.(ref.filePath)
}}
className="text-blue-300 hover:text-blue-200 cursor-pointer underline decoration-dotted"
className="text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 cursor-pointer underline decoration-dotted"
title={`Click to open ${ref.filePath}`}
>
{ref.fullMatch}
@@ -96,13 +96,13 @@ export function ToolCallPart({ part, onFileClick }: ToolCallPartProps) {
const getStatusColor = () => {
switch (part.state.status) {
case 'completed':
return 'text-green-400'
return 'text-green-600 dark:text-green-400'
case 'error':
return 'text-red-400'
return 'text-red-600 dark:text-red-400'
case 'running':
return 'text-yellow-400'
return 'text-yellow-600 dark:text-yellow-400'
default:
return 'text-zinc-400'
return 'text-muted-foreground'
}
}
@@ -154,9 +154,9 @@ export function ToolCallPart({ part, onFileClick }: ToolCallPartProps) {
return (
<div ref={outputRef} className="my-2">
<div className="flex items-center gap-2 text-sm mb-2">
<span className="text-green-400">✓</span>
<span className="text-green-600 dark:text-green-400">✓</span>
<span className="font-medium">$</span>
<span className="text-zinc-300">{command}</span>
<span className="text-foreground">{command}</span>
{part.state.status === 'completed' && part.state.time && (
<span className="text-muted-foreground text-xs ml-auto">
{((part.state.time.end - part.state.time.start) / 1000).toFixed(2)}s
@@ -188,13 +188,13 @@ export function ToolCallPart({ part, onFileClick }: ToolCallPartProps) {
onFileClick(previewText)
}
}}
className="text-blue-300 text-xs truncate hover:text-blue-200 cursor-pointer underline decoration-dotted"
className="text-blue-600 dark:text-blue-400 text-xs truncate hover:text-blue-700 dark:hover:text-blue-300 cursor-pointer underline decoration-dotted"
title={`Click to open ${previewText}`}
>
{previewText}
</span>
) : previewText ? (
<span className="text-zinc-400 text-xs truncate">{previewText}</span>
<span className="text-muted-foreground text-xs truncate">{previewText}</span>
) : null}
<span className="text-muted-foreground text-xs ml-auto">({part.state.status})</span>
</button>
@@ -213,24 +213,24 @@ export function ToolCallPart({ part, onFileClick }: ToolCallPartProps) {
{part.tool === 'bash' ? (
<div className="text-sm">
<div className="flex items-center gap-2 mb-1">
<div className="text-zinc-400">Command:</div>
<div className="text-muted-foreground">Command:</div>
<CopyButton
content={typeof part.state.input?.command === 'string' ? part.state.input.command : ''}
title="Copy command"
/>
</div>
<div className="bg-accent p-2 rounded text-xs overflow-x-auto">
<span className="text-green-400">$</span> {typeof part.state.input?.command === 'string' ? part.state.input.command : ''}
<span className="text-green-600 dark:text-green-400">$</span> {typeof part.state.input?.command === 'string' ? part.state.input.command : ''}
</div>
</div>
) : (
<div className="text-sm">
<div className="text-zinc-400 mb-1">Input:</div>
<div className="text-muted-foreground mb-1">Input:</div>
<ClickableJson json={part.state.input} onFileClick={onFileClick} />
</div>
)}
<div className="text-sm" ref={outputRef}>
<div className="text-zinc-400 mb-1">Output:</div>
<div className="text-muted-foreground mb-1">Output:</div>
<pre className="bg-accent p-2 rounded text-xs overflow-x-auto whitespace-pre-wrap cursor-pointer hover:bg-accent/80 transition-colors"
onClick={() => part.state.status === 'completed' && navigator.clipboard.writeText(part.state.output)}
title="Click to copy output">
@@ -238,7 +238,7 @@ export function ToolCallPart({ part, onFileClick }: ToolCallPartProps) {
</pre>
</div>
{part.state.time && (
<div className="text-xs text-zinc-500">
<div className="text-xs text-muted-foreground">
Duration: {((part.state.time.end - part.state.time.start) / 1000).toFixed(2)}s
</div>
)}
@@ -247,8 +247,8 @@ export function ToolCallPart({ part, onFileClick }: ToolCallPartProps) {
{part.state.status === 'error' && (
<div className="text-sm">
<div className="text-red-400 mb-1">Error:</div>
<pre className="bg-accent p-2 rounded text-xs overflow-x-auto text-red-300">
<div className="text-red-600 dark:text-red-400 mb-1">Error:</div>
<pre className="bg-accent p-2 rounded text-xs overflow-x-auto text-red-600 dark:text-red-300">
{part.state.error}
</pre>
</div>
@@ -123,7 +123,7 @@ export function ModelSelectDialog({
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="max-w-4xl max-h-[80vh] bg-[#1a1a1a] border-[#333] text-white">
<DialogContent className="max-w-4xl max-h-[80vh] bg-background border-border text-foreground">
<DialogHeader>
<DialogTitle className="text-xl font-semibold">
Select Model
@@ -133,12 +133,12 @@ export function ModelSelectDialog({
<div className="space-y-4">
{/* Search */}
<div className="relative">
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-zinc-400" />
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" />
<Input
placeholder="Search models or providers..."
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="pl-10 bg-[#0a0a0a] border-[#333] text-white placeholder-zinc-500"
className="pl-10 bg-card border-border text-foreground placeholder-muted-foreground"
/>
</div>
@@ -53,7 +53,7 @@ export function BranchSwitcher({ repoId, currentBranch, isWorktree, repoUrl, rep
<Button
variant="ghost"
size="sm"
className="h-6 px-1 sm:px-2 text-[10px] sm:text-xs text-blue-400 hover:text-blue-300 hover:bg-accent gap-1 border border-blue-500/20"
className="h-6 px-1 sm:px-2 text-[10px] sm:text-xs text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:bg-accent gap-1 border border-blue-500/20"
>
<GitBranch className="w-3 h-3" />
<span className="hidden sm:inline">{currentBranch}</span>
+4 -4
View File
@@ -69,7 +69,7 @@ export function RepoCard({
onSelect(repo.id, !isSelected);
}
}}
className={`font-semibold text-lg text-foreground truncate group-hover:text-blue-400 transition-colors ${
className={`font-semibold text-lg text-foreground truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors ${
onSelect ? "cursor-pointer" : "cursor-not-allowed opacity-60"
}`}
>
@@ -77,14 +77,14 @@ export function RepoCard({
</h3>
{repo.isWorktree && (
<Badge
className="text-xs px-2.5 py-0.5 bg-purple-600/20 text-purple-400 border-purple-600/40"
className="text-xs px-2.5 py-0.5 bg-purple-600/20 text-purple-600 dark:text-purple-400 border-purple-600/40"
>
worktree
</Badge>
)}
{repo.cloneStatus === "cloning" && (
<Badge
className="text-xs px-2.5 py-0.5 bg-blue-600/20 text-blue-400 border-blue-600/40"
className="text-xs px-2.5 py-0.5 bg-blue-600/20 text-blue-600 dark:text-blue-400 border-blue-600/40"
>
cloning
</Badge>
@@ -101,7 +101,7 @@ export function RepoCard({
<div className="flex flex-col gap-2">
{repo.cloneStatus === "cloning" && (
<div className="text-sm text-muted-foreground flex items-center gap-2">
<Loader2 className="w-3 h-3 animate-spin text-blue-400" />
<Loader2 className="w-3 h-3 animate-spin text-blue-600 dark:text-blue-400" />
<span>Cloning repository...</span>
</div>
)}
@@ -84,30 +84,30 @@ export function SwitchConfigDialog({
<div className="space-y-4">
{currentConfigName && (
<div className="text-sm text-zinc-400">
Current config: <span className="text-white font-semibold">{currentConfigName}</span>
<div className="text-sm text-muted-foreground">
Current config: <span className="text-foreground font-semibold">{currentConfigName}</span>
</div>
)}
{loading ? (
<div className="flex items-center justify-center py-6">
<Loader2 className="w-4 h-4 animate-spin text-blue-400" />
<span className="ml-2 text-sm text-zinc-400">Loading configs...</span>
<Loader2 className="w-4 h-4 animate-spin text-blue-600 dark:text-blue-400" />
<span className="ml-2 text-sm text-muted-foreground">Loading configs...</span>
</div>
) : configs.length === 0 ? (
<div className="text-sm text-zinc-400">No configs available</div>
<div className="text-sm text-muted-foreground">No configs available</div>
) : (
<Select value={selectedConfig} onValueChange={setSelectedConfig}>
<SelectTrigger className="bg-[#1a1a1a] border-[#2a2a2a] text-white">
<SelectTrigger className="bg-background border-border text-foreground">
<SelectValue placeholder="Select a config" />
</SelectTrigger>
<SelectContent className="bg-[#1a1a1a] border-[#2a2a2a]">
<SelectContent className="bg-popover border-border">
{configs.map((config) => (
<SelectItem key={config.id} value={config.name}>
<div className="flex items-center gap-2">
{config.name}
{config.isDefault && (
<span className="text-xs text-blue-400 ml-2">(default)</span>
<span className="text-xs text-blue-600 dark:text-blue-400 ml-2">(default)</span>
)}
</div>
</SelectItem>
@@ -117,9 +117,9 @@ export function SwitchConfigDialog({
)}
{error && (
<div className="flex items-start gap-2 bg-red-900/20 border border-red-800/50 rounded p-3">
<AlertCircle className="w-4 h-4 text-red-400 mt-0.5 flex-shrink-0" />
<p className="text-sm text-red-400">{error}</p>
<div className="flex items-start gap-2 bg-red-500/10 dark:bg-red-900/20 border border-red-500/30 dark:border-red-800/50 rounded p-3">
<AlertCircle className="w-4 h-4 text-red-600 dark:text-red-400 mt-0.5 flex-shrink-0" />
<p className="text-sm text-red-600 dark:text-red-400">{error}</p>
</div>
)}
@@ -127,7 +127,7 @@ export function SwitchConfigDialog({
<Button
variant="outline"
onClick={() => onOpenChange(false)}
className="border-[#2a2a2a] hover:bg-[#1a1a1a]"
className="border-border hover:bg-accent"
>
Cancel
</Button>
+10 -10
View File
@@ -44,12 +44,12 @@ export const SessionList = ({
}, [sessions, searchQuery]);
if (isLoading) {
return <div className="p-4 text-sm text-gray-400">Loading sessions...</div>;
return <div className="p-4 text-sm text-muted-foreground">Loading sessions...</div>;
}
if (!sessions || sessions.length === 0) {
return (
<div className="p-4 text-sm text-gray-400">
<div className="p-4 text-sm text-muted-foreground">
No sessions yet. Create one to get started.
</div>
);
@@ -115,7 +115,7 @@ export const SessionList = ({
<div className="p-4 flex-shrink-0">
<div className="flex items-center gap-3 mb-3">
<div className="relative flex-1">
<Search className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400" />
<Search className="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground" />
<Input
type="text"
placeholder="Search"
@@ -183,7 +183,7 @@ export const SessionList = ({
<div className="flex-1 overflow-y-auto px-4 pb-4">
<div className="flex flex-col gap-2">
{filteredSessions.length === 0 ? (
<div className="text-sm text-gray-400 text-center py-4">
<div className="text-sm text-muted-foreground text-center py-4">
No sessions found
</div>
) : (
@@ -192,10 +192,10 @@ export const SessionList = ({
key={session.id}
className={`p-3 cursor-pointer transition-all ${
selectedSessions.has(session.id)
? "border-blue-500 shadow-lg shadow-blue-900/30 bg-[#2a2a2a]"
? "border-blue-500 shadow-lg shadow-blue-900/30 dark:shadow-blue-900/30 bg-accent"
: activeSessionID === session.id
? "bg-[#333333] border-[#5a5a5a]"
: "bg-[#2a2a2a] border-[#4a4a4a] hover:bg-[#333333] hover:border-[#5a5a5a]"
? "bg-accent border-border"
: "bg-card border-border hover:bg-accent hover:border-border"
} hover:shadow-lg`}
onClick={() => onSelectSession(session.id)}
>
@@ -212,10 +212,10 @@ export const SessionList = ({
className="w-5 h-5 flex-shrink-0 mt-0.5"
/>
<div className="flex-1 min-w-0">
<h3 className="text-sm font-medium text-white truncate">
<h3 className="text-sm font-medium text-foreground truncate">
{session.title || "Untitled Session"}
</h3>
<div className="flex items-center gap-3 mt-1 text-xs text-gray-400">
<div className="flex items-center gap-3 mt-1 text-xs text-muted-foreground">
{session.parentID && (
<span className="flex items-center gap-1">
<GitBranch className="w-3 h-3" />
@@ -232,7 +232,7 @@ export const SessionList = ({
</div>
</div>
<button
className="h-6 w-6 p-0 text-gray-400 hover:text-red-400 bg-transparent border-none cursor-pointer"
className="h-6 w-6 p-0 text-foreground hover:text-red-600 dark:hover:text-red-400 bg-transparent border-none cursor-pointer"
onClick={(e) => handleDelete(session.id, e)}
>
<Trash2 className="w-4 h-4" />
@@ -107,7 +107,7 @@ export function SettingsDialog({ open, onOpenChange }: SettingsDialogProps) {
>
<div className="flex items-center gap-4">
<div className="p-3 bg-accent rounded-lg">
<item.icon className="w-6 h-6 text-blue-400" />
<item.icon className="w-6 h-6 text-blue-600 dark:text-blue-400" />
</div>
<div className="flex-1 min-w-0">
<h3 className="font-semibold text-foreground mb-1">{item.label}</h3>
+9 -9
View File
@@ -23,7 +23,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
<DropdownMenuPrimitive.SubTrigger
ref={ref}
className={cn(
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-[#1a1a1a] data-[state=open]:bg-[#1a1a1a]",
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
inset && "pl-8",
className
)}
@@ -42,7 +42,7 @@ const DropdownMenuSubContent = React.forwardRef<
<DropdownMenuPrimitive.SubContent
ref={ref}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-[#262626] bg-[#141414] p-1 text-white shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
{...props}
@@ -60,7 +60,7 @@ const DropdownMenuContent = React.forwardRef<
ref={ref}
sideOffset={sideOffset}
className={cn(
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-[#262626] bg-[#141414] p-1 text-white shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
className
)}
{...props}
@@ -78,7 +78,7 @@ const DropdownMenuItem = React.forwardRef<
<DropdownMenuPrimitive.Item
ref={ref}
className={cn(
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-[#1a1a1a] focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
inset && "pl-8",
className
)}
@@ -94,7 +94,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
<DropdownMenuPrimitive.CheckboxItem
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-[#1a1a1a] focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
)}
checked={checked}
@@ -118,7 +118,7 @@ const DropdownMenuRadioItem = React.forwardRef<
<DropdownMenuPrimitive.RadioItem
ref={ref}
className={cn(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-[#1a1a1a] focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
className
)}
{...props}
@@ -142,7 +142,7 @@ const DropdownMenuLabel = React.forwardRef<
<DropdownMenuPrimitive.Label
ref={ref}
className={cn(
"px-2 py-1.5 text-sm font-semibold text-gray-400",
"px-2 py-1.5 text-sm font-semibold text-muted-foreground",
inset && "pl-8",
className
)}
@@ -157,7 +157,7 @@ const DropdownMenuSeparator = React.forwardRef<
>(({ className, ...props }, ref) => (
<DropdownMenuPrimitive.Separator
ref={ref}
className={cn("-mx-1 my-1 h-px bg-[#262626]", className)}
className={cn("-mx-1 my-1 h-px bg-border", className)}
{...props}
/>
))
@@ -169,7 +169,7 @@ const DropdownMenuShortcut = ({
}: React.HTMLAttributes<HTMLSpanElement>) => {
return (
<span
className={cn("ml-auto text-xs tracking-widest text-gray-500", className)}
className={cn("ml-auto text-xs tracking-widest text-muted-foreground", className)}
{...props}
/>
)
+1 -1
View File
@@ -131,7 +131,7 @@ export function RepoDetail() {
variant="outline"
onClick={() => setFileBrowserOpen(true)}
size="sm"
className="text-white border-gray-600 hover:bg-gray-800 transition-all duration-200 hover:scale-105"
className="text-foreground border-border hover:bg-accent transition-all duration-200 hover:scale-105"
>
<FolderOpen className="w-4 h-4 sm:mr-2" />
<span className="hidden sm:inline">Files</span>