@oh-my-pi/pi-tui 18.10.0 → 18.10.2

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +42 -154
  2. package/THIRD-PARTY-NOTICES.txt +3 -3
  3. package/dist/types/app-keybindings.d.ts +8 -8
  4. package/dist/types/apps/git/diff-pane.d.ts +5 -0
  5. package/dist/types/apps/git/state.d.ts +11 -0
  6. package/dist/types/chat/assistant-message.d.ts +9 -4
  7. package/dist/types/chat/tool-execution.d.ts +32 -20
  8. package/dist/types/chat/user-message.d.ts +3 -2
  9. package/dist/types/chrome/countdown-timer.d.ts +3 -2
  10. package/dist/types/native/backend.d.ts +5 -4
  11. package/dist/types/native/blobs.d.ts +13 -1
  12. package/dist/types/overlays/annotation-overlay.d.ts +19 -0
  13. package/dist/types/overlays/ask-dialog.d.ts +9 -4
  14. package/dist/types/overlays/btw-history-panel.d.ts +2 -6
  15. package/dist/types/overlays/hook-editor.d.ts +7 -2
  16. package/dist/types/overlays/hook-input.d.ts +12 -4
  17. package/dist/types/overlays/jobs-panel.d.ts +8 -7
  18. package/dist/types/overlays/login-dialog.d.ts +8 -3
  19. package/dist/types/overlays/mcp-add-wizard.d.ts +9 -1
  20. package/dist/types/overlays/model-browser.d.ts +6 -1
  21. package/dist/types/overlays/pause-screen.d.ts +5 -0
  22. package/dist/types/overlays/report-panel.d.ts +5 -1
  23. package/dist/types/overlays/reset-usage-selector.d.ts +7 -5
  24. package/dist/types/overlays/session-account-selector.d.ts +4 -0
  25. package/dist/types/overlays/session-info-overlay.d.ts +7 -3
  26. package/dist/types/overlays/usage-dashboard.d.ts +6 -6
  27. package/dist/types/status-line/context-usage.d.ts +1 -1
  28. package/dist/types/tools/bash.d.ts +2 -1
  29. package/dist/types/tools/eval.d.ts +2 -2
  30. package/dist/types/tools/grouped-file-output.d.ts +4 -1
  31. package/dist/types/tools/native-view.d.ts +1 -1
  32. package/dist/types/tools/read.d.ts +7 -1
  33. package/dist/types/tools/renderer.d.ts +2 -0
  34. package/package.json +9 -9
  35. package/src/app-keybindings.ts +8 -8
  36. package/src/apps/autoresearch-dashboard.ts +440 -27
  37. package/src/apps/git/diff-pane.ts +39 -35
  38. package/src/apps/git/git-tui.ts +53 -4
  39. package/src/apps/git/state.ts +12 -0
  40. package/src/chat/assistant-message.ts +68 -19
  41. package/src/chat/tool-execution.ts +73 -30
  42. package/src/chat/user-message.ts +32 -19
  43. package/src/chrome/countdown-timer.ts +3 -3
  44. package/src/native/backend.ts +13 -5
  45. package/src/native/blobs.ts +34 -1
  46. package/src/native/reconcile.ts +24 -6
  47. package/src/overlays/advisor-config.ts +259 -8
  48. package/src/overlays/annotation-overlay.ts +420 -168
  49. package/src/overlays/ask-dialog.ts +154 -90
  50. package/src/overlays/btw-history-panel.ts +178 -124
  51. package/src/overlays/hook-editor.ts +90 -32
  52. package/src/overlays/hook-input.ts +105 -19
  53. package/src/overlays/jobs-panel.ts +154 -132
  54. package/src/overlays/login-dialog.ts +201 -91
  55. package/src/overlays/mcp-add-wizard.ts +559 -279
  56. package/src/overlays/model-browser.ts +23 -1
  57. package/src/overlays/model-hub.ts +2 -9
  58. package/src/overlays/pause-screen.ts +81 -23
  59. package/src/overlays/plugin-selector.ts +17 -1
  60. package/src/overlays/queue-mode-selector.ts +10 -0
  61. package/src/overlays/report-panel.ts +6 -2
  62. package/src/overlays/reset-usage-selector.ts +130 -21
  63. package/src/overlays/session-account-selector.ts +36 -0
  64. package/src/overlays/session-info-overlay.ts +197 -76
  65. package/src/overlays/show-images-selector.ts +1 -0
  66. package/src/overlays/theme-selector.ts +6 -1
  67. package/src/overlays/thinking-selector.ts +8 -4
  68. package/src/overlays/tree-selector.ts +117 -2
  69. package/src/overlays/usage-dashboard.ts +495 -143
  70. package/src/status-line/context-usage.ts +154 -57
  71. package/src/tools/bash.ts +9 -8
  72. package/src/tools/eval.ts +2 -2
  73. package/src/tools/grep.ts +1 -0
  74. package/src/tools/grouped-file-output.ts +11 -2
  75. package/src/tools/native-view.ts +2 -2
  76. package/src/tools/read.ts +12 -4
  77. package/src/tools/renderer.ts +2 -0
  78. package/src/tools/wait.ts +16 -30
@@ -367,16 +367,49 @@ function renderAnswerSummary(question: ExtensionAskDialogQuestion, state: Questi
367
367
  return selected[0] ?? theme.fg("warning", "unanswered");
368
368
  }
369
369
 
370
- /** {@link renderAnswerSummary} as spans for the native review list. */
370
+ /** Inline markdown code (`` `x` ``) as mono `code` spans, the rest plain, as the ANSI rows render it. */
371
+ function inlineCodeSpans(value: string): TspSpan[] {
372
+ return value
373
+ .split(/(`[^`]+`)/)
374
+ .flatMap(piece =>
375
+ piece === ""
376
+ ? []
377
+ : piece.length > 2 && piece.startsWith("`") && piece.endsWith("`")
378
+ ? [span(piece.slice(1, -1), "code")]
379
+ : [span(piece)],
380
+ );
381
+ }
382
+
383
+ /** An option's native label: the `(Recommended)` suffix goes (the row's badge says it), inline code runs mono. */
384
+ function optionLabelSpans(question: ExtensionAskDialogQuestion, optionIndex: number, label: string): TspSpan[] {
385
+ const recommended = question.recommended === optionIndex && label.endsWith(RECOMMENDED_SUFFIX);
386
+ return inlineCodeSpans(recommended ? label.slice(0, -RECOMMENDED_SUFFIX.length) : label);
387
+ }
388
+
389
+ function isAnswered(state: QuestionState): boolean {
390
+ return state.selectedOptions.size > 0 || state.customInput !== undefined;
391
+ }
392
+
393
+ /** The answer to one question for the Review tab: the chosen labels (code mono), the custom answer, the note. */
371
394
  function describeAnswer(question: ExtensionAskDialogQuestion, state: QuestionState): readonly TspSpan[] {
372
- if (state.selectedOptions.size === 0 && state.customInput === undefined) return [span("unanswered", "warning")];
373
- const spans = [span(plainText(renderAnswerSummary(question, state)))];
395
+ if (!isAnswered(state)) return [span("Unanswered", "warning")];
396
+ const labels = displayOptionLabels(question);
397
+ const spans: TspSpan[] = [];
398
+ const push = (parts: readonly TspSpan[]): void => {
399
+ if (spans.length > 0) spans.push(span(", ", "dim"));
400
+ spans.push(...parts);
401
+ };
402
+ question.options.forEach((option, index) => {
403
+ if (state.selectedOptions.has(option.label))
404
+ push(optionLabelSpans(question, index, labels[index] ?? option.label));
405
+ });
406
+ if (state.customInput !== undefined) push([span(`“${normalizedInlineInput(state.customInput)}”`)]);
374
407
  const note = noteForSubmittedAnswer(question, state)?.trim();
375
- if (note) spans.push(span(` · Note: ${normalizedInlineInput(note)}`, "muted"));
408
+ if (note) spans.push(span(" ✎ ", "dim"), span(normalizedInlineInput(note), "em"));
376
409
  return spans;
377
410
  }
378
411
 
379
- /** Native `item.detail` of an option row: its description, the typed custom answer, and its note. */
412
+ /** Native `item.detail` of an option row: its description or the typed custom answer, then its note (`em`). */
380
413
  function describeRowDetail(
381
414
  rowItem: QuestionRow,
382
415
  question: ExtensionAskDialogQuestion,
@@ -385,12 +418,12 @@ function describeRowDetail(
385
418
  const spans: TspSpan[] = [];
386
419
  if (rowItem.kind === "option") {
387
420
  const description = question.options[rowItem.optionIndex ?? -1]?.description?.trim();
388
- if (description) spans.push(span(normalizedInlineInput(description), "muted"));
421
+ if (description) spans.push(...inlineCodeSpans(normalizedInlineInput(description)));
389
422
  } else if (state.customInput !== undefined) {
390
- spans.push(span(`“${normalizedInlineInput(state.customInput)}”`, "muted"));
423
+ spans.push(span(`“${normalizedInlineInput(state.customInput)}”`));
391
424
  }
392
425
  if (state.note && state.noteRowKey === rowItem.key) {
393
- spans.push(span(`${spans.length > 0 ? " · " : ""}✎ ${normalizedInlineInput(state.note)}`, "success"));
426
+ spans.push(span(`${spans.length > 0 ? " " : ""}✎ `, "dim"), span(normalizedInlineInput(state.note), "em"));
394
427
  }
395
428
  return spans.length > 0 ? spans : undefined;
396
429
  }
@@ -724,10 +757,15 @@ export class AskDialogComponent implements Component {
724
757
 
725
758
  /**
726
759
  * In the dock, in the composer's place and framed as the composer is: a
727
- * `col` with the prompt editor's root role (`omp.editor`), so the terminal
728
- * gives it the composer's insets and spacing. Not a modal `overlay` sheet:
729
- * one anchored at the bottom covered the transcript rows that explain the
730
- * question and blocked scrolling until the question was answered.
760
+ * `col` with an `omp.editor.*` root role (`omp.editor.ask`, collapsed
761
+ * `omp.editor.ask.hidden`), so the terminal draws the composer's shell
762
+ * around it. Not a modal `overlay` sheet: one anchored at the bottom
763
+ * covered the transcript rows that explain the question and blocked
764
+ * scrolling until the question was answered.
765
+ *
766
+ * Anatomy: the question tabs (several questions), the question, its
767
+ * answers as radio/check rows, and the action bar as the footer (the
768
+ * countdown, Hide, then Note, Skip and the primary Submit/Next).
731
769
  */
732
770
  describe(cx: DescribeContext): NativeNode {
733
771
  const inputGuard = this.options.inputGuard;
@@ -743,36 +781,48 @@ export class AskDialogComponent implements Component {
743
781
  return this.#native;
744
782
  }
745
783
  const children: NativeChild[] = [];
746
- const head = this.#describeHead(ring);
784
+ const head = this.#describeHead();
747
785
  if (head) children.push(head);
748
786
  if (this.#isSubmitTab()) this.#describeSubmitBody(children);
749
787
  else this.#describeQuestionBody(children);
750
- children.push(this.#describeActions(blocked));
751
- this.#native = col(children, { role: "omp.editor", gap: "md" });
788
+ children.push(this.#describeActions(blocked, ring));
789
+ this.#native = col(children, { role: "omp.editor.ask", gap: "md" });
752
790
  this.#nativeBlocked = blocked;
753
791
  return this.#native;
754
792
  }
755
793
 
756
- /** Question tabs (plus Review) and the countdown: a ring when the terminal draws meters, else a clocked `elapsed`. */
757
- #describeHead(ring: boolean): NativeNode | undefined {
758
- const children: NativeChild[] = [];
759
- if (this.#hasSubmitTab()) {
760
- const items = this.#questions.map((question, index) => ({
794
+ /** The question tabs, an answered one checked, then Review; none for a lone single-choice question. */
795
+ #describeHead(): NativeNode | undefined {
796
+ if (!this.#hasSubmitTab()) return undefined;
797
+ const items = this.#questions.map((question, index) => {
798
+ const name = questionTabName(question, index);
799
+ const state = this.#states[index];
800
+ return {
761
801
  id: String(index),
762
- label: questionTabName(question, index),
763
- }));
764
- items.push({ id: "submit", label: REVIEW_TAB });
765
- const active = this.#isSubmitTab() ? "submit" : String(this.#activeTabIndex);
766
- children.push(
767
- node("tabs", { items, active, role: "omp.ask.questions", actions: { click: "select" } }, undefined, "tabs"),
768
- );
769
- }
770
- if (this.#countdown) {
771
- children.push(node("spacer", { grow: 1 }));
772
- children.push(this.#describeTimer(this.#countdown, ring));
773
- }
774
- if (children.length === 0) return undefined;
775
- return node("row", { role: "omp.ask.head", gap: "sm", align: "center" }, children, "head");
802
+ label: state && isAnswered(state) ? [span("✓ ", "success"), span(name)] : [span(name)],
803
+ };
804
+ });
805
+ items.push({ id: "submit", label: [span(REVIEW_TAB)] });
806
+ const active = this.#isSubmitTab() ? "submit" : String(this.#activeTabIndex);
807
+ return node(
808
+ "row",
809
+ { role: "omp.ask.head", align: "center" },
810
+ [
811
+ node(
812
+ "tabs",
813
+ {
814
+ items,
815
+ active,
816
+ role: "omp.ask.questions",
817
+ title: "Next question tab · Previous shift+tab",
818
+ actions: { click: "select" },
819
+ },
820
+ undefined,
821
+ "tabs",
822
+ ),
823
+ ],
824
+ "head",
825
+ );
776
826
  }
777
827
 
778
828
  /** The countdown: a ring when the terminal draws meters, else a clocked `elapsed`. */
@@ -794,25 +844,31 @@ export class AskDialogComponent implements Component {
794
844
  );
795
845
  }
796
846
 
797
- /** Hidden: one action row in the composer's place — the question clipped to a line, the countdown, Show and Skip. */
847
+ /** Hidden: one row in the composer's place — the countdown, the question clipped to a line, Skip and Show. */
798
848
  #describeHidden(ring: boolean): NativeNode {
799
849
  const question = this.#questions[this.#currentQuestionIndex()];
800
- const more = this.#questions.length > 1 ? ` (+${this.#questions.length - 1} more)` : "";
850
+ const more = this.#questions.length > 1 ? ` +${this.#questions.length - 1} more` : "";
801
851
  const summary = text(
802
852
  [
803
- span("Ask hidden · ", "muted"),
804
- span(`${normalizedInlineInput(sanitizeCarriageReturns(question?.question ?? ""))}${more}`),
853
+ span("Question ", "muted"),
854
+ span(normalizedInlineInput(sanitizeCarriageReturns(question?.question ?? ""))),
855
+ ...(more ? [span(more, "muted")] : []),
805
856
  ],
806
- { truncate: "end" },
857
+ { truncate: "end", role: "omp.ask.summary" },
807
858
  );
808
859
  const hideKey = getKeybindings().getKeys("app.ask.hide")[0];
809
- const show = actionButton("Show", "show", { tone: "accent", ...(hideKey ? { keys: hideKey } : {}) });
860
+ const show = actionButton("Show", "show", {
861
+ tone: "accent",
862
+ ...(hideKey ? { keys: hideKey } : {}),
863
+ title: `Show the question${hideKey ? ` ${formatTooltipKey(hideKey)}` : ""}`,
864
+ });
810
865
  const cancelKey = getKeybindings().getKeys("tui.select.cancel")[0];
811
866
  const skip = actionButton("Skip", "cancel", cancelKey ? { keys: cancelKey } : {});
812
- const items: (NativeNode | null)[] = [summary, null];
867
+ const items: (NativeNode | null)[] = [];
813
868
  if (this.#countdown) items.push(this.#describeTimer(this.#countdown, ring));
814
- items.push(show, skip);
815
- return col([actionBar(items)], { role: "omp.editor", gap: "md" });
869
+ // The summary grows (`omp.ask.summary`), end-aligning Skip and Show.
870
+ items.push(summary, skip, show);
871
+ return col([actionBar(items)], { role: "omp.editor.ask.hidden", gap: "md" });
816
872
  }
817
873
 
818
874
  /** Question tab: the question as markdown and its answers as radio/check rows (label, description, badge). */
@@ -830,7 +886,8 @@ export class AskDialogComponent implements Component {
830
886
  "question",
831
887
  ),
832
888
  );
833
- const optionRole = question.multi ? "omp.ask.check" : "omp.ask.option";
889
+ // Radios (`omp.ask.option`, `omp.ask.other`) or checks (`omp.ask.check`, `omp.ask.other.check`); a chosen
890
+ // row is `accent`-toned (a check also carries the check glyph), apart from the highlighted row (`selected`).
834
891
  const items = rows.map(rowItem => {
835
892
  const option = rowItem.kind === "option" ? question.options[rowItem.optionIndex ?? -1] : undefined;
836
893
  const checked =
@@ -838,33 +895,29 @@ export class AskDialogComponent implements Component {
838
895
  ? state.customInput !== undefined
839
896
  : option !== undefined && state.selectedOptions.has(option.label);
840
897
  const recommended = rowItem.kind === "option" && question.recommended === rowItem.optionIndex;
841
- // The badge replaces the ANSI `(Recommended)` suffix.
842
- const label =
843
- rowItem.kind === "other"
844
- ? OTHER_LABEL
845
- : recommended && rowItem.label.endsWith(RECOMMENDED_SUFFIX)
846
- ? rowItem.label.slice(0, -RECOMMENDED_SUFFIX.length)
847
- : rowItem.label;
848
898
  const detail =
849
899
  describeRowDetail(rowItem, question, state) ??
850
- (rowItem.kind === "other" ? [span("Type your own answer", "dim")] : undefined);
900
+ (rowItem.kind === "other" ? [span("Type your own answer")] : undefined);
901
+ const role =
902
+ rowItem.kind === "other"
903
+ ? question.multi
904
+ ? "omp.ask.other.check"
905
+ : "omp.ask.other"
906
+ : question.multi
907
+ ? "omp.ask.check"
908
+ : "omp.ask.option";
851
909
  return node(
852
910
  "item",
853
911
  {
854
- // Inline code runs mono, as the ANSI row renders inline markdown.
855
- label: label
856
- .split(/(`[^`]+`)/)
857
- .flatMap(piece =>
858
- piece === ""
859
- ? []
860
- : piece.length > 2 && piece.startsWith("`") && piece.endsWith("`")
861
- ? [span(piece.slice(1, -1), "code")]
862
- : [span(piece)],
863
- ),
864
- role: rowItem.kind === "other" ? "omp.ask.other" : optionRole,
912
+ // The badge replaces the ANSI `(Recommended)` suffix.
913
+ label:
914
+ rowItem.kind === "other"
915
+ ? [span(OTHER_LABEL)]
916
+ : optionLabelSpans(question, rowItem.optionIndex ?? -1, rowItem.label),
917
+ role,
865
918
  ...(detail ? { detail } : {}),
866
- ...(recommended ? { value: [span("Recommended", "accent")] } : {}),
867
- ...(checked ? { icon: "check", tone: "success" as const } : {}),
919
+ ...(recommended ? { value: [span("Recommended")] } : {}),
920
+ ...(checked ? { tone: "accent" as const, ...(question.multi ? { icon: "check" } : {}) } : {}),
868
921
  },
869
922
  undefined,
870
923
  rowItem.key,
@@ -882,68 +935,79 @@ export class AskDialogComponent implements Component {
882
935
  const highlighted = rows[state.cursorIndex];
883
936
  const option = highlighted?.kind === "option" ? question.options[highlighted.optionIndex ?? -1] : undefined;
884
937
  if (option?.preview?.trim()) {
885
- children.push(node("md", { text: replaceTabs(option.preview) }, undefined, "preview"));
938
+ children.push(
939
+ node("md", { text: replaceTabs(option.preview), role: "omp.ask.preview" }, undefined, "preview"),
940
+ );
886
941
  }
887
942
  }
888
943
 
889
- /** Review tab: every answer as key/value pairs; the action bar's Submit sends them. */
944
+ /** Review tab: what is still unanswered, then every answer as question/answer pairs; Submit sends them. */
890
945
  #describeSubmitBody(children: NativeChild[]): void {
891
946
  const unanswered = this.#unansweredCount();
892
- if (unanswered > 0) {
893
- const noun = `question${unanswered === 1 ? "" : "s"}`;
894
- children.push(
895
- text([span(`${unanswered} unanswered ${noun}; ${formatKeyHint("enter")} still submits.`, "warning")]),
896
- );
897
- }
947
+ const notice =
948
+ unanswered > 0
949
+ ? [
950
+ span(`${unanswered} unanswered`, "warning"),
951
+ span(` · Submit still sends ${unanswered === this.#questions.length ? "the questions" : "the rest"}`),
952
+ ]
953
+ : [span("All answered · Submit sends them")];
954
+ children.push(node("text", { spans: notice, role: "omp.ask.notice" }, undefined, "notice"));
898
955
  const answers: { k: string; v: readonly TspSpan[] }[] = [];
899
956
  for (let index = 0; index < this.#questions.length; index++) {
900
957
  const question = this.#questions[index];
901
958
  const state = this.#states[index];
902
959
  if (!question || !state) continue;
903
- answers.push({ k: `${index + 1}. ${questionTabName(question, index)}`, v: describeAnswer(question, state) });
960
+ answers.push({ k: questionTabName(question, index), v: describeAnswer(question, state) });
904
961
  }
905
- children.push(node("kv", { items: answers }, undefined, "answers"));
962
+ children.push(node("kv", { items: answers, role: "omp.ask.answers" }, undefined, "answers"));
906
963
  }
907
964
 
908
965
  /**
909
- * The action bar: Submit ⏎ (Enter's action on this tab; `Next` while more
910
- * questions follow), Note n, Skip esc. Keyboard-only keys live in the
911
- * buttons' tooltips; a draft that owns input shows its hint instead. Hide
912
- * (left-aligned, apart from the answer actions) collapses the dialog.
966
+ * The action bar, the sheet's footer: the countdown and Hide (apart from
967
+ * the answer actions), then Note, Skip and the primary Submit (Enter's
968
+ * action on this tab; `Next` while more questions follow). Buttons say
969
+ * what they do; their keys live in their tooltips. A draft that owns input
970
+ * shows its hint in place of the answer actions.
913
971
  */
914
- #describeActions(blocked: boolean): NativeNode {
972
+ #describeActions(blocked: boolean, ring: boolean): NativeNode {
915
973
  const cancelKey = getKeybindings().getKeys("tui.select.cancel")[0];
916
- const skip = actionButton("Skip", "cancel", cancelKey ? { keys: cancelKey } : {});
974
+ const skip = actionButton("Skip", "cancel", {
975
+ ...(cancelKey ? { keys: cancelKey } : {}),
976
+ title: `Skip without answering${cancelKey ? ` ${formatTooltipKey(cancelKey)}` : ""}`,
977
+ });
917
978
  const hideKey = getKeybindings().getKeys("app.ask.hide")[0];
918
979
  const hide = actionButton("Hide", "hide", {
919
980
  ...(hideKey ? { keys: hideKey } : {}),
920
- title: `Hide the question until you are ready to answer${hideKey ? ` ${formatTooltipKey(hideKey)}` : ""}`,
981
+ title: `Hide until you are ready to answer${hideKey ? ` ${formatTooltipKey(hideKey)}` : ""}`,
921
982
  });
983
+ const lead: NativeNode[] = this.#countdown ? [this.#describeTimer(this.#countdown, ring), hide] : [hide];
922
984
  const inputGuard = this.options.inputGuard;
923
985
  if (blocked && inputGuard) {
924
- return actionBar([text([span(plainText(inputGuard.hint), "muted")], { truncate: "end" }), null, hide, skip]);
986
+ return actionBar([
987
+ ...lead,
988
+ text([span(plainText(inputGuard.hint), "muted")], { truncate: "end", role: "omp.ask.summary" }),
989
+ skip,
990
+ ]);
925
991
  }
926
- const moves = ["up/down move"];
927
- if (this.#hasSubmitTab()) moves.push("tab switches question");
928
992
  if (this.#isSubmitTab()) {
929
993
  const submit = actionButton("Submit", "submit", {
930
994
  keys: "enter",
931
995
  tone: "accent",
932
996
  title: "Submit answers enter",
933
997
  });
934
- return actionBar([hide, null, skip, submit]);
998
+ return actionBar([...lead, null, skip, submit]);
935
999
  }
936
1000
  const question = this.#questions[this.#currentQuestionIndex()];
937
1001
  const last = this.#questions.length === 1;
938
1002
  const enterLabel = last ? "Submit" : "Next";
939
- const tips = question?.multi ? ["space toggles", ...moves] : moves;
1003
+ // A multi-select toggles on Space; Enter moves on.
940
1004
  const submit = actionButton(enterLabel, "submit", {
941
1005
  keys: "enter",
942
1006
  tone: "accent",
943
- title: `${enterLabel} enter · ${tips.join(" · ")}`,
1007
+ title: question?.multi ? `${enterLabel} enter · Toggle space` : `${enterLabel} enter`,
944
1008
  });
945
- const note = actionButton("Note", "note", { keys: "n", title: `Add a note to the highlighted answer n` });
946
- return actionBar([hide, null, note, skip, submit]);
1009
+ const note = actionButton("Note", "note", { keys: "n", title: "Add a note to the highlighted answer n" });
1010
+ return actionBar([...lead, null, note, skip, submit]);
947
1011
  }
948
1012
 
949
1013
  /**