MCPcopy
hub / github.com/virattt/dexter / setApproval

Method setApproval

src/components/tool-event.ts:156–164  ·  view source on GitHub ↗
(decision: ApprovalDecision)

Source from the content-addressed store, hash-verified

154 }
155
156 setApproval(decision: ApprovalDecision) {
157 this.clearDetail();
158 const color = decision !== 'deny' ? theme.primary : theme.warning;
159 const circle = decision !== 'deny' ? theme.success(CIRCLE) : theme.error(CIRCLE);
160 this.header.setText(`${circle} ${this.toolTitle}`);
161 const detail = new Text(`${theme.muted('⎿ ')}${color(approvalLabel(decision))}`, 0, 0);
162 this.completedDetails.push(detail);
163 this.addChild(detail);
164 }
165
166 dispose() {
167 this.clearDetail();

Callers

nothing calls this directly

Calls 4

clearDetailMethod · 0.95
approvalLabelFunction · 0.85
setTextMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected