@leeoohoo/ui-apps-devkit 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeoohoo/ui-apps-devkit",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "ChatOS UI Apps DevKit (CLI + templates + sandbox) for building installable ChatOS UI Apps plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -739,6 +739,16 @@ function htmlPage() {
739
739
  box-shadow: 0 14px 40px rgba(0,0,0,0.16);
740
740
  z-index: 12;
741
741
  }
742
+ #mcpPanel[data-mode='half'] {
743
+ right: 0;
744
+ top: 72px;
745
+ width: 50vw;
746
+ height: calc(100vh - 84px);
747
+ max-height: none;
748
+ border-right: none;
749
+ border-top-right-radius: 0;
750
+ border-bottom-right-radius: 0;
751
+ }
742
752
  #mcpPanelHeader {
743
753
  padding: 10px 12px;
744
754
  display:flex;
@@ -795,6 +805,7 @@ function htmlPage() {
795
805
  <div id="sandboxContext" class="muted"></div>
796
806
  <button id="btnLlmConfig" class="btn" type="button">AI Config</button>
797
807
  <button id="btnMcpTest" class="btn" type="button">MCP Test</button>
808
+ <button id="btnMcpHalf" class="btn" type="button">Half Test</button>
798
809
  <button id="btnInspectorToggle" class="btn" type="button">Inspect</button>
799
810
  <button id="btnReload" class="btn" type="button">Reload</button>
800
811
  </div>
@@ -950,6 +961,7 @@ const llmModelId = $('#llmModelId');
950
961
  const llmStatus = $('#llmStatus');
951
962
  const llmKeyStatus = $('#llmKeyStatus');
952
963
  const btnMcpTest = $('#btnMcpTest');
964
+ const btnMcpHalf = $('#btnMcpHalf');
953
965
  const mcpPanel = $('#mcpPanel');
954
966
  const btnMcpClose = $('#btnMcpClose');
955
967
  const btnMcpClear = $('#btnMcpClear');
@@ -1128,8 +1140,13 @@ const refreshMcpConfigHint = async () => {
1128
1140
  }
1129
1141
  };
1130
1142
 
1131
- const setMcpPanelOpen = (open) => {
1143
+ const setMcpPanelOpen = (open, mode) => {
1132
1144
  if (!mcpPanel) return;
1145
+ if (mode) {
1146
+ mcpPanel.dataset.mode = mode;
1147
+ } else {
1148
+ delete mcpPanel.dataset.mode;
1149
+ }
1133
1150
  mcpPanel.style.display = open ? 'flex' : 'none';
1134
1151
  mcpPanel.setAttribute('aria-hidden', open ? 'false' : 'true');
1135
1152
  if (open) {
@@ -1138,6 +1155,16 @@ const setMcpPanelOpen = (open) => {
1138
1155
  }
1139
1156
  };
1140
1157
 
1158
+ const toggleMcpPanel = (mode) => {
1159
+ if (!mcpPanel) return;
1160
+ const currentMode = mcpPanel.dataset.mode || 'panel';
1161
+ if (isMcpPanelOpen() && currentMode === mode) {
1162
+ setMcpPanelOpen(false);
1163
+ return;
1164
+ }
1165
+ setMcpPanelOpen(true, mode);
1166
+ };
1167
+
1141
1168
  const runMcpTest = async () => {
1142
1169
  const sendBtn = btnMcpSend;
1143
1170
  try {
@@ -1278,7 +1305,8 @@ if (btnLlmClose) btnLlmClose.addEventListener('click', () => setLlmPanelOpen(fal
1278
1305
  if (btnLlmRefresh) btnLlmRefresh.addEventListener('click', () => refreshLlmConfig());
1279
1306
  if (btnLlmSave) btnLlmSave.addEventListener('click', () => saveLlmConfig());
1280
1307
  if (btnLlmClear) btnLlmClear.addEventListener('click', () => saveLlmConfig({ clearKey: true }));
1281
- if (btnMcpTest) btnMcpTest.addEventListener('click', () => setMcpPanelOpen(!isMcpPanelOpen()));
1308
+ if (btnMcpTest) btnMcpTest.addEventListener('click', () => toggleMcpPanel('panel'));
1309
+ if (btnMcpHalf) btnMcpHalf.addEventListener('click', () => toggleMcpPanel('half'));
1282
1310
  if (btnMcpClose) btnMcpClose.addEventListener('click', () => setMcpPanelOpen(false));
1283
1311
  if (btnMcpClear)
1284
1312
  btnMcpClear.addEventListener('click', () => {