[UX] click shortcut in chat to go to source file in workbench

This commit is contained in:
Hugo SANSON
2024-11-18 22:37:33 +01:00
committed by Hgosansn
parent 233d22e080
commit d419a3c4b5
6 changed files with 47 additions and 15 deletions

11
app/utils/diff.spec.ts Normal file
View File

@@ -0,0 +1,11 @@
import { describe, expect, it } from 'vitest';
import { extractRelativePath } from './diff';
import { WORK_DIR } from './constants';
describe('Diff', () => {
it('should strip out Work_dir', () => {
const filePath = `${WORK_DIR}/index.js`;
const result = extractRelativePath(filePath);
expect(result).toBe('index.js');
});
});