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.

53 lines (52 loc) 2.13 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; smartAiInstance: plugins.smartai.SmartAi; argvArg: any; constructor(argvArg?: any); private printSanitizedToken; start(): Promise<void>; stop(): Promise<void>; /** * Get the OpenAI provider for direct chat calls * This is a convenience getter to access the provider from SmartAi */ get openaiProvider(): plugins.smartai.OpenAiProvider; getOpenaiToken(): string; 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>; /** * Estimate token count in a text string * @param text The text to estimate tokens for * @returns Estimated number of tokens */ countTokens(text: string): number; }