Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

1008 B
Raw Blame
<script lang="ts">
	import { feX, feFileText } from '$src/feather';
	import Icon from '$src/Icon.svelte';


	interface Props {
		file: any;
		canDelete?: boolean;
		ondelete?: (...args: any[]) => void;
		onshowContents?: (...args: any[]) => void;
	}

	let { file, canDelete = false, ondelete, onshowContents }: Props = $props();
</script>

<div class="flex mb-2 items-center self-start gap-1.5 rounded-full border border-slate-200 bg-white pl-2.5 pr-3 py-1.5">
	{#if canDelete}
		<button
			onclick={() => {
				ondelete?.();
			}}
			class="flex h-4 w-4 rounded-full"
		>
			<Icon icon={feX} class="m-auto h-3.5 w-3.5 text-slate-600" />
		</button>
	{:else}
		<!-- If can not delete, then the action is to show file contents.	-->
		<button
			onclick={() => {
				onshowContents?.();
			}}
			class="flex h-4 w-4 rounded-full"
		>
			<Icon icon={feFileText} class="m-auto h-3.5 w-3.5 text-slate-600" />
		</button>
	{/if}
	<span class="text-xs text-black">{file.path.replace(/^.*[\/\\]/, '')}</span>
</div>