Halve the assistant's share of the Scheduler panel
It was the largest thing there before being asked anything, and the view above it is what the question is usually about.
This commit is contained in:
@@ -1224,15 +1224,22 @@ function vvFitRight() {
|
|||||||
// its floor, and nothing ever raised it again.
|
// its floor, and nothing ever raised it again.
|
||||||
const availH = Math.max(80, lf.getBoundingClientRect().top - 32
|
const availH = Math.max(80, lf.getBoundingClientRect().top - 32
|
||||||
- toolbar.getBoundingClientRect().bottom);
|
- toolbar.getBoundingClientRect().bottom);
|
||||||
// Expanded takes most of the panel rather than all of it. The view above is what the question
|
// A fifth of the panel at rest, two fifths expanded. Both were double this, which made the
|
||||||
// is usually about — a log, a conf, a script — and a chat that covers it entirely turns every
|
// assistant the largest thing in the panel before it had been asked anything — and the view
|
||||||
// follow-up into a round trip through the collapse button.
|
// above is what the question is usually about. Expanded still leaves the majority to the log,
|
||||||
|
// conf or script being discussed, so a follow-up does not need the panel handed back first.
|
||||||
|
//
|
||||||
|
// It grows upward: the panel is pinned at the bottom and everything above it is sized from what
|
||||||
|
// is left, a few lines down. So the top edge rises and the thing being read stays where it is.
|
||||||
|
//
|
||||||
// Both heights handed to the chat rather than one cap applied to it, because the component owns
|
// Both heights handed to the chat rather than one cap applied to it, because the component owns
|
||||||
// which of the two it is currently at. Recomputed on every fit so a resize while expanded stays
|
// which of the two it is currently at. Recomputed on every fit so a resize while expanded stays
|
||||||
// expanded at the new panel size instead of snapping back to the resting share.
|
// expanded at the new panel size instead of snapping back to the resting share. The floors keep
|
||||||
|
// the same 1:2 relationship, or on a very short viewport the two states would clamp to the same
|
||||||
|
// number and the control would appear to do nothing.
|
||||||
if (vvSchedChat) {
|
if (vvSchedChat) {
|
||||||
vvSchedChat.setHeights(Math.max(90, Math.round(availH * 0.40)) + 'px',
|
vvSchedChat.setHeights(Math.max(70, Math.round(availH * 0.20)) + 'px',
|
||||||
Math.max(90, Math.round(availH * 0.82)) + 'px');
|
Math.max(140, Math.round(availH * 0.40)) + 'px');
|
||||||
}
|
}
|
||||||
// Measured after the heights are applied, so this reads the clamped height, not the natural one.
|
// Measured after the heights are applied, so this reads the clamped height, not the natural one.
|
||||||
const dock = document.getElementById('vv-ai-dock');
|
const dock = document.getElementById('vv-ai-dock');
|
||||||
|
|||||||
Reference in New Issue
Block a user