Open History to see the last commit
1/**
2 * Homepage and /changes rows. Model events use the catalog slug as
3 * subjectId, which GET /models/$provider/$modelId accepts.
4 */
5export function modelChangeHref(change: {
6 type: string
7 providerId: string
8 subjectId: string
9}): string | null {
10 if (!change.type.startsWith('model.')) return null
11 if (change.providerId === '' || change.subjectId === '') return null
12 return `/models/${encodeURIComponent(change.providerId)}/${encodeURIComponent(change.subjectId)}`
13}