Skip to content

Commit 6781d6e

Browse files
committed
feat(context): persist config from cmd arguments
1 parent 390ba0f commit 6781d6e

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
@@ -113,13 +113,16 @@ function M.send_message(prompt, opts)
113113
if opts.model then
114114
local provider, model = opts.model:match('^(.-)/(.+)$')
115115
params.model = { providerID = provider, modelID = model }
116+
state.current_model = opts.model
116117
end
117118

118119
if opts.agent then
119120
params.agent = opts.agent
121+
state.current_mode = opts.agent
120122
end
121123

122124
params.parts = context.format_message(prompt, opts.context)
125+
state.current_context_config = opts.context
123126

124127
M.before_run(opts)
125128

0 commit comments

Comments
 (0)