fix(core): preserve shell output tail
Shell truncation read from cursor zero, so large command output kept the head instead of the useful tail. Read the final capture window and cover the direction with head/tail markers.
This commit is contained in:
parent
49cb73b348
commit
d8b7a0a391
9 changed files with 32 additions and 12 deletions
|
|
@ -57,7 +57,11 @@ export const ShellHandler = HttpApiBuilder.group(Api, "server.shell", (handlers)
|
|||
Effect.fn(function* (ctx) {
|
||||
const shell = yield* Shell.Service
|
||||
return yield* response(
|
||||
shell.output(ctx.params.id, { cursor: ctx.query.cursor, limit: ctx.query.limit }).pipe(
|
||||
shell.output(ctx.params.id, {
|
||||
cursor: ctx.query.cursor,
|
||||
limit: ctx.query.limit,
|
||||
keep: ctx.query.keep,
|
||||
}).pipe(
|
||||
Effect.catchTag(
|
||||
"Shell.NotFoundError",
|
||||
() => new ShellNotFoundError({ id: ctx.params.id, message: `Shell command not found: ${ctx.params.id}` }),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue