improve logs text wrapping; remove tooltips (#606)
This commit is contained in:
committed by
GitHub
parent
c100b12ee9
commit
80058d0fb6
@@ -22,7 +22,7 @@ import {
|
|||||||
} from 'shared/types.ts';
|
} from 'shared/types.ts';
|
||||||
import FileChangeRenderer from './FileChangeRenderer';
|
import FileChangeRenderer from './FileChangeRenderer';
|
||||||
import ToolDetails from './ToolDetails';
|
import ToolDetails from './ToolDetails';
|
||||||
import { Braces, FileText, MoreHorizontal } from 'lucide-react';
|
import { Braces, FileText } from 'lucide-react';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
entry: NormalizedEntry;
|
entry: NormalizedEntry;
|
||||||
@@ -255,10 +255,7 @@ function DisplayConversationEntry({ entry, expansionKey }: Props) {
|
|||||||
title={toolExpanded ? 'Hide details' : 'Show details'}
|
title={toolExpanded ? 'Hide details' : 'Show details'}
|
||||||
>
|
>
|
||||||
<span className="flex items-center gap-1 min-w-0">
|
<span className="flex items-center gap-1 min-w-0">
|
||||||
<span
|
<span className="text-sm break-words">
|
||||||
className="text-sm truncate whitespace-nowrap overflow-hidden text-ellipsis"
|
|
||||||
title={entry.content}
|
|
||||||
>
|
|
||||||
{shouldRenderMarkdown(entry.entry_type) ? (
|
{shouldRenderMarkdown(entry.entry_type) ? (
|
||||||
<MarkdownRenderer
|
<MarkdownRenderer
|
||||||
content={entry.content}
|
content={entry.content}
|
||||||
@@ -301,9 +298,7 @@ function DisplayConversationEntry({ entry, expansionKey }: Props) {
|
|||||||
? `output: ${outputMeta.lineCount} lines · ${outputMeta.sizeStr}`
|
? `output: ${outputMeta.lineCount} lines · ${outputMeta.sizeStr}`
|
||||||
: 'output'
|
: 'output'
|
||||||
}
|
}
|
||||||
>
|
></span>
|
||||||
<FileText className="h-3.5 w-3.5 text-zinc-500" />
|
|
||||||
</span>
|
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
@@ -320,16 +315,10 @@ function DisplayConversationEntry({ entry, expansionKey }: Props) {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
<MoreHorizontal className="ml-auto h-4 w-4 text-zinc-400 group-hover:text-zinc-600" />
|
|
||||||
</button>
|
</button>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<div
|
<div className={'text-sm break-words'}>
|
||||||
className={
|
|
||||||
'text-sm truncate whitespace-nowrap overflow-hidden text-ellipsis'
|
|
||||||
}
|
|
||||||
title={entry.content}
|
|
||||||
>
|
|
||||||
{shouldRenderMarkdown(entry.entry_type) ? (
|
{shouldRenderMarkdown(entry.entry_type) ? (
|
||||||
<MarkdownRenderer
|
<MarkdownRenderer
|
||||||
content={entry.content}
|
content={entry.content}
|
||||||
@@ -341,29 +330,6 @@ function DisplayConversationEntry({ entry, expansionKey }: Props) {
|
|||||||
</div>
|
</div>
|
||||||
{isCommand ? (
|
{isCommand ? (
|
||||||
<>
|
<>
|
||||||
{typeof commandSuccess === 'boolean' && (
|
|
||||||
<span
|
|
||||||
className={
|
|
||||||
'px-1.5 py-0.5 rounded text-[10px] border whitespace-nowrap ' +
|
|
||||||
(commandSuccess
|
|
||||||
? 'text-success'
|
|
||||||
: 'text-destructive')
|
|
||||||
}
|
|
||||||
title={
|
|
||||||
typeof commandExitCode === 'number'
|
|
||||||
? `exit code: ${commandExitCode}`
|
|
||||||
: commandSuccess
|
|
||||||
? 'success'
|
|
||||||
: 'failed'
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{typeof commandExitCode === 'number'
|
|
||||||
? `exit ${commandExitCode}`
|
|
||||||
: commandSuccess
|
|
||||||
? 'ok'
|
|
||||||
: 'fail'}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{commandOutput && (
|
{commandOutput && (
|
||||||
<span
|
<span
|
||||||
title={
|
title={
|
||||||
|
|||||||
Reference in New Issue
Block a user