Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the prompt handling in the core files and adds async dedent functionality. The prompt handling in the core files is updated to remove an asynchronous call and return statement. Additionally, the
dedentAsync
function is added to theindent.ts
file, which allows for asynchronous dedenting of strings. This functionality is then used in thepromptcontext.ts
andpromptdom.ts
files to improve the handling of prompts.DEDENT_INSPECT_MAX_DEPTH
was added in the constants file.dedentAsync
has been implemented. This function asynchronously indents multi-line string templates and handles the resolution of arguments including arrays and objects.prompt
. It performs asynchronous operations, handles any exceptions, and ties it together with therunPrompt
function.dedentAsync
is added in "promptdom.ts" and "promptcontext.ts" file, and the function is used to reduce complexity ofstringTemplate
function in "promptdom.ts".RunPromptResultPromiseWithOptions
was defined, and a new functionprompt
is included in theChatGenerationContext
interface.runPrompt
function is replaced with the newly createdprompt
function along with the usage of string templates.