mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 12:04:11 +00:00
fix(tui): always position cursor for IME
# Conflicts: # packages/coding-agent/CHANGELOG.md
This commit is contained in:
parent
cd43b8a9ca
commit
673916f63c
7 changed files with 87 additions and 11 deletions
|
|
@ -235,7 +235,7 @@ export class InteractiveMode {
|
|||
) {
|
||||
this.session = session;
|
||||
this.version = VERSION;
|
||||
this.ui = new TUI(new ProcessTerminal());
|
||||
this.ui = new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
|
||||
this.chatContainer = new Container();
|
||||
this.pendingMessagesContainer = new Container();
|
||||
this.statusContainer = new Container();
|
||||
|
|
@ -689,6 +689,18 @@ export class InteractiveMode {
|
|||
shutdown: () => {
|
||||
this.shutdownRequested = true;
|
||||
},
|
||||
getContextUsage: () => this.session.getContextUsage(),
|
||||
compact: (options) => {
|
||||
void (async () => {
|
||||
try {
|
||||
const result = await this.session.compact(options?.customInstructions);
|
||||
options?.onComplete?.(result);
|
||||
} catch (error) {
|
||||
const err = error instanceof Error ? error : new Error(String(error));
|
||||
options?.onError?.(err);
|
||||
}
|
||||
})();
|
||||
},
|
||||
},
|
||||
// ExtensionCommandContextActions - for ctx.* in command handlers
|
||||
{
|
||||
|
|
@ -813,6 +825,18 @@ export class InteractiveMode {
|
|||
shutdown: () => {
|
||||
this.shutdownRequested = true;
|
||||
},
|
||||
getContextUsage: () => this.session.getContextUsage(),
|
||||
compact: (options) => {
|
||||
void (async () => {
|
||||
try {
|
||||
const result = await this.session.compact(options?.customInstructions);
|
||||
options?.onComplete?.(result);
|
||||
} catch (error) {
|
||||
const err = error instanceof Error ? error : new Error(String(error));
|
||||
options?.onError?.(err);
|
||||
}
|
||||
})();
|
||||
},
|
||||
});
|
||||
|
||||
// Set up the extension shortcut handler on the default editor
|
||||
|
|
@ -2521,6 +2545,7 @@ export class InteractiveMode {
|
|||
hideThinkingBlock: this.hideThinkingBlock,
|
||||
collapseChangelog: this.settingsManager.getCollapseChangelog(),
|
||||
doubleEscapeAction: this.settingsManager.getDoubleEscapeAction(),
|
||||
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
||||
editorPaddingX: this.settingsManager.getEditorPaddingX(),
|
||||
},
|
||||
{
|
||||
|
|
@ -2589,6 +2614,10 @@ export class InteractiveMode {
|
|||
onDoubleEscapeActionChange: (action) => {
|
||||
this.settingsManager.setDoubleEscapeAction(action);
|
||||
},
|
||||
onShowHardwareCursorChange: (enabled) => {
|
||||
this.settingsManager.setShowHardwareCursor(enabled);
|
||||
this.ui.setShowHardwareCursor(enabled);
|
||||
},
|
||||
onEditorPaddingXChange: (padding) => {
|
||||
this.settingsManager.setEditorPaddingX(padding);
|
||||
this.defaultEditor.setPaddingX(padding);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue