anentrypoint-design 0.0.92 → 0.0.93
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/dist/247420.app.js +4 -4
- package/dist/247420.js +27 -27
- package/package.json +1 -1
- package/src/components/freddie/pages-chat.js +8 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anentrypoint-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.93",
|
|
4
4
|
"description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/247420.js",
|
|
@@ -17,7 +17,10 @@ export async function chat(h0) {
|
|
|
17
17
|
const skills = [...h0.pi.skills.values()];
|
|
18
18
|
const providers = await fetch('/api/providers').then(r => r.json()).catch(() => []);
|
|
19
19
|
const configured = providers.filter(p => p.configured);
|
|
20
|
+
const v1Models = await fetch('/v1/models').then(r => r.json()).then(j => j.data || []).catch(() => []);
|
|
21
|
+
const cached = await fetch('/api/models/cached').then(r => r.json()).catch(() => ({}));
|
|
20
22
|
const cs = window.__fd_chatState = window.__fd_chatState || { cwd: '', skill: '', provider: '', model: '', messages: [], busy: false, sessionId: null };
|
|
23
|
+
try { const last = localStorage.getItem('fd-chat-model'); if (last && !cs.model) cs.model = last } catch {}
|
|
21
24
|
if (!cs.cwd) cs.cwd = (getRecentPaths()[0] || '');
|
|
22
25
|
const root = document.getElementById('app');
|
|
23
26
|
const getMsgs = () => root.querySelector('#fd-chat-msgs');
|
|
@@ -91,8 +94,11 @@ export async function chat(h0) {
|
|
|
91
94
|
)
|
|
92
95
|
),
|
|
93
96
|
h('div', { class: 'fd-col' },
|
|
94
|
-
h('label', { class: 'fd-label' }, 'model'),
|
|
95
|
-
h('
|
|
97
|
+
h('label', { class: 'fd-label' }, 'model · ' + v1Models.length + ' available'),
|
|
98
|
+
h('select', { name: 'model', onchange: ev => { cs.model = ev.target.value; try { localStorage.setItem('fd-chat-model', cs.model) } catch {} } },
|
|
99
|
+
h('option', { value: '' }, '— auto —'),
|
|
100
|
+
...v1Models.map(m => h('option', { value: m.id, selected: cs.model === m.id ? 'true' : null }, m.id))
|
|
101
|
+
)
|
|
96
102
|
)
|
|
97
103
|
),
|
|
98
104
|
h('div', { class: 'fd-chat-send-row' },
|