If we have multiple artifacts of the same type, it is impossible to set the current artifact to be a specific artifact. A better API for actions might be:
interface UseArtifactsActions {
setValue: (value: string | null) => void;
dismiss: (type: string) => void;
restore: (type: string) => void;
setValueById: (id: string | null) => void;
dismissById: (id: string) => void;
}