feat: add configurable input window height for vertical layout (#773)
Co-authored-by: amojury <wujiajun880@gmail.com>
This commit is contained in:
		
							parent
							
								
									7df1fe6656
								
							
						
					
					
						commit
						58e0165098
					
				@ -261,6 +261,7 @@ _See [config.lua#L9](./lua/avante/config.lua) for the full config_
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    input = {
 | 
					    input = {
 | 
				
			||||||
      prefix = "> ",
 | 
					      prefix = "> ",
 | 
				
			||||||
 | 
					      height = 8, -- Height of the input window in vertical layout
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    edit = {
 | 
					    edit = {
 | 
				
			||||||
      border = "rounded",
 | 
					      border = "rounded",
 | 
				
			||||||
 | 
				
			|||||||
@ -172,6 +172,7 @@ Respect and use existing conventions, libraries, etc that are already present in
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    input = {
 | 
					    input = {
 | 
				
			||||||
      prefix = "> ",
 | 
					      prefix = "> ",
 | 
				
			||||||
 | 
					      height = 8, -- Height of the input window in vertical layout
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    edit = {
 | 
					    edit = {
 | 
				
			||||||
      border = "rounded",
 | 
					      border = "rounded",
 | 
				
			||||||
 | 
				
			|||||||
@ -1415,7 +1415,7 @@ function Sidebar:create_input(opts)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  local get_size = function()
 | 
					  local get_size = function()
 | 
				
			||||||
    if self:get_layout() == "vertical" then return {
 | 
					    if self:get_layout() == "vertical" then return {
 | 
				
			||||||
      height = 8,
 | 
					      height = Config.windows.input.height,
 | 
				
			||||||
    } end
 | 
					    } end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    local selected_code_size = self:get_selected_code_size()
 | 
					    local selected_code_size = self:get_selected_code_size()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user