fix: inline pills

This commit is contained in:
David Kaya
2026-03-25 21:40:40 +01:00
parent 29c054f47d
commit 7957928fc7
2 changed files with 53 additions and 31 deletions
+26 -4
View File
@@ -336,9 +336,29 @@ export function ChatPane({
</div> </div>
)} )}
{/* Scratchpad config pills — inline above composer */} {/* Scratchpad pills — tools/approval left, model/reasoning right */}
{isScratchpad && primaryAgent && ( {isScratchpad && (
<div className="mb-2 flex items-center gap-2"> <div className="mb-2 flex items-center gap-2">
{hasConfigurableTools && onUpdateSessionTooling && (
<InlineToolsPill
disabled={isComposerDisabled}
lspProfiles={lspProfiles}
mcpServers={mcpServers}
onToggle={onUpdateSessionTooling}
selection={toolSelection}
/>
)}
{hasToolCallApproval && onUpdateSessionApprovalSettings && approvalTools.length > 0 && (
<InlineApprovalPill
approvalTools={approvalTools}
disabled={isComposerDisabled}
effectiveAutoApproved={effectiveAutoApproved}
isOverridden={isApprovalOverridden}
onUpdate={onUpdateSessionApprovalSettings}
/>
)}
{primaryAgent && (
<div className="ml-auto flex items-center gap-2">
<InlineModelPill <InlineModelPill
disabled={isComposerDisabled} disabled={isComposerDisabled}
models={availableModels} models={availableModels}
@@ -367,9 +387,11 @@ export function ChatPane({
)} )}
</div> </div>
)} )}
</div>
)}
{/* Session config pills — tool & approval controls */} {/* Session config pills — tool & approval controls (non-scratchpad) */}
{(hasConfigurableTools || hasToolCallApproval) && ( {!isScratchpad && (hasConfigurableTools || hasToolCallApproval) && (
<div className="mb-2 flex items-center gap-2"> <div className="mb-2 flex items-center gap-2">
{hasConfigurableTools && onUpdateSessionTooling && ( {hasConfigurableTools && onUpdateSessionTooling && (
<InlineToolsPill <InlineToolsPill
+2 -2
View File
@@ -78,7 +78,7 @@ export function InlineModelPill({
</button> </button>
{open && !disabled && ( {open && !disabled && (
<div className="absolute bottom-full left-0 z-40 mb-1.5 max-h-72 w-64 overflow-y-auto rounded-lg border border-zinc-700 bg-zinc-900 py-1 shadow-2xl" role="listbox"> <div className="absolute bottom-full right-0 z-40 mb-1.5 max-h-72 w-64 overflow-y-auto rounded-lg border border-zinc-700 bg-zinc-900 py-1 shadow-2xl" role="listbox">
{groupedModels.map((pg) => ( {groupedModels.map((pg) => (
<div key={pg.id}> <div key={pg.id}>
<div className="flex items-center gap-2 px-3 pb-1 pt-2.5"> <div className="flex items-center gap-2 px-3 pb-1 pt-2.5">
@@ -183,7 +183,7 @@ export function InlineThinkingPill({
</button> </button>
{open && !disabled && ( {open && !disabled && (
<div className="absolute bottom-full left-0 z-40 mb-1.5 w-36 overflow-hidden rounded-lg border border-zinc-700 bg-zinc-900 py-1 shadow-2xl" role="listbox"> <div className="absolute bottom-full right-0 z-40 mb-1.5 w-36 overflow-hidden rounded-lg border border-zinc-700 bg-zinc-900 py-1 shadow-2xl" role="listbox">
{options.map((option) => ( {options.map((option) => (
<button <button
className={`flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13px] transition hover:bg-zinc-800 ${ className={`flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13px] transition hover:bg-zinc-800 ${