mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 23:01:32 +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
|
|
@ -36,6 +36,7 @@ export interface SettingsConfig {
|
|||
hideThinkingBlock: boolean;
|
||||
collapseChangelog: boolean;
|
||||
doubleEscapeAction: "fork" | "tree";
|
||||
showHardwareCursor: boolean;
|
||||
editorPaddingX: number;
|
||||
}
|
||||
|
||||
|
|
@ -53,6 +54,7 @@ export interface SettingsCallbacks {
|
|||
onHideThinkingBlockChange: (hidden: boolean) => void;
|
||||
onCollapseChangelogChange: (collapsed: boolean) => void;
|
||||
onDoubleEscapeActionChange: (action: "fork" | "tree") => void;
|
||||
onShowHardwareCursorChange: (enabled: boolean) => void;
|
||||
onEditorPaddingXChange: (padding: number) => void;
|
||||
onCancel: () => void;
|
||||
}
|
||||
|
|
@ -269,9 +271,19 @@ export class SettingsSelectorComponent extends Container {
|
|||
values: ["true", "false"],
|
||||
});
|
||||
|
||||
// Editor padding toggle (insert after skill-commands)
|
||||
// Hardware cursor toggle (insert after skill-commands)
|
||||
const skillCommandsIndex = items.findIndex((item) => item.id === "skill-commands");
|
||||
items.splice(skillCommandsIndex + 1, 0, {
|
||||
id: "show-hardware-cursor",
|
||||
label: "Show hardware cursor",
|
||||
description: "Show the terminal cursor while still positioning it for IME support",
|
||||
currentValue: config.showHardwareCursor ? "true" : "false",
|
||||
values: ["true", "false"],
|
||||
});
|
||||
|
||||
// Editor padding toggle (insert after show-hardware-cursor)
|
||||
const hardwareCursorIndex = items.findIndex((item) => item.id === "show-hardware-cursor");
|
||||
items.splice(hardwareCursorIndex + 1, 0, {
|
||||
id: "editor-padding",
|
||||
label: "Editor padding",
|
||||
description: "Horizontal padding for input editor (0-3)",
|
||||
|
|
@ -318,6 +330,9 @@ export class SettingsSelectorComponent extends Container {
|
|||
case "double-escape-action":
|
||||
callbacks.onDoubleEscapeActionChange(newValue as "fork" | "tree");
|
||||
break;
|
||||
case "show-hardware-cursor":
|
||||
callbacks.onShowHardwareCursorChange(newValue === "true");
|
||||
break;
|
||||
case "editor-padding":
|
||||
callbacks.onEditorPaddingXChange(parseInt(newValue, 10));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue