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
|
|
@ -809,6 +809,7 @@ export type Endpoint21_4Input = {
|
|||
readonly location?: Endpoint21_4Request["query"]["location"]
|
||||
readonly cursor?: Endpoint21_4Request["query"]["cursor"]
|
||||
readonly limit?: Endpoint21_4Request["query"]["limit"]
|
||||
readonly keep?: Endpoint21_4Request["query"]["keep"]
|
||||
}
|
||||
export type Endpoint21_4Output = EffectValue<ReturnType<RawClient["server.shell"]["shell.output"]>>
|
||||
export type ShellOutputOperation<E = never> = (input: Endpoint21_4Input) => Effect.Effect<Endpoint21_4Output, E>
|
||||
|
|
|
|||
|
|
@ -971,11 +971,12 @@ type Endpoint21_4Input = {
|
|||
readonly location?: Endpoint21_4Request["query"]["location"]
|
||||
readonly cursor?: Endpoint21_4Request["query"]["cursor"]
|
||||
readonly limit?: Endpoint21_4Request["query"]["limit"]
|
||||
readonly keep?: Endpoint21_4Request["query"]["keep"]
|
||||
}
|
||||
const Endpoint21_4 = (raw: RawClient["server.shell"]) => (input: Endpoint21_4Input) =>
|
||||
raw["shell.output"]({
|
||||
params: { id: input["id"] },
|
||||
query: { location: input["location"], cursor: input["cursor"], limit: input["limit"] },
|
||||
query: { location: input["location"], cursor: input["cursor"], limit: input["limit"], keep: input["keep"] },
|
||||
}).pipe(Effect.mapError(mapClientError))
|
||||
|
||||
type Endpoint21_5Request = Parameters<RawClient["server.shell"]["shell.remove"]>[0]
|
||||
|
|
|
|||
|
|
@ -1411,7 +1411,7 @@ export function make(options: ClientOptions) {
|
|||
{
|
||||
method: "GET",
|
||||
path: `/api/shell/${encodeURIComponent(input.id)}/output`,
|
||||
query: { location: input["location"], cursor: input["cursor"], limit: input["limit"] },
|
||||
query: { location: input["location"], cursor: input["cursor"], limit: input["limit"], keep: input["keep"] },
|
||||
successStatus: 200,
|
||||
declaredStatuses: [404, 401, 400],
|
||||
empty: false,
|
||||
|
|
|
|||
|
|
@ -4623,17 +4623,26 @@ export type ShellOutputInput = {
|
|||
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
|
||||
readonly cursor?: number | undefined
|
||||
readonly limit?: number | undefined
|
||||
readonly keep?: "head" | "tail" | undefined
|
||||
}["location"]
|
||||
readonly cursor?: {
|
||||
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
|
||||
readonly cursor?: number | undefined
|
||||
readonly limit?: number | undefined
|
||||
readonly keep?: "head" | "tail" | undefined
|
||||
}["cursor"]
|
||||
readonly limit?: {
|
||||
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
|
||||
readonly cursor?: number | undefined
|
||||
readonly limit?: number | undefined
|
||||
readonly keep?: "head" | "tail" | undefined
|
||||
}["limit"]
|
||||
readonly keep?: {
|
||||
readonly location?: { readonly directory?: string | undefined; readonly workspace?: string | undefined } | undefined
|
||||
readonly cursor?: number | undefined
|
||||
readonly limit?: number | undefined
|
||||
readonly keep?: "head" | "tail" | undefined
|
||||
}["keep"]
|
||||
}
|
||||
|
||||
export type ShellOutputOutput = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue