Skip to content

Commit f185518

Browse files
committed
fix(picker): show notification instead of empty window when no sessions match
1 parent 281e026 commit f185518

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lua/opencode/core.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ M.select_session = Promise.async(function(parent_id)
2323
return s.title ~= '' and s ~= nil and s.parentID == parent_id
2424
end, all_sessions)
2525

26+
if #filtered_sessions == 0 then
27+
vim.notify(parent_id and 'No child sessions found' or 'No sessions found', vim.log.levels.INFO)
28+
if state.ui.is_visible() then
29+
ui.focus_input()
30+
end
31+
return
32+
end
33+
2634
ui.select_session(filtered_sessions, function(selected_session)
2735
if not selected_session then
2836
if state.ui.is_visible() then

0 commit comments

Comments
 (0)