mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
new indicators in web ui for llm stuff
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -11,8 +11,8 @@
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
||||
<title>Multi Roomba Rover</title>
|
||||
<script type="module" crossorigin src="/assets/index-Djoi30hN.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CgR-sTcr.css">
|
||||
<script type="module" crossorigin src="/assets/index-B49ZvEXj.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CpaTrvxo.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -285,6 +285,7 @@ function LlmCommentaryPanel({ status, onClearHistory, clearingHistory }) {
|
||||
: status.lastOutcome === 'posted'
|
||||
? 'text-emerald-300'
|
||||
: 'text-slate-300';
|
||||
const largeIndicator = buildLlmLargeIndicator(status);
|
||||
const conversationRows = buildLlmConversationRows(status);
|
||||
|
||||
return (
|
||||
@@ -300,6 +301,10 @@ function LlmCommentaryPanel({ status, onClearHistory, clearingHistory }) {
|
||||
{clearingHistory ? 'Clearing...' : 'Clear LLM History'}
|
||||
</button>
|
||||
</div>
|
||||
<div className={`surface border text-center ${largeIndicator.className}`}>
|
||||
<div className="text-[1.1rem] font-bold tracking-wide">{largeIndicator.label}</div>
|
||||
<div className="text-xs text-slate-200">{largeIndicator.detail}</div>
|
||||
</div>
|
||||
<div className="surface space-y-0.5 text-xs text-slate-200">
|
||||
<div className="flex items-center justify-between">
|
||||
<span>Enabled</span>
|
||||
@@ -421,6 +426,42 @@ function LlmCommentaryPanel({ status, onClearHistory, clearingHistory }) {
|
||||
);
|
||||
}
|
||||
|
||||
function buildLlmLargeIndicator(status) {
|
||||
if (status?.inFlight) {
|
||||
return {
|
||||
label: 'IN FLIGHT',
|
||||
detail: 'Generating commentary now',
|
||||
className: 'border-amber-400/60 bg-amber-700/20 text-amber-200',
|
||||
};
|
||||
}
|
||||
if (status?.lastOutcome === 'posted') {
|
||||
return {
|
||||
label: 'POSTED',
|
||||
detail: status?.lastPostedText ? `Last: ${status.lastPostedText}` : 'Commentary posted',
|
||||
className: 'border-emerald-400/60 bg-emerald-700/20 text-emerald-200',
|
||||
};
|
||||
}
|
||||
if (status?.lastOutcome === 'skipped') {
|
||||
return {
|
||||
label: 'SKIPPED',
|
||||
detail: status?.lastReason || 'Model chose to skip',
|
||||
className: 'border-slate-400/60 bg-slate-700/30 text-slate-200',
|
||||
};
|
||||
}
|
||||
if (status?.lastOutcome === 'failed') {
|
||||
return {
|
||||
label: 'FAILED',
|
||||
detail: status?.lastError || status?.lastReason || 'Tick failed',
|
||||
className: 'border-red-400/60 bg-red-700/20 text-red-200',
|
||||
};
|
||||
}
|
||||
return {
|
||||
label: status?.running ? 'IDLE' : 'STOPPED',
|
||||
detail: status?.lastReason || 'Waiting for next tick',
|
||||
className: 'border-sky-400/50 bg-sky-700/20 text-sky-200',
|
||||
};
|
||||
}
|
||||
|
||||
function buildLlmConversationRows(status) {
|
||||
const now = Date.now();
|
||||
const modelMessages = Array.isArray(status?.lastModelMessages) ? status.lastModelMessages : [];
|
||||
|
||||
Reference in New Issue
Block a user