Fix terminal slot review issues
This commit is contained in:
@@ -2161,12 +2161,19 @@ export const CreateTerminalResponseSchema = z.object({
|
||||
|
||||
export const SubscribeTerminalResponseSchema = z.object({
|
||||
type: z.literal("subscribe_terminal_response"),
|
||||
payload: z.object({
|
||||
terminalId: z.string(),
|
||||
slot: z.number().int().min(0).max(255),
|
||||
error: z.string().nullable(),
|
||||
requestId: z.string(),
|
||||
}),
|
||||
payload: z.union([
|
||||
z.object({
|
||||
terminalId: z.string(),
|
||||
slot: z.number().int().min(0).max(255),
|
||||
error: z.null(),
|
||||
requestId: z.string(),
|
||||
}),
|
||||
z.object({
|
||||
terminalId: z.string(),
|
||||
error: z.string(),
|
||||
requestId: z.string(),
|
||||
}),
|
||||
]),
|
||||
});
|
||||
|
||||
export const KillTerminalResponseSchema = z.object({
|
||||
|
||||
@@ -84,7 +84,7 @@ export function decodeTerminalStreamFrame(bytes: Uint8Array): TerminalStreamFram
|
||||
}
|
||||
return {
|
||||
opcode,
|
||||
slot: bytes[1] ?? 0,
|
||||
slot: bytes[1],
|
||||
payload: bytes.subarray(2),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user