From 87ea15bb94f0707a5fd154f11f5ed419c17392d1 Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 8 Apr 2025 20:01:57 +0800 Subject: [PATCH] fix: follow the prev slash command strategy (#1835) --- lua/avante/sidebar.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index 460f8d3..91ce5e3 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -2574,8 +2574,7 @@ function Sidebar:create_input_container(opts) return end - local has_cmp = pcall(require, "cmp") - if request:sub(1, 1) == "/" and not has_cmp then + if request:sub(1, 1) == "/" then local command, args = request:match("^/(%S+)%s*(.*)") if command == nil then self:update_content("Invalid command", { focus = false, scroll = false })