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.

48 lines (47 loc) 2.02 kB
import * as plugins from './plugins.js'; import * as aiDocsClasses from './aidocs_classes/index.js'; export declare class AiDoc { private openaiToken; npmextraKV: plugins.npmextra.KeyValueStore; qenvInstance: plugins.qenv.Qenv; aidocInteract: plugins.smartinteract.SmartInteract; openaiInstance: plugins.smartai.OpenAiProvider; argvArg: any; constructor(argvArg?: any); private printSanitizedToken; start(): Promise<void>; stop(): Promise<void>; buildReadme(projectDirArg: string): Promise<string>; buildDescription(projectDirArg: string): Promise<string>; buildNextCommitObject(projectDirArg: string): Promise<aiDocsClasses.INextCommitObject>; getProjectContext(projectDirArg: string): Promise<{ smartfilePackageJSON: plugins.smartfile.SmartFile; smartfilesReadme: plugins.smartfile.SmartFile; smartfilesReadmeHints: plugins.smartfile.SmartFile; smartfilesNpmextraJSON: plugins.smartfile.SmartFile; smartfilesMod: plugins.smartfile.SmartFile[]; smartfilesTest: plugins.smartfile.SmartFile[]; }>; /** * Get the context with token count information * @param projectDirArg The path to the project directory * @returns An object containing the context string and its token count */ getProjectContextWithTokenCount(projectDirArg: string): Promise<{ context: string; tokenCount: number; }>; /** * Get just the token count for a project's context * @param projectDirArg The path to the project directory * @returns The number of tokens in the project context */ getProjectContextTokenCount(projectDirArg: string): Promise<number>; /** * Count tokens in a text string using GPT tokenizer * @param text The text to count tokens for * @param model The model to use for tokenization (default: gpt-3.5-turbo) * @returns The number of tokens in the text */ countTokens(text: string, model?: string): number; }