command-code 1.45.0 → 1.47.0
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
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# command-code
|
|
2
2
|
|
|
3
|
+
## 1.47.0
|
|
4
|
+
|
|
5
|
+
- fix: mark Grok 4.6 as vision-capable
|
|
6
|
+
|
|
7
|
+
## 1.46.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- feat: auto compact improvements
|
|
12
|
+
- feat: Add browser sign in through local callback server
|
|
13
|
+
- feat: read_file now reads documents. Word, PowerPoint, Excel, OpenDocument, RTF, EPUB and PDF files are extracted to Markdown.
|
|
14
|
+
|
|
3
15
|
## 1.45.0
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -40,12 +40,29 @@ Read a file as a bounded, line-numbered window. Read-only; never prompts.
|
|
|
40
40
|
|
|
41
41
|
What it does beyond "read a file":
|
|
42
42
|
|
|
43
|
-
- **Format-aware**: images
|
|
43
|
+
- **Format-aware**: images come back as real image blocks the model can see; Jupyter notebooks render as tagged cells with outputs; Word, PowerPoint, Excel, OpenDocument, RTF, EPUB and PDF files are extracted to Markdown; SVG reads as text. The full list is below.
|
|
44
44
|
- **Bounded by design**: 128 KB byte cap, 2000-line window, 2000-char per-line clamp - with truncation notes that embed the exact `offset` to continue from.
|
|
45
45
|
- **Typo-tolerant**: on a miss it retries macOS filename variants (curly apostrophes, NFD normalization) and then suggests siblings ("Did you mean…?") using substring and edit-distance matching.
|
|
46
46
|
- **Efficient**: memory-capped streaming reads, and re-reading an unchanged file returns a dedup stub instead of burning context.
|
|
47
47
|
- **Honest about safety**: device and stream paths (`/dev/zero`, `/dev/stdin`, `/proc/<pid>/fd/*`, …) are blocked; every read is recorded in the session's read ledger, which the write tools check later.
|
|
48
48
|
|
|
49
|
+
#### What it reads
|
|
50
|
+
|
|
51
|
+
| Kind | Extensions | What comes back |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| Text and code | anything not listed below, plus `.svg` and `.rtf` | Line-numbered text window (`offset`/`limit`, negative `offset` reads the tail). |
|
|
54
|
+
| Images | `.png` `.jpg` `.jpeg` `.gif` `.webp` `.bmp` `.tiff` | The image itself, attached for vision-capable models (compressed, with the scale factor disclosed when downscaled). |
|
|
55
|
+
| Jupyter notebooks | `.ipynb` | Tagged cells with their outputs; plots attached as images; oversized outputs replaced by a `jq` pointer. |
|
|
56
|
+
| Word | `.docx` `.docm` `.doc` | Markdown: headings, lists, tables, windowed by `offset`/`limit` like text. |
|
|
57
|
+
| PowerPoint | `.pptx` `.pptm` `.ppsx` `.ppsm` `.ppt` `.pps` `.pot` | Markdown per slide, speaker notes included. |
|
|
58
|
+
| Excel | `.xlsx` `.xlsm` `.xlsb` `.xls` | Markdown tables per sheet. |
|
|
59
|
+
| OpenDocument | `.odt` `.ods` `.odp` | Markdown, as for the Office equivalents. |
|
|
60
|
+
| RTF, EPUB | `.rtf` `.epub` | Markdown. `.rtf` reads as plain text when no converter is available. |
|
|
61
|
+
| PDF | `.pdf` | Markdown from the text layer. A scanned or image-only PDF says which pages have no text and gives the `pdftoppm` command to render them; reading the rendered pages attaches them as images. |
|
|
62
|
+
| Other binary | `.zip` `.tar` `.gz` `.exe` `.dll` `.so` `.dylib` `.wasm` and other known binary types | A one-line note with the MIME type and size. Bytes are never loaded. |
|
|
63
|
+
|
|
64
|
+
Document extraction runs through a native converter that is not shipped with the CLI. The first document read on a machine installs it (needs network, a second or two); every later read and every later session reuses it, and a new release upgrades it on the next read. Where it cannot be installed (offline, unsupported platform) the read falls back to the binary note above, and `.rtf` to plain text. Documents are read as a rendering, never as bytes, so `write_file` will not overwrite a `.docx` with the Markdown that came out of it.
|
|
65
|
+
|
|
49
66
|
#### Multi-file reads
|
|
50
67
|
|
|
51
68
|
Pass `paths` (or a single glob pattern in `file_path`) and the contents come back concatenated under `// File: <path> (<type>)` headers, preceded by a `Read X/Y files` summary:
|
|
@@ -56,7 +73,7 @@ Pass `paths` (or a single glob pattern in `file_path`) and the contents come bac
|
|
|
56
73
|
|
|
57
74
|
`file_path` and `paths` are two separate fields on purpose rather than one union-typed field: providers translate JSON-Schema unions inconsistently — Gemini rejects a function declaration whose parameter sets `any_of` alongside `description`/`items`, failing the whole request. `paths` satisfies the schema's `file_path` requirement through the tool's `requiredAlternatives`, so a multi-file call needs no placeholder.
|
|
58
75
|
|
|
59
|
-
Literal paths are read as named; glob patterns are filtered by `exclude`, the default exclusions and `.gitignore`.
|
|
76
|
+
Literal paths are read as named; glob patterns are filtered by `exclude`, the default exclusions and `.gitignore`. Documents are extracted to Markdown (capped per file at 128 KB, with a hint to read the file alone for the rest); other binary files are noted with their type and size instead of being inlined. Per-file errors are reported inline and never fail the whole call; every match is boundary-checked individually (symlink and `..` escapes are dropped); and an aggregate ~100 KB cap (one tool-output budget) reports exactly which files were skipped, so a wide glob narrows instead of flooding the context.
|
|
60
77
|
|
|
61
78
|
This absorbed the former `read_multiple_files` tool — one tool schema instead of two keeps roughly 540 tokens out of every request (~1,685 → ~1,147), and models no longer have to choose between two near-identical read tools. Calls that still arrive under the old name are rewritten to `read_file` (its `include` renames onto `paths`, and `targetDirectory` / `gitIgnore` / `defaultExclude` onto the merged schema's snake_case options), so nothing breaks mid-conversation.
|
|
62
79
|
|