MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / applyRefinement

Function applyRefinement

graph-ui/src/pseudocode/refine.ts:112–119  ·  view source on GitHub ↗
(document: PseudocodeDocument, answer: string)

Source from the content-addressed store, hash-verified

110 * Total: never throws, and an empty answer is a refusal like any other.
111 */
112export function applyRefinement(document: PseudocodeDocument, answer: string): RefineOutcome {
113 const cleaned = unfence(answer);
114 const applied = applyRefinedPseudocode(document, cleaned);
115 if (applied === undefined) {
116 return { kind: 'refused', reason: refusalReason(document, answer) };
117 }
118 return { kind: 'applied', document: applied };
119}
120
121/** The text a rewrite is asked to rephrase. The block, as a reader copies it. */
122export function refineSubjectText(document: PseudocodeDocument): string {

Callers 2

ProjectWindowViewFunction · 0.90
refine.test.tsFile · 0.90

Calls 3

applyRefinedPseudocodeFunction · 0.90
unfenceFunction · 0.85
refusalReasonFunction · 0.85

Tested by

no test coverage detected