Skip to content

Commit ed961cc

Browse files
authored
fix: adding mcp interfaces (#514)
* fix: adding mcp interfaces * fix: addressing comments * fix: minor edits
1 parent 4ee967d commit ed961cc

File tree

1 file changed

+38
-4
lines changed

1 file changed

+38
-4
lines changed

types/chat.ts

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,28 @@ export interface InlineChatResultParams {
420420
}
421421

422422
// history
423-
export type TextBasedFilterOption = {
424-
type: 'textarea' | 'textinput'
423+
export interface FilterOptionBase {
425424
placeholder?: string
425+
title?: string
426+
description?: string
426427
icon?: IconType
427428
}
429+
430+
export type TextBasedFilterOption = FilterOptionBase & {
431+
type: 'textarea' | 'textinput' | 'numericinput'
432+
}
433+
434+
export type OptionBasedFilterOption = FilterOptionBase & {
435+
type: 'select' | 'radiogroup'
436+
options: Array<{
437+
value: string
438+
label: string
439+
}>
440+
}
441+
442+
export type BaseFilterOption = TextBasedFilterOption | OptionBasedFilterOption
428443
export type FilterValue = string
429-
export type FilterOption = { id: string } & TextBasedFilterOption
444+
export type FilterOption = { id: string } & BaseFilterOption
430445
export interface Action {
431446
id: string
432447
icon?: IconType
@@ -468,11 +483,14 @@ export interface DetailedListItem {
468483
title: string
469484
description?: string
470485
groupActions?: boolean
486+
children?: DetailedListGroup[]
471487
}
472488

473489
export interface DetailedListGroup {
474490
groupName?: string
475491
children?: DetailedListItem[]
492+
actions?: Action[]
493+
icon?: IconType
476494
}
477495

478496
export interface ListMcpServersResult {
@@ -497,10 +515,26 @@ export interface ConversationClickResult extends ConversationClickParams {
497515

498516
export interface McpServerClickParams {
499517
id: string
518+
title?: string
519+
optionsValues?: Record<string, string>
500520
}
501521

502522
export interface McpServerClickResult extends McpServerClickParams {
503-
success: boolean
523+
filterOptions?: FilterOption[] | null
524+
filterActions?: Button[]
525+
list?: DetailedListGroup[]
526+
header?: {
527+
title?: string
528+
icon?: IconType
529+
status?: {
530+
icon?: IconType
531+
title?: string
532+
description?: string
533+
status?: Status
534+
}
535+
description?: string
536+
actions?: Action[]
537+
}
504538
}
505539

506540
export type TabBarAction = 'export'

0 commit comments

Comments
 (0)