mirror of
https://github.com/sst/opencode.git
synced 2025-09-02 19:27:34 +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)
|
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 mode = args.mode ? await Mode.get(args.mode) : await Mode.list().then((x) => x[0])
|
||||||
|
|
||||||
const result = await Session.chat({
|
const result = await Session.chat({
|
||||||
sessionID: session.id,
|
sessionID: session.id,
|
||||||
providerID,
|
...(mode.model
|
||||||
modelID,
|
? mode.model
|
||||||
|
: {
|
||||||
|
providerID,
|
||||||
|
modelID,
|
||||||
|
}),
|
||||||
mode: mode.name,
|
mode: mode.name,
|
||||||
parts: [
|
parts: [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue