Studio: fix permission composer layout and Hub feed icons (#7148)
* Expand composer for permission modes * Filter default Hub feed by provider logo
This commit is contained in:
parent
73af334d11
commit
c0b16b9df8
2 changed files with 7 additions and 4 deletions
|
|
@ -1433,7 +1433,6 @@ const Composer: FC<{
|
|||
const mcpEnabledForChat = useChatRuntimeStore((s) => s.mcpEnabledForChat);
|
||||
const ragEnabled = useChatRuntimeStore((s) => s.ragEnabled);
|
||||
const permissionMode = useChatRuntimeStore((s) => s.permissionMode);
|
||||
const bypassPermissions = useChatRuntimeStore((s) => s.bypassPermissions);
|
||||
// More than 4 pills: collapse to icons only. Search and Code always show; the
|
||||
// permission pill shows in every mode except "off" (it renders null there);
|
||||
// Images, RAG, Canvas and MCP are conditional.
|
||||
|
|
@ -1557,8 +1556,7 @@ const Composer: FC<{
|
|||
}, [composerText, draftKey]);
|
||||
// Two-row layout shows once the input wraps or a tool is on. Tools can
|
||||
// pre-select before a model loads, so an active toggle expands it either way.
|
||||
// Bypass permissions counts too: turning it on should drop the composer into
|
||||
// the two-row layout immediately, same as Search/Code.
|
||||
// Keep the composer expanded whenever the permission pill is visible.
|
||||
const composerExpanded =
|
||||
isMultiline ||
|
||||
hasAttachments ||
|
||||
|
|
@ -1569,7 +1567,7 @@ const Composer: FC<{
|
|||
ragEnabled ||
|
||||
artifactsEnabled ||
|
||||
mcpEnabledForChat ||
|
||||
bypassPermissions;
|
||||
permissionMode !== "off";
|
||||
// react-textarea-autosize re-measures only on value change or window resize,
|
||||
// not on the width swap from expanding, so it keeps the taller height and
|
||||
// leaves a stray blank row. Nudge a resize whenever input width changes.
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ import {
|
|||
} from "./lib/channels";
|
||||
import { isHiddenModelId } from "./lib/hidden-models";
|
||||
import { inventoryRowMatches, tokenizeQuery } from "./lib/inventory-search";
|
||||
import { resolveOwnerProviderLogo } from "./lib/provider-logos";
|
||||
import {
|
||||
buildDiscoverRows,
|
||||
detectResultFormat,
|
||||
|
|
@ -699,6 +700,9 @@ export function ModelsPage() {
|
|||
return discoverRows.filter(
|
||||
(row) =>
|
||||
!isHiddenModelId(row.id) &&
|
||||
// The default feed only shows models with a provider logo.
|
||||
(!isFeedMode ||
|
||||
resolveOwnerProviderLogo(row.owner, row.repo) !== null) &&
|
||||
matchesFormat(detectResultFormat(row.result), effectiveDiscoverFormat) &&
|
||||
matchesCapability(row.capabilities, deferredCapabilityFilter) &&
|
||||
(!activeChannel?.finetunableOnly || isUnslothFinetunable(row.result)) &&
|
||||
|
|
@ -711,6 +715,7 @@ export function ModelsPage() {
|
|||
}, [
|
||||
discoverRows,
|
||||
isDatasetMode,
|
||||
isFeedMode,
|
||||
effectiveDiscoverFormat,
|
||||
deferredCapabilityFilter,
|
||||
activeChannel,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue