anentrypoint-design 0.0.296 → 0.0.297
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/app-shell.css +9 -4
- package/chat.css +21 -20
- package/dist/247420.css +62 -52
- package/dist/247420.js +14 -14
- package/package.json +1 -1
- package/src/components/agent-chat.js +13 -8
- package/src/components/sessions.js +2 -2
- package/src/components/shell.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anentrypoint-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.297",
|
|
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",
|
|
@@ -63,7 +63,7 @@ function scrollThreadToBottom(btn) {
|
|
|
63
63
|
|
|
64
64
|
// The agent picker: agent-then-model, not a flat model list. Unavailable agents
|
|
65
65
|
// are disabled (unless installable via npx). Ordering is the host's concern.
|
|
66
|
-
function AgentControls({ agents, selectedAgent, models, selectedModel, busy, status, modelsLoading,
|
|
66
|
+
function AgentControls({ agents, selectedAgent, models, selectedModel, busy, status, modelsLoading, agentsLoading,
|
|
67
67
|
onSelectAgent, onSelectModel, onNewChat, onStop, exportActions }) {
|
|
68
68
|
const agentOptions = (agents || []).map((a) => ({
|
|
69
69
|
value: a.id,
|
|
@@ -72,11 +72,16 @@ function AgentControls({ agents, selectedAgent, models, selectedModel, busy, sta
|
|
|
72
72
|
}));
|
|
73
73
|
const showModels = (models || []).length > 0;
|
|
74
74
|
return h('div', { class: 'agentchat-controls' },
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
// While agents load on first boot, show a disabled "loading…" placeholder
|
|
76
|
+
// instead of an empty options list, which is indistinguishable from "this
|
|
77
|
+
// app has no agents configured" (mirrors the models-loading branch below).
|
|
78
|
+
(agentsLoading && !agentOptions.length)
|
|
79
|
+
? Select({ key: 'agentsel', value: '', placeholder: 'loading agents…', title: 'Loading agents', disabled: true, options: [] })
|
|
80
|
+
: Select({
|
|
81
|
+
key: 'agentsel', value: selectedAgent, placeholder: '— agent —',
|
|
82
|
+
title: 'Select agent', options: agentOptions,
|
|
83
|
+
onChange: (v) => onSelectAgent && onSelectAgent(v),
|
|
84
|
+
}),
|
|
80
85
|
// While models load for a freshly-picked agent, show a disabled "loading…"
|
|
81
86
|
// placeholder so the picker doesn't vanish then reappear (a layout flash).
|
|
82
87
|
showModels
|
|
@@ -143,7 +148,7 @@ function CwdBar({ cwd, editing, draft, onEdit, onSave, onCancel, onClear, onDraf
|
|
|
143
148
|
// onCwdEdit/onCwdSave/onCwdCancel/onCwdClear/onCwdDraft
|
|
144
149
|
export function AgentChat(props = {}) {
|
|
145
150
|
const {
|
|
146
|
-
agents = [], selectedAgent = '', models = [], selectedModel = '', modelsLoading = false,
|
|
151
|
+
agents = [], selectedAgent = '', models = [], selectedModel = '', modelsLoading = false, agentsLoading = false,
|
|
147
152
|
messages = [], busy = false, draft = '', status, banners = [],
|
|
148
153
|
cwd = '', cwdEditing = false, cwdDraft, cwdError, cwdChecking = false,
|
|
149
154
|
agentName, placeholder,
|
|
@@ -389,7 +394,7 @@ export function AgentChat(props = {}) {
|
|
|
389
394
|
: null;
|
|
390
395
|
|
|
391
396
|
return h('div', { class: 'agentchat' },
|
|
392
|
-
AgentControls({ agents, selectedAgent, models, selectedModel, busy, status, modelsLoading,
|
|
397
|
+
AgentControls({ agents, selectedAgent, models, selectedModel, busy, status, modelsLoading, agentsLoading,
|
|
393
398
|
onSelectAgent, onSelectModel, onNewChat, onStop, exportActions }),
|
|
394
399
|
CwdBar({ cwd, editing: cwdEditing, draft: cwdDraft, error: cwdError, checking: cwdChecking,
|
|
395
400
|
onEdit: onCwdEdit, onSave: onCwdSave, onCancel: onCwdCancel, onClear: onCwdClear, onDraft: onCwdDraft }),
|
|
@@ -351,12 +351,12 @@ export function SessionDashboard({ sessions = [], onStop, onOpen, onView, onStop
|
|
|
351
351
|
: (selectable && selCount && onStopSelected
|
|
352
352
|
? (onArmStopSelected && !confirmingStopSelected
|
|
353
353
|
? Btn({ key: 'stopsel', variant: 'danger', onClick: () => onArmStopSelected([...selSet]), children: 'stop selected' })
|
|
354
|
-
: Btn({ key: 'stopsel', variant: 'danger',
|
|
354
|
+
: Btn({ key: 'stopsel', variant: 'danger', class: confirmingStopSelected ? 'is-armed' : null, onClick: () => onStopSelected([...selSet]),
|
|
355
355
|
children: confirmingStopSelected ? 'stop ' + selCount + ' sessions - press again' : 'stop selected' }))
|
|
356
356
|
: (onStopAll
|
|
357
357
|
? (onArmStopAll && !confirmingStopAll
|
|
358
358
|
? Btn({ key: 'stopall', variant: 'danger', onClick: () => onArmStopAll(sessions), children: 'stop all' })
|
|
359
|
-
: Btn({ key: 'stopall', variant: 'danger',
|
|
359
|
+
: Btn({ key: 'stopall', variant: 'danger', class: confirmingStopAll ? 'is-armed' : null, onClick: () => onStopAll(sessions),
|
|
360
360
|
children: confirmingStopAll ? 'stop ' + sessions.length + ' sessions - press again' : 'stop all' }))
|
|
361
361
|
: null));
|
|
362
362
|
// Build header children as a filtered array: webjsx applyDiff crashes
|
package/src/components/shell.js
CHANGED
|
@@ -16,7 +16,7 @@ export function Chip({ tone = '', children }) {
|
|
|
16
16
|
return h('span', { class: 'chip' + (tone ? ' tone-' + tone : '') }, children);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export function Btn({ href, variant = 'default', children, onClick, 'aria-label': ariaLabel, primary, ghost, danger, disabled, className, key }) {
|
|
19
|
+
export function Btn({ href, variant = 'default', children, onClick, 'aria-label': ariaLabel, primary, ghost, danger, disabled, class: className, key }) {
|
|
20
20
|
// Support legacy primary/ghost props for backward compatibility, but prefer variant
|
|
21
21
|
const resolvedVariant = variant !== 'default' ? variant : (primary ? 'primary' : (ghost ? 'ghost' : (danger ? 'danger' : 'default')));
|
|
22
22
|
const cls = (resolvedVariant === 'primary' ? 'btn-primary' : (resolvedVariant === 'ghost' ? 'btn-ghost' : (resolvedVariant === 'danger' ? 'btn-primary danger' : 'btn')))
|