@oxecli/oxe 1.0.82 → 1.0.83

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/LICENSE CHANGED
@@ -12,10 +12,16 @@ furnished to do so, subject to the following conditions:
12
12
  The above copyright notice and this permission notice shall be included in all
13
13
  copies or substantial portions of the Software.
14
14
 
15
+ Redistribution or publication of the Software, in original or modified form,
16
+ must retain this copyright notice and must not be presented, published, or
17
+ distributed under a different author's name or claimed as the redistributor's
18
+ own original work. Attribution to the original author ("Oxe") must be
19
+ preserved in any public release, fork, or derivative distribution.
20
+
15
21
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
22
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
23
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
24
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
25
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
26
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
27
+ SOFTWARE.
package/dist/cli.js CHANGED
@@ -376,7 +376,7 @@ export class CLI {
376
376
  const budget = max_context_tokens - context_overhead_margin;
377
377
  const pct = Math.max(0, Math.min(100, Math.round(((budget - used) / budget) * 100)));
378
378
  const [input, spans] = await askBottomPrompt("You", "❯", this.promptHistory, {
379
- left: "\x1b[90mPress \x1b[1;36mesc\x1b[0m\x1b[90m to interrupt\x1b[0m",
379
+ left: "\x1b[90mPress \x1b[1;36mCtrl+C\x1b[0m\x1b[90m to interrupt\x1b[0m",
380
380
  right: `\x1b[1;36m${pct}%\x1b[0m \x1b[90muntil auto-compact\x1b[0m`,
381
381
  });
382
382
  if (!input.trim())
package/dist/engine.js CHANGED
@@ -598,12 +598,12 @@ export class InferenceEngine {
598
598
  text: action,
599
599
  status: failed ? "failed" : "ok",
600
600
  });
601
- // Swap the "⎿ Working..." line for the real result, then a blank line.
601
+ // Swap the "⎿ Working..." line for the real result. If the tool
602
+ // produced a diff it renders directly below the action line with no
603
+ // gap; otherwise a blank line separates the action from what follows.
602
604
  toolSpinner.replaceWith(action);
603
- process.stdout.write(`\n`);
604
- // Any diff the tool produced is flushed only now, after the spinner
605
- // has stopped, so the box renders cleanly below the action line.
606
- flushPendingDiffOutput();
605
+ if (!flushPendingDiffOutput())
606
+ process.stdout.write("\n");
607
607
  const truncatedResult = c.name === "read_file"
608
608
  ? truncateToolOutput(rawResult, max_read_file_stored_chars)
609
609
  : truncateToolOutput(rawResult);
package/dist/tools.js CHANGED
@@ -36,9 +36,10 @@ function truncateDiffLine(line) {
36
36
  const pendingDiffOutput = [];
37
37
  export function flushPendingDiffOutput() {
38
38
  if (!pendingDiffOutput.length)
39
- return;
39
+ return false;
40
40
  process.stdout.write(pendingDiffOutput.join("\n") + "\n\n");
41
41
  pendingDiffOutput.length = 0;
42
+ return true;
42
43
  }
43
44
  function displayDiff(pathName, oldContent, newContent) {
44
45
  if (oldContent.length + newContent.length > max_diff_source_chars) {
@@ -137,12 +138,15 @@ function displayDiff(pathName, oldContent, newContent) {
137
138
  const bg = isAdd ? "\x1b[48;2;2;40;0m" : "\x1b[48;2;61;1;0m";
138
139
  const fg = isAdd ? "\x1b[38;2;80;200;80m" : "\x1b[38;2;220;90;90m";
139
140
  const sign = isAdd ? "+" : "-";
140
- // Changed content renders normal white with syntax highlighting;
141
- // re-apply the white base after each token reset.
141
+ // The row background spans the full line width (number, sign, content,
142
+ // and trailing fill) so the row reads as one colored strip. Changed
143
+ // content renders normal white with syntax highlighting; re-apply the
144
+ // background + white base after each token reset so both hold across
145
+ // the whole body.
142
146
  const raw = highlightCodeLine(v.body);
143
- const body = truncateStyled(raw.replace(/\x1b\[0m/g, "\x1b[0m\x1b[97m"), bodyMax);
147
+ const body = truncateStyled(raw.replace(/\x1b\[0m/g, `\x1b[0m${bg}\x1b[97m`), bodyMax);
144
148
  const fill = Math.max(0, termW - numW - 4 - plainLen(body));
145
- pendingDiffOutput.push(`${bg}${fg}${numStr} ${sign} \x1b[0m\x1b[97m${body}${" ".repeat(fill)}\x1b[0m`);
149
+ pendingDiffOutput.push(`${bg}${fg}${numStr} ${sign} \x1b[0m${bg}\x1b[97m${body}${bg}\x1b[97m${" ".repeat(fill)}\x1b[0m`);
146
150
  }
147
151
  else {
148
152
  const raw = v.kind === "\\" ? v.body : highlightCodeLine(v.body);
@@ -403,7 +407,7 @@ export function toolWriteFile(pathName, content) {
403
407
  catch (err) {
404
408
  return `Error: ${err}`;
405
409
  }
406
- return `Wrote ${content.length.toLocaleString()} characters to ${pathName}`;
410
+ return `Wrote ${content.length.toLocaleString()} chars`;
407
411
  }
408
412
  // ---------------------------------------------------------------------------
409
413
  // edit_file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxecli/oxe",
3
- "version": "1.0.82",
3
+ "version": "1.0.83",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },