Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
		
							parent
							
								
									28fd18fd0f
								
							
						
					
					
						commit
						eaa373a7f6
					
				@ -96,8 +96,6 @@ M.stream = function(question, code_lang, code_content, selected_content_content,
 | 
				
			|||||||
  ---@type AvanteCurlOutput
 | 
					  ---@type AvanteCurlOutput
 | 
				
			||||||
  local spec = Provider.parse_curl_args(Provider, code_opts)
 | 
					  local spec = Provider.parse_curl_args(Provider, code_opts)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Utils.debug({ spec })
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  ---@param line string
 | 
					  ---@param line string
 | 
				
			||||||
  local function parse_stream_data(line)
 | 
					  local function parse_stream_data(line)
 | 
				
			||||||
    local event = line:match("^event: (.+)$")
 | 
					    local event = line:match("^event: (.+)$")
 | 
				
			||||||
 | 
				
			|||||||
@ -150,7 +150,6 @@ E.setup = function(opts)
 | 
				
			|||||||
  local function mount_dressing_buffer()
 | 
					  local function mount_dressing_buffer()
 | 
				
			||||||
    vim.defer_fn(function()
 | 
					    vim.defer_fn(function()
 | 
				
			||||||
      -- only mount if given buffer is not of buftype ministarter, dashboard, alpha, qf
 | 
					      -- only mount if given buffer is not of buftype ministarter, dashboard, alpha, qf
 | 
				
			||||||
      local exclude_buftypes = { "qf", "nofile" }
 | 
					 | 
				
			||||||
      local exclude_filetypes = {
 | 
					      local exclude_filetypes = {
 | 
				
			||||||
        "NvimTree",
 | 
					        "NvimTree",
 | 
				
			||||||
        "Outline",
 | 
					        "Outline",
 | 
				
			||||||
@ -163,12 +162,9 @@ E.setup = function(opts)
 | 
				
			|||||||
        "gitcommit",
 | 
					        "gitcommit",
 | 
				
			||||||
        "gitrebase",
 | 
					        "gitrebase",
 | 
				
			||||||
        "DressingInput",
 | 
					        "DressingInput",
 | 
				
			||||||
 | 
					        "noice",
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if
 | 
					      if not vim.tbl_contains(exclude_filetypes, vim.bo.filetype) and not opts.provider.has() then
 | 
				
			||||||
        not vim.tbl_contains(exclude_buftypes, vim.bo.buftype)
 | 
					 | 
				
			||||||
        and not vim.tbl_contains(exclude_filetypes, vim.bo.filetype)
 | 
					 | 
				
			||||||
        and not opts.provider.has()
 | 
					 | 
				
			||||||
      then
 | 
					 | 
				
			||||||
        Dressing.initialize_input_buffer({
 | 
					        Dressing.initialize_input_buffer({
 | 
				
			||||||
          opts = { prompt = "Enter " .. var .. ": " },
 | 
					          opts = { prompt = "Enter " .. var .. ": " },
 | 
				
			||||||
          on_confirm = on_confirm,
 | 
					          on_confirm = on_confirm,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user