mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
terminal better
This commit is contained in:
parent
32bee63b50
commit
1f98e75a4f
1 changed files with 14 additions and 12 deletions
|
|
@ -740,7 +740,7 @@ const ToolHeaderWrapper = ({
|
|||
</span>}
|
||||
{numResults !== undefined && (
|
||||
<span className="text-void-fg-4 text-xs ml-auto mr-1">
|
||||
{`(${numResults}${hasNextPage ? '+' : ''} result${numResults !== 1 ? 's' : ''})`}
|
||||
{`${numResults}${hasNextPage ? '+' : ''} result${numResults !== 1 ? 's' : ''}`}
|
||||
</span>
|
||||
)}
|
||||
{isError && <AlertTriangle className='text-void-warning opacity-90 flex-shrink-0' size={14} />}
|
||||
|
|
@ -751,7 +751,7 @@ const ToolHeaderWrapper = ({
|
|||
{/* children */}
|
||||
{<div
|
||||
className={`overflow-hidden transition-all duration-200 ease-in-out ${isExpanded ? 'opacity-100' : 'max-h-0 opacity-0'}
|
||||
text-void-fg-4 rounded-sm
|
||||
text-void-fg-4 rounded-sm overflow-x-auto bg-void-bg-2
|
||||
`}
|
||||
// bg-black bg-opacity-10 border border-void-border-4 border-opacity-50
|
||||
>
|
||||
|
|
@ -1310,7 +1310,7 @@ const ToolRequestAcceptRejectButtons = () => {
|
|||
}
|
||||
|
||||
export const ToolChildrenWrapper = ({ children, className }: { children: React.ReactNode, className?: string }) => {
|
||||
return <div className={`${className ? className : ''} overflow-x-auto cursor-default select-none`}>
|
||||
return <div className={`${className ? className : ''} cursor-default select-none`}>
|
||||
<div className='px-2 min-w-full'>
|
||||
{children}
|
||||
</div>
|
||||
|
|
@ -1764,16 +1764,18 @@ const toolNameToComponent: { [T in ToolName]: ToolComponent<T> } = {
|
|||
: null
|
||||
|
||||
componentParams.children = <ToolChildrenWrapper className='bg-void-bg-3 font-mono whitespace-pre text-nowrap overflow-auto text-sm'>
|
||||
<ListableToolItem
|
||||
showDot={false}
|
||||
name={`$ ${command}`}
|
||||
className='w-full overflow-auto py-1'
|
||||
onClick={() => terminalToolsService.openTerminal(terminalId)}
|
||||
/>
|
||||
|
||||
<div className='!select-text cursor-auto'>
|
||||
{resolveReason.type === 'bgtask' ? 'Result so far:\n' : null}
|
||||
{result}
|
||||
{resultStr}
|
||||
<div>
|
||||
<span>{`Ran command: `}</span>
|
||||
<span className="text-void-fg-1">{command}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>{resolveReason.type === 'bgtask' ? 'Result so far:\n' : null}</span>
|
||||
<span>{`Result: `}</span>
|
||||
<span className="text-void-fg-1">{result}</span>
|
||||
<span className="text-void-fg-1">{resultStr}</span>
|
||||
</div>
|
||||
</div>
|
||||
</ToolChildrenWrapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue