Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/tests/hooks/useStoryCompareAi

Cockpit client (features), next. Source: ui/client/features/tests/hooks/useStoryCompareAi.tsx.

Functions#

useStoryCompareAi()#

useStoryCompareAi(feature): object

Defined in: ui/client/features/tests/hooks/useStoryCompareAi.tsx:15

Runs AI compare for the given feature through the inline Generate control. Mechanical mode makes no call at all -- the three-list compare it stands for is already drawn as the Story column above, "0 model calls" per design 8.6 guardrail 1. AI mode calls the model, which may only cite acceptance lines and code units; every citation is verified mechanically server-side before it comes back, so an unverifiable one is dropped there, never here. onRun is the control's only exit; nothing is written.

Parameters#

feature

string

Returns#

object

cancel

cancel: () => void

Returns

void

result

result: GenerateResult | null = run.result

run

run: (mode) => Promise<void> = start

Parameters
mode

GenerateMode

Returns

Promise<void>

running

running: boolean = run.running