mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 05:02:14 +00:00
fix(coding-agent): propagate focus in extension editor for cursor positioning (#1784)
This commit is contained in:
parent
9a4fe52654
commit
d4084a7ad6
2 changed files with 15 additions and 1 deletions
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed IME hardware cursor positioning in the custom extension editor (`ctx.ui.editor()` / extension editor dialog) by propagating focus to the internal `Editor`, preventing the terminal cursor from getting stuck at the bottom-right during composition.
|
||||||
|
|
||||||
## [0.55.4] - 2026-03-02
|
## [0.55.4] - 2026-03-02
|
||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import {
|
||||||
Container,
|
Container,
|
||||||
Editor,
|
Editor,
|
||||||
type EditorOptions,
|
type EditorOptions,
|
||||||
|
type Focusable,
|
||||||
getEditorKeybindings,
|
getEditorKeybindings,
|
||||||
Spacer,
|
Spacer,
|
||||||
Text,
|
Text,
|
||||||
|
|
@ -21,13 +22,22 @@ import { getEditorTheme, theme } from "../theme/theme.js";
|
||||||
import { DynamicBorder } from "./dynamic-border.js";
|
import { DynamicBorder } from "./dynamic-border.js";
|
||||||
import { appKeyHint, keyHint } from "./keybinding-hints.js";
|
import { appKeyHint, keyHint } from "./keybinding-hints.js";
|
||||||
|
|
||||||
export class ExtensionEditorComponent extends Container {
|
export class ExtensionEditorComponent extends Container implements Focusable {
|
||||||
private editor: Editor;
|
private editor: Editor;
|
||||||
private onSubmitCallback: (value: string) => void;
|
private onSubmitCallback: (value: string) => void;
|
||||||
private onCancelCallback: () => void;
|
private onCancelCallback: () => void;
|
||||||
private tui: TUI;
|
private tui: TUI;
|
||||||
private keybindings: KeybindingsManager;
|
private keybindings: KeybindingsManager;
|
||||||
|
|
||||||
|
private _focused = false;
|
||||||
|
get focused(): boolean {
|
||||||
|
return this._focused;
|
||||||
|
}
|
||||||
|
set focused(value: boolean) {
|
||||||
|
this._focused = value;
|
||||||
|
this.editor.focused = value;
|
||||||
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
tui: TUI,
|
tui: TUI,
|
||||||
keybindings: KeybindingsManager,
|
keybindings: KeybindingsManager,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue