mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 04:01:56 +00:00
feat: add autocompleteMaxVisible setting for configurable dropdown height
This commit is contained in:
parent
06a7fedda5
commit
b212314f45
8 changed files with 63 additions and 4 deletions
|
|
@ -81,6 +81,7 @@ export interface Settings {
|
|||
doubleEscapeAction?: "fork" | "tree"; // Action for double-escape with empty editor (default: "tree")
|
||||
thinkingBudgets?: ThinkingBudgetsSettings; // Custom token budgets for thinking levels
|
||||
editorPaddingX?: number; // Horizontal padding for input editor (default: 0)
|
||||
autocompleteMaxVisible?: number; // Max visible items in autocomplete dropdown (default: 5)
|
||||
showHardwareCursor?: boolean; // Show terminal cursor while still positioning it for IME
|
||||
markdown?: MarkdownSettings;
|
||||
}
|
||||
|
|
@ -673,6 +674,15 @@ export class SettingsManager {
|
|||
this.save();
|
||||
}
|
||||
|
||||
getAutocompleteMaxVisible(): number {
|
||||
return this.settings.autocompleteMaxVisible ?? 5;
|
||||
}
|
||||
|
||||
setAutocompleteMaxVisible(maxVisible: number): void {
|
||||
this.globalSettings.autocompleteMaxVisible = Math.max(3, Math.min(20, Math.floor(maxVisible)));
|
||||
this.save();
|
||||
}
|
||||
|
||||
getCodeBlockIndent(): string {
|
||||
return this.settings.markdown?.codeBlockIndent ?? " ";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue