chore: format
This commit is contained in:
parent
d631b5c7ed
commit
48159eecce
2 changed files with 11 additions and 3 deletions
|
|
@ -86,10 +86,12 @@ function getCurrentSessionId(): string {
|
|||
/**
|
||||
* Save session to file
|
||||
*/
|
||||
export function saveSession(sessionOrHistory: Session | ChatHistoryItem[]): void {
|
||||
export function saveSession(
|
||||
sessionOrHistory: Session | ChatHistoryItem[],
|
||||
): void {
|
||||
try {
|
||||
let session: Session;
|
||||
|
||||
|
||||
// Handle both Session objects and ChatHistoryItem[] arrays
|
||||
if (Array.isArray(sessionOrHistory)) {
|
||||
// If it's a ChatHistoryItem array, create/update the session
|
||||
|
|
|
|||
|
|
@ -61,7 +61,13 @@ export const MemoizedMessage = memo<MemoizedMessageProps>(
|
|||
<Box marginLeft={1} marginBottom={1}>
|
||||
<Text color="white">●</Text>
|
||||
<Text> </Text>
|
||||
<MarkdownRenderer content={typeof message.content === "string" ? message.content : JSON.stringify(message.content)} />
|
||||
<MarkdownRenderer
|
||||
content={
|
||||
typeof message.content === "string"
|
||||
? message.content
|
||||
: JSON.stringify(message.content)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
)}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue