Elffuss BraidHub

kikocis/continue public

remove log and fix eslint
Changeset10063232baf3852fd01b1926cee639eb2b945b7f899ea5a5fef3db03ee900b40
Authoruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-10 18:31 +05:30
Committeruinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-09-10 18:31 +05:30
Parents8245094b4ec8

Browse the files at this changeset

1 file changed

modified extensions/cli/src/ui/hooks/useChat.ts +19 −21
@@ -484,7 +484,25 @@
484484 }
485485
486486 // For non-queued messages, format and add to chat history
487- if (!isQueuedMessage) {
487+ if (isQueuedMessage) {
488+ // For queued messages, chat history is already updated
489+ // Check if auto-compacting is needed with current history
490+ const { currentChatHistory, currentCompactionIndex } =
491+ await handleAutoCompaction({
492+ chatHistory,
493+ model,
494+ llmApi,
495+ compactionIndex,
496+ setChatHistory: setChatHistory,
497+ setCompactionIndex,
498+ });
499+
500+ // Execute the streaming response with the current history (which already includes the queued message)
501+ await executeStreamingResponse(
502+ currentChatHistory,
503+ currentCompactionIndex,
504+ );
505+ } else {
488506 // Format message with attached files and images
489507 logger.debug("Processing message with images", {
490508 hasImages: !!(imageMap && imageMap.size > 0),
@@ -516,28 +534,8 @@
516534 const newHistory = [...currentChatHistory, newUserMessage];
517535 setChatHistory(newHistory);
518536
519- logger.debug("debug1 streaming started again");
520-
521537 // Execute the streaming response
522538 await executeStreamingResponse(newHistory, currentCompactionIndex);
523- } else {
524- // For queued messages, chat history is already updated
525- // Check if auto-compacting is needed with current history
526- const { currentChatHistory, currentCompactionIndex } =
527- await handleAutoCompaction({
528- chatHistory,
529- model,
530- llmApi,
531- compactionIndex,
532- setChatHistory: setChatHistory,
533- setCompactionIndex,
534- });
535-
536- // Execute the streaming response with the current history (which already includes the queued message)
537- await executeStreamingResponse(
538- currentChatHistory,
539- currentCompactionIndex,
540- );
541539 }
542540 };
543541