feat(agent): add git diff viewer and improve permission handling

- Add git diff viewer screen accessible via agent dropdown menu
- Implement git_diff_request/response WebSocket messages
- Add dropdown menu to agent screen header with "View Changes" option
- Clear pending permissions when starting new agent turn to prevent conflicts
- Treat agent refusals as completed rather than failed state
- Add test coverage for permission handling edge cases
- Configure vitest to run in single-threaded mode for stability
- Remove redundant wrapper in agent stream view

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2025-10-26 22:19:16 +01:00
parent 70a1852e57
commit 086dde30cc
11 changed files with 627 additions and 29 deletions

View File

@@ -6,9 +6,10 @@ import { ArrowLeft } from "lucide-react-native";
interface BackHeaderProps {
title?: string;
rightContent?: React.ReactNode;
}
export function BackHeader({ title }: BackHeaderProps) {
export function BackHeader({ title, rightContent }: BackHeaderProps) {
const { theme } = useUnistyles();
const insets = useSafeAreaInsets();
@@ -31,8 +32,10 @@ export function BackHeader({ title }: BackHeaderProps) {
)}
</View>
{/* Right side - Empty for now */}
<View style={styles.headerRight} />
{/* Right side */}
<View style={styles.headerRight}>
{rightContent}
</View>
</View>
</View>
</View>