codeam-cli 2.12.12 → 2.12.14
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/CHANGELOG.md +13 -0
- package/dist/index.js +65 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,19 @@ All notable changes to `codeam-cli` are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.12.13] — 2026-05-14
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Don't wrap diff / commit / PR / push / merge output in code fences
|
|
12
|
+
|
|
13
|
+
## [2.12.12] — 2026-05-14
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **cli:** Codex-specific renderer with DECSTBM scroll-region support — captures full multi-paragraph replies
|
|
18
|
+
- **cli:** Inject Markdown ``` fences for Codex-emitted code blocks
|
|
19
|
+
|
|
7
20
|
## [2.12.11] — 2026-05-14
|
|
8
21
|
|
|
9
22
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -1682,7 +1682,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
|
|
|
1682
1682
|
// package.json
|
|
1683
1683
|
var package_default = {
|
|
1684
1684
|
name: "codeam-cli",
|
|
1685
|
-
version: "2.12.
|
|
1685
|
+
version: "2.12.14",
|
|
1686
1686
|
description: "Remote control Claude Code (and other AI coding agents) from your mobile phone. Pair your device, send prompts, stream responses in real-time, and approve commands \u2014 from anywhere.",
|
|
1687
1687
|
type: "commonjs",
|
|
1688
1688
|
main: "dist/index.js",
|
|
@@ -5834,12 +5834,13 @@ function filterCodexChrome(lines) {
|
|
|
5834
5834
|
}
|
|
5835
5835
|
out.push(t2);
|
|
5836
5836
|
}
|
|
5837
|
-
const
|
|
5837
|
+
const dedented = dedentCodexDiffLines(out);
|
|
5838
|
+
const wrapped = wrapCodexCodeBlocks(dedented);
|
|
5838
5839
|
const hasRealInput = lines.some((l) => /\w/.test(l));
|
|
5839
5840
|
if (out.length > 0 || hasRealInput) {
|
|
5840
5841
|
const sampleIn = lines.slice(-50).map((l, i) => ` in[${i}] ${JSON.stringify(l)}`).join("\n");
|
|
5841
|
-
const sampleOut =
|
|
5842
|
-
log.info("codex-parse", `in=${lines.length} out=${
|
|
5842
|
+
const sampleOut = dedented.map((l, i) => ` out[${i}] ${JSON.stringify(l)}`).join("\n");
|
|
5843
|
+
log.info("codex-parse", `in=${lines.length} out=${dedented.length}
|
|
5843
5844
|
${sampleIn}
|
|
5844
5845
|
---
|
|
5845
5846
|
${sampleOut}`);
|
|
@@ -5849,6 +5850,54 @@ ${sampleOut}`);
|
|
|
5849
5850
|
return wrapped;
|
|
5850
5851
|
}
|
|
5851
5852
|
var CODE_CHAR_RE = /[;{}]|=>|^\s*(?:import|public|private|static|class|function|interface|type|const|let|var|def|return|if|else|for|while)\b/;
|
|
5853
|
+
var DIFF_HUNK_RE = /^@@\s+-\d+(?:,\d+)?\s+\+\d+(?:,\d+)?\s+@@/;
|
|
5854
|
+
var DIFF_GIT_RE = /^diff\s+--git\s+/;
|
|
5855
|
+
var DIFF_OLD_RE = /^---\s+(?:a\/)?\S/;
|
|
5856
|
+
var DIFF_NEW_RE = /^\+\+\+\s+(?:b\/)?\S/;
|
|
5857
|
+
var COMMIT_HEAD_RE = /^\[[\w./@-]+\s+[0-9a-f]{7,40}\]\s+/;
|
|
5858
|
+
var COMMIT_STATS_RE = /\d+\s+files?\s+changed/;
|
|
5859
|
+
var PUSH_TO_RE = /^To\s+(?:https?:\/\/|git@)/;
|
|
5860
|
+
var PUSH_NEW_RE = /\[new branch\]\s+\S+\s*->\s*\S+/;
|
|
5861
|
+
var PUSH_UPDATE_RE = /^\s*[0-9a-f]{7,40}\.\.[0-9a-f]{7,40}\s+\S+\s*->\s*\S+/;
|
|
5862
|
+
var MERGE_UPD_RE = /^Updating\s+[0-9a-f]{7,40}\.\.[0-9a-f]{7,40}/;
|
|
5863
|
+
var MERGE_FF_RE = /^Fast-forward\s*$/;
|
|
5864
|
+
var PR_TITLE_RE = /^title:\s+\S/;
|
|
5865
|
+
var PR_STATE_RE = /^state:\s+(?:OPEN|CLOSED|MERGED|DRAFT)/i;
|
|
5866
|
+
var PR_URL_RE = /https?:\/\/github\.com\/[\w.-]+\/[\w.-]+\/pull\/\d+/;
|
|
5867
|
+
var PR_BANNER_RE = /^\s*[✓✔]?\s*Pull request created\s*$/i;
|
|
5868
|
+
function dedentCodexDiffLines(lines) {
|
|
5869
|
+
let margin = -1;
|
|
5870
|
+
for (const line of lines) {
|
|
5871
|
+
const m = line.match(/^( +)(?:diff --git |@@ |--- |\+\+\+ )/);
|
|
5872
|
+
if (m) {
|
|
5873
|
+
const w3 = m[1].length;
|
|
5874
|
+
if (margin === -1 || w3 < margin) margin = w3;
|
|
5875
|
+
}
|
|
5876
|
+
}
|
|
5877
|
+
if (margin <= 0) return lines;
|
|
5878
|
+
return lines.map((line) => {
|
|
5879
|
+
if (line.length === 0) return line;
|
|
5880
|
+
const lead = line.match(/^ */)?.[0].length ?? 0;
|
|
5881
|
+
const strip = Math.min(margin, lead);
|
|
5882
|
+
return strip > 0 ? line.slice(strip) : line;
|
|
5883
|
+
});
|
|
5884
|
+
}
|
|
5885
|
+
function isStructuredBlock(block) {
|
|
5886
|
+
if (block.some((l) => DIFF_HUNK_RE.test(l))) return true;
|
|
5887
|
+
if (block.some((l) => DIFF_GIT_RE.test(l))) return true;
|
|
5888
|
+
if (block.some((l) => DIFF_OLD_RE.test(l)) && block.some((l) => DIFF_NEW_RE.test(l))) return true;
|
|
5889
|
+
if (block.some((l) => COMMIT_HEAD_RE.test(l))) return true;
|
|
5890
|
+
if (block.some((l) => COMMIT_STATS_RE.test(l))) return true;
|
|
5891
|
+
if (block.some((l) => PUSH_TO_RE.test(l))) return true;
|
|
5892
|
+
if (block.some((l) => PUSH_NEW_RE.test(l))) return true;
|
|
5893
|
+
if (block.some((l) => PUSH_UPDATE_RE.test(l))) return true;
|
|
5894
|
+
if (block.some((l) => MERGE_UPD_RE.test(l))) return true;
|
|
5895
|
+
if (block.some((l) => MERGE_FF_RE.test(l))) return true;
|
|
5896
|
+
if (block.some((l) => PR_TITLE_RE.test(l)) && block.some((l) => PR_STATE_RE.test(l))) return true;
|
|
5897
|
+
if (block.some((l) => PR_URL_RE.test(l))) return true;
|
|
5898
|
+
if (block.some((l) => PR_BANNER_RE.test(l))) return true;
|
|
5899
|
+
return false;
|
|
5900
|
+
}
|
|
5852
5901
|
function inferLanguage(block) {
|
|
5853
5902
|
const head = block.slice(0, 10).join("\n");
|
|
5854
5903
|
if (/\bpublic\s+(?:static\s+)?(?:class|void|int|String)\b|System\.out\.println|\bjava\.util/.test(head)) return "java";
|
|
@@ -5861,6 +5910,9 @@ function inferLanguage(block) {
|
|
|
5861
5910
|
return "";
|
|
5862
5911
|
}
|
|
5863
5912
|
function wrapCodexCodeBlocks(lines) {
|
|
5913
|
+
if (isStructuredBlock(lines)) {
|
|
5914
|
+
return lines;
|
|
5915
|
+
}
|
|
5864
5916
|
const result = [];
|
|
5865
5917
|
let i = 0;
|
|
5866
5918
|
while (i < lines.length) {
|
|
@@ -5898,9 +5950,14 @@ function wrapCodexCodeBlocks(lines) {
|
|
|
5898
5950
|
break;
|
|
5899
5951
|
}
|
|
5900
5952
|
const runLen = end - start2 + 1;
|
|
5901
|
-
const
|
|
5953
|
+
const body = lines.slice(start2, end + 1);
|
|
5954
|
+
if (isStructuredBlock(body)) {
|
|
5955
|
+
for (const l of body) result.push(l);
|
|
5956
|
+
i = end + 1;
|
|
5957
|
+
continue;
|
|
5958
|
+
}
|
|
5959
|
+
const codeShapedCount = body.filter((l) => CODE_CHAR_RE.test(l)).length;
|
|
5902
5960
|
if (codeShapedCount >= 3) {
|
|
5903
|
-
const body = lines.slice(start2, end + 1);
|
|
5904
5961
|
const lang = inferLanguage(body);
|
|
5905
5962
|
result.push("```" + lang);
|
|
5906
5963
|
for (const l of body) result.push(l);
|
|
@@ -10385,7 +10442,7 @@ async function stopWorkspaceFromLocal(target) {
|
|
|
10385
10442
|
// src/commands/version.ts
|
|
10386
10443
|
var import_picocolors11 = __toESM(require("picocolors"));
|
|
10387
10444
|
function version() {
|
|
10388
|
-
const v = true ? "2.12.
|
|
10445
|
+
const v = true ? "2.12.14" : "unknown";
|
|
10389
10446
|
console.log(`${import_picocolors11.default.bold("codeam-cli")} ${import_picocolors11.default.cyan(v)}`);
|
|
10390
10447
|
}
|
|
10391
10448
|
|
|
@@ -10520,7 +10577,7 @@ function checkForUpdates() {
|
|
|
10520
10577
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
10521
10578
|
if (process.env.CI) return;
|
|
10522
10579
|
if (!process.stdout.isTTY) return;
|
|
10523
|
-
const current = true ? "2.12.
|
|
10580
|
+
const current = true ? "2.12.14" : null;
|
|
10524
10581
|
if (!current) return;
|
|
10525
10582
|
const cache = readCache();
|
|
10526
10583
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.14",
|
|
4
4
|
"description": "Remote control Claude Code (and other AI coding agents) from your mobile phone. Pair your device, send prompts, stream responses in real-time, and approve commands — from anywhere.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|