Skip to content

Commit c6e4362

Browse files
committed
Template history
1 parent cf890bd commit c6e4362

File tree

6 files changed

+312
-300
lines changed

6 files changed

+312
-300
lines changed

frontend/src/api/api.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,19 @@ export const historyRead = async (convId: string): Promise<ChatMessage[]> => {
116116
export const historyGenerate = async (
117117
options: ConversationRequest,
118118
abortSignal: AbortSignal,
119-
convId?: string
119+
convId?: string, chatType: ChatType = ChatType.Browse
120120
): Promise<Response> => {
121121
let body
122122
if (convId) {
123123
body = JSON.stringify({
124124
conversation_id: convId,
125-
messages: options.messages
125+
messages: options.messages,
126+
chat_type: chatType
126127
})
127128
} else {
128129
body = JSON.stringify({
129-
messages: options.messages
130+
messages: options.messages,
131+
chat_type: chatType
130132
})
131133
}
132134
const response = await fetch('/history/generate', {

frontend/src/components/ChatHistory/ChatHistoryPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export function ChatHistoryPanel(_props: ChatHistoryPanelProps) {
116116
marginRight: 'auto',
117117
paddingLeft: '20px'
118118
}}>
119-
Chat history
119+
Template history
120120
</Text>
121121
</StackItem>
122122
<Stack verticalAlign="start">
@@ -184,7 +184,7 @@ export function ChatHistoryPanel(_props: ChatHistoryPanelProps) {
184184
</StackItem>
185185
<StackItem>
186186
<Text style={{ alignSelf: 'center', fontWeight: '400', fontSize: 14 }}>
187-
<span>Chat history can't be saved at this time</span>
187+
<span>Template history can't be saved at this time</span>
188188
</Text>
189189
</StackItem>
190190
</Stack>

frontend/src/components/common/Button.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424

2525
.historyButtonRoot {
26-
width: 180px;
26+
width: 220px;
2727
border: 1px solid #d1d1d1;
2828
}
2929

0 commit comments

Comments
 (0)