mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 10:02:23 +00:00
docs: document EditorOptions paddingX and editorPaddingX setting
This commit is contained in:
parent
fe52ff00d2
commit
5c938e08d0
2 changed files with 8 additions and 1 deletions
|
|
@ -804,6 +804,7 @@ Global `~/.pi/agent/settings.json` stores persistent preferences:
|
||||||
| `images.autoResize` | Auto-resize images to 2000x2000 max for better model compatibility | `true` |
|
| `images.autoResize` | Auto-resize images to 2000x2000 max for better model compatibility | `true` |
|
||||||
| `images.blockImages` | Prevent images from being sent to LLM providers | `false` |
|
| `images.blockImages` | Prevent images from being sent to LLM providers | `false` |
|
||||||
| `doubleEscapeAction` | Action for double-escape with empty editor: `tree` or `branch` | `tree` |
|
| `doubleEscapeAction` | Action for double-escape with empty editor: `tree` or `branch` | `tree` |
|
||||||
|
| `editorPaddingX` | Horizontal padding for input editor (0-3) | `0` |
|
||||||
| `extensions` | Additional extension file paths | `[]` |
|
| `extensions` | Additional extension file paths | `[]` |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -220,12 +220,18 @@ interface EditorTheme {
|
||||||
selectList: SelectListTheme;
|
selectList: SelectListTheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
const editor = new Editor(tui, theme); // tui is required for height-aware scrolling
|
interface EditorOptions {
|
||||||
|
paddingX?: number; // Horizontal padding (default: 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
const editor = new Editor(tui, theme, options?); // tui is required for height-aware scrolling
|
||||||
editor.onSubmit = (text) => console.log(text);
|
editor.onSubmit = (text) => console.log(text);
|
||||||
editor.onChange = (text) => console.log("Changed:", text);
|
editor.onChange = (text) => console.log("Changed:", text);
|
||||||
editor.disableSubmit = true; // Disable submit temporarily
|
editor.disableSubmit = true; // Disable submit temporarily
|
||||||
editor.setAutocompleteProvider(provider);
|
editor.setAutocompleteProvider(provider);
|
||||||
editor.borderColor = (s) => chalk.blue(s); // Change border dynamically
|
editor.borderColor = (s) => chalk.blue(s); // Change border dynamically
|
||||||
|
editor.setPaddingX(1); // Update horizontal padding dynamically
|
||||||
|
editor.getPaddingX(); // Get current padding
|
||||||
```
|
```
|
||||||
|
|
||||||
**Features:**
|
**Features:**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue