-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
terminal support for multi-turn conversations #9
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
cngarrison
commented
Aug 1, 2024
- Added terminal support for multi-turn conversations
- Applied formatting to chat logs for easier reading
Applied patches from bbai to 1 file Files modified: - api/src/utils/conversationLogger.utils.ts
"Added configurable max line length and used console size to determine default max line length in ConversationLogger" Applied patches from bbai to 1 file Files modified: - api/src/utils/conversationLogger.utils.ts
Applied patches from bbai to 1 file Files modified: - api/src/utils/conversationLogger.utils.ts
…tting and wrapping logic, and updated the logging format to use a more concise and standardized approach. Applied patches from bbai to 1 file Files modified: - api/src/utils/conversationLogger.utils.ts
…ogFormatter` class. Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.ts
… changes Applied patches from bbai to 2 files Files modified: - src/shared/utils/logFormatter.ts - ./src/shared/utils/logFormatter.utils.ts
…and added an optional `follow` parameter to display logs in real-time. Applied patches from bbai to 1 file Files modified: - cli/src/commands/viewLogs.ts
…g log file changes Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
…ite log entries Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
Applied patches from bbai to 1 file Files modified: - ./api/src/utils/conversationLogger.utils.ts
The changes made in this commit include: 1. Simplified the file opening and closing logic by using a nullable `file` variable and checking its existence before closing. 2. Replaced the `bufReader.readString(undefined)` call with `Deno.readTextFile(logFile)` to read the entire log file content at once. 3. Removed the `let fullContent` variable declaration and assignment, as the `Deno.readTextFile(logFile)` call already provides the full content. 4. Improved the error handling by logging the error message when an error occurs while reading the log file. Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
…ls.ts` Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
- Added option to display a default number of entries for chat logs (5) and API logs (20) - Allowed users to specify the number of entries to display for both chat and API logs - Separated the log display logic for chat logs and API logs to handle the different default and maximum entry options Applied patches from bbai to 1 file Files modified: - cli/src/commands/viewLogs.ts
…og entries Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
… session with BBai, including the ability to provide an initial prompt and conversation ID. Applied patches from bbai to 1 file Files modified: - /Users/cng/working/bbai/cli/src/commands/chat.ts
Applied patches from bbai to 1 file Files modified: - cli/src/main.ts
Applied patches from bbai to 1 file Files modified: - cli/src/utils/apiClient.ts
… file. Applied patches from bbai to 1 file Files modified: - cli/deno.jsonc
Applied patches from bbai to 1 file Files modified: - cli/src/utils/apiClient.ts
Applied patches from bbai to 1 file Files modified: - cli/src/commands/chat.ts
…ieve the current commit hash of a Git repository. Applied patches from bbai to 1 file Files modified: - src/shared/utils/git.utils.ts
1. Added functionality to retrieve the current Git commit hash and append it to the system prompt. 2. Appended the current Git commit hash to the first user message in the conversation. 3. Incremented the statement count after logging the assistant's response. Git commit message: "Added Git commit information to conversation interaction" Applied patches from bbai to 1 file Files modified: - api/src/llms/interactions/conversationInteraction.ts
Applied patches from bbai to 1 file Files modified: - ./cli/src/commands/conversationStart.ts
…ectively Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
…ually appealing format, utilizing ANSI symbols and colors for better readability. Applied patches from bbai to 1 file Files modified: - ./cli/src/commands/conversationStart.ts
…nversationStart.ts Applied patches from bbai to 1 file Files modified: - cli/src/commands/conversationStart.ts
"Added conversation title to summary output in conversationStart command" Applied patches from bbai to 1 file Files modified: - ./cli/src/commands/conversationStart.ts
…e completion of a conversation, with additional details displayed in the output. Applied patches from bbai to 1 file Files modified: - ./cli/src/commands/conversationStart.ts
Applied patches from bbai to 1 file Files modified: - /Users/cng/working/bbai/cli/src/utils/promptHistory.utils.ts
… chat command. Applied patches from bbai to 1 file Files modified: - cli/src/commands/chat.ts
Applied patches from bbai to 1 file Files modified: - cli/src/commands/conversationStart.ts
Applied patches from bbai to 1 file Files modified: - api/src/llms/tool.ts
Applied patches from bbai to 1 file Files modified: - api/src/editor/projectEditor.ts
Applied patches from bbai to 1 file Files modified: - ./api/src/editor/projectEditor.ts
hydration logging
…gFormatter.utils.ts` file. The changes include: 1. Added `console.debug` statements to log the raw entry before processing and the formatted entry after processing. 2. Added a `console.debug` statement to log the read line during the loop that processes the log file. 3. Added a `console.debug` statement to log when the entry separator is found and the entry is reset. Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
"Trimmed whitespace in log message formatting and improved formatting of multi-line log entries" The changes made in this commit include: 1. Trimming leading and trailing whitespace from the log message before splitting it into paragraphs. 2. Removing the extra newline at the end of the wrapped message in the `wrapText` method. 3. Removing the extra newline at the end of the formatted log entry in the `formatLogEntry` method. 4. Trimming the log message before passing it to the `formatLogEntry` method in the `formatRawLogEntry` method. These changes help to ensure that the log entries are formatted consistently and without unnecessary whitespace. Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
The changes made in this commit include: 1. Filtering out empty paragraphs before wrapping the text. 2. Modifying the logic for determining when to start a new line, ensuring that the line length does not exceed the maximum allowed length. 3. Adjusting the indentation of wrapped lines to maintain consistent formatting. 4. Simplifying the logic for joining the wrapped paragraphs, removing the unnecessary indentation between them. These improvements enhance the overall functionality and readability of the log formatter utility. Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
The changes made to the `logFormatter.utils.ts` file include: 1. Preserving empty lines between paragraphs, but not at the start or end of the text. 2. Removing any empty lines at the start and end of the wrapped text. 3. Refactoring the `wrapText` function to handle empty paragraphs more efficiently. These improvements enhance the functionality and readability of the log formatter utility. Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
…a newline and separator Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
…ndentation Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
- Optimized text wrapping to handle long messages more efficiently - Simplified the logic for splitting and wrapping text - Removed unnecessary code and improved readability - Added support for handling empty lines between paragraphs - Improved error handling and logging for file operations Applied patches from bbai to 1 file Files modified: - src/shared/utils/logFormatter.utils.ts
…ferent before applying the operation, and only write the file if changes were actually made. Applied patches from bbai to 1 file Files modified: - api/src/editor/projectEditor.ts
- Added warning message and skipped operations when search and replace strings are identical - Tracked whether any operations were successfully applied and added appropriate success/failure messages to the conversation - Provided more detailed log messages when no changes were made to the file Applied patches from bbai to 1 file Files modified: - api/src/editor/projectEditor.ts
Applied patches from bbai to 1 file Files modified: - cli/src/main.ts
Applied patches from bbai to 1 file Files modified: - /Users/cng/working/bbai/b/cli/src/commands/apiRestart.ts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.