@fungi.computer/parakeet 0.17.2 → 0.17.3

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.
@@ -285,7 +285,7 @@ function useComposerRow({ showFooter, statusChips, model, status, viewState, wai
285
285
  : [
286
286
  {
287
287
  id: "settings",
288
- label: (_jsxs("span", { className: "composer-settings-chip", children: [_jsx(SlidersHorizontal, { "aria-hidden": "true" }), "Settings"] })),
288
+ label: (_jsxs("span", { className: "composer-settings-chip", children: [_jsx(SlidersHorizontal, { "aria-hidden": "true" }), _jsx("span", { className: "composer-settings-label", children: "Settings" })] })),
289
289
  accessibleLabel: "Session settings",
290
290
  title: "Settings",
291
291
  content: (_jsxs(StatusTrayList, { className: "composer-settings", children: [modelName === undefined ? null : (_jsx(StatusTrayRow, { primary: "Model", secondary: modelName, actions: canPickModel ? (_jsx(Button, { size: "xs", variant: "ghost", onClick: () => {
@@ -32,7 +32,7 @@ export function ClientRows({ entryId, rows, actions, onOpen, }) {
32
32
  void actions.execute(entryId, decision);
33
33
  }, children: [_jsx("span", { "aria-hidden": "true", "data-client-row-dot": "", className: `w-3 shrink-0 text-center ${row.tone === undefined ? "" : rowColors[row.tone]}`, children: row.tone === undefined ? "" : "●" }), _jsxs("span", { className: `min-w-0 flex-1 truncate text-start ${row.tone === undefined ? "" : rowColors[row.tone]}`, children: [row.title, row.detail === undefined ? null : (_jsxs("span", { className: "text-dim", children: [" \u00B7 ", row.detail] }))] }), _jsx("span", { className: "shrink-0 text-dim", "data-client-row-action": "", children: decision.label })] }) }, row.id));
34
34
  }
35
- return (_jsxs("div", { "data-client-row": row.id, className: "py-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { "aria-hidden": "true", "data-client-row-dot": "", className: `w-3 shrink-0 text-center leading-4 ${row.tone === undefined ? "" : rowColors[row.tone]}`, children: row.tone === undefined ? "" : "●" }), _jsxs("details", { className: "min-w-0 flex-1", children: [_jsxs("summary", { title: row.title, className: `cursor-pointer truncate leading-4 ${row.tone === undefined ? "" : rowColors[row.tone]}`, children: [row.title, row.inspection === undefined || row.detail === undefined
35
+ return (_jsxs("div", { "data-client-row": row.id, className: "py-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { "aria-hidden": "true", "data-client-row-dot": "", className: `w-3 shrink-0 text-center leading-4 ${row.tone === undefined ? "" : rowColors[row.tone]}`, children: row.tone === undefined ? "" : "●" }), _jsxs("details", { className: "min-w-0 flex-1", children: [_jsxs("summary", { title: row.title, className: `cursor-pointer truncate leading-4 ${row.tone === undefined ? "" : `list-none [&::-webkit-details-marker]:hidden ${rowColors[row.tone]}`}`, children: [row.title, row.inspection === undefined || row.detail === undefined
36
36
  ? null
37
37
  : ` · ${row.detail}`] }), row.detail === undefined ? null : (_jsx("p", { className: "max-h-32 overflow-y-auto overscroll-contain whitespace-pre-wrap break-words pb-2", children: row.detail }))] }), row.open === undefined ? null : (_jsx(Button, { size: "xs", variant: "outline", className: "shrink-0", disabled: onOpen === undefined, onClick: () => {
38
38
  if (row.open !== undefined)
@@ -16,6 +16,8 @@ export type AwaitingItem = Readonly<{
16
16
  arrivedAt: number;
17
17
  /** The conversation to draw and answer. */
18
18
  host: WhistleInteractionHost;
19
+ /** A draft owned by the pending record, retained while its host reconnects. */
20
+ draft?: DecisionDraft;
19
21
  }>;
20
22
  /** Which item the composer shows and where it stands among all of them. */
21
23
  export type AwaitingQueue = Readonly<{
@@ -46,7 +48,7 @@ export type DecisionPrompt = WhistlePromptOf<"decision">;
46
48
  export type DecisionPhase = "choose" | "other" | "confirm" | "sending" | "refused";
47
49
  /** Everything the reducer remembers about one decision prompt. */
48
50
  export type DecisionState = Readonly<{
49
- /** Highlighted row: an option, or the Other row after the last option. */
51
+ /** Highlighted row, or -1 when a retained choice is no longer available. */
50
52
  highlight: number;
51
53
  /** Option values toggled so far (multiple decisions only). */
52
54
  toggled: ReadonlySet<string>;
@@ -122,6 +124,16 @@ export type DecisionOutcome = Readonly<{
122
124
  }>;
123
125
  /** The state a decision starts in. */
124
126
  export declare function initialDecisionState(): DecisionState;
127
+ /** One pending choice, retaining no display metadata or answering authority. */
128
+ export declare class DecisionDraft {
129
+ #private;
130
+ /** Start without a remembered choice. */
131
+ constructor();
132
+ /** Remember option values, which policy rows may move, and unfinished text. */
133
+ remember(state: DecisionState, prompt: DecisionPrompt): void;
134
+ /** Redraw a compatible choice without replaying any submitted answer. */
135
+ restore(prompt: DecisionPrompt): DecisionState;
136
+ }
125
137
  /**
126
138
  * The one set of rules both renderers follow. Number keys only move the
127
139
  * highlight, Enter is the only way to answer, and Esc steps back one level
@@ -32,6 +32,63 @@ export function initialDecisionState() {
32
32
  details: false,
33
33
  };
34
34
  }
35
+ /** One pending choice, retaining no display metadata or answering authority. */
36
+ export class DecisionDraft {
37
+ #current;
38
+ /** Start without a remembered choice. */
39
+ constructor() {
40
+ this.#current = undefined;
41
+ }
42
+ /** Remember option values, which policy rows may move, and unfinished text. */
43
+ remember(state, prompt) {
44
+ const option = prompt.options[state.highlight];
45
+ if (option === undefined &&
46
+ (state.highlight !== prompt.options.length || prompt.other === undefined))
47
+ return;
48
+ this.#current = {
49
+ multiple: prompt.multiple === true,
50
+ escape: prompt.escape,
51
+ other: prompt.other === undefined ? undefined : { blank: prompt.other.blank },
52
+ choice: option === undefined
53
+ ? { kind: "other" }
54
+ : { kind: "option", value: option.value },
55
+ toggled: [...state.toggled],
56
+ text: state.other,
57
+ };
58
+ }
59
+ /** Redraw a compatible choice without replaying any submitted answer. */
60
+ restore(prompt) {
61
+ const initial = initialDecisionState();
62
+ const draft = this.#current;
63
+ if (draft === undefined)
64
+ return initial;
65
+ const choice = draft.choice;
66
+ const highlight = choice.kind === "other"
67
+ ? prompt.other === undefined
68
+ ? -1
69
+ : prompt.options.length
70
+ : prompt.options.findIndex((option) => option.value === choice.value);
71
+ if (draft.multiple !== (prompt.multiple === true) ||
72
+ draft.escape !== prompt.escape ||
73
+ (draft.other === undefined) !== (prompt.other === undefined) ||
74
+ draft.other?.blank !== prompt.other?.blank ||
75
+ highlight < 0 ||
76
+ draft.toggled.some((value) => !prompt.options.some((option) => option.value === value)))
77
+ return {
78
+ ...initial,
79
+ highlight: -1,
80
+ phase: "refused",
81
+ refusal: "This choice changed. Choose again before sending.",
82
+ };
83
+ return {
84
+ ...initial,
85
+ highlight,
86
+ phase: highlight === prompt.options.length ? "other" : "choose",
87
+ toggled: new Set(draft.toggled),
88
+ other: draft.text,
89
+ };
90
+ }
91
+ }
35
92
  const unchanged = (state) => ({ state });
36
93
  function onRow(state, prompt, highlight) {
37
94
  return {
@@ -61,7 +118,11 @@ export function reduceDecision(state, intent, prompt) {
61
118
  switch (intent.type) {
62
119
  case "move":
63
120
  return {
64
- state: onRow(state, prompt, (state.highlight + intent.delta + rows) % rows),
121
+ state: onRow(state, prompt, state.highlight < 0
122
+ ? intent.delta === 1
123
+ ? 0
124
+ : rows - 1
125
+ : (state.highlight + intent.delta + rows) % rows),
65
126
  };
66
127
  case "pick":
67
128
  return intent.number >= 1 && intent.number <= rows
@@ -96,6 +157,8 @@ export function reduceDecision(state, intent, prompt) {
96
157
  case "details":
97
158
  return { state: { ...state, details: !state.details } };
98
159
  case "enter": {
160
+ if (state.highlight < 0 || state.highlight >= rows)
161
+ return unchanged(state);
99
162
  const text = state.other.trim();
100
163
  const answerText = text === "" ? {} : { text };
101
164
  if (prompt.multiple === true) {
@@ -269,6 +332,8 @@ export function decisionView(state, prompt, context) {
269
332
  phase: state.phase,
270
333
  canSend: !sending &&
271
334
  !state.details &&
335
+ state.highlight >= 0 &&
336
+ state.highlight < rows.length &&
272
337
  (multiple
273
338
  ? state.toggled.size > 0 || otherText !== ""
274
339
  : state.highlight < optionCount ||
@@ -28,7 +28,7 @@ export { formatToolDuration, toolCallView, toolKindSigils, toolLiveLines, toolSt
28
28
  export { assistantMessageVisible } from "./core/assistant-visibility.js";
29
29
  export { disclosureOpen, initialToolDisclosure, toggleAllDisclosure, toggleDisclosure, toolCallDefaultOpen, toolGroupDefaultOpen, visibleToolCalls, type ToolDisclosureState, } from "./core/tool-groups.js";
30
30
  export { useClientActions } from "./client-contributions.js";
31
- export { awaitingQueue, awaitingTakeover, decisionView, decisionViewText, initialDecisionState, reduceDecision, type AwaitingItem, type AwaitingKind, type AwaitingQueue, type DecisionEffect, type DecisionIntent, type DecisionOutcome, type DecisionPhase, type DecisionPrompt, type DecisionRowView, type DecisionState, type DecisionView, } from "./core/awaiting-answer.js";
31
+ export { awaitingQueue, awaitingTakeover, decisionView, decisionViewText, initialDecisionState, reduceDecision, type AwaitingItem, type AwaitingKind, type AwaitingQueue, type DecisionEffect, type DecisionIntent, type DecisionOutcome, type DecisionPhase, type DecisionPrompt, type DecisionRowView, type DecisionState, DecisionDraft, type DecisionView, } from "./core/awaiting-answer.js";
32
32
  export { useDecision, type DecisionController } from "./use-decision.js";
33
33
  export { useApprovalAwaiting } from "./use-approval-awaiting.js";
34
34
  export { approvalCardCopy, approvalRefusal, askApproval, type ApprovalAbandoned, type ApprovalAnswered, type ApprovalAnswerInput, type ApprovalAnswerResult, type ApprovalCard, type ApprovalContent, type ApprovalDecision, type ApprovalEntry, type ApprovalFacts, type ApprovalOutcome, type ApprovalRefused, type ApprovalReview, type ApprovalSource, } from "./core/approval-decision.js";
package/dist/headless.js CHANGED
@@ -23,7 +23,7 @@ export { formatToolDuration, toolCallView, toolKindSigils, toolLiveLines, toolSt
23
23
  export { assistantMessageVisible } from "./core/assistant-visibility.js";
24
24
  export { disclosureOpen, initialToolDisclosure, toggleAllDisclosure, toggleDisclosure, toolCallDefaultOpen, toolGroupDefaultOpen, visibleToolCalls, } from "./core/tool-groups.js";
25
25
  export { useClientActions } from "./client-contributions.js";
26
- export { awaitingQueue, awaitingTakeover, decisionView, decisionViewText, initialDecisionState, reduceDecision, } from "./core/awaiting-answer.js";
26
+ export { awaitingQueue, awaitingTakeover, decisionView, decisionViewText, initialDecisionState, reduceDecision, DecisionDraft, } from "./core/awaiting-answer.js";
27
27
  export { useDecision } from "./use-decision.js";
28
28
  export { useApprovalAwaiting } from "./use-approval-awaiting.js";
29
29
  export { approvalCardCopy, approvalRefusal, askApproval, } from "./core/approval-decision.js";
package/dist/styles.css CHANGED
@@ -6599,6 +6599,9 @@
6599
6599
  .resize {
6600
6600
  resize: both;
6601
6601
  }
6602
+ .list-none {
6603
+ list-style-type: none;
6604
+ }
6602
6605
  .grid-cols-2 {
6603
6606
  grid-template-columns: repeat(2, minmax(0, 1fr));
6604
6607
  }
@@ -7859,6 +7862,11 @@
7859
7862
  height: calc(var(--spacing) * 7);
7860
7863
  }
7861
7864
  }
7865
+ .\[\&\:\:-webkit-details-marker\]\:hidden {
7866
+ &::-webkit-details-marker {
7867
+ display: none;
7868
+ }
7869
+ }
7862
7870
  .\[\&\>\*\]\:join-item {
7863
7871
  &>* {
7864
7872
  @layer daisyui.l1.l2.l3.l4 {
@@ -14599,7 +14607,8 @@
14599
14607
  position: relative;
14600
14608
  display: inline-grid;
14601
14609
  justify-self: start;
14602
- width: max-content;
14610
+ --caps-code-slot: calc(var(--size-field, 0.25rem) * 10);
14611
+ width: min( 100%, calc( var(--caps-code-length) * var(--caps-code-slot) + (var(--caps-code-length) - 1) * var(--spacing-xs) ) );
14603
14612
  }
14604
14613
  .caps-code-field {
14605
14614
  position: absolute;
@@ -14617,13 +14626,13 @@
14617
14626
  }
14618
14627
  .caps-code-slots {
14619
14628
  display: grid;
14620
- grid-auto-columns: max-content;
14621
- grid-auto-flow: column;
14629
+ grid-template-columns: repeat(var(--caps-code-length), minmax(0, 1fr));
14622
14630
  gap: var(--spacing-xs);
14623
14631
  }
14624
14632
  .caps-code-slot {
14625
14633
  position: relative;
14626
- width: var(--size);
14634
+ width: 100%;
14635
+ min-width: 0;
14627
14636
  justify-content: center;
14628
14637
  padding-inline: 0;
14629
14638
  font-family: var(--font-numeric, var(--font-mono));
@@ -19630,6 +19639,25 @@
19630
19639
  max-width: none;
19631
19640
  }
19632
19641
  }
19642
+ @container (max-width: 16rem) {
19643
+ .parakeet-composer-row:has(.composer-settings-chip) .parakeet-composer-model-key {
19644
+ --caps-keycap-justify: center;
19645
+ --caps-keycap-padding: var(--spacing-xs);
19646
+ flex: none;
19647
+ width: var(--caps-status-tray-key-height);
19648
+ min-width: var(--caps-status-tray-key-height);
19649
+ }
19650
+ .parakeet-composer-row:has(.composer-settings-chip) .parakeet-composer-model-key .caps-keycap-button-label, .parakeet-composer-row .composer-settings-label {
19651
+ display: none;
19652
+ }
19653
+ }
19654
+ @media (pointer: coarse) {
19655
+ @container (max-width: 16rem) {
19656
+ .parakeet-composer-row:has(.composer-settings-chip) .parakeet-composer-model-key {
19657
+ display: none;
19658
+ }
19659
+ }
19660
+ }
19633
19661
  .boot-curtain {
19634
19662
  position: fixed;
19635
19663
  inset: 0;
@@ -1,6 +1,7 @@
1
1
  import { createWhistleInteractionHost } from "@fungi.computer/whistle/interaction";
2
2
  import { useEffect, useRef, useSyncExternalStore } from "react";
3
3
  import { askApproval } from "./core/approval-decision.js";
4
+ import { DecisionDraft } from "./core/awaiting-answer.js";
4
5
  const noApproval = () => undefined;
5
6
  const noSubscription = () => () => undefined;
6
7
  /**
@@ -31,11 +32,17 @@ export function useApprovalAwaiting(options) {
31
32
  view.record.revision,
32
33
  view.canAnswer,
33
34
  ]);
35
+ // One record owns its draft through a temporary loss of capability metadata.
36
+ // A different record or revision starts a new choice; rights stay live in source.
37
+ const draft = useRef();
38
+ if (key !== undefined && draft.current?.key !== key)
39
+ draft.current = { key, memory: new DecisionDraft() };
34
40
  useEffect(() => {
35
41
  const view = shown.current;
36
42
  if (!enabled || source === undefined || view === undefined)
37
43
  return;
38
- if (!view.canAnswer || key === undefined)
44
+ const retained = draft.current;
45
+ if (!view.canAnswer || key === undefined || retained?.key !== key)
39
46
  return;
40
47
  const { home, width, noteLimit } = layout.current;
41
48
  const host = createWhistleInteractionHost({ title: "Approval" });
@@ -52,6 +59,7 @@ export function useApprovalAwaiting(options) {
52
59
  kind: "approval",
53
60
  arrivedAt: Date.now(),
54
61
  host,
62
+ draft: retained.memory,
55
63
  });
56
64
  void askApproval(session.interaction, {
57
65
  view,
@@ -22,20 +22,36 @@ export function useDecision(item, context) {
22
22
  const { host } = item;
23
23
  const snapshot = useSyncExternalStore(host.subscribe, host.snapshot);
24
24
  const shown = useRef();
25
+ if (shown.current?.host !== host)
26
+ shown.current = undefined;
25
27
  const pending = snapshot.prompt;
26
28
  if (pending?.request.type === "decision")
27
- shown.current = { sequence: pending.sequence, prompt: pending.request };
29
+ shown.current = {
30
+ host,
31
+ sequence: pending.sequence,
32
+ prompt: pending.request,
33
+ };
28
34
  const [, setHeld] = useState();
29
35
  // Several keys can arrive before React renders; each must see the last one.
30
36
  const latest = useRef();
31
37
  const prompt = shown.current;
32
- const held = () => prompt !== undefined && latest.current?.sequence === prompt.sequence
33
- ? latest.current.state
34
- : initialDecisionState();
38
+ const held = () => {
39
+ if (prompt === undefined)
40
+ return initialDecisionState();
41
+ if (latest.current?.host !== host ||
42
+ latest.current.sequence !== prompt.sequence) {
43
+ const state = latest.current?.host === host
44
+ ? initialDecisionState()
45
+ : (item.draft?.restore(prompt.prompt) ?? initialDecisionState());
46
+ latest.current = { host, sequence: prompt.sequence, state };
47
+ }
48
+ return latest.current.state;
49
+ };
35
50
  const remember = (next) => {
36
51
  if (prompt === undefined)
37
52
  return;
38
- latest.current = { sequence: prompt.sequence, state: next };
53
+ latest.current = { host, sequence: prompt.sequence, state: next };
54
+ item.draft?.remember(next, prompt.prompt);
39
55
  setHeld(latest.current);
40
56
  };
41
57
  return {
@@ -8,6 +8,65 @@
8
8
 
9
9
  # headless
10
10
 
11
+ ## Classes
12
+
13
+ ### DecisionDraft
14
+
15
+ One pending choice, retaining no display metadata or answering authority.
16
+
17
+ #### Constructors
18
+
19
+ ##### Constructor
20
+
21
+ ```ts
22
+ new DecisionDraft(): DecisionDraft;
23
+ ```
24
+
25
+ Start without a remembered choice.
26
+
27
+ ###### Returns
28
+
29
+ [`DecisionDraft`](#decisiondraft)
30
+
31
+ #### Methods
32
+
33
+ ##### remember()
34
+
35
+ ```ts
36
+ remember(state, prompt): void;
37
+ ```
38
+
39
+ Remember option values, which policy rows may move, and unfinished text.
40
+
41
+ ###### Parameters
42
+
43
+ | Parameter | Type |
44
+ | --------- | --------------------------------- |
45
+ | `state` | [`DecisionState`](#decisionstate) |
46
+ | `prompt` | `object` & `object` |
47
+
48
+ ###### Returns
49
+
50
+ `void`
51
+
52
+ ##### restore()
53
+
54
+ ```ts
55
+ restore(prompt): DecisionState;
56
+ ```
57
+
58
+ Redraw a compatible choice without replaying any submitted answer.
59
+
60
+ ###### Parameters
61
+
62
+ | Parameter | Type |
63
+ | --------- | ------------------- |
64
+ | `prompt` | `object` & `object` |
65
+
66
+ ###### Returns
67
+
68
+ [`DecisionState`](#decisionstate)
69
+
11
70
  ## Type Aliases
12
71
 
13
72
  ### LoginMethodKind
@@ -699,6 +758,7 @@ type AwaitingItem = Readonly<{
699
758
  kind: AwaitingKind;
700
759
  arrivedAt: number;
701
760
  host: WhistleInteractionHost;
761
+ draft?: DecisionDraft;
702
762
  }>;
703
763
  ```
704
764
 
@@ -1952,10 +2012,10 @@ leaves the composer but stays counted: it is the footer row.
1952
2012
 
1953
2013
  #### Parameters
1954
2014
 
1955
- | Parameter | Type |
1956
- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
1957
- | `items` | readonly `Readonly`\<\{ `key`: `string`; `kind`: [`AwaitingKind`](#awaitingkind); `arrivedAt`: `number`; `host`: `WhistleInteractionHost`; \}\>[] |
1958
- | `later` | `ReadonlySet`\<`string`\> |
2015
+ | Parameter | Type |
2016
+ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2017
+ | `items` | readonly `Readonly`\<\{ `key`: `string`; `kind`: [`AwaitingKind`](#awaitingkind); `arrivedAt`: `number`; `host`: `WhistleInteractionHost`; `draft?`: [`DecisionDraft`](#decisiondraft); \}\>[] |
2018
+ | `later` | `ReadonlySet`\<`string`\> |
1959
2019
 
1960
2020
  #### Returns
1961
2021
 
@@ -1975,6 +2035,7 @@ function awaitingTakeover(
1975
2035
  kind: AwaitingKind;
1976
2036
  arrivedAt: number;
1977
2037
  host: WhistleInteractionHost;
2038
+ draft?: DecisionDraft;
1978
2039
  }>
1979
2040
  | undefined;
1980
2041
  ```
@@ -1984,15 +2045,16 @@ with text is never, unless the person asked for the decision.
1984
2045
 
1985
2046
  #### Parameters
1986
2047
 
1987
- | Parameter | Type |
1988
- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1989
- | `awaiting` | `Readonly`\<\{ `items`: readonly `Readonly`\<\{ `key`: `string`; `kind`: [`AwaitingKind`](#awaitingkind); `arrivedAt`: `number`; `host`: `WhistleInteractionHost`; \}\>[]; `current?`: `Readonly`\<\{ `key`: `string`; `kind`: [`AwaitingKind`](#awaitingkind); `arrivedAt`: `number`; `host`: `WhistleInteractionHost`; \}\>; `position`: `number`; `total`: `number`; \}\> & `Readonly`\<\{ `forced`: `boolean`; \}\> |
1990
- | `draft` | `string` |
2048
+ | Parameter | Type |
2049
+ | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2050
+ | `awaiting` | `Readonly`\<\{ `items`: readonly `Readonly`\<\{ `key`: `string`; `kind`: [`AwaitingKind`](#awaitingkind); `arrivedAt`: `number`; `host`: `WhistleInteractionHost`; `draft?`: [`DecisionDraft`](#decisiondraft); \}\>[]; `current?`: `Readonly`\<\{ `key`: `string`; `kind`: [`AwaitingKind`](#awaitingkind); `arrivedAt`: `number`; `host`: `WhistleInteractionHost`; `draft?`: [`DecisionDraft`](#decisiondraft); \}\>; `position`: `number`; `total`: `number`; \}\> & `Readonly`\<\{ `forced`: `boolean`; \}\> |
2051
+ | `draft` | `string` |
1991
2052
 
1992
2053
  #### Returns
1993
2054
 
1994
2055
  \| `Readonly`\<\{ `key`: `string`; `kind`: [`AwaitingKind`](#awaitingkind);
1995
- `arrivedAt`: `number`; `host`: `WhistleInteractionHost`; \}\> \| `undefined`
2056
+ `arrivedAt`: `number`; `host`: `WhistleInteractionHost`; `draft?`:
2057
+ [`DecisionDraft`](#decisiondraft); \}\> \| `undefined`
1996
2058
 
1997
2059
  ---
1998
2060
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/parakeet",
3
- "version": "0.17.2",
3
+ "version": "0.17.3",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "private": false,
6
6
  "description": "Standalone React composer for a typed Shiitake Session",
@@ -68,14 +68,14 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@earendil-works/pi-ai": "1.5.2",
71
- "@fungi.computer/agar": "0.27.2",
71
+ "@fungi.computer/agar": "0.28.0",
72
72
  "@fungi.computer/bird-dog": "0.3.8",
73
73
  "@fungi.computer/cairn": "0.1.0",
74
- "@fungi.computer/caps": "0.12.9",
74
+ "@fungi.computer/caps": "0.13.0",
75
75
  "@fungi.computer/gills": "0.4.0",
76
76
  "@fungi.computer/knapsack": "0.4.27",
77
77
  "@fungi.computer/mule": "0.3.0",
78
- "@fungi.computer/shiitake": "0.22.4",
78
+ "@fungi.computer/shiitake": "0.22.5",
79
79
  "@fungi.computer/sigils": "0.3.2",
80
80
  "@fungi.computer/sprite": "0.2.2",
81
81
  "@fungi.computer/sprite-zdog": "0.3.2",
@@ -132,3 +132,34 @@
132
132
  max-width: none;
133
133
  }
134
134
  }
135
+
136
+ /* A split phone pane has room for the model menu key, not a partial name.
137
+ Keep its accessible model label and the ordinary picker action. */
138
+ @container (max-width: 16rem) {
139
+ .parakeet-composer-row:has(.composer-settings-chip)
140
+ .parakeet-composer-model-key {
141
+ --caps-keycap-justify: center;
142
+ --caps-keycap-padding: var(--spacing-xs);
143
+ flex: none;
144
+ width: var(--caps-status-tray-key-height);
145
+ min-width: var(--caps-status-tray-key-height);
146
+ }
147
+
148
+ .parakeet-composer-row:has(.composer-settings-chip)
149
+ .parakeet-composer-model-key
150
+ .caps-keycap-button-label,
151
+ .parakeet-composer-row .composer-settings-label {
152
+ display: none;
153
+ }
154
+ }
155
+
156
+ /* Touch keys need more room in a phone's beside pane. Settings already
157
+ contains the same model picker, so keep that route instead of a fourth key. */
158
+ @media (pointer: coarse) {
159
+ @container (max-width: 16rem) {
160
+ .parakeet-composer-row:has(.composer-settings-chip)
161
+ .parakeet-composer-model-key {
162
+ display: none;
163
+ }
164
+ }
165
+ }