@diffexai/diffex 0.2.4 → 0.2.5
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 +6 -0
- package/README.md +1 -1
- package/dist/AGENTS.md +0 -4
- package/dist/core/agent-session.d.ts +0 -1
- package/dist/core/agent-session.js +3 -10
- package/dist/core/sdk.js +1 -1
- package/dist/core/system-prompt-production.d.ts +7 -0
- package/dist/core/system-prompt-production.js +108 -0
- package/dist/core/system-prompt.d.ts +2 -2
- package/dist/core/system-prompt.js +34 -28
- package/dist/core/tools/subagents.js +22 -9
- package/dist/modes/print-mode.js +12 -14
- package/dist/node_modules/@diffexai/diffex-agent-core/distribution-components.json +4 -4
- package/dist/node_modules/@diffexai/diffex-agent-core/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-agent-core/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/fireworks.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/nvidia.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/opencode-go.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/opencode.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/openrouter.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/node_modules/@diffexai/diffex-ai/distribution-components.json +3 -3
- package/dist/node_modules/@diffexai/diffex-ai/distribution-files.json +12 -12
- package/dist/node_modules/@diffexai/diffex-ai/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-client/distribution-components.json +3 -3
- package/dist/node_modules/@diffexai/diffex-client/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-client/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-harness-state/distribution-components.json +2 -2
- package/dist/node_modules/@diffexai/diffex-harness-state/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-harness-state/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-protocol/distribution-components.json +2 -2
- package/dist/node_modules/@diffexai/diffex-protocol/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-protocol/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-telemetry/distribution-components.json +2 -2
- package/dist/node_modules/@diffexai/diffex-telemetry/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-telemetry/package.json +1 -1
- package/dist/node_modules/@diffexai/diffex-tui/distribution-components.json +2 -2
- package/dist/node_modules/@diffexai/diffex-tui/distribution-files.json +1 -1
- package/dist/node_modules/@diffexai/diffex-tui/package.json +1 -1
- package/dist/server/create-harness.js +1 -1
- package/distribution-components.json +11 -11
- package/distribution-files.json +50 -42
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -31
- package/release/distribution-manifest.json +4 -4
- package/release/install-package-lock.json +5 -5
- package/release/install-package.json +2 -2
- package/docs/compaction.md +0 -401
- package/docs/containerization.md +0 -84
- package/docs/custom-provider.md +0 -774
- package/docs/environment-variables.md +0 -88
- package/docs/evolution.md +0 -90
- package/docs/extensions.md +0 -2982
- package/docs/images/interactive-mode.png +0 -0
- package/docs/images/tree-view.png +0 -0
- package/docs/installation.md +0 -118
- package/docs/json.md +0 -91
- package/docs/keybindings.md +0 -241
- package/docs/llama-cpp.md +0 -99
- package/docs/models.md +0 -565
- package/docs/packages.md +0 -232
- package/docs/prompt-templates.md +0 -96
- package/docs/providers.md +0 -317
- package/docs/quickstart.md +0 -161
- package/docs/rpc.md +0 -1647
- package/docs/sdk.md +0 -1332
- package/docs/security.md +0 -66
- package/docs/session-format.md +0 -438
- package/docs/sessions.md +0 -162
- package/docs/settings.md +0 -341
- package/docs/shell-aliases.md +0 -13
- package/docs/skills.md +0 -227
- package/docs/terminal-setup.md +0 -152
- package/docs/themes.md +0 -326
- package/docs/tmux.md +0 -63
- package/docs/tui.md +0 -940
- package/docs/usage.md +0 -434
package/docs/terminal-setup.md
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
# Terminal Setup
|
|
2
|
-
|
|
3
|
-
Diffex uses the [Kitty keyboard protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration.
|
|
4
|
-
|
|
5
|
-
## Terminal focus and tmux
|
|
6
|
-
|
|
7
|
-
Diffex uses terminal focus reporting to pause cursor animation when its terminal window or pane is not active. When reliable focus reporting is unavailable, the placeholder cursor remains static. To receive pane focus changes inside tmux and keep the focused-pane animation, add this to `~/.tmux.conf`:
|
|
8
|
-
|
|
9
|
-
```tmux
|
|
10
|
-
set -g focus-events on
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Detach and reattach existing tmux clients after changing this option.
|
|
14
|
-
|
|
15
|
-
## Kitty, iTerm2
|
|
16
|
-
|
|
17
|
-
Work out of the box.
|
|
18
|
-
|
|
19
|
-
## Apple Terminal
|
|
20
|
-
|
|
21
|
-
Diffex enables enhanced key reporting when available. If Terminal.app still sends plain Return for `Shift+Enter`, Diffex uses a local macOS modifier fallback to treat that Return as `Shift+Enter`.
|
|
22
|
-
|
|
23
|
-
This fallback only works when Diffex runs on the same Mac as Terminal.app. It cannot detect the local keyboard over remote SSH.
|
|
24
|
-
|
|
25
|
-
## Ghostty
|
|
26
|
-
|
|
27
|
-
Add to your Ghostty config (`~/Library/Application Support/com.mitchellh.ghostty/config` on macOS, `~/.config/ghostty/config` on Linux):
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
keybind = alt+backspace=text:\x1b\x7f
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Older Claude Code versions may have added this Ghostty mapping:
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
keybind = shift+enter=text:\n
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
That mapping sends a raw linefeed byte. Inside Diffex, that is indistinguishable from `Ctrl+J`, so tmux and Diffex no longer see a real `shift+enter` key event.
|
|
40
|
-
|
|
41
|
-
If Claude Code 2.x or newer is the only reason you added that mapping, you can remove it, unless you want to use Claude Code in tmux, where it still requires that Ghostty mapping.
|
|
42
|
-
|
|
43
|
-
Diffex binds `Ctrl+J` as a default newline alias, so `Shift+Enter` keeps working in tmux via that remap without extra Diffex configuration.
|
|
44
|
-
|
|
45
|
-
## WezTerm
|
|
46
|
-
|
|
47
|
-
WezTerm usually works out of the box for `Shift+Enter` via xterm modifyOtherKeys. To use the Kitty keyboard protocol explicitly, create `~/.wezterm.lua`:
|
|
48
|
-
|
|
49
|
-
```lua
|
|
50
|
-
local wezterm = require 'wezterm'
|
|
51
|
-
local config = wezterm.config_builder()
|
|
52
|
-
config.enable_kitty_keyboard = true
|
|
53
|
-
return config
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
On macOS, WezTerm binds `Option+Enter` to fullscreen by default. To use `Option+Enter` for Diffex follow-up queueing, add this key override:
|
|
57
|
-
|
|
58
|
-
```lua
|
|
59
|
-
local wezterm = require 'wezterm'
|
|
60
|
-
local config = wezterm.config_builder()
|
|
61
|
-
config.keys = {
|
|
62
|
-
{
|
|
63
|
-
key = 'Enter',
|
|
64
|
-
mods = 'ALT',
|
|
65
|
-
action = wezterm.action.SendString('\x1b[13;3u'),
|
|
66
|
-
},
|
|
67
|
-
}
|
|
68
|
-
return config
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
If you already have a `config.keys` table, add the entry to it.
|
|
72
|
-
|
|
73
|
-
On WSL, WezTerm may require a visible hardware cursor for IME candidate window positioning. If CJK IME candidates do not follow the text cursor, set `DIFFEX_HARDWARE_CURSOR=1` before running Diffex or set `showHardwareCursor` to `true` in settings.
|
|
74
|
-
|
|
75
|
-
## Alacritty
|
|
76
|
-
|
|
77
|
-
Alacritty usually works out of the box for `Shift+Enter`. On macOS, `Option+Enter` may arrive as plain `Enter`. To use `Option+Enter` for Diffex follow-up queueing, add to `~/.config/alacritty/alacritty.toml`:
|
|
78
|
-
|
|
79
|
-
```toml
|
|
80
|
-
[[keyboard.bindings]]
|
|
81
|
-
key = "Enter"
|
|
82
|
-
mods = "Alt"
|
|
83
|
-
chars = "\u001b[13;3u"
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Restart Alacritty after changing the config.
|
|
87
|
-
|
|
88
|
-
## VS Code (Integrated Terminal)
|
|
89
|
-
|
|
90
|
-
VS Code 1.109.5 and newer enable Kitty keyboard protocol in the integrated terminal by default, so `Shift+Enter` should work out of the box.
|
|
91
|
-
|
|
92
|
-
VS Code versions older than 1.109.5 need an explicit terminal keybinding for `Shift+Enter`.
|
|
93
|
-
|
|
94
|
-
`keybindings.json` locations:
|
|
95
|
-
- macOS: `~/Library/Application Support/Code/User/keybindings.json`
|
|
96
|
-
- Linux: `~/.config/Code/User/keybindings.json`
|
|
97
|
-
- Windows: `%APPDATA%\\Code\\User\\keybindings.json`
|
|
98
|
-
|
|
99
|
-
Add to `keybindings.json`:
|
|
100
|
-
|
|
101
|
-
```json
|
|
102
|
-
{
|
|
103
|
-
"key": "shift+enter",
|
|
104
|
-
"command": "workbench.action.terminal.sendSequence",
|
|
105
|
-
"args": { "text": "\u001b[13;2u" },
|
|
106
|
-
"when": "terminalFocus"
|
|
107
|
-
}
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Windows Terminal
|
|
111
|
-
|
|
112
|
-
Add to `settings.json` (Ctrl+Shift+, or Settings → Open JSON file) to forward the modified Enter keys Diffex uses:
|
|
113
|
-
|
|
114
|
-
```json
|
|
115
|
-
{
|
|
116
|
-
"actions": [
|
|
117
|
-
{
|
|
118
|
-
"command": { "action": "sendInput", "input": "\u001b[13;2u" },
|
|
119
|
-
"keys": "shift+enter"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"command": { "action": "sendInput", "input": "\u001b[13;3u" },
|
|
123
|
-
"keys": "alt+enter"
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
- `Shift+Enter` inserts a new line.
|
|
130
|
-
- Windows Terminal binds `Alt+Enter` to fullscreen by default. That prevents Diffex from receiving `Alt+Enter` for follow-up queueing.
|
|
131
|
-
- Remapping `Alt+Enter` to `sendInput` forwards the real key chord to Diffex instead.
|
|
132
|
-
|
|
133
|
-
If you already have an `actions` array, add the objects to it. If the old fullscreen behavior persists, fully close and reopen Windows Terminal.
|
|
134
|
-
|
|
135
|
-
## xfce4-terminal, terminator
|
|
136
|
-
|
|
137
|
-
These terminals have limited escape sequence support. Modified Enter keys like `Ctrl+Enter` and `Shift+Enter` cannot be distinguished from plain `Enter`, preventing custom keybindings such as `submit: ["ctrl+enter"]` from working.
|
|
138
|
-
|
|
139
|
-
For the best experience, use a terminal that supports the Kitty keyboard protocol:
|
|
140
|
-
- [Kitty](https://sw.kovidgoyal.net/kitty/)
|
|
141
|
-
- [Ghostty](https://ghostty.org/)
|
|
142
|
-
- [WezTerm](https://wezfurlong.org/wezterm/)
|
|
143
|
-
- [iTerm2](https://iterm2.com/)
|
|
144
|
-
- [Alacritty](https://github.com/alacritty/alacritty) (requires compilation with Kitty protocol support)
|
|
145
|
-
|
|
146
|
-
## IntelliJ IDEA (Integrated Terminal)
|
|
147
|
-
|
|
148
|
-
The built-in terminal has limited escape sequence support. Shift+Enter cannot be distinguished from Enter in IntelliJ's terminal.
|
|
149
|
-
|
|
150
|
-
If you want the hardware cursor visible, set `DIFFEX_HARDWARE_CURSOR=1` before running Diffex (disabled by default for compatibility).
|
|
151
|
-
|
|
152
|
-
Consider using a dedicated terminal emulator for the best experience.
|
package/docs/themes.md
DELETED
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
> Diffex can create themes. Ask it to build one for your setup.
|
|
2
|
-
|
|
3
|
-
# Themes
|
|
4
|
-
|
|
5
|
-
Themes are JSON files that define colors for the TUI.
|
|
6
|
-
|
|
7
|
-
## Table of Contents
|
|
8
|
-
|
|
9
|
-
- [Locations](#locations)
|
|
10
|
-
- [Selecting a Theme](#selecting-a-theme)
|
|
11
|
-
- [Creating a Custom Theme](#creating-a-custom-theme)
|
|
12
|
-
- [Theme Format](#theme-format)
|
|
13
|
-
- [Color Tokens](#color-tokens)
|
|
14
|
-
- [Color Values](#color-values)
|
|
15
|
-
- [Tips](#tips)
|
|
16
|
-
|
|
17
|
-
## Locations
|
|
18
|
-
|
|
19
|
-
Diffex loads themes from:
|
|
20
|
-
|
|
21
|
-
- Built-in: `dark`, `light`
|
|
22
|
-
- Global: `~/.diffex/agent/themes/*.json`
|
|
23
|
-
- Project: `.diffex/themes/*.json` (only after the project is trusted)
|
|
24
|
-
- Packages: `themes/` directories or `diffex.themes` entries in `package.json`
|
|
25
|
-
- Settings: `themes` array with files or directories
|
|
26
|
-
- CLI: `--theme <path>` (repeatable)
|
|
27
|
-
|
|
28
|
-
Disable discovery with `--no-themes`.
|
|
29
|
-
|
|
30
|
-
## Selecting a Theme
|
|
31
|
-
|
|
32
|
-
Select a theme via `/settings` or in `settings.json`:
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
{
|
|
36
|
-
"theme": "my-theme"
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
On first run, Diffex detects your terminal background and defaults to `dark` or `light`.
|
|
41
|
-
|
|
42
|
-
## Creating a Custom Theme
|
|
43
|
-
|
|
44
|
-
1. Create a theme file:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
mkdir -p ~/.diffex/agent/themes
|
|
48
|
-
vim ~/.diffex/agent/themes/my-theme.json
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
2. Define the theme with all required colors (see [Color Tokens](#color-tokens)):
|
|
52
|
-
|
|
53
|
-
```json
|
|
54
|
-
{
|
|
55
|
-
"$schema": "https://raw.githubusercontent.com/diffexai/diffex/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
56
|
-
"name": "my-theme",
|
|
57
|
-
"vars": {
|
|
58
|
-
"primary": "#00aaff",
|
|
59
|
-
"secondary": 242
|
|
60
|
-
},
|
|
61
|
-
"colors": {
|
|
62
|
-
"accent": "primary",
|
|
63
|
-
"border": "primary",
|
|
64
|
-
"borderAccent": "#00ffff",
|
|
65
|
-
"borderMuted": "secondary",
|
|
66
|
-
"success": "#00ff00",
|
|
67
|
-
"error": "#ff0000",
|
|
68
|
-
"warning": "#ffff00",
|
|
69
|
-
"muted": "secondary",
|
|
70
|
-
"dim": 240,
|
|
71
|
-
"text": "",
|
|
72
|
-
"thinkingText": "secondary",
|
|
73
|
-
"footerModel": "#F7ED4F",
|
|
74
|
-
"footerContext": "#F5B427",
|
|
75
|
-
"footerWindow": "#3A75F2",
|
|
76
|
-
"startupIntroText": "#CDD6F4",
|
|
77
|
-
"startupIntroAccent": "#89B4FA",
|
|
78
|
-
"selectionAccent": "#89B4FA",
|
|
79
|
-
"selectedBg": "#2d2d30",
|
|
80
|
-
"scrollbarThumb": "#555566",
|
|
81
|
-
"userMessageBg": "#2d2d30",
|
|
82
|
-
"userMessageText": "",
|
|
83
|
-
"customMessageBg": "#2d2d30",
|
|
84
|
-
"customMessageText": "",
|
|
85
|
-
"customMessageLabel": "primary",
|
|
86
|
-
"toolPendingBg": "#1e1e2e",
|
|
87
|
-
"toolSuccessBg": "#1e2e1e",
|
|
88
|
-
"toolErrorBg": "#2e1e1e",
|
|
89
|
-
"toolTitle": "primary",
|
|
90
|
-
"toolOutput": "",
|
|
91
|
-
"mdHeading": "#ffaa00",
|
|
92
|
-
"mdLink": "primary",
|
|
93
|
-
"mdLinkUrl": "secondary",
|
|
94
|
-
"mdCode": "#00ffff",
|
|
95
|
-
"mdCodeBlock": "",
|
|
96
|
-
"mdCodeBlockBorder": "secondary",
|
|
97
|
-
"mdQuote": "secondary",
|
|
98
|
-
"mdQuoteBorder": "secondary",
|
|
99
|
-
"mdHr": "secondary",
|
|
100
|
-
"mdListBullet": "#00ffff",
|
|
101
|
-
"toolDiffAdded": "#00ff00",
|
|
102
|
-
"toolDiffRemoved": "#ff0000",
|
|
103
|
-
"toolDiffContext": "secondary",
|
|
104
|
-
"syntaxComment": "secondary",
|
|
105
|
-
"syntaxKeyword": "primary",
|
|
106
|
-
"syntaxFunction": "#00aaff",
|
|
107
|
-
"syntaxVariable": "#ffaa00",
|
|
108
|
-
"syntaxString": "#00ff00",
|
|
109
|
-
"syntaxNumber": "#ff00ff",
|
|
110
|
-
"syntaxType": "#00aaff",
|
|
111
|
-
"syntaxOperator": "primary",
|
|
112
|
-
"syntaxPunctuation": "secondary",
|
|
113
|
-
"thinkingOff": "secondary",
|
|
114
|
-
"thinkingMinimal": "primary",
|
|
115
|
-
"thinkingLow": "#00aaff",
|
|
116
|
-
"thinkingMedium": "#00ffff",
|
|
117
|
-
"thinkingHigh": "#ff00ff",
|
|
118
|
-
"thinkingXhigh": "#ff0000",
|
|
119
|
-
"thinkingMax": "#ff0088",
|
|
120
|
-
"bashMode": "#ffaa00"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
3. Select the theme via `/settings`.
|
|
126
|
-
|
|
127
|
-
**Hot reload:** When you edit the currently active custom theme file, Diffex reloads it automatically for immediate visual feedback.
|
|
128
|
-
|
|
129
|
-
## Theme Format
|
|
130
|
-
|
|
131
|
-
```json
|
|
132
|
-
{
|
|
133
|
-
"$schema": "https://raw.githubusercontent.com/diffexai/diffex/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
134
|
-
"name": "my-theme",
|
|
135
|
-
"vars": {
|
|
136
|
-
"blue": "#0066cc",
|
|
137
|
-
"gray": 242
|
|
138
|
-
},
|
|
139
|
-
"colors": {
|
|
140
|
-
"accent": "blue",
|
|
141
|
-
"muted": "gray",
|
|
142
|
-
"text": "",
|
|
143
|
-
...
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
- `name` is required, must be unique, and must not contain `/`.
|
|
149
|
-
- `vars` is optional. Define reusable colors here, then reference them in `colors`.
|
|
150
|
-
- `colors` must define all 54 required tokens.
|
|
151
|
-
`editorBorder`, `thinkingMax`, `scrollbarThumb`, `startupIntroText`, `startupIntroAccent`, `selectionAccent`, and `autocompleteSelected` are optional compatibility tokens with fallbacks.
|
|
152
|
-
|
|
153
|
-
The `$schema` field enables editor auto-completion and validation.
|
|
154
|
-
|
|
155
|
-
## Color Tokens
|
|
156
|
-
|
|
157
|
-
Every theme must define all 54 required color tokens.
|
|
158
|
-
`editorBorder`, `thinkingMax`, `scrollbarThumb`, `startupIntroText`, `startupIntroAccent`, `selectionAccent`, and `autocompleteSelected` are optional for compatibility with existing themes.
|
|
159
|
-
Their fallbacks are `borderMuted`, `thinkingXhigh`, `selectedBg`, `text`, `mdLink`, `autocompleteSelected` or `startupIntroAccent`, and `selectionAccent`, respectively.
|
|
160
|
-
|
|
161
|
-
### Core UI (11 required, 1 optional)
|
|
162
|
-
|
|
163
|
-
| Token | Purpose |
|
|
164
|
-
|-------|---------|
|
|
165
|
-
| `accent` | Primary accent for titles, active controls, and status elements |
|
|
166
|
-
| `border` | Normal borders |
|
|
167
|
-
| `borderAccent` | Highlighted borders |
|
|
168
|
-
| `borderMuted` | Subtle borders (editor) |
|
|
169
|
-
| `editorBorder` | Editor border; optional, falls back to `borderMuted` |
|
|
170
|
-
| `success` | Success states |
|
|
171
|
-
| `error` | Error states |
|
|
172
|
-
| `warning` | Warning states |
|
|
173
|
-
| `muted` | Secondary text |
|
|
174
|
-
| `dim` | Tertiary text |
|
|
175
|
-
| `text` | Default text (usually `""`) |
|
|
176
|
-
| `thinkingText` | Thinking block text |
|
|
177
|
-
|
|
178
|
-
### Footer Status (3 colors)
|
|
179
|
-
|
|
180
|
-
| Token | Purpose |
|
|
181
|
-
|-------|---------|
|
|
182
|
-
| `footerModel` | Model name |
|
|
183
|
-
| `footerContext` | Context usage percentage |
|
|
184
|
-
| `footerWindow` | Context window size |
|
|
185
|
-
|
|
186
|
-
### Startup Intro And Selection (4 optional)
|
|
187
|
-
|
|
188
|
-
| Token | Purpose |
|
|
189
|
-
|-------|---------|
|
|
190
|
-
| `startupIntroText` | Startup logo art, version, directory, and changelog preview text; optional, falls back to `text` |
|
|
191
|
-
| `startupIntroAccent` | Startup title and boundary box; optional, falls back to `mdLink` |
|
|
192
|
-
| `selectionAccent` | Selected row prefix and primary text; optional, falls back to `autocompleteSelected`, then `startupIntroAccent` |
|
|
193
|
-
| `autocompleteSelected` | Legacy autocomplete selection color; optional, falls back to `selectionAccent` |
|
|
194
|
-
|
|
195
|
-
### Backgrounds & Content (11 required, 1 optional)
|
|
196
|
-
|
|
197
|
-
| Token | Purpose |
|
|
198
|
-
|-------|---------|
|
|
199
|
-
| `selectedBg` | Selected line background |
|
|
200
|
-
| `scrollbarThumb` | Fullscreen scrollbar thumb background; optional, falls back to `selectedBg` |
|
|
201
|
-
| `userMessageBg` | User message background |
|
|
202
|
-
| `userMessageText` | User message text |
|
|
203
|
-
| `customMessageBg` | Extension message background |
|
|
204
|
-
| `customMessageText` | Extension message text |
|
|
205
|
-
| `customMessageLabel` | Extension message label |
|
|
206
|
-
| `toolPendingBg` | Tool box (pending) |
|
|
207
|
-
| `toolSuccessBg` | Tool box (success) |
|
|
208
|
-
| `toolErrorBg` | Tool box (error) |
|
|
209
|
-
| `toolTitle` | Tool title |
|
|
210
|
-
| `toolOutput` | Tool output text |
|
|
211
|
-
|
|
212
|
-
### Markdown (10 colors)
|
|
213
|
-
|
|
214
|
-
| Token | Purpose |
|
|
215
|
-
|-------|---------|
|
|
216
|
-
| `mdHeading` | Headings |
|
|
217
|
-
| `mdLink` | Link text |
|
|
218
|
-
| `mdLinkUrl` | Link URL |
|
|
219
|
-
| `mdCode` | Inline code |
|
|
220
|
-
| `mdCodeBlock` | Code block content |
|
|
221
|
-
| `mdCodeBlockBorder` | Code block fences |
|
|
222
|
-
| `mdQuote` | Blockquote text |
|
|
223
|
-
| `mdQuoteBorder` | Blockquote border |
|
|
224
|
-
| `mdHr` | Horizontal rule |
|
|
225
|
-
| `mdListBullet` | List bullets |
|
|
226
|
-
|
|
227
|
-
### Tool Diffs (3 colors)
|
|
228
|
-
|
|
229
|
-
| Token | Purpose |
|
|
230
|
-
|-------|---------|
|
|
231
|
-
| `toolDiffAdded` | Added lines |
|
|
232
|
-
| `toolDiffRemoved` | Removed lines |
|
|
233
|
-
| `toolDiffContext` | Context lines |
|
|
234
|
-
|
|
235
|
-
### Syntax Highlighting (9 colors)
|
|
236
|
-
|
|
237
|
-
| Token | Purpose |
|
|
238
|
-
|-------|---------|
|
|
239
|
-
| `syntaxComment` | Comments |
|
|
240
|
-
| `syntaxKeyword` | Keywords |
|
|
241
|
-
| `syntaxFunction` | Function names |
|
|
242
|
-
| `syntaxVariable` | Variables |
|
|
243
|
-
| `syntaxString` | Strings |
|
|
244
|
-
| `syntaxNumber` | Numbers |
|
|
245
|
-
| `syntaxType` | Types |
|
|
246
|
-
| `syntaxOperator` | Operators |
|
|
247
|
-
| `syntaxPunctuation` | Punctuation |
|
|
248
|
-
|
|
249
|
-
### Thinking Level Borders (6 required, 1 optional)
|
|
250
|
-
|
|
251
|
-
Editor border colors indicating thinking level (visual hierarchy from subtle to prominent):
|
|
252
|
-
|
|
253
|
-
| Token | Purpose |
|
|
254
|
-
|-------|---------|
|
|
255
|
-
| `thinkingOff` | Thinking off |
|
|
256
|
-
| `thinkingMinimal` | Minimal thinking |
|
|
257
|
-
| `thinkingLow` | Low thinking |
|
|
258
|
-
| `thinkingMedium` | Medium thinking |
|
|
259
|
-
| `thinkingHigh` | High thinking |
|
|
260
|
-
| `thinkingXhigh` | Extra high thinking |
|
|
261
|
-
| `thinkingMax` | Maximum thinking; optional, falls back to `thinkingXhigh` |
|
|
262
|
-
|
|
263
|
-
### Bash Mode (1 color)
|
|
264
|
-
|
|
265
|
-
| Token | Purpose |
|
|
266
|
-
|-------|---------|
|
|
267
|
-
| `bashMode` | Editor border in bash mode (`!` prefix) |
|
|
268
|
-
|
|
269
|
-
### HTML Export (optional)
|
|
270
|
-
|
|
271
|
-
The `export` section controls colors for `/export` HTML output. If omitted, colors are derived from `userMessageBg`.
|
|
272
|
-
|
|
273
|
-
```json
|
|
274
|
-
{
|
|
275
|
-
"export": {
|
|
276
|
-
"pageBg": "#18181e",
|
|
277
|
-
"cardBg": "#1e1e24",
|
|
278
|
-
"infoBg": "#3c3728"
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
## Color Values
|
|
284
|
-
|
|
285
|
-
Four formats are supported:
|
|
286
|
-
|
|
287
|
-
| Format | Example | Description |
|
|
288
|
-
|--------|---------|-------------|
|
|
289
|
-
| Hex | `"#ff0000"` | 6-digit hex RGB |
|
|
290
|
-
| 256-color | `39` | xterm 256-color palette index (0-255) |
|
|
291
|
-
| Variable | `"primary"` | Reference to a `vars` entry |
|
|
292
|
-
| Default | `""` | Terminal's default color |
|
|
293
|
-
|
|
294
|
-
### 256-Color Palette
|
|
295
|
-
|
|
296
|
-
- `0-15`: Basic ANSI colors (terminal-dependent)
|
|
297
|
-
- `16-231`: 6×6×6 RGB cube (`16 + 36×R + 6×G + B` where R,G,B are 0-5)
|
|
298
|
-
- `232-255`: Grayscale ramp
|
|
299
|
-
|
|
300
|
-
### Terminal Compatibility
|
|
301
|
-
|
|
302
|
-
Diffex uses 24-bit RGB colors. Most modern terminals support this (iTerm2, Kitty, WezTerm, Windows Terminal, VS Code). For older terminals with only 256-color support, Diffex falls back to the nearest approximation.
|
|
303
|
-
|
|
304
|
-
Check truecolor support:
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
echo $COLORTERM # Should output "truecolor" or "24bit"
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
## Tips
|
|
311
|
-
|
|
312
|
-
**Dark terminals:** Use bright, saturated colors with higher contrast.
|
|
313
|
-
|
|
314
|
-
**Light terminals:** Use darker, muted colors with lower contrast.
|
|
315
|
-
|
|
316
|
-
**Color harmony:** Start with a base palette (Nord, Gruvbox, Tokyo Night), define it in `vars`, and reference consistently.
|
|
317
|
-
|
|
318
|
-
**Testing:** Check your theme with different message types, tool states, markdown content, and long wrapped text.
|
|
319
|
-
|
|
320
|
-
**VS Code:** Set `terminal.integrated.minimumContrastRatio` to `1` for accurate colors.
|
|
321
|
-
|
|
322
|
-
## Examples
|
|
323
|
-
|
|
324
|
-
See the built-in themes:
|
|
325
|
-
- [dark.json](../src/modes/interactive/theme/dark.json)
|
|
326
|
-
- [light.json](../src/modes/interactive/theme/light.json)
|
package/docs/tmux.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# tmux Setup
|
|
2
|
-
|
|
3
|
-
Diffex works inside tmux, but tmux strips modifier information from certain keys by default. Without configuration, `Shift+Enter` and `Ctrl+Enter` are usually indistinguishable from plain `Enter`.
|
|
4
|
-
|
|
5
|
-
## Recommended Configuration
|
|
6
|
-
|
|
7
|
-
Add to `~/.tmux.conf`:
|
|
8
|
-
|
|
9
|
-
```tmux
|
|
10
|
-
set -g extended-keys on
|
|
11
|
-
set -g extended-keys-format csi-u
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Then restart tmux fully:
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
tmux kill-server
|
|
18
|
-
tmux
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Diffex requests extended key reporting automatically when Kitty keyboard protocol is not available. With `extended-keys-format csi-u`, tmux forwards modified keys in CSI-u format, which is the most reliable configuration. The `extended-keys-format` option requires tmux 3.5 or later.
|
|
22
|
-
|
|
23
|
-
## Why `csi-u` Is Recommended
|
|
24
|
-
|
|
25
|
-
With only:
|
|
26
|
-
|
|
27
|
-
```tmux
|
|
28
|
-
set -g extended-keys on
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
tmux defaults to `extended-keys-format xterm`. When an application requests extended key reporting, modified keys are forwarded in xterm `modifyOtherKeys` format such as:
|
|
32
|
-
|
|
33
|
-
- `Ctrl+C` → `\x1b[27;5;99~`
|
|
34
|
-
- `Ctrl+D` → `\x1b[27;5;100~`
|
|
35
|
-
- `Ctrl+Enter` → `\x1b[27;5;13~`
|
|
36
|
-
|
|
37
|
-
With `extended-keys-format csi-u`, the same keys are forwarded as:
|
|
38
|
-
|
|
39
|
-
- `Ctrl+C` → `\x1b[99;5u`
|
|
40
|
-
- `Ctrl+D` → `\x1b[100;5u`
|
|
41
|
-
- `Ctrl+Enter` → `\x1b[13;5u`
|
|
42
|
-
|
|
43
|
-
Diffex supports both formats, but `csi-u` is the recommended tmux setup.
|
|
44
|
-
|
|
45
|
-
## What This Fixes
|
|
46
|
-
|
|
47
|
-
Without tmux extended keys, modified Enter keys collapse to legacy sequences:
|
|
48
|
-
|
|
49
|
-
| Key | Without extkeys | With `csi-u` |
|
|
50
|
-
|-----|-----------------|--------------|
|
|
51
|
-
| Enter | `\r` | `\r` |
|
|
52
|
-
| Shift+Enter | `\r` | `\x1b[13;2u` |
|
|
53
|
-
| Ctrl+Enter | `\r` | `\x1b[13;5u` |
|
|
54
|
-
| Alt/Option+Enter | `\x1b\r` | `\x1b[13;3u` |
|
|
55
|
-
|
|
56
|
-
This affects the default keybindings (`Enter` to submit, `Shift+Enter` for newline) and any custom keybindings using modified Enter.
|
|
57
|
-
|
|
58
|
-
## Requirements
|
|
59
|
-
|
|
60
|
-
- tmux 3.5 or later for `extended-keys-format csi-u` (run `tmux -V` to check)
|
|
61
|
-
- A terminal emulator that supports extended keys (Ghostty, Kitty, iTerm2, WezTerm, Windows Terminal)
|
|
62
|
-
|
|
63
|
-
With tmux 3.2 through 3.4, omit `extended-keys-format csi-u`; Diffex still supports tmux's default xterm `modifyOtherKeys` format.
|