Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
feat(community): show last-refresh + handled-count on the my-bots card
Shelly392f582adbeb
diff --git a/src/web/src/components/community/bots/bot-list.tsx b/src/web/src/components/community/bots/bot-list.tsxindex 84e4d3448..c2e6e0615 100644--- a/src/web/src/components/community/bots/bot-list.tsx+++ b/src/web/src/components/community/bots/bot-list.tsx@@ -27,6 +27,7 @@ import {} from "@/components/ui/alert-dialog"import { AgentAvatar } from "@/components/avatar"import { ProviderLogo } from "@/components/provider-logo"+import { formatRelativeTime } from "@/components/community/format-time"import { useMachines } from "@/hooks/community/use-machines"import { useBots, useDeleteBot, useResetBotSession, type BotSummary } from "@/hooks/community/use-bots"import { useCreateOrGetDm } from "@/hooks/community/mutations"@@ -282,6 +283,21 @@ export function BotList({ onBack }: { onBack?: () => void } = {}) {</span>)}</span>+ {/* Context-lifecycle meta (my-bots #516/#531):+ when the agent last refreshed context (nap /+ reset) + how many messages it's handled in the+ CURRENT lifecycle. `lastRefreshContextAt` is+ null for a bot that never refreshed → omit that+ half; the count is always present (defaults 0). */}+ <span className="flex items-center gap-1.5 truncate text-xs text-muted-foreground">+ {bot.lastRefreshContextAt && (+ <>+ <span className="truncate">Refreshed {formatRelativeTime(bot.lastRefreshContextAt)}</span>+ <span aria-hidden className="shrink-0">·</span>+ </>+ )}+ <span className="shrink-0">{bot.handledMessageCount} handled</span>+ </span></div></div><DropdownMenu>diff --git a/src/web/src/hooks/community/use-bots.ts b/src/web/src/hooks/community/use-bots.tsindex 3611e78f6..bdf670946 100644--- a/src/web/src/hooks/community/use-bots.ts+++ b/src/web/src/hooks/community/use-bots.ts@@ -12,6 +12,12 @@ export type BotSummary = {machineId: stringruntime: stringmodelName: string | null+ // Context lifecycle (my-bots #516/#531): when the agent last refreshed its+ // context (nap OR session reset — both "refresh context"), ISO string, null+ // if it never has; and how many messages it's handled in the CURRENT lifecycle+ // (reset/nap zero it). Rendered as "refreshed X ago · N handled".+ lastRefreshContextAt: string | null+ handledMessageCount: number}export type BotsResponse = { bots: BotSummary[] }