mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
The web ChatConsole seeded a fresh conversation's model from the global
default, never the selected agent's model override, and handleSendMessage
then pinned that default onto the conversation row. Since a conversation
pin outranks the agent override in the backend runtime resolver
(AgentGraphBuilder.resolveRuntimeBaseModel), the model chosen on the
agent edit page was silently clobbered. IM channels and external webchat
were unaffected — they leave the conversation unpinned.
- applyConversationModel now follows the backend precedence:
conversation pin > agent model override > global default.
- The agent tier resolves via /agents/{id}/capabilities (authoritative)
with a synchronous fallback (currentAgent.modelName against the
enabled-model list) so an agent switch, a capability-fetch failure, or
a not-yet-hydrated deep-link still honour the override instead of
dropping to the global default.
- userPickedModel guards the async re-seed from clobbering an explicit
pick; reset on new/switch/delete conversation.
- Unit tests cover the precedence tiers, the empty-string capabilities
wire shape, and the synchronous fallback.
|
||
|---|---|---|
| .. | ||
| api | ||
| assets | ||
| components | ||
| composables | ||
| i18n | ||
| router | ||
| stores | ||
| types | ||
| utils | ||
| views | ||
| App.vue | ||
| main.ts | ||
| vite-env.d.ts | ||