Skip to content

Commit 902de3f

Browse files
committed
fix(files): sync materialized display names
1 parent 26e6206 commit 902de3f

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

apps/sim/lib/copilot/tools/handlers/materialize-file.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,11 @@ describe('executeMaterializeFile - save storage transition', () => {
325325
null
326326
)
327327
expect(dbChainMockFns.set).toHaveBeenCalledWith(
328-
expect.objectContaining({ context: 'workspace', originalName: 'image (1).png' })
328+
expect.objectContaining({
329+
context: 'workspace',
330+
originalName: 'image (1).png',
331+
displayName: 'image (1).png',
332+
})
329333
)
330334
expect(result.resources).toEqual([{ type: 'file', id: 'file-1', title: 'image (1).png' }])
331335
})

apps/sim/lib/copilot/tools/handlers/materialize-file.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ async function executeSave(
139139
chatId: null,
140140
messageId: null,
141141
originalName: materializedName,
142+
displayName: materializedName,
142143
size: verifiedSize,
143144
})
144145
.where(

0 commit comments

Comments
 (0)