ui/client/features/wizard/hooks/useWizard
Cockpit client (features), v0.9. Source: ui/client/features/wizard/hooks/useWizard.tsx.
Functions#
useWizard()#
useWizard():
object
Defined in: ui/client/features/wizard/hooks/useWizard.tsx:38
Connects to ui/server's /ws/wizard endpoint and drives the whole chat/ connection flow through the pure wizardReducer.
Returns#
awaitingAnswer
awaitingAnswer:
boolean=state.awaitingAnswer
cancel
cancel: () =>
void
Returns
void
cancelling
cancelling:
boolean=state.cancelling
input
input:
string
messages
messages:
ChatMessageData[] =state.messages
picker
picker: {
canChooseEntry: (entry) =>boolean;choose: (path) =>void;close: () =>void;crumbs:object[];error:string;expects:PathExpectation;hintFor: (entry) =>string;load: (path) =>Promise<void>;loading:boolean;open:boolean;openPicker: () =>void;tree:ProjectTree|null; } |undefined
The project picker for a question that wants a path; undefined for every other question.
planner
planner:
"mechanical"|"ai"
review
review: () =>
void
Returns
void
reviewable
reviewable:
boolean=state.reviewable
reviewing
reviewing:
boolean=state.reviewing
seedRoute
seedRoute:
string
setInput
setInput:
Dispatch<SetStateAction<string>>
setPlanner
setPlanner:
Dispatch<SetStateAction<"mechanical"|"ai">>
setSeedRoute
setSeedRoute:
Dispatch<SetStateAction<string>>
start
start: () =>
void
Returns
void
status
status:
WizardStatus=state.status
steps
steps:
WizardStep[] =state.steps
submitAnswer
submitAnswer: (
e) =>void
Parameters
e
FormEvent
Returns
void