args and no more emojis

This commit is contained in:
legop3
2026-05-19 17:29:08 -04:00
parent f9e472c832
commit 133ea3f6d2
4 changed files with 10 additions and 8 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,7 +11,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="Roomba Rover" />
<title>Roomba Rover</title>
<script type="module" crossorigin src="/assets/index-BWk3SALU.js"></script>
<script type="module" crossorigin src="/assets/index-CK-TYSk4.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BtUMEmG6.css">
</head>
<body>
@@ -6,10 +6,11 @@ const { WebhookClient } = require('discord.js');
function summarizeToolCall(entry = {}) {
const tool = String(entry?.tool || 'unknown');
const status = String(entry?.status || 'unknown').toLowerCase();
if (status === 'ok') return `${tool}`;
if (status === 'blocked') return ` ${tool} ${String(entry?.error || 'blocked')}`;
if (status === 'error') return ` ${tool} ${String(entry?.error || 'failed')}`;
return ` ${tool}`;
const argsText = JSON.stringify(entry?.args && typeof entry.args === 'object' ? entry.args : {});
if (status === 'ok') return `ok ${tool} args=${argsText}`;
if (status === 'blocked') return `blocked ${tool} args=${argsText} - ${String(entry?.error || 'blocked')}`;
if (status === 'error') return `error ${tool} args=${argsText} - ${String(entry?.error || 'failed')}`;
return `unknown ${tool} args=${argsText}`;
}
function formatToolCallsCodeBlock(toolCalls = []) {
@@ -156,10 +156,11 @@ export default function ChatMessageRow({ message }) {
<div className="mt-0.5 rounded border border-slate-700/70 bg-slate-900/70 p-0.5 text-[0.68rem] text-slate-200">
{toolCalls.map((entry, idx) => {
const status = String(entry?.status || 'unknown');
const icon = status === 'ok' ? '' : status === 'blocked' ? '' : status === 'error' ? '' : '';
const statusLabel = status === 'ok' ? 'ok' : status === 'blocked' ? 'blocked' : status === 'error' ? 'error' : 'unknown';
const argsText = JSON.stringify(entry?.args && typeof entry.args === 'object' ? entry.args : {});
return (
<div key={`${entry?.tool || 'tool'}-${idx}`} className="mb-0.5 last:mb-0">
<div>{icon} {entry?.tool || 'unknown'}</div>
<div>{statusLabel} {entry?.tool || 'unknown'} args={argsText}</div>
{entry?.error ? <div className="text-rose-300">error: {String(entry.error)}</div> : null}
</div>
);