| 4 | const source: BrowserChatAttachment = { id: 'selection-1', text: '\t partial(\r\n a + b\n', path: 'src/math.ts', project: 'sample', startLine: 3, startColumn: 8, endLine: 5, endColumn: 1, sourceVersion: 'sha256:test' }; |
| 5 | const attached = (content: string) => JSON.parse(content.slice(content.indexOf('\n{') + 1).split('\n')[0]); |
| 6 | const reader = (text = source.text, kind: 'file' | 'selection' = 'selection'): BrowserChatReaderContext => ({ project: source.project, path: source.path, status: 'ready', source: { ...source, text, kind } }); |
| 7 | |
| 8 | describe('browser chat context', () => { |
| 9 | it('preserves partial selection characters, whitespace, line endings and range exactly', () => { |