diff --git a/FEEDBACK.md b/FEEDBACK.md index 25a5930..2f8912d 100644 --- a/FEEDBACK.md +++ b/FEEDBACK.md @@ -195,3 +195,16 @@ - Webchat → icône chat/bulle - Fallback générique pour les channels non-vanilla (ex: TeamSpeak) → icône par défaut (bulle ou globe) - Utiliser des SVG ou une lib d'icônes (lucide-react, react-icons, etc.) + +## Item #24 +- **Date:** 2026-02-12 +- **Priority:** medium +- **Status:** pending +- **Description:** Display agent and model info in the UI +- **Details:** + - Show the OpenClaw agent ID (e.g. "main") and the model being used (e.g. "claude-opus-4-6") somewhere in the UI + - Investigate what data `sessions.list` and the connect response return — look for `agentId`, `model`, `defaultModel` or similar fields + - Good placement options: in the header bar near the session name, or in a small info tooltip/popover + - If the gateway doesn't expose this info via WebSocket, check if there's another endpoint or if it can be inferred from the session key + - Keep it subtle/non-intrusive — small text or an info icon that reveals details on hover + - This helps users know which agent/model is handling their conversation diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 3634eaf..03fbff0 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,4 +1,4 @@ -import { Menu, Sparkles, LogOut, Volume2, VolumeOff } from 'lucide-react'; +import { Menu, Sparkles, LogOut, Volume2, VolumeOff, Cpu } from 'lucide-react'; import type { ConnectionStatus, Session } from '../types'; import { useT } from '../hooks/useLocale'; import { LanguageSelector } from './LanguageSelector'; @@ -30,7 +30,15 @@ export function Header({ status, sessionKey, onToggleSidebar, activeSessionData, {t('header.title')} - {sessionLabel} +
+ {sessionLabel} + {activeSessionData?.model && ( + + + {activeSessionData.model.replace(/^.*\//, '')} + + )} +
diff --git a/src/hooks/useGateway.ts b/src/hooks/useGateway.ts index e045630..ab6aca7 100644 --- a/src/hooks/useGateway.ts +++ b/src/hooks/useGateway.ts @@ -94,6 +94,8 @@ export function useGateway() { outputTokens: s.outputTokens as number | undefined, channel: (s.lastChannel || s.channel) as string | undefined, kind: s.kind as string | undefined, + model: s.model as string | undefined, + agentId: s.agentId as string | undefined, }))); } } catch { diff --git a/src/types/index.ts b/src/types/index.ts index 550f6d4..42d64dd 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -27,6 +27,8 @@ export interface Session { outputTokens?: number; channel?: string; kind?: string; + model?: string; + agentId?: string; } export type ConnectionStatus = 'disconnected' | 'connecting' | 'connected';