@@ -113,7 +113,7 @@ describe('toCopyableMarkdown', () => {
113113 'Read <workspace_resource>{"type":"file","path":"files/notes.md","title":"notes.md"}</workspace_resource>.'
114114
115115 expect ( serializeCopyableMarkdown ( message ) ) . toEqual ( {
116- markdown : 'Read notes.md.' ,
116+ markdown : 'Read [ notes.md](sim:file/files/notes.md) .' ,
117117 hasUnresolvedFile : true ,
118118 } )
119119 } )
@@ -126,7 +126,18 @@ describe('toCopyableMarkdown', () => {
126126 const content = prepareCopyableMarkdown ( message , [ ] , refreshWorkspaceFiles )
127127 expect ( content ) . not . toBeTypeOf ( 'string' )
128128 if ( typeof content === 'string' ) throw new Error ( 'Expected deferred clipboard content' )
129- expect ( content . fallback ) . toBe ( 'Read The Bell at Low Tide.md.' )
129+ expect ( content . fallback ) . toBe (
130+ 'Read [The Bell at Low Tide.md](sim:file/files/The%20Bell%20at%20Low%20Tide.md).'
131+ )
132+ expect ( parseChipLinks ( content . fallback ) ) . toEqual ( [
133+ {
134+ kind : 'file' ,
135+ id : 'files/The%20Bell%20at%20Low%20Tide.md' ,
136+ label : 'The Bell at Low Tide.md' ,
137+ start : 5 ,
138+ end : 78 ,
139+ } ,
140+ ] )
130141 await expect ( content . prepare ( ) ) . resolves . toBe (
131142 'Read [The Bell at Low Tide.md](sim:file/file_bell).'
132143 )
@@ -157,6 +168,8 @@ describe('toCopyableMarkdown', () => {
157168
158169 const content = getRenderableMessageText ( contentBlocks , 'Fallback without the resource.' )
159170
160- expect ( toCopyableMarkdown ( content , WORKSPACE_FILES ) ) . toBe ( 'Read notes.md for details.' )
171+ expect ( toCopyableMarkdown ( content , WORKSPACE_FILES ) ) . toBe (
172+ 'Read [notes.md](sim:file/files/notes.md) for details.'
173+ )
161174 } )
162175} )
0 commit comments