u
This commit is contained in:
@@ -508,7 +508,7 @@ export default class ChatDrawer extends PureComponent {
|
||||
placeholder={
|
||||
pendingAsk
|
||||
? 'Bitte Frage oben beantworten…'
|
||||
: 'Nachricht eingeben…'
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -544,10 +544,6 @@ export default class ChatDrawer extends PureComponent {
|
||||
)}
|
||||
</IconButton>
|
||||
</Box>
|
||||
|
||||
<Typography variant="caption" sx={{ color: 'text.disabled', fontSize: '0.68rem', textAlign: 'center' }}>
|
||||
Enter zum Senden • Shift+Enter für Zeilenumbruch
|
||||
</Typography>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@ import ClickAwayListener from '@mui/material/ClickAwayListener';
|
||||
import HandshakeRoundedIcon from '@mui/icons-material/HandshakeRounded';
|
||||
import PsychologyRoundedIcon from '@mui/icons-material/PsychologyRounded';
|
||||
import BuildRoundedIcon from '@mui/icons-material/BuildRounded';
|
||||
import SearchRoundedIcon from '@mui/icons-material/SearchRounded';
|
||||
import ComputerRoundedIcon from '@mui/icons-material/ComputerRounded';
|
||||
import ImageSearchRoundedIcon from '@mui/icons-material/ImageSearchRounded';
|
||||
import CompareRoundedIcon from '@mui/icons-material/CompareRounded';
|
||||
import HealingMarkdown from './HealingMarkdown';
|
||||
import {
|
||||
CHROMA,
|
||||
@@ -14,6 +18,13 @@ import {
|
||||
SURFACE_RAISED,
|
||||
} from '../../colors';
|
||||
|
||||
const TOOL_ICON_MAP = {
|
||||
find_files: SearchRoundedIcon,
|
||||
javascript_execute: ComputerRoundedIcon,
|
||||
search_images: ImageSearchRoundedIcon,
|
||||
analyze_image: CompareRoundedIcon,
|
||||
};
|
||||
|
||||
function formatMessageTime(isoString) {
|
||||
if (!isoString) return '';
|
||||
try {
|
||||
@@ -45,9 +56,13 @@ function formatUsageText(usage) {
|
||||
return `${fmt(input)} Prompt${cachedPart} · ${fmt(output)} Antwort${cost}`;
|
||||
}
|
||||
|
||||
function formatToolTooltip(content, result, parameters) {
|
||||
function formatToolTooltip(content, result, parameters, prefix) {
|
||||
const parts = [];
|
||||
|
||||
if (prefix) {
|
||||
parts.push(prefix);
|
||||
}
|
||||
|
||||
if (parameters !== undefined && parameters !== null && parameters !== '') {
|
||||
try {
|
||||
const parsed = typeof parameters === 'string' ? JSON.parse(parameters) : parameters;
|
||||
@@ -202,7 +217,9 @@ function BrainIconView({ reasoning }) {
|
||||
|
||||
function WorkIconView({ tool }) {
|
||||
const isGreen = tool?.state === 'green';
|
||||
const tooltipText = formatToolTooltip(tool?.content, tool?.result, tool?.parameters);
|
||||
const ToolNameIcon = tool?.name ? TOOL_ICON_MAP[tool.name] : null;
|
||||
const prefix = ToolNameIcon ? tool?.name : null;
|
||||
const tooltipText = formatToolTooltip(tool?.content, tool?.result, tool?.parameters, prefix);
|
||||
|
||||
return (
|
||||
<ClickTooltip
|
||||
@@ -237,21 +254,27 @@ function WorkIconView({ tool }) {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<BuildRoundedIcon sx={{ fontSize: 18, color: 'inherit' }} />
|
||||
{tool?.name ? (
|
||||
<Typography
|
||||
component="span"
|
||||
sx={{
|
||||
fontFamily: 'monospace',
|
||||
fontSize: '0.75rem',
|
||||
fontWeight: 600,
|
||||
color: 'text.secondary',
|
||||
lineHeight: 1,
|
||||
}}
|
||||
>
|
||||
{tool.name}
|
||||
</Typography>
|
||||
) : null}
|
||||
{ToolNameIcon ? (
|
||||
<ToolNameIcon sx={{ fontSize: 18, color: 'inherit' }} />
|
||||
) : (
|
||||
<>
|
||||
<BuildRoundedIcon sx={{ fontSize: 18, color: 'inherit' }} />
|
||||
{tool?.name ? (
|
||||
<Typography
|
||||
component="span"
|
||||
sx={{
|
||||
fontFamily: 'monospace',
|
||||
fontSize: '0.75rem',
|
||||
fontWeight: 600,
|
||||
color: 'text.secondary',
|
||||
lineHeight: 1,
|
||||
}}
|
||||
>
|
||||
{tool.name}
|
||||
</Typography>
|
||||
) : null}
|
||||
</>
|
||||
)}
|
||||
</Box>
|
||||
</ClickTooltip>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user