fix: preserve tool details and prevent repeated history growth
Show bounded operation summaries for Continue, DeepSeek Harness and direct-model tools, retaining input details across incremental updates. Use one canonical workspace path for DeepSeek Host startup and ACP sessions so equivalent Windows paths reuse a working Runtime. Compare persisted subagent tool fields by value, release terminal task caches, and avoid rebuilding caches for duplicate remote events. Upgrade to schema 35 to recompact repeated schema-34 tool blocks while preserving events and provenance. Include regression coverage, validation records and temporary-resource test exclusions. Validation: 4155 tests passed, 66 skipped; typecheck and lint passed. Full desktop real-model validation covered all three tool-summary paths and both Windows path spellings. Storage validation evidence includes local and remote tool workloads and real database upgrade checks. Release note: Tool records now show paths, commands and search details across runtimes. Fix DeepSeek Windows workspace failures and repeated subagent history growth; schema 35 reclaims redundant history data while preserving execution records, and older clients cannot reopen the upgraded database.
This commit is contained in:
@@ -4,7 +4,8 @@ import type { ConversationMessageBlock } from '../../shared/assistant-contracts'
|
||||
import type { AssistantStorageProgress } from '../../shared/assistant-storage-contracts'
|
||||
import {
|
||||
compactSubagentPayload,
|
||||
restoreSubagentPayload
|
||||
restoreSubagentPayload,
|
||||
SUBAGENT_PROGRESS_STORAGE_SCHEMA_VERSION
|
||||
} from './subagent-progress-storage'
|
||||
|
||||
export function upgradeAssistantStorage(
|
||||
@@ -21,7 +22,10 @@ export function upgradeAssistantStorage(
|
||||
const version = database.prepare('PRAGMA user_version').get() as {
|
||||
user_version: number
|
||||
}
|
||||
if (version.user_version < 1 || version.user_version >= 34) return
|
||||
if (
|
||||
version.user_version < 1 ||
|
||||
version.user_version >= SUBAGENT_PROGRESS_STORAGE_SCHEMA_VERSION
|
||||
) return
|
||||
checkCancelled()
|
||||
const progress: AssistantStorageProgress = {
|
||||
stage: 'scanning', processed: 0, total: 0, bytesBefore
|
||||
@@ -65,8 +69,9 @@ export function upgradeAssistantStorage(
|
||||
const compact = compactSubagentPayload(payload, blocks)
|
||||
// Replay mixed old/new rows on retry. Never delete events or provenance.
|
||||
restoreSubagentPayload(payload, blocks)
|
||||
if (compact !== payload) {
|
||||
update.run(JSON.stringify(compact), row.id)
|
||||
const compactJson = JSON.stringify(compact)
|
||||
if (compactJson !== row.payload_json) {
|
||||
update.run(compactJson, row.id)
|
||||
}
|
||||
afterId = row.id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user