fa-mcp-sdk 0.12.4 → 0.12.8
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/cli-template/package.json +1 -1
- package/config/_local.yaml +1 -0
- package/dist/core/_types_/types.d.ts +2 -2
- package/dist/core/_types_/types.d.ts.map +1 -1
- package/dist/core/web/static/agent-tester/index.html +72 -83
- package/dist/core/web/static/agent-tester/script.js +0 -36
- package/dist/core/web/static/agent-tester/styles.css +54 -68
- package/package.json +1 -1
- package/src/template/prompts/custom-prompts.ts +1 -1
package/config/_local.yaml
CHANGED
|
@@ -59,8 +59,8 @@ export interface IIcon {
|
|
|
59
59
|
src: string;
|
|
60
60
|
/** Optional MIME type of the icon (e.g. `image/png`, `image/svg+xml`). */
|
|
61
61
|
mimeType?: string;
|
|
62
|
-
/** Optional size
|
|
63
|
-
sizes?: string;
|
|
62
|
+
/** Optional size hints as HTML `sizes` strings (e.g. `['48x48', '96x96']`, `['any']`). */
|
|
63
|
+
sizes?: string[];
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Standard §10.5 — descriptor for a single prompt argument. The host advertises these
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/_types_/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,u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AG,SAAS,CAAC;IAChC,oBAAoB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzD,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;IACJ;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,8BAA8B,CAAC,CAAC,GAAG,GAAG;IACrD,iBAAiB,EAAE,CAAC,CAAC;IACrB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,GAAG,IAAI,wBAAwB,GAAG,8BAA8B,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -64,6 +64,64 @@
|
|
|
64
64
|
</div>
|
|
65
65
|
|
|
66
66
|
<div class="app" data-testid="at-app">
|
|
67
|
+
<!-- Sidebar (pinned settings) -->
|
|
68
|
+
<aside class="sidebar" id="sidebar" data-testid="at-sidebar">
|
|
69
|
+
<div class="sidebar-content">
|
|
70
|
+
<!-- Dynamic Headers -->
|
|
71
|
+
<section id="headersSection" class="config-section" style="display: none;" data-testid="at-headers-section">
|
|
72
|
+
<h3>HTTP Headers</h3>
|
|
73
|
+
<div id="dynamicHeaders" class="dynamic-headers" data-testid="at-dynamic-headers"></div>
|
|
74
|
+
</section>
|
|
75
|
+
|
|
76
|
+
<section class="config-section" data-testid="at-model-section">
|
|
77
|
+
<div class="form-group model-display-group">
|
|
78
|
+
<label>Model</label>
|
|
79
|
+
<div class="model-display-row">
|
|
80
|
+
<span id="modelDisplay" class="model-display" data-testid="at-model-display">—</span>
|
|
81
|
+
<button type="button" id="llmSettingsBtn" class="btn-icon" title="LLM Settings" data-testid="at-llm-settings-btn">
|
|
82
|
+
<span class="material-icons-round">settings</span>
|
|
83
|
+
</button>
|
|
84
|
+
</div>
|
|
85
|
+
<div id="apiKeyWarning" class="api-key-warning" style="display: none;" data-testid="at-api-key-warning">API Key is not set</div>
|
|
86
|
+
</div>
|
|
87
|
+
</section>
|
|
88
|
+
|
|
89
|
+
<!-- Agent (System) Prompt -->
|
|
90
|
+
<section class="config-section">
|
|
91
|
+
<div class="form-group">
|
|
92
|
+
<div class="prompt-label-row">
|
|
93
|
+
<label for="systemPrompt">Agent Prompt<span class="prompt-modified-badge" id="promptModifiedBadge" style="display:none">(modified)</span></label>
|
|
94
|
+
<div class="prompt-actions">
|
|
95
|
+
<button type="button" class="btn-view-original" id="btnViewOriginalPrompt" title="View original agent prompt" data-testid="at-system-prompt-view-original" style="display:none">
|
|
96
|
+
<span class="material-icons-round">visibility</span>
|
|
97
|
+
</button>
|
|
98
|
+
<button type="button" class="btn-reset-prompt" id="btnResetAgentPrompt" title="Reset to original agent prompt" data-testid="at-system-prompt-reset" style="display:none">
|
|
99
|
+
<span class="material-icons-round">restart_alt</span>
|
|
100
|
+
</button>
|
|
101
|
+
<button type="button" class="btn-enlarge" data-target="systemPrompt" title="Enlarge" data-testid="at-system-prompt-enlarge">
|
|
102
|
+
<span class="material-icons-round">open_in_full</span>
|
|
103
|
+
</button>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<textarea id="systemPrompt" placeholder="Enter system prompt..." rows="6" data-testid="at-system-prompt">You are a helpful AI assistant that can use MCP tools to help users. Be concise and accurate in your responses.</textarea>
|
|
107
|
+
</div>
|
|
108
|
+
</section>
|
|
109
|
+
|
|
110
|
+
<!-- Custom Prompt -->
|
|
111
|
+
<section class="config-section">
|
|
112
|
+
<div class="form-group">
|
|
113
|
+
<div class="prompt-label-row">
|
|
114
|
+
<label for="customPrompt">Custom Prompt</label>
|
|
115
|
+
<button type="button" class="btn-enlarge" data-target="customPrompt" title="Enlarge" data-testid="at-custom-prompt-enlarge">
|
|
116
|
+
<span class="material-icons-round">open_in_full</span>
|
|
117
|
+
</button>
|
|
118
|
+
</div>
|
|
119
|
+
<textarea id="customPrompt" placeholder="Enter additional custom prompt..." rows="2" data-testid="at-custom-prompt"></textarea>
|
|
120
|
+
</div>
|
|
121
|
+
</section>
|
|
122
|
+
</div>
|
|
123
|
+
</aside>
|
|
124
|
+
|
|
67
125
|
<!-- Main Chat Area -->
|
|
68
126
|
<main class="main-content" data-testid="at-main">
|
|
69
127
|
<header class="chat-header" data-testid="at-chat-header">
|
|
@@ -75,6 +133,15 @@
|
|
|
75
133
|
</button>
|
|
76
134
|
</div>
|
|
77
135
|
|
|
136
|
+
<!-- MCP Apps mode toggle — placed before the mode (tab) switcher -->
|
|
137
|
+
<label id="appModeToggleLabel" class="app-mode-toggle" title="MCP Apps mode: advertises UI capability and renders widgets" data-testid="at-app-mode-toggle-label">
|
|
138
|
+
<input type="checkbox" id="appModeToggle" data-testid="at-app-mode-toggle">
|
|
139
|
+
<span class="app-mode-toggle-text">
|
|
140
|
+
<span class="material-icons-round app-mode-icon">grid_view</span>
|
|
141
|
+
<span class="app-mode-label">Apps</span>
|
|
142
|
+
</span>
|
|
143
|
+
</label>
|
|
144
|
+
|
|
78
145
|
<!-- Tabs moved into header -->
|
|
79
146
|
<div class="tabs-bar header-tabs" data-testid="at-tabs-bar">
|
|
80
147
|
<button type="button" class="tab-btn active" data-tab="chat" data-testid="at-tab-chat">
|
|
@@ -119,23 +186,9 @@
|
|
|
119
186
|
</form>
|
|
120
187
|
|
|
121
188
|
<div class="chat-actions">
|
|
122
|
-
<label id="appModeToggleLabel" class="app-mode-toggle" title="MCP Apps mode: advertises UI capability and renders widgets" data-testid="at-app-mode-toggle-label">
|
|
123
|
-
<input type="checkbox" id="appModeToggle" data-testid="at-app-mode-toggle">
|
|
124
|
-
<span class="app-mode-toggle-text">
|
|
125
|
-
<span class="material-icons-round app-mode-icon">grid_view</span>
|
|
126
|
-
<span class="app-mode-label">Apps</span>
|
|
127
|
-
</span>
|
|
128
|
-
</label>
|
|
129
|
-
<select id="defaultDisplayFormat" class="header-format-select chat-only" title="Default display format" data-testid="at-default-format">
|
|
130
|
-
<option value="HTML">HTML</option>
|
|
131
|
-
<option value="MD">MD</option>
|
|
132
|
-
</select>
|
|
133
189
|
<button id="clearChat" class="btn-icon chat-only" title="Clear Chat" data-testid="at-clear-chat">
|
|
134
190
|
<span class="material-icons-round">delete_outline</span>
|
|
135
191
|
</button>
|
|
136
|
-
<button id="settingsBtn" class="btn-icon" title="Settings" data-testid="at-settings-btn">
|
|
137
|
-
<span class="material-icons-round">settings</span>
|
|
138
|
-
</button>
|
|
139
192
|
<button id="themeToggle" class="btn-icon" title="Toggle theme" data-testid="at-theme-toggle">
|
|
140
193
|
<span class="material-icons-round">dark_mode</span>
|
|
141
194
|
</button>
|
|
@@ -149,6 +202,11 @@
|
|
|
149
202
|
<div class="tab-pane active" id="tabPaneChat" data-testid="at-tab-pane-chat">
|
|
150
203
|
<!-- Chat Messages -->
|
|
151
204
|
<div class="chat-container">
|
|
205
|
+
<!-- Floating HTML/MD display format toggle — applies to chat only -->
|
|
206
|
+
<select id="defaultDisplayFormat" class="chat-format-float" title="Default display format" data-testid="at-default-format">
|
|
207
|
+
<option value="HTML">HTML</option>
|
|
208
|
+
<option value="MD">MD</option>
|
|
209
|
+
</select>
|
|
152
210
|
<div id="chatMessages" class="chat-messages" data-testid="at-chat-messages">
|
|
153
211
|
<div class="message assistant welcome" data-testid="at-welcome-message">
|
|
154
212
|
<div class="message-avatar">
|
|
@@ -308,75 +366,6 @@
|
|
|
308
366
|
</main>
|
|
309
367
|
</div>
|
|
310
368
|
|
|
311
|
-
<!-- Settings Modal (former sidebar contents) -->
|
|
312
|
-
<div class="settings-modal-overlay" id="settingsModal" style="display: none;" data-testid="at-settings-modal">
|
|
313
|
-
<div class="settings-modal">
|
|
314
|
-
<div class="settings-modal-header">
|
|
315
|
-
<h3>Settings</h3>
|
|
316
|
-
<button type="button" class="btn-icon" id="settingsModalClose" title="Close" data-testid="at-settings-modal-close">
|
|
317
|
-
<span class="material-icons-round">close</span>
|
|
318
|
-
</button>
|
|
319
|
-
</div>
|
|
320
|
-
<div class="settings-modal-body">
|
|
321
|
-
<!-- Dynamic Headers -->
|
|
322
|
-
<section id="headersSection" class="config-section" style="display: none;" data-testid="at-headers-section">
|
|
323
|
-
<h3>HTTP Headers</h3>
|
|
324
|
-
<div id="dynamicHeaders" class="dynamic-headers" data-testid="at-dynamic-headers"></div>
|
|
325
|
-
</section>
|
|
326
|
-
|
|
327
|
-
<section class="config-section" data-testid="at-model-section">
|
|
328
|
-
<div class="form-group model-display-group">
|
|
329
|
-
<label>Model</label>
|
|
330
|
-
<div class="model-display-row">
|
|
331
|
-
<span id="modelDisplay" class="model-display" data-testid="at-model-display">—</span>
|
|
332
|
-
<button type="button" id="llmSettingsBtn" class="btn-icon" title="LLM Settings" data-testid="at-llm-settings-btn">
|
|
333
|
-
<span class="material-icons-round">settings</span>
|
|
334
|
-
</button>
|
|
335
|
-
</div>
|
|
336
|
-
<div id="apiKeyWarning" class="api-key-warning" style="display: none;" data-testid="at-api-key-warning">API Key is not set</div>
|
|
337
|
-
</div>
|
|
338
|
-
</section>
|
|
339
|
-
|
|
340
|
-
<!-- Agent (System) Prompt -->
|
|
341
|
-
<section class="config-section">
|
|
342
|
-
<div class="form-group">
|
|
343
|
-
<div class="prompt-label-row">
|
|
344
|
-
<label for="systemPrompt">Agent Prompt<span class="prompt-modified-badge" id="promptModifiedBadge" style="display:none">(modified)</span></label>
|
|
345
|
-
<div class="prompt-actions">
|
|
346
|
-
<button type="button" class="btn-view-original" id="btnViewOriginalPrompt" title="View original agent prompt" data-testid="at-system-prompt-view-original" style="display:none">
|
|
347
|
-
<span class="material-icons-round">visibility</span>
|
|
348
|
-
</button>
|
|
349
|
-
<button type="button" class="btn-reset-prompt" id="btnResetAgentPrompt" title="Reset to original agent prompt" data-testid="at-system-prompt-reset" style="display:none">
|
|
350
|
-
<span class="material-icons-round">restart_alt</span>
|
|
351
|
-
</button>
|
|
352
|
-
<button type="button" class="btn-enlarge" data-target="systemPrompt" title="Enlarge" data-testid="at-system-prompt-enlarge">
|
|
353
|
-
<span class="material-icons-round">open_in_full</span>
|
|
354
|
-
</button>
|
|
355
|
-
</div>
|
|
356
|
-
</div>
|
|
357
|
-
<textarea id="systemPrompt" placeholder="Enter system prompt..." rows="6" data-testid="at-system-prompt">You are a helpful AI assistant that can use MCP tools to help users. Be concise and accurate in your responses.</textarea>
|
|
358
|
-
</div>
|
|
359
|
-
</section>
|
|
360
|
-
|
|
361
|
-
<!-- Custom Prompt -->
|
|
362
|
-
<section class="config-section">
|
|
363
|
-
<div class="form-group">
|
|
364
|
-
<div class="prompt-label-row">
|
|
365
|
-
<label for="customPrompt">Custom Prompt</label>
|
|
366
|
-
<button type="button" class="btn-enlarge" data-target="customPrompt" title="Enlarge" data-testid="at-custom-prompt-enlarge">
|
|
367
|
-
<span class="material-icons-round">open_in_full</span>
|
|
368
|
-
</button>
|
|
369
|
-
</div>
|
|
370
|
-
<textarea id="customPrompt" placeholder="Enter additional custom prompt..." rows="2" data-testid="at-custom-prompt"></textarea>
|
|
371
|
-
</div>
|
|
372
|
-
</section>
|
|
373
|
-
</div>
|
|
374
|
-
<div class="settings-modal-footer">
|
|
375
|
-
<button type="button" class="btn btn-primary" id="settingsModalOk" data-testid="at-settings-modal-ok">OK</button>
|
|
376
|
-
</div>
|
|
377
|
-
</div>
|
|
378
|
-
</div>
|
|
379
|
-
|
|
380
369
|
<!-- Prompt Enlarge Modal -->
|
|
381
370
|
<div class="prompt-modal-overlay" id="promptModal" style="display: none;" data-testid="at-prompt-modal">
|
|
382
371
|
<div class="prompt-modal">
|
|
@@ -1314,12 +1314,6 @@ class McpAgentTester {
|
|
|
1314
1314
|
this.headersSection = document.getElementById('headersSection');
|
|
1315
1315
|
this.dynamicHeaders = document.getElementById('dynamicHeaders');
|
|
1316
1316
|
|
|
1317
|
-
// Settings modal (former sidebar)
|
|
1318
|
-
this.settingsModal = document.getElementById('settingsModal');
|
|
1319
|
-
this.settingsBtn = document.getElementById('settingsBtn');
|
|
1320
|
-
this.settingsModalClose = document.getElementById('settingsModalClose');
|
|
1321
|
-
this.settingsModalOk = document.getElementById('settingsModalOk');
|
|
1322
|
-
|
|
1323
1317
|
// LLM settings — collapsed view + modal
|
|
1324
1318
|
this.modelDisplay = document.getElementById('modelDisplay');
|
|
1325
1319
|
this.llmSettingsBtn = document.getElementById('llmSettingsBtn');
|
|
@@ -1472,22 +1466,6 @@ class McpAgentTester {
|
|
|
1472
1466
|
sdkVersionBtn.addEventListener('click', (e) => this.toggleSdkVersionTooltip(e));
|
|
1473
1467
|
}
|
|
1474
1468
|
|
|
1475
|
-
// --- Settings modal (former sidebar) ---
|
|
1476
|
-
if (this.settingsBtn) {
|
|
1477
|
-
this.settingsBtn.addEventListener('click', () => this.openSettingsModal());
|
|
1478
|
-
}
|
|
1479
|
-
if (this.settingsModalClose) {
|
|
1480
|
-
this.settingsModalClose.addEventListener('click', () => this.closeSettingsModal());
|
|
1481
|
-
}
|
|
1482
|
-
if (this.settingsModalOk) {
|
|
1483
|
-
this.settingsModalOk.addEventListener('click', () => this.closeSettingsModal());
|
|
1484
|
-
}
|
|
1485
|
-
document.addEventListener('keydown', (e) => {
|
|
1486
|
-
if (e.key === 'Escape' && this.settingsModal && this.settingsModal.style.display === 'flex') {
|
|
1487
|
-
this.closeSettingsModal();
|
|
1488
|
-
}
|
|
1489
|
-
});
|
|
1490
|
-
|
|
1491
1469
|
// --- Tool Tester tab events ---
|
|
1492
1470
|
if (this.tabsBar) {
|
|
1493
1471
|
this.tabsBar.querySelectorAll('.tab-btn').forEach((btn) => {
|
|
@@ -1608,20 +1586,6 @@ class McpAgentTester {
|
|
|
1608
1586
|
});
|
|
1609
1587
|
}
|
|
1610
1588
|
|
|
1611
|
-
openSettingsModal() {
|
|
1612
|
-
if (!this.settingsModal) {
|
|
1613
|
-
return;
|
|
1614
|
-
}
|
|
1615
|
-
this.settingsModal.style.display = 'flex';
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
closeSettingsModal() {
|
|
1619
|
-
if (!this.settingsModal) {
|
|
1620
|
-
return;
|
|
1621
|
-
}
|
|
1622
|
-
this.settingsModal.style.display = 'none';
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
1589
|
async loadInitialData() {
|
|
1626
1590
|
try {
|
|
1627
1591
|
this.loadFormValuesFromStorage();
|
|
@@ -138,6 +138,27 @@ body {
|
|
|
138
138
|
height: 100vh;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
/* --- Sidebar (pinned settings) --- */
|
|
142
|
+
.sidebar {
|
|
143
|
+
width: 384px;
|
|
144
|
+
flex-shrink: 0;
|
|
145
|
+
background: var(--bg-sidebar);
|
|
146
|
+
border-right: 1px solid var(--border);
|
|
147
|
+
display: flex;
|
|
148
|
+
flex-direction: column;
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.sidebar-content {
|
|
153
|
+
flex: 1;
|
|
154
|
+
padding: 16px;
|
|
155
|
+
overflow-y: auto;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.sidebar-content .config-section:last-child {
|
|
159
|
+
margin-bottom: 0;
|
|
160
|
+
}
|
|
161
|
+
|
|
141
162
|
/* --- Section Labels --- */
|
|
142
163
|
.section-label {
|
|
143
164
|
font-size: 0.68rem;
|
|
@@ -866,7 +887,12 @@ body {
|
|
|
866
887
|
display: none !important;
|
|
867
888
|
}
|
|
868
889
|
|
|
869
|
-
|
|
890
|
+
/* Floating HTML/MD display format toggle, pinned to the chat window's top-right */
|
|
891
|
+
.chat-format-float {
|
|
892
|
+
position: absolute;
|
|
893
|
+
top: 8px;
|
|
894
|
+
left: 8px;
|
|
895
|
+
z-index: 5;
|
|
870
896
|
font-size: 12px;
|
|
871
897
|
padding: 4px 6px;
|
|
872
898
|
border: 1px solid var(--border);
|
|
@@ -874,6 +900,13 @@ body {
|
|
|
874
900
|
background: var(--bg-surface);
|
|
875
901
|
color: var(--text-primary);
|
|
876
902
|
cursor: pointer;
|
|
903
|
+
opacity: 0.85;
|
|
904
|
+
box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.15));
|
|
905
|
+
transition: opacity 0.15s;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
.chat-format-float:hover {
|
|
909
|
+
opacity: 1;
|
|
877
910
|
}
|
|
878
911
|
|
|
879
912
|
/* MCP Apps toggle — global, visible on every tab */
|
|
@@ -1269,12 +1302,14 @@ body {
|
|
|
1269
1302
|
overflow: auto;
|
|
1270
1303
|
}
|
|
1271
1304
|
|
|
1272
|
-
/* Inspector tab visibility tied to MCP Apps mode
|
|
1273
|
-
|
|
1305
|
+
/* Inspector tab visibility tied to MCP Apps mode.
|
|
1306
|
+
Specificity must beat the base `.tab-btn { display: inline-flex }` rule, so the
|
|
1307
|
+
hide selector is scoped under `.tabs-bar`. */
|
|
1308
|
+
.tabs-bar .app-only-tab {
|
|
1274
1309
|
display: none;
|
|
1275
1310
|
}
|
|
1276
1311
|
|
|
1277
|
-
.app.apps-mode-on .app-only-tab {
|
|
1312
|
+
.app.apps-mode-on .tabs-bar .app-only-tab {
|
|
1278
1313
|
display: inline-flex;
|
|
1279
1314
|
}
|
|
1280
1315
|
|
|
@@ -1752,26 +1787,26 @@ body {
|
|
|
1752
1787
|
|
|
1753
1788
|
/* --- Scrollbar --- */
|
|
1754
1789
|
.chat-messages::-webkit-scrollbar,
|
|
1755
|
-
.
|
|
1790
|
+
.sidebar-content::-webkit-scrollbar,
|
|
1756
1791
|
.dropdown-list::-webkit-scrollbar {
|
|
1757
1792
|
width: 6px;
|
|
1758
1793
|
}
|
|
1759
1794
|
|
|
1760
1795
|
.chat-messages::-webkit-scrollbar-track,
|
|
1761
|
-
.
|
|
1796
|
+
.sidebar-content::-webkit-scrollbar-track,
|
|
1762
1797
|
.dropdown-list::-webkit-scrollbar-track {
|
|
1763
1798
|
background: transparent;
|
|
1764
1799
|
}
|
|
1765
1800
|
|
|
1766
1801
|
.chat-messages::-webkit-scrollbar-thumb,
|
|
1767
|
-
.
|
|
1802
|
+
.sidebar-content::-webkit-scrollbar-thumb,
|
|
1768
1803
|
.dropdown-list::-webkit-scrollbar-thumb {
|
|
1769
1804
|
background: var(--scrollbar-thumb);
|
|
1770
1805
|
border-radius: 3px;
|
|
1771
1806
|
}
|
|
1772
1807
|
|
|
1773
1808
|
.chat-messages::-webkit-scrollbar-thumb:hover,
|
|
1774
|
-
.
|
|
1809
|
+
.sidebar-content::-webkit-scrollbar-thumb:hover,
|
|
1775
1810
|
.dropdown-list::-webkit-scrollbar-thumb:hover {
|
|
1776
1811
|
background: var(--scrollbar-hover);
|
|
1777
1812
|
}
|
|
@@ -1822,6 +1857,17 @@ body {
|
|
|
1822
1857
|
display: flex !important;
|
|
1823
1858
|
}
|
|
1824
1859
|
|
|
1860
|
+
.app {
|
|
1861
|
+
flex-direction: column;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
.sidebar {
|
|
1865
|
+
width: 100%;
|
|
1866
|
+
max-height: 40vh;
|
|
1867
|
+
border-right: none;
|
|
1868
|
+
border-bottom: 1px solid var(--border);
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1825
1871
|
.chat-title h1 {
|
|
1826
1872
|
font-size: 1rem;
|
|
1827
1873
|
}
|
|
@@ -2087,66 +2133,6 @@ textarea.prompt-modified {
|
|
|
2087
2133
|
color: #f28b82;
|
|
2088
2134
|
}
|
|
2089
2135
|
|
|
2090
|
-
/* ============================================
|
|
2091
|
-
Settings Modal (former sidebar)
|
|
2092
|
-
============================================ */
|
|
2093
|
-
|
|
2094
|
-
.settings-modal-overlay {
|
|
2095
|
-
position: fixed;
|
|
2096
|
-
inset: 0;
|
|
2097
|
-
background: rgba(0, 0, 0, 0.5);
|
|
2098
|
-
backdrop-filter: blur(4px);
|
|
2099
|
-
z-index: 900;
|
|
2100
|
-
display: flex;
|
|
2101
|
-
align-items: center;
|
|
2102
|
-
justify-content: center;
|
|
2103
|
-
padding: 24px;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
.settings-modal {
|
|
2107
|
-
background: var(--bg-sidebar);
|
|
2108
|
-
border: 1px solid var(--border);
|
|
2109
|
-
border-radius: var(--radius-lg);
|
|
2110
|
-
width: 100%;
|
|
2111
|
-
max-width: 560px;
|
|
2112
|
-
max-height: 90vh;
|
|
2113
|
-
display: flex;
|
|
2114
|
-
flex-direction: column;
|
|
2115
|
-
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
2116
|
-
}
|
|
2117
|
-
|
|
2118
|
-
.settings-modal-header {
|
|
2119
|
-
display: flex;
|
|
2120
|
-
align-items: center;
|
|
2121
|
-
justify-content: space-between;
|
|
2122
|
-
padding: 14px 20px;
|
|
2123
|
-
border-bottom: 1px solid var(--border);
|
|
2124
|
-
}
|
|
2125
|
-
|
|
2126
|
-
.settings-modal-header h3 {
|
|
2127
|
-
font-size: 0.95rem;
|
|
2128
|
-
font-weight: 600;
|
|
2129
|
-
color: var(--text);
|
|
2130
|
-
margin: 0;
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2133
|
-
.settings-modal-body {
|
|
2134
|
-
padding: 16px 20px;
|
|
2135
|
-
overflow-y: auto;
|
|
2136
|
-
flex: 1;
|
|
2137
|
-
}
|
|
2138
|
-
|
|
2139
|
-
.settings-modal-body .config-section:last-child {
|
|
2140
|
-
margin-bottom: 0;
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
.settings-modal-footer {
|
|
2144
|
-
display: flex;
|
|
2145
|
-
justify-content: flex-end;
|
|
2146
|
-
padding: 12px 20px;
|
|
2147
|
-
border-top: 1px solid var(--border);
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
2136
|
/* ============================================
|
|
2151
2137
|
LLM Settings Modal
|
|
2152
2138
|
============================================ */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fa-mcp-sdk",
|
|
3
3
|
"productName": "FA MCP SDK",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.8",
|
|
5
5
|
"description": "Core infrastructure and templates for building Model Context Protocol (MCP) servers with TypeScript",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/core/index.js",
|
|
@@ -6,7 +6,7 @@ export const customPrompts: IPromptData[] = [
|
|
|
6
6
|
// `title` and `icons` are optional (standard §10.5, MAY). They are shown only in the client UI;
|
|
7
7
|
// omit them and the prompt still works. Icons accept an absolute URL or an inlined data: URI.
|
|
8
8
|
title: 'Custom prompt',
|
|
9
|
-
icons: [{ src: 'https://example.com/icons/custom-prompt.png', mimeType: 'image/png', sizes: '48x48' }],
|
|
9
|
+
icons: [{ src: 'https://example.com/icons/custom-prompt.png', mimeType: 'image/png', sizes: ['48x48'] }],
|
|
10
10
|
description: 'Custom prompt',
|
|
11
11
|
arguments: [],
|
|
12
12
|
content: (request: IGetPromptRequest) => {
|