diff --git a/src/chatbox.tsx b/src/chatbox.tsx index 2f9a9b1..7a93b0c 100644 --- a/src/chatbox.tsx +++ b/src/chatbox.tsx @@ -14,6 +14,7 @@ import { TemplateAPI, TemplateTools, addTotalCost, + getTotalCost, } from "./app"; import ChatGPT, { calculate_token_length, @@ -34,7 +35,15 @@ import { ListToolsTempaltes } from "./listToolsTemplates"; import { autoHeight } from "./textarea"; import Search from "./search"; import { IDBPDatabase } from "idb"; -import { MagnifyingGlassIcon } from "@heroicons/react/24/outline"; +import { + MagnifyingGlassIcon, + CubeIcon, + BanknotesIcon, + DocumentTextIcon, + ChatBubbleLeftEllipsisIcon, + ScissorsIcon, + SwatchIcon, +} from "@heroicons/react/24/outline"; export interface TemplateChatStore extends ChatStore { name: string; @@ -465,7 +474,7 @@ export default function ChatBOX(props: { /> )}
setShowSettings(true)} > -
- {" "} - {" "} - {chatStore.toolsString.trim() && ( - - )} + -
- {chatStore.model}{" "} - - Tokens:{" "} - - {chatStore.totalTokens}/{chatStore.maxTokens} - - {" "} - - {Tr("Cut")}:{" "} - - {chatStore.postBeginIndex}/ - {chatStore.history.filter(({ hide }) => !hide).length} +
+
+ {" "} + {" "} + {chatStore.toolsString.trim() && ( + + )} +
+
+ {chatStore.model}{" "} + + Tokens:{" "} + + {chatStore.totalTokens}/{chatStore.maxTokens} + {" "} - {" "} - - {Tr("Cost")}:{" "} - ${chatStore.cost.toFixed(4)} - + + {Tr("Cut")}:{" "} + + {chatStore.postBeginIndex}/ + {chatStore.history.filter(({ hide }) => !hide).length} + {" "} + {" "} + + {Tr("Cost")}:{" "} + ${chatStore.cost.toFixed(4)} + +
@@ -730,7 +798,7 @@ export default function ChatBOX(props: {

{chatStore.history.length > 0 && (

diff --git a/src/listToolsTemplates.tsx b/src/listToolsTemplates.tsx index 580208f..6bd4083 100644 --- a/src/listToolsTemplates.tsx +++ b/src/listToolsTemplates.tsx @@ -33,8 +33,8 @@ export function ListToolsTempaltes({
{ chatStore.toolsString = t.toolsString; @@ -42,9 +42,9 @@ export function ListToolsTempaltes({ }} > {t.name} -
- +
diff --git a/src/message.tsx b/src/message.tsx index caa2ebe..5dd7c4b 100644 --- a/src/message.tsx +++ b/src/message.tsx @@ -121,7 +121,9 @@ export default function Message(props: Props) {