A hook call used to record only how it was taken; its run's answer went to the chat alone and was lost to the call once the job was pruned. Now `bot_hook_events` keeps `response`, `response_message_id` and `responded_at`, written on every call a run took in when that run ends (completed, failed, lost, stopped or cancelled) by `recordHookCallResponse` in the job helpers, and calls turn done or failed. The Calls view searches what calls sent and what runs answered, filters by status and pages; Show all loads one call whole. Bots get `search_hook_calls` and `read_hook_call` for their own hooks (never in a hook call's own run), with payloads always marked as outside data. Calls are kept for the app setting `hook_events_keep_days` (Settings > General, default now 30 days). The caller still only gets 202 Queued. Co-Authored-By: Claude Opus 5.5 <[email protected]>
33 lines
1021 B
TypeScript
33 lines
1021 B
TypeScript
import Span from "@moduletrace/twui/layout/Span";
|
|
import Stack from "@moduletrace/twui/layout/Stack";
|
|
import { twMerge } from "tailwind-merge";
|
|
|
|
type Props = {
|
|
label: string;
|
|
text: string;
|
|
/**
|
|
* A preview is kept short; the whole call shows everything.
|
|
*/
|
|
full?: boolean;
|
|
};
|
|
|
|
/**
|
|
* One side of a hook call, what it sent or what its run answered, in a
|
|
* sunken block.
|
|
*/
|
|
export default function HookCallText({ label, text, full }: Props) {
|
|
return (
|
|
<Stack className="w-full gap-0.5! items-stretch">
|
|
<Span className="text-[11px] leading-4 text-ink-secondary">{label}</Span>
|
|
<Span
|
|
className={twMerge(
|
|
"block w-full overflow-hidden whitespace-pre-wrap break-all rounded-default-xs bg-sunken px-2 py-1 font-mono text-[12px] leading-4 text-ink-secondary",
|
|
full ? "max-h-80 overflow-y-auto" : "max-h-24",
|
|
)}
|
|
>
|
|
{text}
|
|
</Span>
|
|
</Stack>
|
|
);
|
|
}
|