From c73f210b9e704986166b9fe1c9159ce562154684 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Wed, 4 Feb 2026 13:11:09 +0700 Subject: [PATCH] Update files --- packages/app/src/components/code-insets.ts | 7 +++-- packages/app/src/components/diff-viewer.tsx | 5 +-- .../app/src/components/tool-call-details.tsx | 31 ++++++++++++------- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/packages/app/src/components/code-insets.ts b/packages/app/src/components/code-insets.ts index d00356b66..faab5e743 100644 --- a/packages/app/src/components/code-insets.ts +++ b/packages/app/src/components/code-insets.ts @@ -1,7 +1,10 @@ export function getCodeInsets(theme: any) { - const currentHorizontal = theme.spacing[3] + theme.spacing[2]; const padding = - typeof theme.spacing?.[4] === "number" ? theme.spacing[4] : currentHorizontal; + typeof theme.spacing?.[3] === "number" + ? theme.spacing[3] + : typeof theme.spacing?.[4] === "number" + ? theme.spacing[4] + : 12; const extraRight = theme.spacing[4]; const extraBottom = theme.spacing[3]; diff --git a/packages/app/src/components/diff-viewer.tsx b/packages/app/src/components/diff-viewer.tsx index 7228966dd..298c882e0 100644 --- a/packages/app/src/components/diff-viewer.tsx +++ b/packages/app/src/components/diff-viewer.tsx @@ -102,11 +102,12 @@ const styles = StyleSheet.create((theme) => { }, linesContainer: { alignSelf: "flex-start", + padding: insets.padding, }, line: { minWidth: "100%", - paddingHorizontal: insets.padding, - paddingVertical: insets.padding, + paddingHorizontal: 0, + paddingVertical: theme.spacing[1], }, lineText: { fontFamily: Fonts.mono, diff --git a/packages/app/src/components/tool-call-details.tsx b/packages/app/src/components/tool-call-details.tsx index bd75f164d..cd04eed67 100644 --- a/packages/app/src/components/tool-call-details.tsx +++ b/packages/app/src/components/tool-call-details.tsx @@ -161,7 +161,7 @@ export function ToolCallDetailsContent({ const isFullBleed = display.type === "edit" || display.type === "shell"; if (display.type === "shell") { - const combinedText = `$ ${display.command}${display.output ? `\n${display.output}` : ""}`; + const hasOutput = Boolean(display.output); sections.push( @@ -178,7 +178,11 @@ export function ToolCallDetailsContent({ contentContainerStyle={styles.codeHorizontalContent} > - {combinedText} + + $ + {display.command} + {hasOutput ? `\n\n${display.output}` : ""} + @@ -424,16 +428,19 @@ const styles = StyleSheet.create((theme) => { scrollContent: { padding: insets.padding, }, - scrollText: { - fontFamily: Fonts.mono, - fontSize: theme.fontSize.xs, - color: theme.colors.foreground, - lineHeight: 18, - }, - jsonScroll: { - borderWidth: theme.borderWidth[1], - borderColor: theme.colors.border, - borderRadius: theme.borderRadius.base, + scrollText: { + fontFamily: Fonts.mono, + fontSize: theme.fontSize.xs, + color: theme.colors.foreground, + lineHeight: 18, + }, + shellPrompt: { + color: theme.colors.foregroundMuted, + }, + jsonScroll: { + borderWidth: theme.borderWidth[1], + borderColor: theme.colors.border, + borderRadius: theme.borderRadius.base, backgroundColor: theme.colors.surface2, }, jsonScrollError: {