62e4e57455
- empty-content-recovery: isSqliteBackend() branch delegating to extracted empty-content-recovery-sdk.ts with SDK message scanning - message-builder: sanitizeEmptyMessagesBeforeSummarize now async with SDK path using replaceEmptyTextPartsAsync/injectTextPartAsync - target-token-truncation: truncateUntilTargetTokens now async with SDK path using findToolResultsBySizeFromSDK/truncateToolResultAsync - aggressive-truncation-strategy: passes client to truncateUntilTargetTokens - summarize-retry-strategy: await sanitizeEmptyMessagesBeforeSummarize - client.ts: derive Client from PluginInput['client'] instead of manual defs - executor.test.ts: .mockReturnValue() → .mockResolvedValue() for async fns - storage.test.ts: add await for async truncateUntilTargetTokens
22 lines
480 B
TypeScript
22 lines
480 B
TypeScript
import type { PluginInput } from "@opencode-ai/plugin"
|
|
|
|
export type Client = PluginInput["client"] & {
|
|
session: {
|
|
prompt_async: (opts: {
|
|
path: { id: string }
|
|
body: { parts: Array<{ type: string; text: string }> }
|
|
query: { directory: string }
|
|
}) => Promise<unknown>
|
|
}
|
|
tui: {
|
|
showToast: (opts: {
|
|
body: {
|
|
title: string
|
|
message: string
|
|
variant: string
|
|
duration: number
|
|
}
|
|
}) => Promise<unknown>
|
|
}
|
|
}
|