MCPcopy Create free account
hub / github.com/Noumena-Network/code / getStatusLineActiveLabel

Function getStatusLineActiveLabel

src/components/statusLine/activeLabel.ts:11–33  ·  view source on GitHub ↗
(
  state: AppState | StatusLineActiveLabelState,
)

Source from the content-addressed store, hash-verified

9>
10
11export function getStatusLineActiveLabel(
12 state: AppState | StatusLineActiveLabelState,
13): string {
14 const viewedTeammate = getViewedTeammateTask(state)
15 if (viewedTeammate) {
16 return `@${viewedTeammate.identity.agentName}`
17 }
18
19 if (state.viewingAgentTaskId) {
20 const task = state.tasks[state.viewingAgentTaskId]
21 if (task?.type === 'local_agent') {
22 for (const [name, agentId] of state.agentNameRegistry) {
23 if (agentId === task.id) {
24 return `@${name}`
25 }
26 }
27
28 return `@${task.agentType}`
29 }
30 }
31
32 return DEFAULT_ACTIVE_LABEL
33}

Callers 1

Calls 1

getViewedTeammateTaskFunction · 0.85

Tested by

no test coverage detected