Skip to content

Commit 57a6277

Browse files
committed
feat(context): persist config from cmd arguments
1 parent 65d3dba commit 57a6277

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/opencode/core.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,16 @@ function M.send_message(prompt, opts)
115115
if opts.model then
116116
local provider, model = opts.model:match('^(.-)/(.+)$')
117117
params.model = { providerID = provider, modelID = model }
118+
state.current_model = opts.model
118119
end
119120

120121
if opts.agent then
121122
params.agent = opts.agent
123+
state.current_mode = opts.agent
122124
end
123125

124126
params.parts = context.format_message(prompt, opts.context)
127+
state.current_context_config = opts.context
125128

126129
M.before_run(opts)
127130

0 commit comments

Comments
 (0)