Skip to content

Commit e6d66a2

Browse files
committed
Simpler stateless chat interface that focuses on document-based assistance
- Replace conversation-based chat system with direct assistant API calls - Remove ConversationList component and related conversation state management - Switch from continueConversation to sendAssistantMessage API endpoint - Track current messages and response IDs instead of full conversations - Remove conversation creation, deletion, and title updating functionality - Simplify UI by removing conversation list toggle and management buttons - Update welcome message to focus on document-based Q&A instead of bipolar treatment - Maintain backward compatibility by keeping Conversation interface export - Remove DOM content extraction and page content tracking - Streamline message handling with direct assistant responses
1 parent ff13ad4 commit e6d66a2

File tree

2 files changed

+156
-243
lines changed

2 files changed

+156
-243
lines changed

frontend/src/api/apiClient.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,20 @@ const updateConversationTitle = async (
267267
}
268268
};
269269

270+
// Assistant API functions
271+
const sendAssistantMessage = async (message: string, previousResponseId?: string) => {
272+
try {
273+
const response = await api.post(`/v1/api/assistant`, {
274+
message,
275+
previous_response_id: previousResponseId,
276+
});
277+
return response.data;
278+
} catch (error) {
279+
console.error("Error(s) during sendAssistantMessage: ", error);
280+
throw error;
281+
}
282+
};
283+
270284
export {
271285
handleSubmitFeedback,
272286
handleSendDrugSummary,
@@ -279,5 +293,6 @@ export {
279293
updateConversationTitle,
280294
handleSendDrugSummaryStream,
281295
handleSendDrugSummaryStreamLegacy,
282-
fetchRiskDataWithSources
296+
fetchRiskDataWithSources,
297+
sendAssistantMessage
283298
};

0 commit comments

Comments
 (0)