agentgui 1.0.932 → 1.0.933

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.932",
3
+ "version": "1.0.933",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
@@ -5,9 +5,9 @@
5
5
  <meta name="viewport" content="width=device-width,initial-scale=1">
6
6
  <title>agentgui</title>
7
7
  <meta name="description" content="agentgui — live client for any acptoapi backend.">
8
- <link rel="stylesheet" href="https://unpkg.com/anentrypoint-design@latest/dist/247420.css">
8
+ <link rel="stylesheet" href="https://unpkg.com/anentrypoint-design@0.0.127/dist/247420.css">
9
9
  <script type="importmap">
10
- { "imports": { "anentrypoint-design": "https://unpkg.com/anentrypoint-design@latest/dist/247420.js" } }
10
+ { "imports": { "anentrypoint-design": "https://unpkg.com/anentrypoint-design@0.0.127/dist/247420.js" } }
11
11
  </script>
12
12
  <style>
13
13
  html, body { margin: 0; height: 100%; }
@@ -3,7 +3,7 @@ import * as B from './backend.js';
3
3
 
4
4
  installStyles().catch(() => {});
5
5
 
6
- const { AppShell, Topbar, Crumb, Side, Status, Chat, ChatComposer, Row, Panel, PageHeader, SearchInput, TextField, EventList } = C;
6
+ const { AppShell, Topbar, Crumb, Side, Status, Chat, ChatComposer, Row, Panel, PageHeader, SearchInput, TextField, Select, Btn, EventList } = C;
7
7
 
8
8
  const state = {
9
9
  backend: B.getBackend(),
@@ -114,18 +114,16 @@ function view() {
114
114
 
115
115
  const crumbRight = state.tab === 'chat'
116
116
  ? [
117
- h('select', {
118
- key: 'modelsel',
119
- onchange: (e) => { state.selectedModel = e.target.value; render(); },
120
- },
121
- h('option', { key: '__', value: '' }, '— model —'),
122
- ...state.models.map(m =>
123
- h('option', { key: m.id, value: m.id, selected: m.id === state.selectedModel }, m.id)
124
- ),
125
- ),
117
+ Select({
118
+ key: 'modelsel',
119
+ value: state.selectedModel,
120
+ placeholder: '— model —',
121
+ options: state.models.map(m => ({ value: m.id, label: m.id })),
122
+ onChange: (v) => { state.selectedModel = v; render(); },
123
+ }),
126
124
  state.chat.busy
127
- ? h('a', { key: 'stop', onclick: cancelChat, style: 'cursor:pointer' }, '◼ stop')
128
- : h('a', { key: 'new', onclick: newChat, style: 'cursor:pointer' }, '+ new'),
125
+ ? Btn({ key: 'stop', onClick: cancelChat, children: '◼ stop' })
126
+ : Btn({ key: 'new', onClick: newChat, children: '+ new' }),
129
127
  dot,
130
128
  ]
131
129
  : [dot];
@@ -169,13 +167,22 @@ function mainContent() {
169
167
 
170
168
  // ── chat ───────────────────────────────────────────────────────────────────
171
169
  function chatMain() {
172
- const msgs = state.chat.messages.map((m, i) => ({
173
- key: String(i),
174
- who: m.role === 'user' ? 'you' : 'them',
175
- name: m.role === 'assistant' ? (state.selectedModel || 'agent') : 'you',
176
- time: m.time || '',
177
- parts: [{ kind: 'text', text: m.content || '' }],
178
- }));
170
+ const lastIdx = state.chat.messages.length - 1;
171
+ const msgs = state.chat.messages.map((m, i) => {
172
+ const isAssistant = m.role === 'assistant';
173
+ const isStreaming = state.chat.busy && i === lastIdx && isAssistant;
174
+ const isEmptyStreaming = isStreaming && !m.content;
175
+ return {
176
+ key: String(i),
177
+ who: isAssistant ? 'them' : 'you',
178
+ name: isAssistant ? (state.selectedModel || 'agent') : 'you',
179
+ time: m.time || '',
180
+ typing: isEmptyStreaming,
181
+ parts: isEmptyStreaming
182
+ ? undefined
183
+ : [{ kind: isAssistant ? 'md' : 'text', text: m.content || '' }],
184
+ };
185
+ });
179
186
 
180
187
  const composer = ChatComposer({
181
188
  value: state.chat.draft,
@@ -250,12 +257,11 @@ function historyMain() {
250
257
  Panel({
251
258
  title: state.events.length + ' events',
252
259
  children: EventList({
253
- events: state.events.map((e, i) => ({
260
+ items: state.events.map((e, i) => ({
254
261
  key: 'ev' + i,
255
- rank: String(i + 1).padStart(3, '0'),
262
+ code: String(i + 1).padStart(3, '0'),
256
263
  title: (e.text || '').slice(0, 200) || '(empty)',
257
264
  sub: new Date(e.ts).toLocaleString() + ' · ' + (e.role || '?') + ' · ' + (e.type || '?') + (e.tool ? ' · ⌘ ' + e.tool : ''),
258
- rail: e.role === 'error' ? 'flame' : (e.role === 'user' ? 'green' : 'purple'),
259
265
  })),
260
266
  }),
261
267
  }),
@@ -334,16 +340,19 @@ function settingsMain() {
334
340
  onInput: (v) => { state.backendDraft = v; render(); },
335
341
  }),
336
342
  h('p', { key: 'hp', class: 'lede' }, (ok ? '● ' : '○ ') + JSON.stringify(state.health)),
337
- h('button', {
343
+ Btn({
338
344
  key: 'savebtn',
339
- onclick: () => {
345
+ primary: true,
346
+ onClick: (e) => {
347
+ e.preventDefault();
340
348
  B.setBackend(state.backendDraft);
341
349
  state.backend = state.backendDraft;
342
350
  state.health = { status: 'unknown' };
343
351
  render();
344
352
  init();
345
353
  },
346
- }, 'save + reconnect'),
354
+ children: 'save + reconnect',
355
+ }),
347
356
  ],
348
357
  }),
349
358
  Panel({