MCPcopy Create free account
hub / github.com/Roy3838/Observer / getField

Function getField

app/src/utils/agentParser.ts:135–138  ·  view source on GitHub ↗
(field: string)

Source from the content-addressed store, hash-verified

133 }
134
135 const getField = (field: string): string => {
136 const match = configText.match(new RegExp(`^${field}:\\s*([^\\n]+)`, 'm'));
137 return match && match[1] ? match[1].trim() : '';
138 };
139
140 const agent: CompleteAgent = {
141 id: getField('id') || `agent_${Date.now()}`, // Fallback to ensure an ID exists

Callers 1

parseAgentResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected