Files
paseo/plugin-examples/provider-direct/client/provider-result.tsx
T
Mohamed Boudra 35d2457d83 Let plugins provide coding agents (#4314)
Allow trusted local plugins to register complete coding-agent providers through the existing agent lifecycle. Includes direct and ACP implementations, SVG provider icons, custom timeline items, runnable examples, and public authoring documentation.

Closes #3547
Closes #3556
2026-09-04 19:56:57 +02:00

33 lines
967 B
TypeScript

import type { PluginTimelineItemProps } from "@getpaseo/plugin";
import { useMemo } from "react";
import { Text, View } from "react-native";
import type { z } from "zod";
import { providerResultSchema } from "../shared/provider-result";
type ProviderResultData = z.output<typeof providerResultSchema>;
export function ProviderResult({ item, theme }: PluginTimelineItemProps<ProviderResultData>) {
const styles = useMemo(
() => ({
card: {
gap: 4,
borderWidth: 1,
borderColor: theme.colors.border,
borderRadius: 10,
padding: 12,
backgroundColor: theme.colors.surface1,
},
label: { color: theme.colors.accent, fontWeight: "600" as const },
detail: { color: theme.colors.foreground },
}),
[theme],
);
return (
<View style={styles.card}>
<Text style={styles.label}>{item.data.label}</Text>
<Text style={styles.detail}>{item.data.detail}</Text>
</View>
);
}