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

editor.ts

16 lines526 Bytes

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