Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 2, 2024
1 parent 50dfde4 commit adaecab
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ export const doConversation = (conversationRequest: ConversationRequest) => {
// decode \x hexadecimal encoding
function decodeEscapedBytes(str: string): string {
// Convert the byte portion separated by \x into a byte array and decode it into a UTF-8 string
const byteArray: number[] = str.split("\\x").slice(1).map((byte: string) => parseInt(byte, 16));
const byteArray: number[] = str
.split("\\x")
.slice(1)
.map((byte: string) => parseInt(byte, 16));
return new TextDecoder("utf-8").decode(new Uint8Array(byteArray));
}

0 comments on commit adaecab

Please sign in to comment.