Skip to content

Commit f7ff03b

Browse files
committed
feat(context): persist config from cmd arguments
1 parent aae8773 commit f7ff03b

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
@@ -95,13 +95,16 @@ function M.send_message(prompt, opts)
9595
if opts.model then
9696
local provider, model = opts.model:match('^(.-)/(.+)$')
9797
params.model = { providerID = provider, modelID = model }
98+
state.current_model = opts.model
9899
end
99100

100101
if opts.agent then
101102
params.agent = opts.agent
103+
state.current_mode = opts.agent
102104
end
103105

104106
params.parts = context.format_message(prompt, opts.context)
107+
state.current_context_config = opts.context
105108

106109
M.before_run(opts)
107110

0 commit comments

Comments
 (0)