feat: add getAssetFilename util with fallback chain (#8309)

## Summary

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8309-feat-add-getAssetFilename-util-with-fallback-chain-2f36d73d36508141be81ecc52c0a2858)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Alexander Brown
2026-01-24 17:50:00 -08:00
committed by GitHub
parent 7b0830a4ca
commit 702c917e57
4 changed files with 15 additions and 16 deletions

View File

@@ -282,16 +282,6 @@ describe('createModelNodeFromAsset', () => {
expectedCode: 'INVALID_ASSET' as const,
errorPattern: /Invalid filename.*expected non-empty string/
},
{
case: 'non-string filename',
overrides: {
user_metadata: { filename: 123 },
metadata: undefined,
name: ''
},
expectedCode: 'INVALID_ASSET' as const,
errorPattern: /Invalid filename.*expected non-empty string, got number/
},
{
case: 'empty filename with no fallback',
overrides: {