mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
fix: command model selection (#2448)
This commit is contained in:
parent
dc99005e65
commit
bffe547417
@ -1297,18 +1297,26 @@ export namespace Session {
|
||||
}),
|
||||
)
|
||||
|
||||
const model = await (async () => {
|
||||
if (command.model) {
|
||||
return Provider.parseModel(command.model)
|
||||
}
|
||||
if (command.agent) {
|
||||
const agent = await Agent.get(command.agent)
|
||||
if (agent.model) {
|
||||
return agent.model
|
||||
}
|
||||
}
|
||||
if (input.model) {
|
||||
return Provider.parseModel(input.model)
|
||||
}
|
||||
return undefined
|
||||
})()
|
||||
|
||||
return prompt({
|
||||
sessionID: input.sessionID,
|
||||
messageID: input.messageID,
|
||||
model: (() => {
|
||||
if (input.model) {
|
||||
return Provider.parseModel(input.model)
|
||||
}
|
||||
if (command.model) {
|
||||
return Provider.parseModel(command.model)
|
||||
}
|
||||
return undefined
|
||||
})(),
|
||||
model,
|
||||
agent,
|
||||
parts,
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user