π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
'use client';
import {
createGlobLocalFilesInspector,
createGrepContentInspector,
} from '@lobechat/shared-tool-ui/inspectors';
import type { BuiltinInspector } from '@lobechat/types';
import { ClaudeCodeApiName } from '../../types';
import { AgentInspector } from './Agent';
import { AskUserQuestionInspector } from './AskUserQuestion';
import { BashInspector } from './Bash';
import { BrowserMcpInspectors } from './BrowserMcp';
import { EditInspector } from './Edit';
import { LinearMcpInspectors } from './LinearMcp';
import { MonitorInspector } from './Monitor';
import { ReadInspector } from './Read';
import { ScheduleWakeupInspector } from './ScheduleWakeup';
import { SendMessageInspector } from './SendMessage';
import { SkillInspector } from './Skill';
import { TaskInspector } from './Task';
import { TaskGetInspector } from './TaskGet';
import { TaskOutputInspector } from './TaskOutput';
import { TaskStopInspector } from './TaskStop';
import { TodoWriteInspector } from './TodoWrite';
import { ToolSearchInspector } from './ToolSearch';
import { WebFetchInspector } from './WebFetch';
import { WebSearchInspector } from './WebSearch';
import { EnterWorktreeInspector, ExitWorktreeInspector } from './Worktree';
import { WriteInspector } from './Write';
// CC's own tool names (Bash / Edit / Glob / Grep / Read / Write) are already
// the intended human-facing label, so we feed them to the shared factories as
// the "translation key" and let react-i18next's missing-key fallback echo it
// back verbatim. Keeps this package out of the plugin locale file.
//
// Glob / Grep can use the shared factories directly β they only need
// `pattern`. Bash reads `lh goal` steps as goal progress, and Edit / Read /
// Write need arg mapping (or synthesized plugin state for diff stats), so they
// live in their own sibling files.
const FixedClaudeCodeInspectors = {
[ClaudeCodeApiName.Agent]: AgentInspector,
[ClaudeCodeApiName.AskUserQuestion]: AskUserQuestionInspector,
[ClaudeCodeApiName.Bash]: BashInspector,
[ClaudeCodeApiName.Edit]: EditInspector,
[ClaudeCodeApiName.EnterWorktree]: EnterWorktreeInspector,
[ClaudeCodeApiName.ExitWorktree]: ExitWorktreeInspector,
[ClaudeCodeApiName.Glob]: createGlobLocalFilesInspector(ClaudeCodeApiName.Glob),
[ClaudeCodeApiName.Grep]: createGrepContentInspector({
noResultsKey: 'No results',
translationKey: ClaudeCodeApiName.Grep,
}),
// Monitor is a long-running tracked tool β its turns drive a SignalCallbacks
// accordion below the AssistantGroup (). The dedicated inspector
// uses the lucide `Monitor` (screen) icon to match the tool name.
[ClaudeCodeApiName.Monitor]: MonitorInspector,
[ClaudeCodeApiName.Read]: ReadInspector,
[ClaudeCodeApiName.ScheduleWakeup]: ScheduleWakeupInspector,
[ClaudeCodeApiName.SendMessage]: SendMessageInspector,
[ClaudeCodeApiName.Skill]: SkillInspector,
// CC 2.1.143+ task tools β TaskCreate / TaskUpdate / TaskList share the
// same inspector because they're driven by the adapter-synthesized
// `pluginState.todos` snapshot (the per-call args are deltas, not state).
// TaskGet is read-only with no pluginState, so it gets its own minimal chip.
[ClaudeCodeApiName.TaskCreate]: TaskInspector,
[ClaudeCodeApiName.TaskGet]: TaskGetInspector,
[ClaudeCodeApiName.TaskList]: TaskInspector,
[ClaudeCodeApiName.TaskOutput]: TaskOutputInspector,
[ClaudeCodeApiName.TaskStop]: TaskStopInspector,
[ClaudeCodeApiName.TaskUpdate]: TaskInspector,
[ClaudeCodeApiName.TodoWrite]: TodoWriteInspector,
[ClaudeCodeApiName.ToolSearch]: ToolSearchInspector,
[ClaudeCodeApiName.WebFetch]: WebFetchInspector,
[ClaudeCodeApiName.WebSearch]: WebSearchInspector,
[ClaudeCodeApiName.Write]: WriteInspector,
...BrowserMcpInspectors,
...LinearMcpInspectors,
};
export const ClaudeCodeInspectors = new Proxy(FixedClaudeCodeInspectors, {
get: (target, prop) => {
if (typeof prop !== 'string') return undefined;
if (prop in target) return target[prop as keyof typeof target];
return BrowserMcpInspectors[prop] ?? LinearMcpInspectors[prop];
},
}) as unknown as Record<string, BuiltinInspector>;