ext-apps/examples/basic-host/src/index.module.css
Olivier Chafik f6ebefe238
Add server selector to basic-host example (#95)
* Add server selector to basic-host example

- Add ServerSelector component to switch between MCP servers
- Run all example servers concurrently on ports 3101-3107
- Update examples:start to launch all servers with assigned ports

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Move server selector into tool call panel

- Server selector now in same component as tool selector
- Tool call results persist across server switches
- Connection caching avoids reconnects when switching servers
- Display server name with tool name in results (ServerName:ToolName)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-08 18:45:50 +01:00

133 lines
1.9 KiB
CSS

.connecting {
padding: 1rem 0;
text-align: center;
color: #666;
}
.callToolPanel, .toolCallInfoPanel {
margin: 0 auto;
padding: 1rem;
border: 1px solid #ddd;
border-radius: 4px;
* + & {
margin-top: 1rem;
}
}
.callToolPanel {
display: flex;
flex-direction: column;
gap: 1rem;
max-width: 480px;
form {
display: flex;
flex-direction: column;
gap: 1rem;
}
label {
display: flex;
flex-direction: column;
gap: 0.25rem;
font-weight: 600;
}
select,
textarea {
padding: 0.5rem;
border: 1px solid #ccc;
border-radius: 4px;
font-family: monospace;
font-size: inherit;
}
textarea {
min-height: 6rem;
resize: vertical;
&[aria-invalid="true"] {
background-color: #fdd;
}
}
button {
align-self: center;
min-width: 200px;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 4px;
background-color: #1e3a5f;
font-size: inherit;
font-weight: 600;
color: white;
cursor: pointer;
&:hover:not(:disabled) {
background-color: #2d4a7c;
}
&:disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
}
.toolCallInfoPanel {
display: flex;
gap: 1rem;
animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
from { opacity: 0; transform: translateY(-12px); }
}
.inputInfoPanel {
display: flex;
flex: 3;
flex-direction: column;
gap: 0.5rem;
min-width: 0;
.toolName {
margin: 0;
font-family: monospace;
font-size: 1.5rem;
}
}
.outputInfoPanel {
flex: 4;
min-width: 0;
}
.jsonBlock {
flex-grow: 1;
min-height: 0;
margin: 0;
padding: 1rem;
border-radius: 4px;
background-color: #f5f5f5;
overflow: auto;
}
.appIframePanel {
min-height: 200px;
iframe {
width: 100%;
height: 600px;
box-sizing: border-box;
border: 3px dashed #888;
border-radius: 4px;
}
}
.error {
padding: 1.5rem;
background-color: #ddd;
color: #d00;
}