feat: label screen observations in pod streams
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
|||||||
EyeIcon,
|
EyeIcon,
|
||||||
GitBranchIcon,
|
GitBranchIcon,
|
||||||
ExternalLinkIcon,
|
ExternalLinkIcon,
|
||||||
FileTextIcon,
|
|
||||||
MessageSquareIcon,
|
MessageSquareIcon,
|
||||||
MonitorUpIcon,
|
MonitorUpIcon,
|
||||||
PanelLeftIcon,
|
PanelLeftIcon,
|
||||||
@@ -773,6 +772,7 @@ function StreamStat({ label, value }: { label: string; value: number }) {
|
|||||||
function ActivityItem({ event }: { event: PodActivityEvent }) {
|
function ActivityItem({ event }: { event: PodActivityEvent }) {
|
||||||
const Icon = activityIcon(event.kind);
|
const Icon = activityIcon(event.kind);
|
||||||
const metadata = activityMetadata(event);
|
const metadata = activityMetadata(event);
|
||||||
|
const title = activityTitle(event);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
@@ -792,9 +792,7 @@ function ActivityItem({ event }: { event: PodActivityEvent }) {
|
|||||||
</div>
|
</div>
|
||||||
<div className="min-w-0">
|
<div className="min-w-0">
|
||||||
<div className="grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-start gap-2">
|
<div className="grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-start gap-2">
|
||||||
<p className="line-clamp-2 min-w-0 break-words text-sm font-medium leading-5">
|
<p className="line-clamp-2 min-w-0 break-words text-sm font-medium leading-5">{title}</p>
|
||||||
{event.title}
|
|
||||||
</p>
|
|
||||||
<time className="shrink-0 whitespace-nowrap text-xs text-muted-foreground">
|
<time className="shrink-0 whitespace-nowrap text-xs text-muted-foreground">
|
||||||
{timeLabel(event.at)}
|
{timeLabel(event.at)}
|
||||||
</time>
|
</time>
|
||||||
@@ -889,7 +887,7 @@ const ACTIVITY_CATEGORIES: {
|
|||||||
{
|
{
|
||||||
id: 'signal',
|
id: 'signal',
|
||||||
label: 'Signals',
|
label: 'Signals',
|
||||||
hint: 'Raw inputs the agent observed — screen vision and git activity.',
|
hint: 'Screen logs and local git activity routed to this stream.',
|
||||||
icon: RadioTowerIcon,
|
icon: RadioTowerIcon,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -901,7 +899,7 @@ const ACTIVITY_CATEGORIES: {
|
|||||||
];
|
];
|
||||||
|
|
||||||
const KIND_LABEL: Record<PodActivityKind, string> = {
|
const KIND_LABEL: Record<PodActivityKind, string> = {
|
||||||
observation: 'Observed',
|
observation: 'Screen log',
|
||||||
git: 'Git',
|
git: 'Git',
|
||||||
collision: 'Conflict',
|
collision: 'Conflict',
|
||||||
intervention: 'Intervention',
|
intervention: 'Intervention',
|
||||||
@@ -913,7 +911,7 @@ const SOURCE_META: Record<
|
|||||||
{ label: string; icon: typeof RadioTowerIcon; className: string }
|
{ label: string; icon: typeof RadioTowerIcon; className: string }
|
||||||
> = {
|
> = {
|
||||||
vision: {
|
vision: {
|
||||||
label: 'Vision',
|
label: 'Screen',
|
||||||
icon: EyeIcon,
|
icon: EyeIcon,
|
||||||
className: 'border-chart-1/40 bg-chart-1/10 text-chart-1',
|
className: 'border-chart-1/40 bg-chart-1/10 text-chart-1',
|
||||||
},
|
},
|
||||||
@@ -957,6 +955,11 @@ function SourceChip({ source }: { source: PodActivitySource }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function activityTitle(event: PodActivityEvent): string {
|
||||||
|
if (event.kind !== 'observation') return event.title;
|
||||||
|
return event.title.startsWith('Screen') ? event.title : `Screen log: ${event.title}`;
|
||||||
|
}
|
||||||
|
|
||||||
function activityIcon(kind: PodActivityKind) {
|
function activityIcon(kind: PodActivityKind) {
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
case 'git':
|
case 'git':
|
||||||
@@ -969,7 +972,7 @@ function activityIcon(kind: PodActivityKind) {
|
|||||||
return CheckIcon;
|
return CheckIcon;
|
||||||
case 'observation':
|
case 'observation':
|
||||||
default:
|
default:
|
||||||
return FileTextIcon;
|
return MonitorUpIcon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user