mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-07-03 20:41:07 +02:00
add embedded terminal to code mode (node-pty + xterm)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
45100580c9
commit
1632b16dfc
14 changed files with 467 additions and 15 deletions
|
|
@ -648,6 +648,51 @@ const ipcSchemas = {
|
|||
}),
|
||||
res: z.null(),
|
||||
},
|
||||
// ==========================================================================
|
||||
// Embedded terminal (Code section): one PTY per coding session
|
||||
// ==========================================================================
|
||||
// Create-or-attach. Returns the scrollback backlog so a remounted view can
|
||||
// repaint what happened while it was closed.
|
||||
'terminal:ensure': {
|
||||
req: z.object({
|
||||
id: z.string(),
|
||||
cwd: z.string(),
|
||||
cols: z.number().int().positive(),
|
||||
rows: z.number().int().positive(),
|
||||
}),
|
||||
res: z.object({
|
||||
backlog: z.string(),
|
||||
running: z.boolean(),
|
||||
}),
|
||||
},
|
||||
'terminal:input': {
|
||||
req: z.object({
|
||||
id: z.string(),
|
||||
data: z.string(),
|
||||
}),
|
||||
res: z.object({ success: z.literal(true) }),
|
||||
},
|
||||
'terminal:resize': {
|
||||
req: z.object({
|
||||
id: z.string(),
|
||||
cols: z.number().int().positive(),
|
||||
rows: z.number().int().positive(),
|
||||
}),
|
||||
res: z.object({ success: z.literal(true) }),
|
||||
},
|
||||
'terminal:dispose': {
|
||||
req: z.object({ id: z.string() }),
|
||||
res: z.object({ success: z.literal(true) }),
|
||||
},
|
||||
// main → renderer streams
|
||||
'terminal:data': {
|
||||
req: z.object({ id: z.string(), data: z.string() }),
|
||||
res: z.null(),
|
||||
},
|
||||
'terminal:exit': {
|
||||
req: z.object({ id: z.string(), exitCode: z.number() }),
|
||||
res: z.null(),
|
||||
},
|
||||
'granola:setConfig': {
|
||||
req: z.object({
|
||||
enabled: z.boolean(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue