Fix bridge compression history handling (#726)
* feat(bridge): refactor compression to use DB history and add structured logging - Extract buildDbHistory() to share message loading between buildCompressedHistory and forceCompressBridgeHistory - forceCompressBridgeHistory now reads from local DB instead of using Python-provided messages, ensuring consistency with api_server path - Pass sessionId to compressor for snapshot-aware compression - Add force_compress flag to bridge chat requests - Add bridgeLogger structured logging for compression lifecycle - Simplify schemas, session-sync, and providers Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix bridge compression history handling --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ const roomInput = ref<InputLikeInstance | null>(null)
|
||||
const compression = ref({
|
||||
triggerTokens: 100000,
|
||||
maxHistoryTokens: 32000,
|
||||
tailMessageCount: 20,
|
||||
tailMessageCount: 10,
|
||||
})
|
||||
|
||||
function generateCode(): string {
|
||||
|
||||
@@ -18,7 +18,7 @@ const showSidebar = ref(window.innerWidth > 768)
|
||||
const showCreateModal = ref(false)
|
||||
const showAddAgentModal = ref(false)
|
||||
const showCompressionModal = ref(false)
|
||||
const compressionConfig = ref({ triggerTokens: 100000, maxHistoryTokens: 32000, tailMessageCount: 20 })
|
||||
const compressionConfig = ref({ triggerTokens: 100000, maxHistoryTokens: 32000, tailMessageCount: 10 })
|
||||
const isCompressing = ref(false)
|
||||
const selectedProfile = ref<string | null>(null)
|
||||
const agentName = ref('')
|
||||
@@ -119,7 +119,7 @@ function handleOpenCompressionConfig() {
|
||||
compressionConfig.value = {
|
||||
triggerTokens: room.triggerTokens ?? 100000,
|
||||
maxHistoryTokens: room.maxHistoryTokens ?? 32000,
|
||||
tailMessageCount: room.tailMessageCount ?? 20,
|
||||
tailMessageCount: room.tailMessageCount ?? 10,
|
||||
}
|
||||
}
|
||||
showCompressionModal.value = true
|
||||
|
||||
Reference in New Issue
Block a user