fa-mcp-sdk 0.12.4 → 0.12.6
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/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 +58 -72
- package/dist/core/web/static/agent-tester/script.js +0 -36
- package/dist/core/web/static/agent-tester/styles.css +36 -64
- package/package.json +1 -1
- package/src/template/prompts/custom-prompts.ts +1 -1
|
@@ -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,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb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,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">
|
|
@@ -133,9 +191,6 @@
|
|
|
133
191
|
<button id="clearChat" class="btn-icon chat-only" title="Clear Chat" data-testid="at-clear-chat">
|
|
134
192
|
<span class="material-icons-round">delete_outline</span>
|
|
135
193
|
</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
194
|
<button id="themeToggle" class="btn-icon" title="Toggle theme" data-testid="at-theme-toggle">
|
|
140
195
|
<span class="material-icons-round">dark_mode</span>
|
|
141
196
|
</button>
|
|
@@ -308,75 +363,6 @@
|
|
|
308
363
|
</main>
|
|
309
364
|
</div>
|
|
310
365
|
|
|
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
366
|
<!-- Prompt Enlarge Modal -->
|
|
381
367
|
<div class="prompt-modal-overlay" id="promptModal" style="display: none;" data-testid="at-prompt-modal">
|
|
382
368
|
<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;
|
|
@@ -1752,26 +1773,26 @@ body {
|
|
|
1752
1773
|
|
|
1753
1774
|
/* --- Scrollbar --- */
|
|
1754
1775
|
.chat-messages::-webkit-scrollbar,
|
|
1755
|
-
.
|
|
1776
|
+
.sidebar-content::-webkit-scrollbar,
|
|
1756
1777
|
.dropdown-list::-webkit-scrollbar {
|
|
1757
1778
|
width: 6px;
|
|
1758
1779
|
}
|
|
1759
1780
|
|
|
1760
1781
|
.chat-messages::-webkit-scrollbar-track,
|
|
1761
|
-
.
|
|
1782
|
+
.sidebar-content::-webkit-scrollbar-track,
|
|
1762
1783
|
.dropdown-list::-webkit-scrollbar-track {
|
|
1763
1784
|
background: transparent;
|
|
1764
1785
|
}
|
|
1765
1786
|
|
|
1766
1787
|
.chat-messages::-webkit-scrollbar-thumb,
|
|
1767
|
-
.
|
|
1788
|
+
.sidebar-content::-webkit-scrollbar-thumb,
|
|
1768
1789
|
.dropdown-list::-webkit-scrollbar-thumb {
|
|
1769
1790
|
background: var(--scrollbar-thumb);
|
|
1770
1791
|
border-radius: 3px;
|
|
1771
1792
|
}
|
|
1772
1793
|
|
|
1773
1794
|
.chat-messages::-webkit-scrollbar-thumb:hover,
|
|
1774
|
-
.
|
|
1795
|
+
.sidebar-content::-webkit-scrollbar-thumb:hover,
|
|
1775
1796
|
.dropdown-list::-webkit-scrollbar-thumb:hover {
|
|
1776
1797
|
background: var(--scrollbar-hover);
|
|
1777
1798
|
}
|
|
@@ -1822,6 +1843,17 @@ body {
|
|
|
1822
1843
|
display: flex !important;
|
|
1823
1844
|
}
|
|
1824
1845
|
|
|
1846
|
+
.app {
|
|
1847
|
+
flex-direction: column;
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
.sidebar {
|
|
1851
|
+
width: 100%;
|
|
1852
|
+
max-height: 40vh;
|
|
1853
|
+
border-right: none;
|
|
1854
|
+
border-bottom: 1px solid var(--border);
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1825
1857
|
.chat-title h1 {
|
|
1826
1858
|
font-size: 1rem;
|
|
1827
1859
|
}
|
|
@@ -2087,66 +2119,6 @@ textarea.prompt-modified {
|
|
|
2087
2119
|
color: #f28b82;
|
|
2088
2120
|
}
|
|
2089
2121
|
|
|
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
2122
|
/* ============================================
|
|
2151
2123
|
LLM Settings Modal
|
|
2152
2124
|
============================================ */
|
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.6",
|
|
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) => {
|