mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-02-14 04:37:32 +00:00
refactor(design): change the design of bash
This commit is contained in:
@@ -102,11 +102,17 @@ export const OneLineDisplay: React.FC<OneLineDisplayProps> = ({
|
||||
|
||||
return null;
|
||||
};
|
||||
const isTerminal = toolName === 'Bash' || icon === 'terminal';
|
||||
|
||||
return (
|
||||
<div className="group relative bg-gray-50/50 dark:bg-gray-800/30 border-l-2 border-blue-400 dark:border-blue-500 pl-3 py-2 my-2">
|
||||
<div className={`group relative ${isTerminal ? 'bg-gray-900/5 dark:bg-gray-900/30' : 'bg-gray-50/50 dark:bg-gray-800/30'} border-l-2 ${isTerminal ? 'border-green-500 dark:border-green-400' : 'border-blue-400 dark:border-blue-500'} pl-3 py-1 my-0.5`}>
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<div className="flex items-center gap-2 text-xs text-gray-600 dark:text-gray-400 flex-1 min-w-0">
|
||||
{icon ? (
|
||||
{icon === 'terminal' ? (
|
||||
<svg className="w-3.5 h-3.5 text-green-500 dark:text-green-400 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" />
|
||||
</svg>
|
||||
) : icon ? (
|
||||
<span className="text-blue-500 dark:text-blue-400 flex-shrink-0">
|
||||
{icon}
|
||||
</span>
|
||||
@@ -122,6 +128,7 @@ export const OneLineDisplay: React.FC<OneLineDisplayProps> = ({
|
||||
renderActionButton()
|
||||
) : (
|
||||
<span className={`font-mono truncate flex-1 min-w-0 ${colorScheme.primary}`}>
|
||||
{isTerminal && <span className="text-green-500 dark:text-green-400 mr-1">$</span>}
|
||||
{value}
|
||||
</span>
|
||||
)}
|
||||
|
||||
@@ -42,12 +42,12 @@ export const TOOL_CONFIGS: Record<string, ToolDisplayConfig> = {
|
||||
Bash: {
|
||||
input: {
|
||||
type: 'one-line',
|
||||
icon: '$',
|
||||
icon: 'terminal',
|
||||
getValue: (input) => input.command,
|
||||
getSecondary: (input) => input.description,
|
||||
action: 'copy',
|
||||
colorScheme: {
|
||||
primary: 'text-green-600 dark:text-green-400',
|
||||
primary: 'text-green-600 dark:text-green-400 font-mono',
|
||||
secondary: 'text-gray-500 dark:text-gray-400'
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user