Добавил Cocos Code Mode
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
.panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
gap: 10px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
ui-prop-split {
|
||||
--ui-prop-margin-left: 24px;
|
||||
--ui-prop-label-width-min: 60px;
|
||||
--ui-prop-label-width-max: 289px;
|
||||
--left-width: 38.2%;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.desc-container {
|
||||
padding: 5px 10px;
|
||||
color: var(--color-text-normal);
|
||||
opacity: 0.8;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.code-container {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.list-container {
|
||||
padding: 0;
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.bridge-item-section {
|
||||
margin-bottom: 5px;
|
||||
border: 1px solid var(--color-normal-border-weak);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bridge-item-content {
|
||||
padding: 10px;
|
||||
background: var(--color-normal-fill-calmer);
|
||||
}
|
||||
|
||||
.bridge-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.actions.right {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
ui-button.blue {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ui-button.green {
|
||||
color: white;
|
||||
}
|
||||
|
||||
ui-prop {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.transparent {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.group-header {
|
||||
font-weight: bold;
|
||||
color: var(--color-text-normal);
|
||||
margin-bottom: 5px;
|
||||
margin-top: 10px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.mt-10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.add-template-container {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
ui-prop ui-button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#save-utcp-path-btn {
|
||||
max-width: 24px;
|
||||
padding: 0 4px;
|
||||
height: 24px;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
.panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #252526;
|
||||
}
|
||||
|
||||
#preview-container {
|
||||
flex: 1;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<ui-prop-split class="panel" position="38.2" indent="24px" min-limit="60px,85px">
|
||||
|
||||
<!-- Port Section -->
|
||||
<ui-section class="config" header="Server Configuration" expand>
|
||||
<ui-prop>
|
||||
<ui-label slot="label" class="label">Server Port</ui-label>
|
||||
<ui-num-input slot="content" id="port-input" value="3000" step="1"></ui-num-input>
|
||||
<ui-button slot="content" id="save-port-btn" class="blue">Update</ui-button>
|
||||
</ui-prop>
|
||||
</ui-section>
|
||||
|
||||
<!-- UTCP Config Section -->
|
||||
<ui-section class="config" header="UTCP Configuration" expand>
|
||||
<ui-prop>
|
||||
<ui-label slot="label" class="label">Config Path</ui-label>
|
||||
<ui-input slot="content" id="utcp-config-path" class="flex-1"></ui-input>
|
||||
<ui-button type="icon" slot="content" id="save-utcp-path-btn" class="green"><ui-icon
|
||||
value="check"></ui-icon></ui-button>
|
||||
</ui-prop>
|
||||
|
||||
<div class="group-header">Bridge Templates</div>
|
||||
<div id="bridge-container" class="list-container">
|
||||
<!-- Templates injected here -->
|
||||
</div>
|
||||
|
||||
<div class="group-header mt-10">Add New Template</div>
|
||||
<div class="add-template-container">
|
||||
<ui-textarea id="new-template-json" placeholder="UTCP Call Template" rows="5"></ui-textarea>
|
||||
<div class="actions right">
|
||||
<ui-button id="add-bridge-btn" class="green">
|
||||
<ui-icon value="add"></ui-icon> Add Template
|
||||
</ui-button>
|
||||
</div>
|
||||
</div>
|
||||
</ui-section>
|
||||
|
||||
<!-- MCP Integration Section -->
|
||||
<ui-section class="config" header="MCP Agent Integration" expand>
|
||||
<div class="desc-container">
|
||||
<span class="desc">Configure your AI agent by adding this server to MCP config
|
||||
config. Config example:</span>
|
||||
</div>
|
||||
<div class="code-container">
|
||||
<ui-code language="json" id="mcp-config-code"></ui-code>
|
||||
</div>
|
||||
</ui-section>
|
||||
|
||||
</ui-prop-split>
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="panel">
|
||||
<div id="preview-container"></div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user