@mrciphersmith/keryx 0.2.137 → 0.2.139

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 (2) hide show
  1. package/dist/cli.js +87 -9
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -51141,7 +51141,7 @@ import path47 from "path";
51141
51141
  // package.json
51142
51142
  var package_default = {
51143
51143
  name: "@mrciphersmith/keryx",
51144
- version: "0.2.137",
51144
+ version: "0.2.139",
51145
51145
  description: "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
51146
51146
  private: false,
51147
51147
  publishConfig: {
@@ -92550,18 +92550,23 @@ function createBlockView(otui, renderer, parent, block, options = {}) {
92550
92550
  }
92551
92551
  function appendUserEcho(otui, renderer, parent, options) {
92552
92552
  const text = `${options.marker ?? "\u276F"} ${options.line}`;
92553
+ const fullWidth = options.fullWidth === true;
92553
92554
  const box = new otui.BoxRenderable(renderer, {
92554
92555
  id: options.id,
92555
- borderStyle: "rounded",
92556
- border: true,
92557
- borderColor: options.borderColor ?? frameColor(),
92556
+ borderStyle: fullWidth ? "single" : "rounded",
92557
+ border: fullWidth ? ["left"] : true,
92558
+ borderColor: options.borderColor ?? (fullWidth ? getTheme().user : frameColor()),
92559
+ ...fullWidth ? { width: "100%", backgroundColor: getTheme().panel } : { maxWidth: hugWidth(text, FRAME_CHROME) },
92558
92560
  paddingLeft: 1,
92559
92561
  paddingRight: 1,
92560
92562
  marginTop: options.marginTop ?? 1,
92561
- flexShrink: 0,
92562
- maxWidth: hugWidth(text, FRAME_CHROME)
92563
+ flexShrink: 0
92563
92564
  });
92564
- box.add(new otui.TextRenderable(renderer, { id: `${options.id}-t`, content: otui.t`${otui.dim(text)}` }));
92565
+ box.add(new otui.TextRenderable(renderer, {
92566
+ id: `${options.id}-t`,
92567
+ content: fullWidth ? text : otui.t`${otui.dim(text)}`,
92568
+ ...fullWidth ? { fg: getTheme().user, wrapMode: "word" } : {}
92569
+ }));
92565
92570
  parent.add(box);
92566
92571
  return box;
92567
92572
  }
@@ -95122,6 +95127,27 @@ async function createShellChrome(otui, renderer, opts) {
95122
95127
  target.content = text.length === 0 ? "" : otui.t`${otui.dim(text)}`;
95123
95128
  };
95124
95129
  paintDim(headerRight, opts.headerMeta ?? "");
95130
+ const promptPin = new otui.BoxRenderable(r, {
95131
+ id: "prompt-pin",
95132
+ flexShrink: 0,
95133
+ width: "100%",
95134
+ height: 1,
95135
+ visible: false,
95136
+ border: ["left"],
95137
+ borderColor: getTheme().user,
95138
+ backgroundColor: getTheme().highlight,
95139
+ paddingLeft: 1,
95140
+ paddingRight: 1
95141
+ });
95142
+ const promptPinText = new otui.TextRenderable(r, {
95143
+ id: "prompt-pin-text",
95144
+ content: "",
95145
+ fg: getTheme().user,
95146
+ wrapMode: "none",
95147
+ truncate: true
95148
+ });
95149
+ promptPin.add(promptPinText);
95150
+ main.add(promptPin);
95125
95151
  const scroll = new otui.ScrollBoxRenderable(r, {
95126
95152
  id: "transcript",
95127
95153
  flexGrow: 1,
@@ -95138,6 +95164,36 @@ async function createShellChrome(otui, renderer, opts) {
95138
95164
  });
95139
95165
  main.add(scroll);
95140
95166
  const transcript = scroll.content;
95167
+ const userPrompts = [];
95168
+ let pinnedPrompt;
95169
+ const syncPromptPin = () => {
95170
+ let active;
95171
+ for (let i = userPrompts.length - 1;i >= 0; i -= 1) {
95172
+ const candidate = userPrompts[i];
95173
+ if (candidate === undefined)
95174
+ continue;
95175
+ if (candidate.box.parent !== transcript) {
95176
+ userPrompts.splice(i, 1);
95177
+ continue;
95178
+ }
95179
+ const logicalTop = candidate.box.y - transcript.y;
95180
+ if (logicalTop < scroll.scrollTop) {
95181
+ active = candidate;
95182
+ break;
95183
+ }
95184
+ }
95185
+ if (active?.box === pinnedPrompt?.box)
95186
+ return;
95187
+ pinnedPrompt = active;
95188
+ promptPin.visible = active !== undefined;
95189
+ promptPinText.content = active === undefined ? "" : `\u21A5 \u276F ${active.line}`;
95190
+ };
95191
+ const registerUserPrompt = (box, line) => {
95192
+ if (line.length === 0 || userPrompts.some((item) => item.box === box))
95193
+ return;
95194
+ userPrompts.push({ box, line });
95195
+ };
95196
+ r.on(otui.CliRenderEvents.FRAME, syncPromptPin);
95141
95197
  let liveStatus;
95142
95198
  const originalTranscriptAdd = transcript.add.bind(transcript);
95143
95199
  const originalTranscriptRemove = transcript.remove.bind(transcript);
@@ -95551,6 +95607,9 @@ async function createShellChrome(otui, renderer, opts) {
95551
95607
  sidebar.borderColor = theme.border;
95552
95608
  sidebar.backgroundColor = theme.panel;
95553
95609
  header.backgroundColor = theme.bg;
95610
+ promptPin.borderColor = theme.user;
95611
+ promptPin.backgroundColor = theme.highlight;
95612
+ promptPinText.fg = theme.user;
95554
95613
  footer.backgroundColor = theme.bg;
95555
95614
  dock.backgroundColor = theme.panel;
95556
95615
  dock.borderColor = theme.border;
@@ -95594,6 +95653,7 @@ async function createShellChrome(otui, renderer, opts) {
95594
95653
  sidebarTop,
95595
95654
  sidebarScroll: sidebarTopScroll,
95596
95655
  header,
95656
+ promptPin,
95597
95657
  scroll,
95598
95658
  transcript,
95599
95659
  dock,
@@ -95603,6 +95663,8 @@ async function createShellChrome(otui, renderer, opts) {
95603
95663
  textarea,
95604
95664
  footer,
95605
95665
  input,
95666
+ registerUserPrompt,
95667
+ pinnedUserPrompt: () => pinnedPrompt?.line,
95606
95668
  focusComposer: () => {
95607
95669
  textarea.focus();
95608
95670
  },
@@ -95663,6 +95725,9 @@ async function createShellChrome(otui, renderer, opts) {
95663
95725
  try {
95664
95726
  r.off(otui.CliRenderEvents.SELECTION, onSelection);
95665
95727
  } catch {}
95728
+ try {
95729
+ r.off(otui.CliRenderEvents.FRAME, syncPromptPin);
95730
+ } catch {}
95666
95731
  }
95667
95732
  };
95668
95733
  }
@@ -106652,7 +106717,12 @@ Usage: /reasoning <${REASONING_EFFORT_LEVELS.join("|")}>
106652
106717
  }
106653
106718
  return;
106654
106719
  }
106655
- appendUserEcho(otui, r, transcript, { id: `ub${uid++}`, line: displayLine });
106720
+ const userEcho = appendUserEcho(otui, r, transcript, {
106721
+ id: `ub${uid++}`,
106722
+ line: displayLine,
106723
+ fullWidth: true
106724
+ });
106725
+ chrome.registerUserPrompt(userEcho, displayLine);
106656
106726
  transcript.add(new otui.TextRenderable(r, {
106657
106727
  id: `h${uid++}`,
106658
106728
  content: otui.t`${otui.cyan("\u25CF")} ${otui.bold("keryx")} ${otui.dim(hhmm())}`,
@@ -107130,7 +107200,15 @@ async function mountChatShell(otui, renderer, opts) {
107130
107200
  const bridge = createChatBridge({
107131
107201
  onAccepted: (line) => {
107132
107202
  const displayLine = line.startsWith("/") ? line : summarizeSubmittedLine(line);
107133
- appendUserEcho(otui, r, transcript, { id: `ub${uid++}`, line: displayLine });
107203
+ const isCommand = line.startsWith("/");
107204
+ const userEcho = appendUserEcho(otui, r, transcript, {
107205
+ id: `ub${uid++}`,
107206
+ line: displayLine,
107207
+ fullWidth: !isCommand
107208
+ });
107209
+ if (!isCommand) {
107210
+ chrome.registerUserPrompt(userEcho, displayLine);
107211
+ }
107134
107212
  if (!line.startsWith("/")) {
107135
107213
  seen.push({ content: line });
107136
107214
  paintContext();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrciphersmith/keryx",
3
- "version": "0.2.137",
3
+ "version": "0.2.139",
4
4
  "description": "Version-controlled project context for AI coding agents: code graph, architecture wiki, project memory, relevant tests, quality signals, and task flows.",
5
5
  "private": false,
6
6
  "publishConfig": {