feat(coding-agent): Add widget placement option (#850)

* Add widget placement for extension widgets

* Remove changelog entry for widget placement

* Keep no-op widget signature

* Move widget render before attach
This commit is contained in:
Marc Krenn 2026-01-19 15:54:24 +01:00 committed by GitHub
parent 6327bfd3dc
commit abb1775ff7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 114 additions and 36 deletions

View file

@ -704,14 +704,17 @@ ctx.ui.setStatus("my-ext", undefined);
**Examples:** [status-line.ts](../examples/extensions/status-line.ts), [plan-mode.ts](../examples/extensions/plan-mode.ts), [preset.ts](../examples/extensions/preset.ts)
### Pattern 5: Widget Above Editor
### Pattern 5: Widgets Above/Below Editor
Show persistent content above the input editor. Good for todo lists, progress.
Show persistent content above or below the input editor. Good for todo lists, progress.
```typescript
// Simple string array
// Simple string array (above editor by default)
ctx.ui.setWidget("my-widget", ["Line 1", "Line 2"]);
// Render below the editor
ctx.ui.setWidget("my-widget", ["Line 1", "Line 2"], { placement: "belowEditor" });
// Or with theme
ctx.ui.setWidget("my-widget", (_tui, theme) => {
const lines = items.map((item, i) =>