Files
t3code/packages/contracts/src/editor.ts
T
Julius Marminge 4a08686e74 Add Zed editor support across open-in flow
- add `zed` to shared editor contracts and Open In picker
- add Zed icon and wire launch resolution tests on macOS
- wrap branch optimistic updates in `startTransition` to avoid sync warnings
2026-03-02 18:53:21 -08:00

19 lines
628 B
TypeScript

import { Schema } from "effect";
import { TrimmedNonEmptyString } from "./baseSchemas";
export const EDITORS = [
{ id: "cursor", label: "Cursor", command: "cursor" },
{ id: "vscode", label: "VS Code", command: "code" },
{ id: "zed", label: "Zed", command: "zed" },
{ id: "file-manager", label: "File Manager", command: null },
] as const;
export const EditorId = Schema.Literals(EDITORS.map((e) => e.id));
export type EditorId = typeof EditorId.Type;
export const OpenInEditorInput = Schema.Struct({
cwd: TrimmedNonEmptyString,
editor: EditorId,
});
export type OpenInEditorInput = typeof OpenInEditorInput.Type;