fix: wrap orchestrator messages view with ToolCallSheetProvider

The ToolCall component requires the ToolCallSheetProvider context to
function properly. The orchestrator messages view was rendering ToolCall
components without this provider, which would cause a crash when tapping
tool call badges.

🤖 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
2025-12-21 18:36:11 +00:00
co-authored by Claude Opus 4.5
parent 4927e2b04e
commit 253af9988c
2 changed files with 6 additions and 5 deletions
@@ -1,4 +1,4 @@
import { View, ScrollView } from "react-native";
import { ScrollView } from "react-native";
import { StyleSheet } from "react-native-unistyles";
import { forwardRef } from "react";
import {
@@ -7,6 +7,7 @@ import {
ActivityLog,
ToolCall,
} from "@/components/message";
import { ToolCallSheetProvider } from "@/components/tool-call-sheet";
import type { MessageEntry } from "@/contexts/session-context";
interface OrchestratorMessagesViewProps {
@@ -19,7 +20,7 @@ export const OrchestratorMessagesView = forwardRef<ScrollView, OrchestratorMessa
function OrchestratorMessagesView({ messages, currentAssistantMessage, onArtifactClick }, ref) {
return (
<>
<ToolCallSheetProvider>
<ScrollView
ref={ref}
style={styles.scrollView}
@@ -101,8 +102,7 @@ export const OrchestratorMessagesView = forwardRef<ScrollView, OrchestratorMessa
/>
)}
</ScrollView>
</>
</ToolCallSheetProvider>
);
}
);