mirror of
https://github.com/geoffsee/open-gsio.git
synced 2025-09-08 22:56:46 +00:00

Update README deployment steps and add deploy:secrets script to package.json update local inference script and README update lockfile reconfigure package scripts for development update test execution pass server tests Update README with revised Bun commands and workspace details remove pnpm package manager designator create bun server
19 lines
565 B
TypeScript
19 lines
565 B
TypeScript
// Function to generate a Markdown representation of the current conversation
|
|
import { type IMessage } from "../../../stores/ClientChatStore";
|
|
import { Instance } from "mobx-state-tree";
|
|
|
|
export function formatConversationMarkdown(
|
|
messages: Instance<typeof IMessage>[],
|
|
): string {
|
|
return messages
|
|
.map((message) => {
|
|
if (message.role === "user") {
|
|
return `**You**: ${message.content}`;
|
|
} else if (message.role === "assistant") {
|
|
return `**Geoff's AI**: ${message.content}`;
|
|
}
|
|
return "";
|
|
})
|
|
.join("\n\n");
|
|
}
|