@hanzo/app 0.3.99 → 0.3.101
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/Recents.js +12 -5
- package/dist/bots/Thread.js +4 -2
- package/package.json +1 -1
package/dist/Recents.js
CHANGED
|
@@ -234,12 +234,14 @@ function Runs({ host, view, keep, onOpen }) {
|
|
|
234
234
|
return true;
|
|
235
235
|
patchMeta(t.id, { title });
|
|
236
236
|
const tok = host.token?.();
|
|
237
|
+
const headers = { 'Content-Type': 'application/json' };
|
|
238
|
+
if (tok)
|
|
239
|
+
headers.Authorization = `Bearer ${tok}`;
|
|
240
|
+
if (host.org)
|
|
241
|
+
headers['X-Org-Id'] = host.org;
|
|
237
242
|
void fetch(`${host.api}/v1/agent/sessions/${encodeURIComponent(t.id)}`, {
|
|
238
243
|
method: 'PATCH',
|
|
239
|
-
headers
|
|
240
|
-
...(tok ? { Authorization: `Bearer ${tok}` } : {}),
|
|
241
|
-
'Content-Type': 'application/json',
|
|
242
|
-
},
|
|
244
|
+
headers,
|
|
243
245
|
body: JSON.stringify({ title }),
|
|
244
246
|
}).catch(() => { });
|
|
245
247
|
return true;
|
|
@@ -247,9 +249,14 @@ function Runs({ host, view, keep, onOpen }) {
|
|
|
247
249
|
remove: async (t) => {
|
|
248
250
|
patchMeta(t.id, { deleted: true });
|
|
249
251
|
const tok = host.token?.();
|
|
252
|
+
const headers = {};
|
|
253
|
+
if (tok)
|
|
254
|
+
headers.Authorization = `Bearer ${tok}`;
|
|
255
|
+
if (host.org)
|
|
256
|
+
headers['X-Org-Id'] = host.org;
|
|
250
257
|
void fetch(`${host.api}/v1/agent/sessions/${encodeURIComponent(t.id)}`, {
|
|
251
258
|
method: 'DELETE',
|
|
252
|
-
headers
|
|
259
|
+
headers,
|
|
253
260
|
}).catch(() => { });
|
|
254
261
|
return true;
|
|
255
262
|
},
|
package/dist/bots/Thread.js
CHANGED
|
@@ -149,14 +149,16 @@ export function Thread({ bot, bots, runs, pending, notice, wrong, side, live, lo
|
|
|
149
149
|
return (_jsx(Text, { self: "center", mt: i ? 24 : 4, mb: 8, fontSize: 12, lineHeight: 17, color: DIM, children: line.text }, line.key));
|
|
150
150
|
if (line.kind === 'from')
|
|
151
151
|
return (_jsxs(XStack, { self: "center", mt: gap, items: "center", gap: 6, children: [_jsx(Text, { fontSize: 12, lineHeight: 17, color: DIM, children: t('Message from') }), _jsx(Face, { bot: line.bot, size: 16 }), _jsx(Text, { fontSize: 12, lineHeight: 17, color: DIM, children: called(line.bot.name) })] }, line.key));
|
|
152
|
+
// `group` makes the row a size container, which has no intrinsic width:
|
|
153
|
+
// each row states its width, or a bubble collapses to one character a line.
|
|
152
154
|
if (line.kind === 'mine')
|
|
153
|
-
return (_jsx(YStack, { group: true, self: "flex-end", items: "flex-end",
|
|
155
|
+
return (_jsx(YStack, { group: true, self: "flex-end", items: "flex-end", width: "76%", "$max-md": { width: '86%' }, mt: gap, children: _jsx(Text, { "data-parity-key": "bots.mine", render: "div", px: 14, py: 8, rounded: 18, fontSize: 15, lineHeight: 22, color: INK, whiteSpace: "pre-wrap", "$platform-web": { overflowWrap: 'anywhere', backgroundColor: MINE }, children: line.text }) }, line.key));
|
|
154
156
|
if (line.kind === 'thinking')
|
|
155
157
|
return (_jsx(XStack, { "data-parity-key": "bots.thinking", role: "status", "aria-label": t('{name} is working', { name: displayName }), self: "flex-start", mt: gap, px: 14, height: 38, items: "center", rounded: 16, bg: RAISED, borderWidth: 1, borderColor: LINE, children: _jsx(Caret, {}) }, line.key));
|
|
156
158
|
if (line.kind === 'theirs' && line.failed)
|
|
157
159
|
return (_jsx(YStack, { "data-parity-key": "bots.theirs", self: "flex-start", maxW: 680, mt: gap, px: 15, py: 11, rounded: 18, bg: RAISED, borderWidth: 1, borderColor: LINE, "$max-md": { maxW: '92%' }, children: _jsx(Text, { fontSize: 15, lineHeight: 22, color: "var(--state-error)", children: line.text }) }, line.key));
|
|
158
160
|
const parts = partsOf(line.text);
|
|
159
|
-
return (_jsxs(YStack, { group: true, "data-parity-key": line.kind === 'other' ? 'bots.other' : 'bots.theirs', self: "flex-start", items: "flex-start", gap: 8,
|
|
161
|
+
return (_jsxs(YStack, { group: true, "data-parity-key": line.kind === 'other' ? 'bots.other' : 'bots.theirs', self: "flex-start", items: "flex-start", gap: 8, width: "100%", mt: gap, children: [parts.map((part, idx) => {
|
|
160
162
|
if (part.kind === 'doc') {
|
|
161
163
|
const inner = (_jsxs(XStack, { px: 12, py: 10, gap: 12, items: "center", rounded: 16, bg: RAISED, borderWidth: 1, borderColor: LINE, hoverStyle: { borderColor: 'var(--border-strong)' }, maxW: 290, children: [_jsx(DocBadge, { ext: part.ext }), _jsxs(YStack, { flex: 1, minW: 0, gap: 2, children: [_jsx(Text, { ...CLIP, fontSize: 14, lineHeight: 19, fontWeight: "500", color: INK, children: part.name }), part.size ? (_jsx(Text, { fontSize: 12, lineHeight: 17, color: DIM, children: part.size })) : null] })] }));
|
|
162
164
|
return part.href ? (_jsx(YStack, { render: "a", href: part.href, target: '_blank', rel: 'noopener noreferrer', "$platform-web": { textDecoration: 'none' }, children: inner }, idx)) : (_jsx(YStack, { children: inner }, idx));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.101",
|
|
4
4
|
"description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|