MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / extractStructuredString

Function extractStructuredString

src/providers/codex/app_client.ts:4425–4433  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

4423}
4424
4425function extractStructuredString(value) {
4426 if (typeof value === 'string' && value.trim()) {
4427 return value;
4428 }
4429 if (!value || typeof value !== 'object') {
4430 return null;
4431 }
4432 return extractTextCandidate(value) ?? extractTextCandidate(value?.message) ?? extractTextCandidate(value?.error);
4433}
4434
4435function extractTextCandidate(value) {
4436 if (typeof value === 'string') {

Callers 2

mapTurnFunction · 0.70
mapTurnItemFunction · 0.70

Calls 1

extractTextCandidateFunction · 0.70

Tested by

no test coverage detected