10. (14 points) In $\triangle A B C$, $B C=a, C A=$ $b$, a square $A B E F$ is constructed outward with side $A B$, $O$ is the center of the square $A B E F$, $M$ and $N$ are the midpoints of sides $B C$ and $C A$, respectively. When $\angle B C A$ varies, find the maximum value of $O M+O N$.

---

Please note that the translation preserves the original text's formatting and structure.
10. As shown in Figure 3, in $\triangle O B M$, by the Law of Cosines (let $A B = c$, $\angle A B C = \beta$)
$$
\begin{aligned}
& O M^{2} \\
& =\left(\frac{\sqrt{2}}{2} c\right)^{2}+ \\
& \left(\frac{a}{2}\right)^{2}-2 \cdot \frac{\sqrt{2}}{2} c \cdot \frac{a}{2} \cos \left(\beta+45^{\circ}\right) \\
= & \frac{c^{2}}{2}+\frac{a^{2}}{4}-\frac{\sqrt{2}}{2} a c\left(\frac{\sqrt{2}}{2} \cos \beta-\frac{\sqrt{2}}{2} \sin \beta\right) \\
= & \frac{c^{2}}{2}+\frac{a^{2}}{4}-\frac{a c}{2} \cos \beta+\frac{a c}{2} \sin \beta .
\end{aligned}
$$

In $\triangle A B C$, by the Law of Cosines and the Law of Sines, we have
$$
\cos \beta=\frac{a^{2}+c^{2}-b^{2}}{2 a c}, c \sin \beta=b \sin C .
$$

Thus, $O M^{2}$
$$
\begin{array}{l}
=\frac{c^{2}}{2}+\frac{a^{2}}{4}-\frac{1}{4}\left(a^{2}+c^{2}-b^{2}\right)+\frac{a b}{2} \sin C \\
=\frac{b^{2}}{4}+\frac{c^{2}}{4}+\frac{a b}{2} \sin C \\
=\frac{b^{2}}{4}+\frac{1}{4}\left(a^{2}+b^{2}-2 a b \cos C\right)+\frac{a b}{2} \sin C \\
=\frac{b^{2}}{2}+\frac{a^{2}}{4}+\frac{a b}{2}(\sin C-\cos C) \\
=\frac{b^{2}}{2}+\frac{a^{2}}{4}+\frac{\sqrt{2}}{2} a b \sin \left(C-45^{\circ}\right) .
\end{array}
$$

Similarly, $O N^{2}=\frac{a^{2}}{2}+\frac{b^{2}}{4}+\frac{\sqrt{2}}{2} a b \sin \left(C-45^{\circ}\right)$.
Therefore, when $\angle C=135^\circ$,
$$
\begin{array}{l}
\left(O M^{2}\right)_{\text {max }}=\frac{b^{2}}{2}+\frac{a^{2}}{4}+\frac{\sqrt{2}}{2} a b=\left(\frac{a}{2}+\frac{\sqrt{2}}{2} b\right)^{2}, \\
\left(O N^{2}\right)_{\text {max }}=\left(\frac{\sqrt{2}}{2} a+\frac{b}{2}\right)^{2} . \\
\text { Hence }(O M+O N)_{\text {max }} \\
=\left(\frac{a}{2}+\frac{\sqrt{2}}{2} b\right)+\left(\frac{\sqrt{2}}{2} a+\frac{b}{2}\right)=\frac{\sqrt{2}+1}{2}(a+b) .
\end{array}
$$