UNPKG

@git.zone/tsdoc

Version:

A comprehensive TypeScript documentation tool that leverages AI to generate and enhance project documentation, including dynamic README creation, API docs via TypeDoc, and smart commit message generation.

14 lines (13 loc) 793 B
* module needs to be installed globally * alternatively can be used through npx, if installed locally * cli parameters are concluded from ./ts/cli.ts * this module is not intended for API use. * Read carefully through the TypeScript files. Don't make stuff up. ## Token Budgeting (commit.ts) * OpenAI has a 272,000 token context limit * The smartagent infrastructure adds ~180,000 tokens of overhead (system messages, tool descriptions, conversation history) * TOKEN_BUDGET constants in commit.ts control the available tokens for diff content * Dynamic calculation: 272K - 10K (safety) - 180K (overhead) - 2K (prompt) = 80K tokens for diff * If token limit errors occur, consider: - Splitting large commits into smaller ones - Adjusting SMARTAGENT_OVERHEAD if actual overhead is different