MCPcopy Create free account
hub / github.com/codeaashu/claude-code / AgentDetail

Function AgentDetail

src/components/agents/AgentDetail.tsx:21–219  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

19 onBack: () => void;
20};
21export function AgentDetail(t0) {
22 const $ = _c(48);
23 const {
24 agent,
25 tools,
26 onBack
27 } = t0;
28 const resolvedTools = resolveAgentTools(agent, tools, false);
29 let t1;
30 if ($[0] !== agent) {
31 t1 = getActualRelativeAgentFilePath(agent);
32 $[0] = agent;
33 $[1] = t1;
34 } else {
35 t1 = $[1];
36 }
37 const filePath = t1;
38 let t2;
39 if ($[2] !== agent.agentType) {
40 t2 = getAgentColor(agent.agentType);
41 $[2] = agent.agentType;
42 $[3] = t2;
43 } else {
44 t2 = $[3];
45 }
46 const backgroundColor = t2;
47 let t3;
48 if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
49 t3 = {
50 context: "Confirmation"
51 };
52 $[4] = t3;
53 } else {
54 t3 = $[4];
55 }
56 useKeybinding("confirm:no", onBack, t3);
57 let t4;
58 if ($[5] !== onBack) {
59 t4 = e => {
60 if (e.key === "return") {
61 e.preventDefault();
62 onBack();
63 }
64 };
65 $[5] = onBack;
66 $[6] = t4;
67 } else {
68 t4 = $[6];
69 }
70 const handleKeyDown = t4;
71 const renderToolsList = function renderToolsList() {
72 if (resolvedTools.hasWildcard) {
73 return <Text>All tools</Text>;
74 }
75 if (!agent.tools || agent.tools.length === 0) {
76 return <Text>None</Text>;
77 }
78 return <>{resolvedTools.validTools.length > 0 && <Text>{resolvedTools.validTools.join(", ")}</Text>}{resolvedTools.invalidTools.length > 0 && <Text color="warning">{figures.warning} Unrecognized:{" "}{resolvedTools.invalidTools.join(", ")}</Text>}</>;

Callers

nothing calls this directly

Calls 10

resolveAgentToolsFunction · 0.85
getAgentColorFunction · 0.85
useKeybindingFunction · 0.85
renderToolsListFunction · 0.85
getAgentModelDisplayFunction · 0.85
getMemoryScopeDisplayFunction · 0.85
isBuiltInAgentFunction · 0.85
preventDefaultMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected