fix: address feedback
This commit is contained in:
parent
73135ffdc5
commit
49ff60026c
1 changed files with 5 additions and 1 deletions
|
|
@ -494,8 +494,12 @@ export function useChat({
|
|||
]);
|
||||
|
||||
try {
|
||||
if (!llmApi) {
|
||||
throw new Error("LLM API is not available for auto-compaction");
|
||||
}
|
||||
|
||||
// Compact the history WITHOUT the current user message
|
||||
const result = await compactChatHistory(chatHistory, model, llmApi!);
|
||||
const result = await compactChatHistory(chatHistory, model, llmApi);
|
||||
|
||||
// Update local variables immediately
|
||||
currentChatHistory = result.compactedHistory;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue