Files
apes-sidebar/tests
xun1241 e51864d8d1 fix(sidechat): inherit the parent's CURRENT model selection, not its stale options snapshot (#368)
sidechat.start seeded the child with `agentOptions: { ...parent.options }`.
In DSH 0.1.5 those options freeze the creation-time deployment default: a
composer model switch appends a durable `model/selection` event and drives
requests through the session-local selection + the `agent/request`
waterfall, never rewriting `agent.options`. A side thread created after an
explicit parent switch therefore silently ran the deployment default
instead of the model shown in the parent composer (issue #368, still
reproducible on 0.19.1 since no release shipped a fix).

- sidechat-core: add `parentModelSelection()`, a host-side mirror of the
  core `modelSelection` projection (a pending `model/selection` is consumed
  by a same-route `request/header`; the view value is `pending ?? lastUsed`),
  the same replication pattern as `resolvePresetId`.
- sidechat-routes: inherit the projected route in the child's agentOptions
  (provider/model/reasoningEffort; a request-header effort is deliberately
  NOT adopted since it may be an adapter default the core selection getter
  does not honor) and stamp the durable descriptor with the same route.
  Behavior is unchanged when the parent log carries no selection state.
- tests: projection unit cases (pending adoption, same-route consumption,
  cross-route isolation, header fallback, malformed rows) and route cases
  pinning the inherited agentOptions/descriptor for a composer switch and
  for a header-only parent.
2026-09-16 20:31:14 +08:00
..
2026-09-09 11:15:30 +08:00