From f1855184ccd13b374ca5287fa825c4f0630fd367 Mon Sep 17 00:00:00 2001 From: David Herman Date: Mon, 30 Mar 2026 22:37:46 +0200 Subject: [PATCH] fix(picker): show notification instead of empty window when no sessions match --- lua/opencode/core.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/opencode/core.lua b/lua/opencode/core.lua index 7ceb3a3f..dd01d8ec 100644 --- a/lua/opencode/core.lua +++ b/lua/opencode/core.lua @@ -23,6 +23,14 @@ M.select_session = Promise.async(function(parent_id) return s.title ~= '' and s ~= nil and s.parentID == parent_id end, all_sessions) + if #filtered_sessions == 0 then + vim.notify(parent_id and 'No child sessions found' or 'No sessions found', vim.log.levels.INFO) + if state.ui.is_visible() then + ui.focus_input() + end + return + end + ui.select_session(filtered_sessions, function(selected_session) if not selected_session then if state.ui.is_visible() then