feat(tool-call-sheet): improve MCP tool call display

- Extract key-value pairs from tool arguments and results
- Add Input/Output group headers with visual separation
- Fix Playwright MCP tool calls not being clickable (pass data.input as args)
- Increase default sheet height to 60%
- Add extractKeyValuePairs utility function using Zod

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2026-01-03 15:23:49 +07:00
co-authored by Claude Opus 4.5
parent 914cebc914
commit 8add1a6620
3 changed files with 178 additions and 39 deletions
@@ -290,7 +290,7 @@ export function AgentStreamView({
<ToolCall
toolName={toolLabel}
kind={data.kind}
args={undefined}
args={data.input}
result={data.result}
error={data.error}
status={data.status as "executing" | "completed" | "failed"}
@@ -594,7 +594,7 @@ function WorkingIndicator() {
};
}, [dotOne, dotTwo, dotThree]);
const translateDistance = -4;
const translateDistance = -2;
const dotOneStyle = useAnimatedStyle(() => ({
opacity: 0.3 + dotOne.value * 0.7,
transform: [{ translateY: dotOne.value * translateDistance }],
@@ -612,7 +612,6 @@ function WorkingIndicator() {
return (
<View style={stylesheet.workingIndicatorBubble}>
<Text style={stylesheet.workingIndicatorText}>Working</Text>
<View style={stylesheet.workingDotsRow}>
<Animated.View style={[stylesheet.workingDot, dotOneStyle]} />
<Animated.View style={[stylesheet.workingDot, dotTwoStyle]} />
@@ -1066,6 +1065,9 @@ const stylesheet = StyleSheet.create((theme) => ({
},
workingIndicatorWrapper: {
alignItems: "flex-start",
paddingLeft: 3,
paddingTop: theme.spacing[3],
paddingBottom: theme.spacing[2],
},
workingIndicatorBubble: {
flexDirection: "row",
@@ -1079,11 +1081,6 @@ const stylesheet = StyleSheet.create((theme) => ({
borderWidth: 0,
alignSelf: "flex-start",
},
workingIndicatorText: {
color: theme.colors.mutedForeground,
fontSize: theme.fontSize.sm,
fontWeight: theme.fontWeight.semibold,
},
workingDotsRow: {
flexDirection: "row",
alignItems: "center",