wip
This commit is contained in:
parent
32d5058f8c
commit
7d55ba4581
2 changed files with 8 additions and 3 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"model": "anthropic/claude-opus-4-8",
|
||||||
|
// "default_agent": "custom",
|
||||||
"$schema": "https://opencode.ai/config.json",
|
"$schema": "https://opencode.ai/config.json",
|
||||||
"provider": {},
|
"provider": {},
|
||||||
"permission": {},
|
"permission": {},
|
||||||
|
|
|
||||||
|
|
@ -405,9 +405,12 @@ export function Prompt(props: PromptProps) {
|
||||||
// Only set agent if it's a primary agent (not a subagent)
|
// Only set agent if it's a primary agent (not a subagent)
|
||||||
const isPrimaryAgent = local.agent.list().some((x) => x.name === msg.agent)
|
const isPrimaryAgent = local.agent.list().some((x) => x.name === msg.agent)
|
||||||
if (msg.agent && isPrimaryAgent) {
|
if (msg.agent && isPrimaryAgent) {
|
||||||
// Keep command line --agent if specified.
|
// Keep an explicitly configured agent (--agent flag or config "default_agent") instead
|
||||||
if (!args.agent) local.agent.set(msg.agent)
|
// of flipping to the session's last-used agent when navigating between sessions.
|
||||||
if (msg.model) {
|
if (!args.agent && !sync.data.config.default_agent) local.agent.set(msg.agent)
|
||||||
|
// Keep an explicitly configured model (--model flag or config "model") instead of
|
||||||
|
// flipping to the session's last-used model when navigating between sessions.
|
||||||
|
if (msg.model && !args.model && !sync.data.config.model) {
|
||||||
local.model.set(msg.model)
|
local.model.set(msg.model)
|
||||||
local.model.variant.set(msg.model.variant)
|
local.model.variant.set(msg.model.variant)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue