Skip to content

Commit 2bfcb8f

Browse files
committed
fix: selection context not loading before opening the panel
1 parent 2d71c20 commit 2bfcb8f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lua/opencode/core.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ function M.open(opts)
5353

5454
state.is_opening = true
5555

56+
if not require('opencode.ui.ui').is_opencode_focused() then
57+
require('opencode.context').load()
58+
end
59+
5660
local are_windows_closed = state.windows == nil
5761
if are_windows_closed then
5862
-- Check if whether prompting will be allowed
@@ -70,10 +74,6 @@ function M.open(opts)
7074

7175
M.ensure_current_mode()
7276

73-
if not require('opencode.ui.ui').is_opencode_focused() then
74-
require('opencode.context').load()
75-
end
76-
7777
if opts.new_session then
7878
state.active_session = nil
7979
state.last_sent_context = nil

0 commit comments

Comments
 (0)