Spaces:
Running
Running
Josep Pon Farreny
commited on
Commit
·
5b1ca13
1
Parent(s):
7813b1d
feat: Improve UI
Browse files- tdagent/grchat.py +4 -0
- tdagent/grcomponents/mcbgroup.py +13 -5
tdagent/grchat.py
CHANGED
@@ -416,6 +416,10 @@ with (
|
|
416 |
),
|
417 |
],
|
418 |
label="MCP Servers",
|
|
|
|
|
|
|
|
|
419 |
)
|
420 |
|
421 |
with gr.Accordion("⚙️ Provider Configuration", open=True):
|
|
|
416 |
),
|
417 |
],
|
418 |
label="MCP Servers",
|
419 |
+
new_value_label="MCP endpoint",
|
420 |
+
new_name_label="MCP endpoint name",
|
421 |
+
new_value_placeholder="https://my-cool-mcp-server.com/mcp/sse",
|
422 |
+
new_name_placeholder="Swiss army knife of MCPs",
|
423 |
)
|
424 |
|
425 |
with gr.Accordion("⚙️ Provider Configuration", open=True):
|
tdagent/grcomponents/mcbgroup.py
CHANGED
@@ -19,7 +19,7 @@ class MutableCheckBoxGroupEntry(NamedTuple):
|
|
19 |
class MutableCheckBoxGroup(gr.Blocks):
|
20 |
"""Check box group with controls to add or remove values."""
|
21 |
|
22 |
-
def __init__(
|
23 |
self,
|
24 |
values: list[MutableCheckBoxGroupEntry] | None = None,
|
25 |
label: str = "Extendable List",
|
@@ -68,16 +68,24 @@ class MutableCheckBoxGroup(gr.Blocks):
|
|
68 |
self.input_value = gr.Textbox(
|
69 |
label=self.new_value_label,
|
70 |
placeholder=self.new_value_placeholder,
|
71 |
-
scale=
|
72 |
)
|
73 |
self.input_name = gr.Textbox(
|
74 |
label=self.new_name_label,
|
75 |
placeholder=self.new_name_placeholder,
|
76 |
scale=2,
|
77 |
)
|
78 |
-
|
79 |
-
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
# Vertical checkbox group
|
83 |
self.items_group = gr.CheckboxGroup(
|
|
|
19 |
class MutableCheckBoxGroup(gr.Blocks):
|
20 |
"""Check box group with controls to add or remove values."""
|
21 |
|
22 |
+
def __init__(
|
23 |
self,
|
24 |
values: list[MutableCheckBoxGroupEntry] | None = None,
|
25 |
label: str = "Extendable List",
|
|
|
68 |
self.input_value = gr.Textbox(
|
69 |
label=self.new_value_label,
|
70 |
placeholder=self.new_value_placeholder,
|
71 |
+
scale=3,
|
72 |
)
|
73 |
self.input_name = gr.Textbox(
|
74 |
label=self.new_name_label,
|
75 |
placeholder=self.new_name_placeholder,
|
76 |
scale=2,
|
77 |
)
|
78 |
+
with gr.Row():
|
79 |
+
self.add_btn = gr.Button(
|
80 |
+
"Add",
|
81 |
+
variant="primary",
|
82 |
+
scale=1,
|
83 |
+
)
|
84 |
+
self.delete_btn = gr.Button(
|
85 |
+
"Delete Selected",
|
86 |
+
variant="stop",
|
87 |
+
scale=1,
|
88 |
+
)
|
89 |
|
90 |
# Vertical checkbox group
|
91 |
self.items_group = gr.CheckboxGroup(
|