feat: add VSCodium editor support (#2299)

Co-authored-by: Scott Densmore <scottdensmore@mac.com>
Co-authored-by: Allen Hutchison <adh@google.com>
This commit is contained in:
Pyush Sinha
2025-06-28 10:44:31 -07:00
committed by GitHub
parent 0d51e4b4b7
commit 3518ff7663
3 changed files with 32 additions and 5 deletions

View File

@@ -56,6 +56,7 @@ describe('editor utils', () => {
win32Command: string;
}> = [
{ editor: 'vscode', command: 'code', win32Command: 'code.cmd' },
{ editor: 'vscodium', command: 'codium', win32Command: 'codium.cmd' },
{ editor: 'windsurf', command: 'windsurf', win32Command: 'windsurf' },
{ editor: 'cursor', command: 'cursor', win32Command: 'cursor' },
{ editor: 'vim', command: 'vim', win32Command: 'vim' },
@@ -112,6 +113,7 @@ describe('editor utils', () => {
win32Command: string;
}> = [
{ editor: 'vscode', command: 'code', win32Command: 'code.cmd' },
{ editor: 'vscodium', command: 'codium', win32Command: 'codium.cmd' },
{ editor: 'windsurf', command: 'windsurf', win32Command: 'windsurf' },
{ editor: 'cursor', command: 'cursor', win32Command: 'cursor' },
{ editor: 'zed', command: 'zed', win32Command: 'zed' },
@@ -171,7 +173,13 @@ describe('editor utils', () => {
});
describe('openDiff', () => {
const spawnEditors: EditorType[] = ['vscode', 'windsurf', 'cursor', 'zed'];
const spawnEditors: EditorType[] = [
'vscode',
'vscodium',
'windsurf',
'cursor',
'zed',
];
for (const editor of spawnEditors) {
it(`should call spawn for ${editor}`, async () => {
const mockSpawn = {
@@ -285,7 +293,13 @@ describe('editor utils', () => {
expect(allowEditorTypeInSandbox('vim')).toBe(true);
});
const guiEditors: EditorType[] = ['vscode', 'windsurf', 'cursor', 'zed'];
const guiEditors: EditorType[] = [
'vscode',
'vscodium',
'windsurf',
'cursor',
'zed',
];
for (const editor of guiEditors) {
it(`should not allow ${editor} in sandbox mode`, () => {
process.env.SANDBOX = 'sandbox';