1import { WS_METHODS } from "@t3tools/contracts";
2import { Atom } from "effect/reactivity";
3
4import { createEnvironmentRpcCommand } from "./runtime.ts";
5import type { EnvironmentRegistry } from "../connection/registry.ts";
6
7export function createShellEnvironmentAtoms<R, E>(
8 runtime: Atom.AtomRuntime<EnvironmentRegistry | R, E>,
9) {
10 return {
11 openInEditor: createEnvironmentRpcCommand(runtime, {
12 label: "environment-data:shell:open-in-editor",
13 tag: WS_METHODS.shellOpenInEditor,
14 }),
15 };
16}