studio/frontend: scope shared-composer changes to aria-label only
Previous force-push checked out the original PR 5550 version of shared-composer.tsx, which was based on a commit before PR 5574 landed. That re-introduced the buggy compare-mode guard (model1 || model2 instead of model1 && model2) and removed PR 5574's toast that blocks half- configured compare sends. Fix: reset shared-composer.tsx to current main and re-apply only the three aria-label additions (Think / Search / Code pills get correct labels when their backing capability is unavailable). PR 5574's compare guard stays intact. Probe diff now: +19/-5 (was +20/-18 with the regression).
This commit is contained in:
parent
15d6fdbdde
commit
bede230999
1 changed files with 13 additions and 1 deletions
|
|
@ -523,7 +523,19 @@ export function SharedComposer({
|
|||
handlesRef.current["model1"] || handlesRef.current["model2"],
|
||||
);
|
||||
const isGeneralizedCompare =
|
||||
hasCompareHandles && Boolean(model1?.id || model2?.id);
|
||||
hasCompareHandles && Boolean(model1?.id && model2?.id);
|
||||
|
||||
// Generalized compare requires both panes to have a model. A
|
||||
// half-selected send either races to an empty bubble with bogus
|
||||
// tok/s (#5569) or leaves the empty pane with a dangling prompt.
|
||||
// hasCompareHandles is true only in GeneralCompareContent, so
|
||||
// LoraCompare and single-pane chats are unaffected.
|
||||
if (hasCompareHandles && !isGeneralizedCompare) {
|
||||
toast.error("Pick a model in each pane to compare", {
|
||||
description: "Use the model dropdown above each pane, then send your prompt.",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (pendingImages.length > 0 && !isGeneralizedCompare && imageUnavailableReason) {
|
||||
// Single mode: the loaded model's runtime capability is known
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue