TypeChat icon indicating copy to clipboard operation
TypeChat copied to clipboard

Add `multiline` option to `processRequests`

Open yannxaver opened this issue 2 years ago • 0 comments
trafficstars


/**
 * A request processor for interactive input or input from a text file. If an input file name is specified,
 * the callback function is invoked for each line in file. Otherwise, the callback function is invoked for
 * each line of interactive input until the user types "quit" or "exit".
 * @param interactivePrompt Prompt to present to user.
 * @param inputFileName Input text file name, if any.
 * @param processRequest Async callback function that is invoked for each interactive input or each line in text file.
 */
export declare function processRequests(interactivePrompt: string, inputFileName: string | undefined, processRequest: (request: string) => Promise<void>): Promise<void>;

If I didn't miss anything, there is currently no possibility to pass multiline text to processRequests. Since prompts can be written over multiple lines, it would be convenient to have that option.

yannxaver avatar Aug 24 '23 06:08 yannxaver