mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 23:17:59 -05:00
Removed terminal if error shown in entry
This commit is contained in:
@@ -78,12 +78,14 @@ export function ConsoleEntry({ entry, consoleWidth }: ConsoleEntryProps) {
|
||||
</div>
|
||||
|
||||
<div className="space-y-4">
|
||||
{!entry.error && (
|
||||
<div className="flex items-start gap-2">
|
||||
<Terminal className="h-4 w-4 text-muted-foreground mt-1" />
|
||||
<div className="text-sm font-mono flex-1">
|
||||
<JSONView data={entry.output} />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{entry.error && (
|
||||
<div className="flex items-start gap-2 border rounded-md p-3 border-red-500 bg-red-50 text-destructive dark:border-border dark:text-foreground dark:bg-background">
|
||||
|
||||
@@ -80,7 +80,7 @@ export function Console() {
|
||||
onMouseDown={handleMouseDown}
|
||||
/>
|
||||
|
||||
<div className="flex items-center justify-between p-4 border-b">
|
||||
<div className="flex items-center justify-between h-14 px-4 border-b">
|
||||
<h2 className="text-sm font-medium">Console</h2>
|
||||
<Button
|
||||
variant="ghost"
|
||||
@@ -93,6 +93,7 @@ export function Console() {
|
||||
</div>
|
||||
|
||||
<ScrollArea className="h-[calc(100%-4rem)]">
|
||||
<div className="pb-16">
|
||||
{filteredEntries.length === 0 ? (
|
||||
<div className="flex items-center justify-center h-full text-sm text-muted-foreground pt-4">
|
||||
No console entries
|
||||
@@ -102,8 +103,10 @@ export function Console() {
|
||||
<ConsoleEntry key={entry.id} entry={entry} consoleWidth={width} />
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
</ScrollArea>
|
||||
|
||||
<div className="absolute left-0 right-0 bottom-0 h-16 bg-background border-t">
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<button
|
||||
@@ -117,5 +120,6 @@ export function Console() {
|
||||
<TooltipContent side="right">Close Console</TooltipContent>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user