Update files

This commit is contained in:
Mohamed Boudra
2026-02-04 13:11:09 +07:00
parent b9464e5bd3
commit c73f210b9e
3 changed files with 27 additions and 16 deletions
+5 -2
View File
@@ -1,7 +1,10 @@
export function getCodeInsets(theme: any) { export function getCodeInsets(theme: any) {
const currentHorizontal = theme.spacing[3] + theme.spacing[2];
const padding = 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 extraRight = theme.spacing[4];
const extraBottom = theme.spacing[3]; const extraBottom = theme.spacing[3];
+3 -2
View File
@@ -102,11 +102,12 @@ const styles = StyleSheet.create((theme) => {
}, },
linesContainer: { linesContainer: {
alignSelf: "flex-start", alignSelf: "flex-start",
padding: insets.padding,
}, },
line: { line: {
minWidth: "100%", minWidth: "100%",
paddingHorizontal: insets.padding, paddingHorizontal: 0,
paddingVertical: insets.padding, paddingVertical: theme.spacing[1],
}, },
lineText: { lineText: {
fontFamily: Fonts.mono, fontFamily: Fonts.mono,
@@ -161,7 +161,7 @@ export function ToolCallDetailsContent({
const isFullBleed = display.type === "edit" || display.type === "shell"; const isFullBleed = display.type === "edit" || display.type === "shell";
if (display.type === "shell") { if (display.type === "shell") {
const combinedText = `$ ${display.command}${display.output ? `\n${display.output}` : ""}`; const hasOutput = Boolean(display.output);
sections.push( sections.push(
<View key="shell" style={styles.section}> <View key="shell" style={styles.section}>
<View style={styles.diffContainer}> <View style={styles.diffContainer}>
@@ -178,7 +178,11 @@ export function ToolCallDetailsContent({
contentContainerStyle={styles.codeHorizontalContent} contentContainerStyle={styles.codeHorizontalContent}
> >
<View style={styles.codeLine}> <View style={styles.codeLine}>
<Text selectable style={styles.scrollText}>{combinedText}</Text> <Text selectable style={styles.scrollText}>
<Text style={styles.shellPrompt}>$ </Text>
{display.command}
{hasOutput ? `\n\n${display.output}` : ""}
</Text>
</View> </View>
</ScrollView> </ScrollView>
</ScrollView> </ScrollView>
@@ -424,16 +428,19 @@ const styles = StyleSheet.create((theme) => {
scrollContent: { scrollContent: {
padding: insets.padding, padding: insets.padding,
}, },
scrollText: { scrollText: {
fontFamily: Fonts.mono, fontFamily: Fonts.mono,
fontSize: theme.fontSize.xs, fontSize: theme.fontSize.xs,
color: theme.colors.foreground, color: theme.colors.foreground,
lineHeight: 18, lineHeight: 18,
}, },
jsonScroll: { shellPrompt: {
borderWidth: theme.borderWidth[1], color: theme.colors.foregroundMuted,
borderColor: theme.colors.border, },
borderRadius: theme.borderRadius.base, jsonScroll: {
borderWidth: theme.borderWidth[1],
borderColor: theme.colors.border,
borderRadius: theme.borderRadius.base,
backgroundColor: theme.colors.surface2, backgroundColor: theme.colors.surface2,
}, },
jsonScrollError: { jsonScrollError: {