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

Method toggleOption

src/components/question-prompt.ts:144–152  ·  view source on GitHub ↗
(idx: number)

Source from the content-addressed store, hash-verified

142 }
143
144 private toggleOption(idx: number): void {
145 const label = this.questions[this.activeTab].options[idx].label;
146 const set = this.selected[this.activeTab];
147 if (set.has(label)) {
148 set.delete(label);
149 } else {
150 set.add(label);
151 }
152 }
153
154 /** After a single-select answer, jump to the next unanswered tab, or Submit. */
155 private advance(): void {

Callers 2

handleInputMethod · 0.95
activateRowMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected