Move search state into ToolControls and PromptControls, search response in history
- ToolControls and PromptControls now manage searchText as local state and filter their lists internally (matches on name + title/description) - Removed searchText/onSearchChange props from ToolsScreen, PromptsScreen, and their associated stories - HistoryListPanel search now also matches against stringified response payloads Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e00853afac
commit
064b807ea4
4 changed files with 18 additions and 41 deletions
|
|
@ -8,8 +8,6 @@ const meta: Meta<typeof PromptsScreen> = {
|
|||
component: PromptsScreen,
|
||||
parameters: { layout: "fullscreen" },
|
||||
args: {
|
||||
searchText: "",
|
||||
onSearchChange: fn(),
|
||||
onRefreshList: fn(),
|
||||
onSelectPrompt: fn(),
|
||||
onArgumentChange: fn(),
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ export interface PromptsScreenProps {
|
|||
selectedPrompt?: SelectedPrompt;
|
||||
messages?: PromptMessagesDisplayProps;
|
||||
listChanged: boolean;
|
||||
searchText: string;
|
||||
onSearchChange: (text: string) => void;
|
||||
onRefreshList: () => void;
|
||||
onSelectPrompt: (name: string) => void;
|
||||
onArgumentChange: (name: string, value: string) => void;
|
||||
|
|
@ -64,8 +62,6 @@ export function PromptsScreen({
|
|||
selectedPrompt,
|
||||
messages,
|
||||
listChanged,
|
||||
searchText,
|
||||
onSearchChange,
|
||||
onRefreshList,
|
||||
onSelectPrompt,
|
||||
onArgumentChange,
|
||||
|
|
@ -78,8 +74,6 @@ export function PromptsScreen({
|
|||
<PromptControls
|
||||
prompts={prompts}
|
||||
listChanged={listChanged}
|
||||
searchText={searchText}
|
||||
onSearchChange={onSearchChange}
|
||||
onRefreshList={onRefreshList}
|
||||
onSelectPrompt={onSelectPrompt}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@ const meta: Meta<typeof ToolsScreen> = {
|
|||
component: ToolsScreen,
|
||||
parameters: { layout: "fullscreen" },
|
||||
args: {
|
||||
searchText: "",
|
||||
listChanged: false,
|
||||
onSearchChange: fn(),
|
||||
onRefreshList: fn(),
|
||||
onSelectTool: fn(),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ export interface ToolsScreenProps {
|
|||
selectedTool?: ToolDetailPanelProps;
|
||||
result?: ToolResultPanelProps;
|
||||
listChanged: boolean;
|
||||
searchText: string;
|
||||
onSearchChange: (text: string) => void;
|
||||
onRefreshList: () => void;
|
||||
onSelectTool: (name: string) => void;
|
||||
}
|
||||
|
|
@ -51,8 +49,6 @@ export function ToolsScreen({
|
|||
selectedTool,
|
||||
result,
|
||||
listChanged,
|
||||
searchText,
|
||||
onSearchChange,
|
||||
onRefreshList,
|
||||
onSelectTool,
|
||||
}: ToolsScreenProps) {
|
||||
|
|
@ -63,8 +59,6 @@ export function ToolsScreen({
|
|||
<ToolControls
|
||||
tools={tools}
|
||||
listChanged={listChanged}
|
||||
searchText={searchText}
|
||||
onSearchChange={onSearchChange}
|
||||
onRefreshList={onRefreshList}
|
||||
onSelectTool={onSelectTool}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue