storybook component fixes and improvements
- Add @storybook/addon-actions for action logging in stories - Add onTestCapability callback to ExperimentalFeaturesPanel - Use CopyButton overlay in ResourcePreviewPanel and ResultPanel - Replace includeContext checkbox with badge in SamplingRequestPanel - Add LongServerName story for ServerCard - Fix long tool name overflow with truncation and contained Paper variant - Add optional title prop to ToolListItem and ToolDetailPanel - Move tool annotations from list to detail panel form - Vertically center static text in ResourceTemplateInput - Fix InlineError blank space when no details Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4a4818e933
commit
1da76c53ef
1 changed files with 167 additions and 110 deletions
|
|
@ -10,11 +10,10 @@ export interface ResultContentItem {
|
|||
|
||||
export interface ResultPanelProps {
|
||||
content: ResultContentItem[];
|
||||
onCopy: () => void;
|
||||
onClear: () => void;
|
||||
}
|
||||
|
||||
export function ResultPanel({ content, onCopy, onClear }: ResultPanelProps) {
|
||||
export function ResultPanel({ content, onClear }: ResultPanelProps) {
|
||||
return (
|
||||
<Stack>
|
||||
<Title order={4}>Results</Title>
|
||||
|
|
@ -29,6 +28,7 @@ export function ResultPanel({ content, onCopy, onClear }: ResultPanelProps) {
|
|||
key={index}
|
||||
type={item.type === "text" ? "text" : "json"}
|
||||
content={item.text}
|
||||
copyable
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
@ -47,9 +47,6 @@ export function ResultPanel({ content, onCopy, onClear }: ResultPanelProps) {
|
|||
</>
|
||||
)}
|
||||
<Group>
|
||||
<Button variant="light" size="sm" onClick={onCopy}>
|
||||
Copy
|
||||
</Button>
|
||||
<Button variant="light" size="sm" onClick={onClear}>
|
||||
Clear
|
||||
</Button>
|
||||
|
|
|
|||
Loading…
Reference in a new issue