@pi-archimedes/diff 1.2.0 → 1.2.1
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/README.md +45 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# @pi-archimedes/diff
|
|
2
|
+
|
|
3
|
+
Shiki-powered diff rendering for the [Pi coding agent](https://github.com/earendil-works/pi).
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Split and unified views** — side-by-side split diff or traditional unified view, auto-selected based on terminal width
|
|
8
|
+
- **Shiki syntax highlighting** — full syntax highlighting powered by [Shiki](https://shiki.style), with auto-derived theme colors
|
|
9
|
+
- **Word-level emphasis** — changed characters within lines are highlighted at word level for precise change tracking
|
|
10
|
+
- **Graceful fallback** — falls back to plain text diff when Shiki is unavailable or the language is unrecognized
|
|
11
|
+
- **Configurable thresholds** — control minimum terminal width for split view and minimum code width per side
|
|
12
|
+
|
|
13
|
+
## Screenshots
|
|
14
|
+
|
|
15
|
+
### Split diff view
|
|
16
|
+
|
|
17
|
+
Side-by-side diff with syntax highlighting, word-level emphasis on changed characters, and line numbers:
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pi install @pi-archimedes/diff
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Or install the full [pi-archimedes](../..) meta package for the integrated experience:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pi install pi-archimedes
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Settings
|
|
34
|
+
|
|
35
|
+
| Setting | Type | Default | Description |
|
|
36
|
+
|---------|------|---------|-------------|
|
|
37
|
+
| `diffTheme` | string | `github-dark` | Shiki syntax-highlighting theme |
|
|
38
|
+
| `diffSplitMinWidth` | number | `150` | Minimum terminal columns to show split diff view (≥ 100) |
|
|
39
|
+
| `diffSplitMinCodeWidth` | number | `60` | Minimum code columns per side in split view (≥ 30) |
|
|
40
|
+
|
|
41
|
+
Settings are stored in `~/.pi/agent/settings.json` under the `archimedes.diff` namespace.
|
|
42
|
+
|
|
43
|
+
## Integration
|
|
44
|
+
|
|
45
|
+
When installed via `pi-archimedes` (the meta package), the diff tools are registered with callbacks to the current theme and config, ensuring colors match your active Pi theme. Standalone installs use default dark theme colors.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-archimedes/diff",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"pi": {
|
|
30
30
|
"extensions": [
|
|
31
31
|
"./src/index.ts"
|
|
32
|
-
]
|
|
32
|
+
],
|
|
33
|
+
"image": "https://raw.githubusercontent.com/danielcherubini/pi-archimedes/main/docs/images/diff-edit.png"
|
|
33
34
|
}
|
|
34
35
|
}
|