mirror of
https://github.com/sst/opencode.git
synced 2025-08-31 02:07:24 +00:00
opencode run respects mode
This commit is contained in:
parent
1cc55b68ef
commit
9db3ce1d0b
1 changed files with 6 additions and 3 deletions
|
@ -144,13 +144,16 @@ export const RunCommand = cmd({
|
|||
UI.error(err)
|
||||
})
|
||||
|
||||
// TODO: dax, should this impact model selection as well?
|
||||
const mode = args.mode ? await Mode.get(args.mode) : await Mode.list().then((x) => x[0])
|
||||
|
||||
const result = await Session.chat({
|
||||
sessionID: session.id,
|
||||
providerID,
|
||||
modelID,
|
||||
...(mode.model
|
||||
? mode.model
|
||||
: {
|
||||
providerID,
|
||||
modelID,
|
||||
}),
|
||||
mode: mode.name,
|
||||
parts: [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue