|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + <meta name="color-scheme" content="light dark"> |
| 7 | + <title>Debug App</title> |
| 8 | +</head> |
| 9 | +<body> |
| 10 | + <main class="main"> |
| 11 | + <!-- Section 1: Event Log --> |
| 12 | + <section class="section"> |
| 13 | + <h2 class="section-header"> |
| 14 | + <span>Event Log</span> |
| 15 | + <div class="header-actions"> |
| 16 | + <select id="log-filter"> |
| 17 | + <option value="all">All Events</option> |
| 18 | + <option value="ontoolinput">ontoolinput</option> |
| 19 | + <option value="ontoolinputpartial">ontoolinputpartial</option> |
| 20 | + <option value="ontoolresult">ontoolresult</option> |
| 21 | + <option value="ontoolcancelled">ontoolcancelled</option> |
| 22 | + <option value="onhostcontextchanged">onhostcontextchanged</option> |
| 23 | + <option value="onteardown">onteardown</option> |
| 24 | + <option value="oncalltool">oncalltool</option> |
| 25 | + <option value="onlisttools">onlisttools</option> |
| 26 | + <option value="onerror">onerror</option> |
| 27 | + <option value="connected">connected</option> |
| 28 | + </select> |
| 29 | + <button id="clear-log-btn" class="btn-small">Clear</button> |
| 30 | + </div> |
| 31 | + </h2> |
| 32 | + <div id="event-log" class="event-log"></div> |
| 33 | + </section> |
| 34 | + |
| 35 | + <!-- Section 2: Host Info --> |
| 36 | + <section class="section collapsible"> |
| 37 | + <h2 class="section-header" data-toggle="host-info-content"> |
| 38 | + <span>Host Info</span> |
| 39 | + <span class="toggle-icon">▼</span> |
| 40 | + </h2> |
| 41 | + <div id="host-info-content" class="section-content"> |
| 42 | + <div class="info-grid"> |
| 43 | + <div class="info-group"> |
| 44 | + <h3>Context</h3> |
| 45 | + <dl id="host-context-info"></dl> |
| 46 | + </div> |
| 47 | + <div class="info-group"> |
| 48 | + <h3>Capabilities</h3> |
| 49 | + <dl id="host-capabilities-info"></dl> |
| 50 | + </div> |
| 51 | + <div class="info-group"> |
| 52 | + <h3>Container</h3> |
| 53 | + <dl id="host-container-info"></dl> |
| 54 | + </div> |
| 55 | + <div class="info-group"> |
| 56 | + <h3>Styles Sample</h3> |
| 57 | + <div id="host-styles-sample" class="styles-sample"></div> |
| 58 | + </div> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </section> |
| 62 | + |
| 63 | + <!-- Section 3: Callback Status --> |
| 64 | + <section class="section collapsible"> |
| 65 | + <h2 class="section-header" data-toggle="callback-status-content"> |
| 66 | + <span>Callback Status</span> |
| 67 | + <span class="toggle-icon">▼</span> |
| 68 | + </h2> |
| 69 | + <div id="callback-status-content" class="section-content"> |
| 70 | + <table class="callback-table"> |
| 71 | + <thead> |
| 72 | + <tr> |
| 73 | + <th>Callback</th> |
| 74 | + <th>Registered</th> |
| 75 | + <th>Count</th> |
| 76 | + <th>Last Payload</th> |
| 77 | + </tr> |
| 78 | + </thead> |
| 79 | + <tbody id="callback-table-body"></tbody> |
| 80 | + </table> |
| 81 | + </div> |
| 82 | + </section> |
| 83 | + |
| 84 | + <!-- Section 4: Action Buttons --> |
| 85 | + <section class="section collapsible"> |
| 86 | + <h2 class="section-header" data-toggle="actions-content"> |
| 87 | + <span>Actions</span> |
| 88 | + <span class="toggle-icon">▼</span> |
| 89 | + </h2> |
| 90 | + <div id="actions-content" class="section-content"> |
| 91 | + <!-- Messages --> |
| 92 | + <div class="action-group"> |
| 93 | + <h3>Messages</h3> |
| 94 | + <div class="action-row"> |
| 95 | + <input type="text" id="message-text" value="Hello from debug app!" placeholder="Message text"> |
| 96 | + <button id="send-message-text-btn">Send Text</button> |
| 97 | + </div> |
| 98 | + <div class="action-row"> |
| 99 | + <button id="send-message-image-btn">Send Test Image</button> |
| 100 | + </div> |
| 101 | + </div> |
| 102 | + |
| 103 | + <!-- Logging --> |
| 104 | + <div class="action-group"> |
| 105 | + <h3>Logging</h3> |
| 106 | + <div class="action-row"> |
| 107 | + <input type="text" id="log-data" value="Debug log data" placeholder="Log data"> |
| 108 | + </div> |
| 109 | + <div class="action-row btn-row"> |
| 110 | + <button id="log-debug-btn" class="btn-small">debug</button> |
| 111 | + <button id="log-info-btn" class="btn-small">info</button> |
| 112 | + <button id="log-warning-btn" class="btn-small">warning</button> |
| 113 | + <button id="log-error-btn" class="btn-small">error</button> |
| 114 | + </div> |
| 115 | + </div> |
| 116 | + |
| 117 | + <!-- Model Context --> |
| 118 | + <div class="action-group"> |
| 119 | + <h3>Model Context</h3> |
| 120 | + <div class="action-row"> |
| 121 | + <input type="text" id="context-text" value="Current app state info" placeholder="Context text"> |
| 122 | + <button id="update-context-text-btn">Update (Text)</button> |
| 123 | + </div> |
| 124 | + <div class="action-row"> |
| 125 | + <button id="update-context-structured-btn">Update (Structured)</button> |
| 126 | + <button id="update-context-image-btn">Update (Image)</button> |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + |
| 130 | + <!-- Display Mode --> |
| 131 | + <div class="action-group"> |
| 132 | + <h3>Display Mode</h3> |
| 133 | + <div class="action-row btn-row"> |
| 134 | + <button id="display-inline-btn" class="btn-small">Inline</button> |
| 135 | + <button id="display-fullscreen-btn" class="btn-small">Fullscreen</button> |
| 136 | + <button id="display-pip-btn" class="btn-small">PiP</button> |
| 137 | + </div> |
| 138 | + </div> |
| 139 | + |
| 140 | + <!-- Links --> |
| 141 | + <div class="action-group"> |
| 142 | + <h3>Links</h3> |
| 143 | + <div class="action-row"> |
| 144 | + <input type="url" id="link-url" value="https://modelcontextprotocol.io/" placeholder="URL"> |
| 145 | + <button id="open-link-btn">Open Link</button> |
| 146 | + </div> |
| 147 | + </div> |
| 148 | + |
| 149 | + <!-- Size Controls --> |
| 150 | + <div class="action-group"> |
| 151 | + <h3>Size</h3> |
| 152 | + <div class="action-row"> |
| 153 | + <label><input type="checkbox" id="auto-resize-toggle" checked> Auto-resize</label> |
| 154 | + </div> |
| 155 | + <div class="action-row btn-row"> |
| 156 | + <button id="resize-200x100-btn" class="btn-small">200x100</button> |
| 157 | + <button id="resize-400x300-btn" class="btn-small">400x300</button> |
| 158 | + <button id="resize-800x600-btn" class="btn-small">800x600</button> |
| 159 | + </div> |
| 160 | + <div class="action-row"> |
| 161 | + <span>Current: <code id="current-size">measuring...</code></span> |
| 162 | + </div> |
| 163 | + </div> |
| 164 | + |
| 165 | + <!-- Server Tools --> |
| 166 | + <div class="action-group"> |
| 167 | + <h3>Server Tools</h3> |
| 168 | + <div class="tool-config"> |
| 169 | + <div class="config-row"> |
| 170 | + <label>Content Type:</label> |
| 171 | + <select id="tool-content-type"> |
| 172 | + <option value="text">text</option> |
| 173 | + <option value="image">image</option> |
| 174 | + <option value="audio">audio</option> |
| 175 | + <option value="resource">resource</option> |
| 176 | + <option value="resourceLink">resourceLink</option> |
| 177 | + <option value="mixed">mixed</option> |
| 178 | + </select> |
| 179 | + </div> |
| 180 | + <div class="config-row"> |
| 181 | + <label><input type="checkbox" id="tool-multiple-blocks"> Multiple blocks</label> |
| 182 | + </div> |
| 183 | + <div class="config-row"> |
| 184 | + <label><input type="checkbox" id="tool-structured-content" checked> Include structuredContent</label> |
| 185 | + </div> |
| 186 | + <div class="config-row"> |
| 187 | + <label><input type="checkbox" id="tool-include-meta"> Include _meta</label> |
| 188 | + </div> |
| 189 | + <div class="config-row"> |
| 190 | + <label><input type="checkbox" id="tool-simulate-error"> Simulate error</label> |
| 191 | + </div> |
| 192 | + <div class="config-row"> |
| 193 | + <label>Delay (ms):</label> |
| 194 | + <input type="number" id="tool-delay-ms" value="0" min="0" max="10000" step="100"> |
| 195 | + </div> |
| 196 | + </div> |
| 197 | + <div class="action-row"> |
| 198 | + <button id="call-debug-tool-btn">Call debug-tool</button> |
| 199 | + </div> |
| 200 | + <div class="action-row"> |
| 201 | + <button id="call-debug-refresh-btn">Call debug-refresh</button> |
| 202 | + </div> |
| 203 | + </div> |
| 204 | + |
| 205 | + </div> |
| 206 | + </section> |
| 207 | + </main> |
| 208 | + <script type="module" src="/src/mcp-app.ts"></script> |
| 209 | +</body> |
| 210 | +</html> |
0 commit comments