Address PR #1212 code review feedback
- Fix hasAnyAnnotation checking annotations.title which is never rendered - Reset formValues when switching tools via onSelectTool handler - Extract ToolProgress type from ToolDetailPanel, reuse in ToolsScreen - Fix contradictory readOnlyHint + destructiveHint in story fixture - Replace listMaxHeight function with LIST_MAX_HEIGHT constant Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
92ecfcbd6c
commit
16f4d9b50f
1 changed files with 20 additions and 22 deletions
|
|
@ -1,22 +1,18 @@
|
|||
import { useState } from "react";
|
||||
import { Card, Flex, Stack, Text } from "@mantine/core";
|
||||
import type {
|
||||
CallToolResult,
|
||||
ProgressNotification,
|
||||
Tool,
|
||||
} from "@modelcontextprotocol/sdk/types.js";
|
||||
import type { CallToolResult, Tool } from "@modelcontextprotocol/sdk/types.js";
|
||||
import { ToolControls } from "../../groups/ToolControls/ToolControls";
|
||||
import { ToolDetailPanel } from "../../groups/ToolDetailPanel/ToolDetailPanel";
|
||||
import {
|
||||
ToolDetailPanel,
|
||||
type ToolProgress,
|
||||
} from "../../groups/ToolDetailPanel/ToolDetailPanel";
|
||||
import { ToolResultPanel } from "../../groups/ToolResultPanel/ToolResultPanel";
|
||||
|
||||
export interface ToolCallState {
|
||||
status: "idle" | "pending" | "ok" | "error";
|
||||
result?: CallToolResult;
|
||||
error?: string;
|
||||
progress?: Pick<
|
||||
ProgressNotification["params"],
|
||||
"progress" | "total" | "message"
|
||||
>;
|
||||
progress?: ToolProgress;
|
||||
}
|
||||
|
||||
export interface ToolsScreenProps {
|
||||
|
|
@ -86,7 +82,10 @@ export function ToolsScreen({
|
|||
selectedName={selectedToolName}
|
||||
listChanged={listChanged}
|
||||
onRefreshList={onRefreshList}
|
||||
onSelectTool={onSelectTool}
|
||||
onSelectTool={(name) => {
|
||||
setFormValues({});
|
||||
onSelectTool(name);
|
||||
}}
|
||||
/>
|
||||
</SidebarCard>
|
||||
</Sidebar>
|
||||
|
|
|
|||
Loading…
Reference in a new issue