179 The function $f(x)=\max \left\{\sin x, \cos x, \frac{\sin x+\cos x}{\sqrt{2}}\right\}(x \in \mathrm{R})$ has a sum of its maximum and minimum values $=$ . $\qquad$
$1791-\frac{\sqrt{2}}{2}$. First, rewrite $f(x)$ as
$$
f(x)=\max \left\{\sin x, \cos x, \sin \left(x+\frac{\pi}{4}\right)\right\}(x \in \mathbf{R}),
$$

Obviously, the maximum value of $f(x)$ is 1. To find the minimum value of $f(x)$, we can first draw the graphs of the two functions $y=$ $\sin x, y=\cos x, \sin \left(x+\frac{\pi}{4}\right)$ to get the minimum value of $\max \{\sin x, \cos x\}$ as $-\frac{\sqrt{2}}{2}$, which is reached at $x=\frac{5}{4} \pi$. At this point, $\sin \left(x+\frac{\pi}{4}\right)$ is -1, thus the minimum value of $f(x)$ is $-\frac{\sqrt{2}}{2}$.