chore: generate
This commit is contained in:
@@ -1,2 +1 @@
|
||||
export function initProjectors() {
|
||||
}
|
||||
export function initProjectors() {}
|
||||
|
||||
@@ -19,7 +19,9 @@ export const controlHandlers = HttpApiBuilder.group(RootHttpApi, "control", (han
|
||||
return true
|
||||
})
|
||||
|
||||
const authRemove = Effect.fn("ControlHttpApi.authRemove")(function* (ctx: { params: { providerID: ProviderV2.ID } }) {
|
||||
const authRemove = Effect.fn("ControlHttpApi.authRemove")(function* (ctx: {
|
||||
params: { providerID: ProviderV2.ID }
|
||||
}) {
|
||||
yield* auth.remove(ctx.params.providerID).pipe(Effect.orDie)
|
||||
return true
|
||||
})
|
||||
|
||||
@@ -43,7 +43,10 @@ function eventResponse(events: EventV2.Interface) {
|
||||
Stream.map((event) => ({ id: event.id, type: event.type, properties: event.data })),
|
||||
)
|
||||
const disposed = Stream.callback<{ id: string; type: string; properties: unknown }>((queue) => {
|
||||
const listener = (event: { directory?: string; payload: { id?: string; type?: string; properties?: unknown } }) => {
|
||||
const listener = (event: {
|
||||
directory?: string
|
||||
payload: { id?: string; type?: string; properties?: unknown }
|
||||
}) => {
|
||||
if (event.directory !== instance.directory || event.payload.type !== "server.instance.disposed") return
|
||||
Queue.offerUnsafe(queue, {
|
||||
id: event.payload.id ?? eventID(),
|
||||
@@ -56,7 +59,10 @@ function eventResponse(events: EventV2.Interface) {
|
||||
() => Effect.sync(() => GlobalBus.off("event", listener)),
|
||||
)
|
||||
})
|
||||
const output = stream.pipe(Stream.merge(disposed, { haltStrategy: "left" }), Stream.takeUntil((event) => event.type === "server.instance.disposed"))
|
||||
const output = stream.pipe(
|
||||
Stream.merge(disposed, { haltStrategy: "left" }),
|
||||
Stream.takeUntil((event) => event.type === "server.instance.disposed"),
|
||||
)
|
||||
const heartbeat = Stream.tick("10 seconds").pipe(
|
||||
Stream.drop(1),
|
||||
Stream.map(() => ({ id: eventID(), type: "server.heartbeat", properties: {} })),
|
||||
|
||||
@@ -88,7 +88,8 @@ export const tuiHandlers = HttpApiBuilder.group(InstanceHttpApi, "tui", (handler
|
||||
yield* events.publish(TuiEvent.PromptAppend, ctx.payload.properties)
|
||||
if (ctx.payload.type === TuiEvent.CommandExecute.type)
|
||||
yield* events.publish(TuiEvent.CommandExecute, ctx.payload.properties)
|
||||
if (ctx.payload.type === TuiEvent.ToastShow.type) yield* events.publish(TuiEvent.ToastShow, ctx.payload.properties)
|
||||
if (ctx.payload.type === TuiEvent.ToastShow.type)
|
||||
yield* events.publish(TuiEvent.ToastShow, ctx.payload.properties)
|
||||
if (ctx.payload.type === TuiEvent.SessionSelect.type)
|
||||
yield* events.publish(TuiEvent.SessionSelect, ctx.payload.properties)
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user