MCPcopy Create free account
hub / github.com/chhoumann/quickadd / warnIfChoiceNameAmbiguous

Method warnIfChoiceNameAmbiguous

src/main.ts:578–585  ·  view source on GitHub ↗

Surface a Notice when a URI's `choice= ` is ambiguous, so an automation * that ran the wrong (first-matching) choice is at least diagnosable.

(name: string)

Source from the content-addressed store, hash-verified

576 /** Surface a Notice when a URI's `choice=<name>` is ambiguous, so an automation
577 * that ran the wrong (first-matching) choice is at least diagnosable. */
578 private warnIfChoiceNameAmbiguous(name: string): void {
579 const matches = this.countChoicesByName(name);
580 if (matches > 1) {
581 log.logWarning(
582 `QuickAdd URI: ${matches} choices are named '${name}'. Ran the first match — rename choices to keep names unique so URIs target the right one.`,
583 );
584 }
585 }
586
587 public removeCommandForChoice(
588 choice: IChoice,

Callers 2

onloadMethod · 0.95
runUriChoiceLegacyMethod · 0.95

Calls 2

countChoicesByNameMethod · 0.95
logWarningMethod · 0.65

Tested by

no test coverage detected