mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-20 21:31:32 +03:00
d98611a04b
Fully implements webterm support for multiple dill terminal sessions. Remaining work includes styling, session creation safety (name-wise), and general cleanup. Co-authored-by: tomholford <tomholford@users.noreply.github.com> Co-authored-by: liam-fitzgerald <liam@tlon.io>
21 lines
520 B
TypeScript
21 lines
520 B
TypeScript
import { Scry } from '../../http-api/src'
|
|
import { Poke } from '../../http-api/src/types';
|
|
import { Belt, Task, SessionTask } from './types';
|
|
|
|
export const pokeTask = (session: string, task: Task): Poke<SessionTask> => ({
|
|
app: 'herm',
|
|
mark: 'herm-task',
|
|
json: { session, ...task }
|
|
});
|
|
|
|
export const pokeBelt = (
|
|
session: string,
|
|
belt: Belt
|
|
): Poke<SessionTask> => pokeTask(session, { belt });
|
|
|
|
//NOTE scry will return string[]
|
|
export const scrySessions = (): Scry => ({
|
|
app: 'herm',
|
|
path: `/sessions`
|
|
});
|