Skip to content

Commit f5a6f4d

Browse files
committed
fix: improve context clearing in new sessions and file mentions
- Clear attachments when starting a new session with /new command - Toggle file removal when selecting already-mentioned files with @ trigger - Fixes issue where context persisted across new sessions - Fixes issue where @ file selection only added files, never removed them
1 parent b4ad8c1 commit f5a6f4d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/opencode/core.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ M.open = Promise.async(function(opts)
9393
if opts.new_session then
9494
state.active_session = nil
9595
state.last_sent_context = nil
96+
context.unload_attachments()
9697

9798
state.current_model = nil
9899
state.current_mode = nil

0 commit comments

Comments
 (0)