@crouton-kit/humanloop 0.3.25 → 0.3.27

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.
@@ -119,11 +119,6 @@ function buildItemReviewLayout(state, cols, rows) {
119
119
  for (const line of wrap(sanitize(interaction.title), maxW)) {
120
120
  preLines.push(` ${BOLD}${line}${RESET}`);
121
121
  }
122
- if (interaction.subtitle) {
123
- for (const line of wrap(sanitize(interaction.subtitle), maxW)) {
124
- preLines.push(` ${DIM}${line}${RESET}`);
125
- }
126
- }
127
122
  // "Previously answered" marker — shown only while the seed is intact (no user
128
123
  // override yet). The label comes from preAnswered.label so callers can be
129
124
  // domain-specific ("Previously approved", "Carried over from prior pass").
@@ -134,8 +129,17 @@ function buildItemReviewLayout(state, cols, rows) {
134
129
  : 'Previously answered';
135
130
  preLines.push(` ${DIM}${ITALIC}◆ ${sanitize(label)} — press n/p to review, or any option to override${RESET}`);
136
131
  }
137
- // Body: rendered question body + expanded visual block (scrollable)
132
+ // Body: rendered subtitle + question body + expanded visual block (scrollable).
133
+ // subtitle and body are both directive-flavored markdown rendered by termrender
134
+ // and live in the scrollable region so long content never overflows the fixed
135
+ // header — agents put rich prose in either field, so both must render markdown.
138
136
  const bodyLines = [];
137
+ if (interaction.subtitle) {
138
+ bodyLines.push('');
139
+ for (const line of renderMarkdown(interaction.subtitle, maxW)) {
140
+ bodyLines.push(` ${line}`);
141
+ }
142
+ }
139
143
  if (interaction.body) {
140
144
  bodyLines.push('');
141
145
  for (const line of renderMarkdown(interaction.body, maxW)) {
package/dist/types.d.ts CHANGED
@@ -28,8 +28,14 @@ export interface InteractionPreAnswer {
28
28
  }
29
29
  export interface Interaction {
30
30
  id: string;
31
+ /** Short topic — the thing being decided, not the decision. */
31
32
  title: string;
33
+ /** ONE-sentence TL;DR of the choice/stakes. Renders as markdown in the
34
+ * scrollable region; keep it a single line — long prose belongs in `body`. */
32
35
  subtitle?: string;
36
+ /** The full explanation: directive-flavored markdown rendered by termrender.
37
+ * This is where long or rich content goes (never the wall of detail in
38
+ * `subtitle`). `bodyPath` is the same content sourced from a file. */
33
39
  body?: string;
34
40
  bodyPath?: string;
35
41
  options: InteractionOption[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crouton-kit/humanloop",
3
- "version": "0.3.25",
3
+ "version": "0.3.27",
4
4
  "description": "Human-in-the-loop decision TUI — agents write questions, humans answer them",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",