@fungi.computer/parakeet 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/dist/client-contributions.d.ts +1 -0
- package/dist/commands/awaiting-driver.d.ts +20 -0
- package/dist/commands/awaiting-driver.js +121 -0
- package/dist/commands/builtins.js +6 -4
- package/dist/commands/interactions.d.ts +25 -0
- package/dist/commands/interactions.js +76 -2
- package/dist/commands/run.js +3 -3
- package/dist/commands/slash.d.ts +7 -3
- package/dist/commands/slash.js +2 -0
- package/dist/commands/use-slash-commands.d.ts +13 -0
- package/dist/commands/use-slash-commands.js +58 -1
- package/dist/components/ChatComposer.d.ts +2 -0
- package/dist/components/ChatComposer.js +158 -40
- package/dist/components/ClientRows.js +42 -26
- package/dist/components/CodeBlock.js +3 -2
- package/dist/components/CompletionMenu.d.ts +54 -0
- package/dist/components/CompletionMenu.js +52 -0
- package/dist/components/ComposerModelKey.d.ts +11 -0
- package/dist/components/ComposerModelKey.js +9 -0
- package/dist/components/ComposerShell.d.ts +47 -0
- package/dist/components/ComposerShell.js +29 -0
- package/dist/components/DecisionComposer.d.ts +30 -0
- package/dist/components/DecisionComposer.js +145 -0
- package/dist/components/InteractionPanel.d.ts +10 -1
- package/dist/components/InteractionPanel.js +9 -4
- package/dist/components/SlashMenu.d.ts +1 -3
- package/dist/components/SlashMenu.js +5 -13
- package/dist/components/TimelineItem.d.ts +1 -0
- package/dist/components/TimelineItem.js +4 -4
- package/dist/components/ToolGroup.d.ts +1 -0
- package/dist/components/ToolGroup.js +8 -8
- package/dist/conversation-opening.d.ts +1 -1
- package/dist/conversation-opening.js +2 -2
- package/dist/conversation.d.ts +5 -1
- package/dist/conversation.js +84 -29
- package/dist/core/approval-decision.d.ts +198 -0
- package/dist/core/approval-decision.js +291 -0
- package/dist/core/awaiting-answer.d.ts +229 -0
- package/dist/core/awaiting-answer.js +303 -0
- package/dist/core/build-timeline.js +61 -7
- package/dist/core/client-actions.d.ts +1 -0
- package/dist/core/client-actions.js +7 -1
- package/dist/core/composer-model-name.d.ts +3 -0
- package/dist/core/composer-model-name.js +21 -0
- package/dist/core/display-text.d.ts +2 -0
- package/dist/core/display-text.js +7 -0
- package/dist/core/draft-storage.d.ts +6 -0
- package/dist/core/draft-storage.js +25 -5
- package/dist/core/session-projection.d.ts +1 -0
- package/dist/core/session-projection.js +3 -2
- package/dist/core/session-query.d.ts +8 -0
- package/dist/core/session-query.js +13 -11
- package/dist/core/session-view-state.d.ts +2 -4
- package/dist/core/session-view-state.js +27 -9
- package/dist/core/tool-groups.d.ts +3 -0
- package/dist/core/tool-groups.js +37 -1
- package/dist/core/tool-view.d.ts +6 -0
- package/dist/core/tool-view.js +33 -0
- package/dist/core/use-timeline-item-key.d.ts +3 -4
- package/dist/core/use-timeline-item-key.js +8 -14
- package/dist/headless.d.ts +10 -5
- package/dist/headless.js +9 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/parakeet.d.ts +6 -2
- package/dist/parakeet.js +24 -17
- package/dist/store/types.d.ts +14 -1
- package/dist/styles.css +911 -162
- package/dist/use-approval-awaiting.d.ts +22 -0
- package/dist/use-approval-awaiting.js +81 -0
- package/dist/use-decision.d.ts +20 -0
- package/dist/use-decision.js +79 -0
- package/docs/api/commands/slash.md +30 -26
- package/docs/api/headless.md +917 -54
- package/docs/api/index.md +166 -5
- package/package.json +17 -8
- package/src/completion-menu.css +72 -0
- package/src/composer-shell.css +125 -0
- package/src/styles.css +99 -53
- package/dist/components/WaitingNotice.d.ts +0 -7
- package/dist/components/WaitingNotice.js +0 -8
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ApprovalSource } from "./core/approval-decision.js";
|
|
2
|
+
import type { ParakeetInteractions } from "./commands/interactions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Put one source's pending approval in the composer's queue. While the record
|
|
5
|
+
* is answerable and the person is present it asks through decision prompts;
|
|
6
|
+
* a changed revision replaces the item, so only the record on screen can be
|
|
7
|
+
* answered. Esc postpones it: the record stays pending in the ledger.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useApprovalAwaiting(options: Readonly<{
|
|
10
|
+
source: ApprovalSource | undefined;
|
|
11
|
+
store: ParakeetInteractions;
|
|
12
|
+
/** Nothing is asked while this is false (observation not live, pane unfocused). */
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
/** The person's home folder, which paths are shortened against. */
|
|
15
|
+
home: string;
|
|
16
|
+
/** Cells to shorten the card's text to. */
|
|
17
|
+
width: number;
|
|
18
|
+
/** The longest denial note. */
|
|
19
|
+
noteLimit: number;
|
|
20
|
+
/** An error that reached the person as a refusal. */
|
|
21
|
+
onFailure: (cause: unknown) => void;
|
|
22
|
+
}>): void;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { createWhistleInteractionHost } from "@fungi.computer/whistle/interaction";
|
|
2
|
+
import { useEffect, useRef, useSyncExternalStore } from "react";
|
|
3
|
+
import { askApproval } from "./core/approval-decision.js";
|
|
4
|
+
const noApproval = () => undefined;
|
|
5
|
+
const noSubscription = () => () => undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Put one source's pending approval in the composer's queue. While the record
|
|
8
|
+
* is answerable and the person is present it asks through decision prompts;
|
|
9
|
+
* a changed revision replaces the item, so only the record on screen can be
|
|
10
|
+
* answered. Esc postpones it: the record stays pending in the ledger.
|
|
11
|
+
*/
|
|
12
|
+
export function useApprovalAwaiting(options) {
|
|
13
|
+
const { source, store, enabled, home, width, noteLimit, onFailure } = options;
|
|
14
|
+
// Only a different record, revision or right restarts the question: a
|
|
15
|
+
// resize, a fresh callback or a reread of the same revision must not move
|
|
16
|
+
// the person back to the first choice or reorder the queue.
|
|
17
|
+
const failure = useRef(onFailure);
|
|
18
|
+
failure.current = onFailure;
|
|
19
|
+
const layout = useRef({ home, width, noteLimit });
|
|
20
|
+
layout.current = { home, width, noteLimit };
|
|
21
|
+
const view = useSyncExternalStore(source?.subscribe ?? noSubscription, source?.snapshot ?? noApproval);
|
|
22
|
+
const shown = useRef(view);
|
|
23
|
+
shown.current = view;
|
|
24
|
+
const key = view === undefined
|
|
25
|
+
? undefined
|
|
26
|
+
: JSON.stringify([
|
|
27
|
+
"approval",
|
|
28
|
+
view.record.recordId,
|
|
29
|
+
view.record.revision,
|
|
30
|
+
view.canAnswer,
|
|
31
|
+
]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const view = shown.current;
|
|
34
|
+
if (!enabled || source === undefined || view === undefined)
|
|
35
|
+
return;
|
|
36
|
+
if (!view.canAnswer || key === undefined)
|
|
37
|
+
return;
|
|
38
|
+
const { home, width, noteLimit } = layout.current;
|
|
39
|
+
const host = createWhistleInteractionHost({ title: "Approval" });
|
|
40
|
+
const session = host.begin();
|
|
41
|
+
const stillCurrent = () => {
|
|
42
|
+
const now = source.snapshot();
|
|
43
|
+
return (!session.interaction.signal.aborted &&
|
|
44
|
+
now?.record.recordId === view.record.recordId &&
|
|
45
|
+
now.record.revision === view.record.revision &&
|
|
46
|
+
now.canAnswer);
|
|
47
|
+
};
|
|
48
|
+
const leave = store.awaiting.add({
|
|
49
|
+
key,
|
|
50
|
+
kind: "approval",
|
|
51
|
+
arrivedAt: Date.now(),
|
|
52
|
+
host,
|
|
53
|
+
});
|
|
54
|
+
void askApproval(session.interaction, {
|
|
55
|
+
view,
|
|
56
|
+
source,
|
|
57
|
+
home,
|
|
58
|
+
width,
|
|
59
|
+
now: Date.now(),
|
|
60
|
+
noteLimit,
|
|
61
|
+
stillCurrent,
|
|
62
|
+
onFailure: (cause) => {
|
|
63
|
+
failure.current(cause);
|
|
64
|
+
},
|
|
65
|
+
}).then((outcome) => {
|
|
66
|
+
if (outcome.kind === "refused")
|
|
67
|
+
// The refusal stays in the composer; the record rereads when it changes.
|
|
68
|
+
session.settle({ status: "failed", message: outcome.message });
|
|
69
|
+
else {
|
|
70
|
+
leave();
|
|
71
|
+
session.settle(outcome.kind === "answered"
|
|
72
|
+
? { status: "handled" }
|
|
73
|
+
: { status: "cancelled" });
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return () => {
|
|
77
|
+
leave();
|
|
78
|
+
host.cancel();
|
|
79
|
+
};
|
|
80
|
+
}, [source, key, enabled, store]);
|
|
81
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type AwaitingItem, type DecisionIntent, type DecisionView } from "./core/awaiting-answer.js";
|
|
2
|
+
/** One decision being answered, ready for a renderer to draw and drive. */
|
|
3
|
+
export type DecisionController = Readonly<{
|
|
4
|
+
/** What to draw; absent only before the first prompt has arrived. */
|
|
5
|
+
view: DecisionView | undefined;
|
|
6
|
+
/** Apply what the person did; every key and click goes through here. */
|
|
7
|
+
dispatch: (intent: DecisionIntent) => void;
|
|
8
|
+
/** Postpone this decision: it leaves the composer and waits in the footer. */
|
|
9
|
+
later: () => void;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Own the answering of one waiting decision for any renderer: the reducer's
|
|
13
|
+
* state per prompt, the answer sent to the item's host, and the refusal that
|
|
14
|
+
* comes back. Renderers draw `view` and forward intents, nothing else.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useDecision(item: AwaitingItem, context: Readonly<{
|
|
17
|
+
position: number;
|
|
18
|
+
total: number;
|
|
19
|
+
later: () => void;
|
|
20
|
+
}>): DecisionController;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { useRef, useState, useSyncExternalStore } from "react";
|
|
2
|
+
import { decisionView, initialDecisionState, reduceDecision, } from "./core/awaiting-answer.js";
|
|
3
|
+
/** The state as the person sees it: the reducer's, over what the host reports. */
|
|
4
|
+
function visibleState(held, snapshot) {
|
|
5
|
+
if (snapshot.prompt !== undefined)
|
|
6
|
+
return held;
|
|
7
|
+
return snapshot.status === "failed"
|
|
8
|
+
? {
|
|
9
|
+
...held,
|
|
10
|
+
phase: "refused",
|
|
11
|
+
refusal: snapshot.failure ?? "Something went wrong.",
|
|
12
|
+
}
|
|
13
|
+
: { ...held, phase: "sending" };
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Own the answering of one waiting decision for any renderer: the reducer's
|
|
17
|
+
* state per prompt, the answer sent to the item's host, and the refusal that
|
|
18
|
+
* comes back. Renderers draw `view` and forward intents, nothing else.
|
|
19
|
+
*/
|
|
20
|
+
export function useDecision(item, context) {
|
|
21
|
+
const { host } = item;
|
|
22
|
+
const snapshot = useSyncExternalStore(host.subscribe, host.snapshot);
|
|
23
|
+
const shown = useRef();
|
|
24
|
+
const pending = snapshot.prompt;
|
|
25
|
+
if (pending?.request.type === "decision")
|
|
26
|
+
shown.current = { sequence: pending.sequence, prompt: pending.request };
|
|
27
|
+
const [, setHeld] = useState();
|
|
28
|
+
// Several keys can arrive before React renders; each must see the last one.
|
|
29
|
+
const latest = useRef();
|
|
30
|
+
const prompt = shown.current;
|
|
31
|
+
const held = () => prompt !== undefined && latest.current?.sequence === prompt.sequence
|
|
32
|
+
? latest.current.state
|
|
33
|
+
: initialDecisionState();
|
|
34
|
+
const remember = (next) => {
|
|
35
|
+
if (prompt === undefined)
|
|
36
|
+
return;
|
|
37
|
+
latest.current = { sequence: prompt.sequence, state: next };
|
|
38
|
+
setHeld(latest.current);
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
view: prompt === undefined
|
|
42
|
+
? undefined
|
|
43
|
+
: decisionView(visibleState(held(), snapshot), prompt.prompt, {
|
|
44
|
+
kind: item.kind,
|
|
45
|
+
position: context.position,
|
|
46
|
+
total: context.total,
|
|
47
|
+
}),
|
|
48
|
+
later: context.later,
|
|
49
|
+
dispatch: (intent) => {
|
|
50
|
+
if (prompt === undefined)
|
|
51
|
+
return;
|
|
52
|
+
const now = host.snapshot();
|
|
53
|
+
if (now.prompt === undefined && now.status === "failed") {
|
|
54
|
+
// The conversation failed after the person answered: try it again.
|
|
55
|
+
if (intent.type === "enter")
|
|
56
|
+
host.retry();
|
|
57
|
+
else if (intent.type === "escape")
|
|
58
|
+
context.later();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const outcome = reduceDecision(visibleState(held(), now), intent, prompt.prompt);
|
|
62
|
+
remember(outcome.state);
|
|
63
|
+
const effect = outcome.effect;
|
|
64
|
+
if (effect?.type === "later")
|
|
65
|
+
context.later();
|
|
66
|
+
else if (effect?.type === "answer") {
|
|
67
|
+
const answer = { selected: effect.selected };
|
|
68
|
+
if (effect.text !== undefined)
|
|
69
|
+
answer.text = effect.text;
|
|
70
|
+
const accepted = host.answer(prompt.sequence, answer);
|
|
71
|
+
if (!accepted)
|
|
72
|
+
remember(reduceDecision(outcome.state, {
|
|
73
|
+
type: "refused",
|
|
74
|
+
message: "That answer was not accepted. Choose again.",
|
|
75
|
+
}, prompt.prompt).state);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
type SlashCommand = Readonly<{
|
|
17
17
|
alias: string;
|
|
18
18
|
commandId: string;
|
|
19
|
+
command: WhistleCommandKey;
|
|
19
20
|
consumesDraft?: boolean;
|
|
20
21
|
title: string;
|
|
21
22
|
description?: string;
|
|
@@ -36,6 +37,7 @@ One slash command as every Parakeet renderer lists it.
|
|
|
36
37
|
```ts
|
|
37
38
|
type KeyBindingRow = Readonly<{
|
|
38
39
|
commandId: string;
|
|
40
|
+
command: WhistleCommandKey;
|
|
39
41
|
keys: string;
|
|
40
42
|
title: string;
|
|
41
43
|
order: number;
|
|
@@ -165,6 +167,7 @@ Human key labels from Whistle bindings, with the platform's modifier name.
|
|
|
165
167
|
function slashRegistry(snapshot): readonly Readonly<{
|
|
166
168
|
alias: string;
|
|
167
169
|
commandId: string;
|
|
170
|
+
command: WhistleCommandKey;
|
|
168
171
|
consumesDraft?: boolean;
|
|
169
172
|
title: string;
|
|
170
173
|
description?: string;
|
|
@@ -204,23 +207,23 @@ Every slash alias in the live graph, with the keys bound to its command.
|
|
|
204
207
|
|
|
205
208
|
#### Returns
|
|
206
209
|
|
|
207
|
-
readonly `Readonly`\<\{ `alias`: `string`; `commandId`: `string`;
|
|
208
|
-
`consumesDraft?`: `boolean`; `title`: `string`;
|
|
209
|
-
`category`: `string`; `order`: `number`; `grammar?`:
|
|
210
|
-
`words?`: readonly `object`[]; `text?`: \{ `field`:
|
|
211
|
-
\[`key`: `string`\]: \| `string` \| `number` \|
|
|
210
|
+
readonly `Readonly`\<\{ `alias`: `string`; `commandId`: `string`; `command`:
|
|
211
|
+
`WhistleCommandKey`; `consumesDraft?`: `boolean`; `title`: `string`;
|
|
212
|
+
`description?`: `string`; `category`: `string`; `order`: `number`; `grammar?`:
|
|
213
|
+
\{ `hint`: `string`; `words?`: readonly `object`[]; `text?`: \{ `field`:
|
|
214
|
+
`string`; `arguments`: \{ \[`key`: `string`\]: \| `string` \| `number` \|
|
|
215
|
+
`boolean` \| readonly string \| number \| boolean \| readonly (string \| number
|
|
216
|
+
\| boolean \| readonly (string \| number \| boolean \| readonly (string \|
|
|
212
217
|
number \| boolean \| readonly (string \| number \| boolean \| readonly (string
|
|
213
|
-
\| number \| boolean \| readonly (string \|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
218
|
+
\| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
|
|
219
|
+
...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{
|
|
220
|
+
\[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number
|
|
221
|
+
\| boolean \| readonly (string \| number \| boolean \| readonly (string \|
|
|
217
222
|
number \| boolean \| readonly (string \| number \| boolean \| readonly (string
|
|
218
|
-
\| number \| boolean \| readonly (string \|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
`string`; \}; \}; `keys`: readonly `string`[]; `availability`:
|
|
223
|
-
`WhistleAvailability`; \}\>[]
|
|
223
|
+
\| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{
|
|
224
|
+
...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \|
|
|
225
|
+
`null`; \}; `requestIdField?`: `string`; \}; \}; `keys`: readonly `string`[];
|
|
226
|
+
`availability`: `WhistleAvailability`; \}\>[]
|
|
224
227
|
|
|
225
228
|
---
|
|
226
229
|
|
|
@@ -229,6 +232,7 @@ readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{
|
|
|
229
232
|
```ts
|
|
230
233
|
function keyBindings(snapshot): readonly Readonly<{
|
|
231
234
|
commandId: string;
|
|
235
|
+
command: WhistleCommandKey;
|
|
232
236
|
keys: string;
|
|
233
237
|
title: string;
|
|
234
238
|
order: number;
|
|
@@ -245,8 +249,8 @@ Every bound key in the live graph, grouped by command.
|
|
|
245
249
|
|
|
246
250
|
#### Returns
|
|
247
251
|
|
|
248
|
-
readonly `Readonly`\<\{ `commandId`: `string`; `
|
|
249
|
-
`string`; `order`: `number`; \}\>[]
|
|
252
|
+
readonly `Readonly`\<\{ `commandId`: `string`; `command`: `WhistleCommandKey`;
|
|
253
|
+
`keys`: `string`; `title`: `string`; `order`: `number`; \}\>[]
|
|
250
254
|
|
|
251
255
|
---
|
|
252
256
|
|
|
@@ -260,10 +264,10 @@ Parse one draft against the registry; only a leading `/` names a command.
|
|
|
260
264
|
|
|
261
265
|
#### Parameters
|
|
262
266
|
|
|
263
|
-
| Parameter | Type
|
|
264
|
-
| ---------- |
|
|
265
|
-
| `registry` | readonly `Readonly`\<\{ `alias`: `string`; `commandId`: `string`; `consumesDraft?`: `boolean`; `title`: `string`; `description?`: `string`; `category`: `string`; `order`: `number`; `grammar?`: \{ `hint`: `string`; `words?`: readonly `object`[]; `text?`: \{ `field`: `string`; `arguments`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `requestIdField?`: `string`; \}; \}; `keys`: readonly `string`[]; `availability`: `WhistleAvailability`; \}\>[] |
|
|
266
|
-
| `draft` | `string`
|
|
267
|
+
| Parameter | Type |
|
|
268
|
+
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
269
|
+
| `registry` | readonly `Readonly`\<\{ `alias`: `string`; `commandId`: `string`; `command`: `WhistleCommandKey`; `consumesDraft?`: `boolean`; `title`: `string`; `description?`: `string`; `category`: `string`; `order`: `number`; `grammar?`: \{ `hint`: `string`; `words?`: readonly `object`[]; `text?`: \{ `field`: `string`; `arguments`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `requestIdField?`: `string`; \}; \}; `keys`: readonly `string`[]; `availability`: `WhistleAvailability`; \}\>[] |
|
|
270
|
+
| `draft` | `string` |
|
|
267
271
|
|
|
268
272
|
#### Returns
|
|
269
273
|
|
|
@@ -313,11 +317,11 @@ Rank completions for one draft; renderers draw exactly these rows.
|
|
|
313
317
|
|
|
314
318
|
#### Parameters
|
|
315
319
|
|
|
316
|
-
| Parameter | Type
|
|
317
|
-
| ---------- |
|
|
318
|
-
| `registry` | readonly `Readonly`\<\{ `alias`: `string`; `commandId`: `string`; `consumesDraft?`: `boolean`; `title`: `string`; `description?`: `string`; `category`: `string`; `order`: `number`; `grammar?`: \{ `hint`: `string`; `words?`: readonly `object`[]; `text?`: \{ `field`: `string`; `arguments`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `requestIdField?`: `string`; \}; \}; `keys`: readonly `string`[]; `availability`: `WhistleAvailability`; \}\>[] |
|
|
319
|
-
| `draft` | `string`
|
|
320
|
-
| `options` | `Readonly`\<\{ `idleCategory?`: `string`; \}\>
|
|
320
|
+
| Parameter | Type |
|
|
321
|
+
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
322
|
+
| `registry` | readonly `Readonly`\<\{ `alias`: `string`; `commandId`: `string`; `command`: `WhistleCommandKey`; `consumesDraft?`: `boolean`; `title`: `string`; `description?`: `string`; `category`: `string`; `order`: `number`; `grammar?`: \{ `hint`: `string`; `words?`: readonly `object`[]; `text?`: \{ `field`: `string`; `arguments`: \{ \[`key`: `string`\]: \| `string` \| `number` \| `boolean` \| readonly string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...[] \| \{ \[`key`: `string`\]: string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| number \| boolean \| readonly (string \| ... 4 more ... \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| null)\[\] \| \{ ...; \} \| ...; \} \| `null`; \}; `requestIdField?`: `string`; \}; \}; `keys`: readonly `string`[]; `availability`: `WhistleAvailability`; \}\>[] |
|
|
323
|
+
| `draft` | `string` |
|
|
324
|
+
| `options` | `Readonly`\<\{ `idleCategory?`: `string`; \}\> |
|
|
321
325
|
|
|
322
326
|
#### Returns
|
|
323
327
|
|