(contextWindowTokens?: number)
| 29 | export const MAX_LISTING_DESC_CHARS = 250 |
| 30 | |
| 31 | export function getCharBudget(contextWindowTokens?: number): number { |
| 32 | if (Number(process.env.SLASH_COMMAND_TOOL_CHAR_BUDGET)) { |
| 33 | return Number(process.env.SLASH_COMMAND_TOOL_CHAR_BUDGET) |
| 34 | } |
| 35 | if (contextWindowTokens) { |
| 36 | return Math.floor( |
| 37 | contextWindowTokens * CHARS_PER_TOKEN * SKILL_BUDGET_CONTEXT_PERCENT, |
| 38 | ) |
| 39 | } |
| 40 | return DEFAULT_CHAR_BUDGET |
| 41 | } |
| 42 | |
| 43 | function getCommandDescription(cmd: Command): string { |
| 44 | const desc = cmd.whenToUse |
no outgoing calls
no test coverage detected