Files
t3code/packages/contracts/src/editor.ts
T
Julius Marminge ecb4a1efa4 Add VS Code open support and stabilize chat autoscroll
- add VS Code to editor contracts and picker UI
- use `code --goto` for line/column targets in open resolution
- refine chat scroll intent handling to avoid unwanted stick-to-bottom jumps
2026-03-02 16:06:17 -08:00

18 lines
581 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: "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;