MCPcopy Create free account
hub / github.com/microsoft/TypeChat / _handleMessage

Function _handleMessage

typescript/examples/multiSchema/src/agent.ts:42–54  ·  view source on GitHub ↗
(request: string)

Source from the content-addressed store, hash-verified

40 return jsonPrintAgent;
41
42 async function _handleMessage(request: string): Promise<Result<T>> {
43 const response = await _translator.translate(request);
44 if (response.success) {
45 console.log("Translation Succeeded! ✅\n")
46 console.log("JSON View")
47 console.log(JSON.stringify(response.data, undefined, 2))
48 }
49 else {
50 console.log("Translation Failed ❌")
51 console.log(`Context: ${response.message}`)
52 }
53 return response;
54 }
55}
56
57interface MathAgent<T extends object> extends Agent<T> {

Callers

nothing calls this directly

Calls 5

evaluateJsonProgramFunction · 0.90
getDataFunction · 0.85
successFunction · 0.85
translateMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…