Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

editor.ts

19 lines691 Bytes

1import { Schema } from "effect";
2import { TrimmedNonEmptyString } from "./baseSchemas";
3​
4export const EDITORS = [
5 { id: "cursor", label: "Cursor", command: "cursor" },
6 { id: "vscode", label: "VS Code", command: "code" },
7 { id: "zed", label: "Zed", command: "zed" },
8 { id: "antigravity", label: "Antigravity", command: "agy" },
9 { id: "file-manager", label: "File Manager", command: null },
10] as const;
11​
12export const EditorId = Schema.Literals(EDITORS.map((e) => e.id));
13export type EditorId = typeof EditorId.Type;
14​
15export const OpenInEditorInput = Schema.Struct({
16 cwd: TrimmedNonEmptyString,
17 editor: EditorId,
18});
19export type OpenInEditorInput = typeof OpenInEditorInput.Type;