surshar / claude-code
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Built by Anthropic · github.com/anthropics
| Mmods/telemetry/hooks/entries/checked-value/checked-value.ts |
| Mmods/telemetry/hooks/entries/choice-token/choice-token.ts |
| Mmods/telemetry/hooks/telemetry-types/choice/choice.ts |
| @@ -60,7 +60,7 @@ | ||
| 60 | 60 | |
| 61 | 61 | if (!isTokenList) { |
| 62 | 62 | throw refusal( |
| 63 | - `props.${key}.of: a list of 1 to ${CHOICES_LIMIT} ` + `snake_case tokens`, | |
| 63 | + `props.${key}.of: a list of 1 to ${CHOICES_LIMIT} ` + `lowercase tokens`, | |
| 64 | 64 | method, |
| 65 | 65 | ) |
| 66 | 66 | } |
| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | /** |
| 2 | - * The shape of a Choice member: a snake_case token of at most 64 characters, | |
| 3 | - * which may start with a digit (a bucket such as `110_to_143`), unlike a name | |
| 4 | - * or a key (TOKEN). | |
| 2 | + * The shape of a Choice member: a lowercase token of at most 64 characters, | |
| 3 | + * of letters, digits, `_` and `-`, which may start with a digit (a bucket | |
| 4 | + * such as `110_to_143`) and carry a hyphen (a kind such as `merge-base`), | |
| 5 | + * unlike a name or a key (TOKEN). | |
| 5 | 6 | */ |
| 6 | -export const CHOICE_TOKEN = /^[a-z0-9][a-z0-9_]{0,63}$/ | |
| 7 | +export const CHOICE_TOKEN = /^[a-z0-9][a-z0-9_-]{0,63}$/ |
| @@ -2,7 +2,8 @@ | ||
| 2 | 2 | * A string property: the value and the list it is chosen from, declared |
| 3 | 3 | * beside it, so no free text reaches the row. |
| 4 | 4 | * |
| 5 | - * Every member of `of` is a snake_case token, which may start with a digit, | |
| 6 | - * at most CHOICES_LIMIT of them; `value` is one of them. | |
| 5 | + * Every member of `of` is a lowercase token of letters, digits, `_` and | |
| 6 | + * `-`, which may start with a digit, at most CHOICES_LIMIT of them; `value` | |
| 7 | + * is one of them. | |
| 7 | 8 | */ |
| 8 | 9 | export type Choice = { value: string; of: readonly string[] } |