feat: Add code download functionality

Adds a new "Download Code" button to the code block component, allowing users to download the code displayed for offline use.

This feature enhances user convenience and provides a more versatile experience for exploring and utilizing code snippets.
This commit is contained in:
n4ze3m
2024-10-26 15:37:02 +05:30
parent a2f9002b81
commit 9cc309e9fd
18 changed files with 82 additions and 33 deletions

View File

@@ -8,7 +8,7 @@ import {
systemPromptForNonRagOption
} from "~/services/ollama"
import { type ChatHistory, type Message } from "~/store/option"
import { HumanMessage, SystemMessage } from "@langchain/core/messages"
import { SystemMessage } from "@langchain/core/messages"
import { useStoreMessageOption } from "~/store/option"
import {
deleteChatForEdit,