46 lines · 1.6 KB · TypeScript
RawDownload
import {  createAtomCommandScheduler,  createRuntimeCommand,} from "@t3tools/client-runtime/state/runtime"; import { connectionAtomRuntime } from "../connection/runtime";import {  linkPrimaryEnvironmentToCloud,  type CloudLinkMode,  type CloudLinkTarget,  unlinkPrimaryEnvironmentFromCloud,  updatePrimaryCloudPreferences,} from "./linkEnvironment"; const cloudLinkScheduler = createAtomCommandScheduler();const cloudLinkConcurrency = {  mode: "serial" as const,  key: (input: { readonly target: CloudLinkTarget }) => input.target.environmentId,}; export const linkPrimaryEnvironment = createRuntimeCommand(connectionAtomRuntime, {  label: "web:cloud:link-primary-environment",  scheduler: cloudLinkScheduler,  concurrency: cloudLinkConcurrency,  execute: (input: {    readonly target: CloudLinkTarget;    readonly clerkToken: string;    readonly mode?: CloudLinkMode;  }) => linkPrimaryEnvironmentToCloud(input),}); export const unlinkPrimaryEnvironment = createRuntimeCommand(connectionAtomRuntime, {  label: "web:cloud:unlink-primary-environment",  scheduler: cloudLinkScheduler,  concurrency: cloudLinkConcurrency,  execute: (input: { readonly target: CloudLinkTarget; readonly clerkToken: string | null }) =>    unlinkPrimaryEnvironmentFromCloud(input),}); export const updatePrimaryEnvironmentPreferences = createRuntimeCommand(connectionAtomRuntime, {  label: "web:cloud:update-primary-environment-preferences",  scheduler: cloudLinkScheduler,  concurrency: cloudLinkConcurrency,  execute: (input: { readonly target: CloudLinkTarget; readonly publishAgentActivity: boolean }) =>    updatePrimaryCloudPreferences(input),});

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t